From the output I can see that it is building for 3 different platforms. How does it determine those platforms? I have read here about the architecture tag, but it does no seem to have any effect at all.
lime rebuild rebuilds the Lime binary files for the target platform. This is used when building a native extension (such as lime rebuild my-native-extension android) or using a Lime development build.
I think you want lime build, or probably more helpful, lime test, to build and install the application for testing, so lime test MyProject android
Well, I am actually developing a native extension for android.
On the other hand, you are right, I do not really understand the differences between build
and rebuild commands, as I can’t find much documentation about it. The project that I am working on has a build system that is using lime rebuild (instead of lime build), and as far as I understand, it was initially created according to some old blog post and unfortunately it seems that noone working on the project knows exactly how it works either.
I am already considering if I should start reading the lime-tools source, but it would be helpful if you could explain the system briefly.
For a native extension that requires C++ compilation (sometimes Android uses Java only, which does not require rebuild) the common pattern is to have “project/Build.xml” in the project. This builds out to shared or static library binaries located in an “ndll” directory.
You’ll see this pattern in Lime itself, it has a Build.xml (in development versions) and populates “ndll” for each target platform. We use “CFFI” to reference C++ from Haxe code
“lime rebuild” accepts an XML file path, a folder containing a Build.xml file, or it works with the root of a project containing “project/Build.xml” or the name of a haxelib that contains the same. Skipping this argument implies you want to rebuild Lime itself. For example, you can rebuild HXCPP binaries for Windows using “lime rebuild hxcpp windows”
This is very different than building an OpenFL or Lime project, it’s exclusively for native hand-written code
Thanks for explaining. It seems that I am using it properly then.
But the main source of my confusion was about the list of target platforms it builds for. For example, in my case it ends up building .so files for arm5te, arm7 and x86. What determines that list? Why doesn’t it build for arm64 for example?
Honestly, I don’t know how widely it is used for Android. It definetly exists and NDK seems to support it. According to stackoverflow, many android devices come with emulators, so that they are still able to run arm7.
Yes, you can add <architecture name="arm64" if="android" /> to your project.xml (or the new ~/.lime/config.xml in development builds) to add the architecture, but it may not be supported on Android by the tools yet.
If it is not supported, it would require a little work in the Lime tools, and also confirmation that the Android toolchain XML in HXCPP has the proper values for calling the correct compiler and the correct arguments