However, I currently seem to be stuck as the binary including 64-bit is not generated for legacy builds.
Is this correct? Or is legacy support for 64-bit also supposed to work?
I created a very simple Haxeui V1 project for testing purposes:
This builds and generates a basic APK.
I can also set openfl from 3.6.1. to 8.9.1 without problems.
Setting hxcpp from 4.0.4 to 4.0.8 or higher does not build: Error: Source path “C:\Trunk\dev\HaxeToolkit\haxe\lib\hxcpp/4,0,19/bin/Android/libstd-v7.so” does not exist.
Setting lime from 2.9.1 to 7.5.0 builds and generates the APK with 64-bit support. But it causes a crash: Could not load module lime-legacy@lime_legacy_byte_array_init__4
You should be able to port to newer OpenFL using the drawQuads API (if you were relying on drawTiles)
That would be one approach.
The other would be to use the Lime “legacy” branch on Github and try and back-port 64-bit support. That would require updates to the older tools and to the Build.xml under the legacy folder as well
(You can ignore iOS-related changes in this search)
I would accept pull requests to the legacy Lime branch if you do make these changes, or happy to work with you if you’re seeing problems moving to newer OpenFL versions
Hi!
Is there any particular reason you are still using haxeui v1? I mean, its verrrry old and doesnt get updated at all… Is there some issue migrating to v2 that is blocking you? I would certainly suggest moving to v2 if at all possible
as far as I know Haxeui V2 hasn’t been officially released yet, and the last thing I heard was the dev branch not working for Android releases. Currently Haxelib lists 1.8.21 as the latest version.
Am I wrong? Should I switch to the dev branch?
Is there a document for migrating code to V2 somewhere?
Right… Yeah, there isnt a haxelib (recent) release yet… Also, its not “haxeui” (in haxelib) anymore… its “haxeui-core” and then various “backends”:
haxeui-android (native / wip)
haxeui-flixel
haxeui-heaps (incomplete)
haxeui-html5
haxeui-hxwidgets (native)
haxeui-kha
haxeui-nme
haxeui-openfl <------ this is probably the one you want
haxeui-pdcurses
haxeui-pixijs
haxeui-qt (native / wip)
haxeui-winforms (native)
If you wanted to evaluate them before the haxelib release (which i hope to be soon!) you’ll have to grab core + backend from github: https://github.com/haxeui
There should be general instructions there, but let me know if something isnt clear / doesnt work.
As for migration… … … im hoping it shouldnt be too harsh… especially if you’ve used xml layouts… but its hard to know without seeing the application.
Let me know if you need a hand or something breaks… Also, fyi, there is a forum here: https://community.haxeui.org/ (which may help and might be a good place to post issues) and there is a #haxeui room in the haxe discord.
It should do, yes, i havent actually tested that in a while (for haxeui-openfl)… but it should, yeah. Ill retest also when i get some time, but let me know if there are issues.
So I migrated a bunch of code and that works for the most part. However, I have some other apps that are not yet migrated, and do not absolutely need to be, but I do want to make some small changes and I’m running into errors.
I did update everything from legacy to the most recent libs etc. But I did set all the haxelibs back to the legacy versions. A rather unclear error I get is:
Called from ? line 1
Called from CommandLineTools.hx line 1400
Called from CommandLineTools.hx line 25
Called from CommandLineTools.hx line 126
Called from CommandLineTools.hx line 562
Called from lime/tools/platforms/AndroidPlatform.hx line 25
Called from lime/tools/platforms/AndroidPlatform.hx line 37
Called from lime/project/HXProject.hx line 244
Called from lime/project/ConfigData.hx line 35
Called from lime/tools/helpers/ObjectHelper.hx line 127
Called from lime/tools/helpers/ObjectHelper.hx line 127
Called from lime/tools/helpers/ObjectHelper.hx line 127
Called from lime/tools/helpers/ObjectHelper.hx line 76
Called from C:\trunk\dev\Haxetoolkit\haxe\std/neko/_std/Array.hx line 118
Uncaught exception - Invalid operation (+)
Build halted with errors.
I’ve seen this error pop up more often on the web, and usually this is something related to the setup. The fix is usually reinstalling or running “lime rebuild tools”. I’m not going to reinstall since I need my current setup to work on the up to date 64-bit apps. And the above error actually shows up after “lime rebuild tools”. Before that the build ran for a while and java complained about a couple of duplicate classes like HaxeObject.
The above error occurs pretty much immediately and I know this error occurs while the HXProject and its ConfigData are being cloned. I don’t know why that fails and it seems this should “just work”.
I did install haxe 4.0.0rc3 and haxe 3.4.7. multiple times while I was trying to get the modern 64-bit stuff working. In the end I remained on haxe 3.4.7.
Could it be the hxproject is cached somewhere? I know there is a cache-issue in my up-to-date modern gradle build of another project where the .build file gets ignored until I rename the project folder… But legacy uses ant instead of gradle right?
While trying to narrow down the problem I was fiddling with a reduced project.xml and noticed having one android permission was ok, but more than one resulted in the build error above. Pretty sure that’s not actually pointing to the issue though…
Any suggestions as to what the problem is? How to fix this error without reinstalling?
Actually the change did work, I was messing around with different versions of lime and haxelib etc. and I ended up applying the fix in the wrong lime version.
I did run into other issues afterwards, and for some reason my lime 2.9.1 build currently tries to create 64 bit libs and it goes horribly wrong etc. I also tried “openfl rebuild hxcpp android”, that may be the cause. But I can get this to work with lime 2.9.0. And hopefully this was the last time I have to deal with legacy.
Thanks for pointing me to the fix!
------------- old comment ----------
I made the changes locally but unfortunately the same error occurs.
But code changes shouldn’t be needed right?
This old app was building just fine in legacy before.
Then I updated the haxelibs, rebuild lime tools, migrated another app to be 64-bit haxeui v2.
Then I set the haxelib versions back to legacy, rebuild lime tools and now it no longer builds.
I’m guessing something did not get changed back…