moai/moai-beta — pull request #9 by jlytledistinctdev (2011-11-03 22:34:36+00:00)
Title: New Android Host tools and libmoai build

I've set up an entirely new way to interact with the Android host. Instead of dealing with Eclipse, which gives us almost nothing (and has proven to be highly unreliable when building), I've created a host maker script. A user who wishes to create an Android host for their app only needs to run the moai-beta/android/make-host.sh script and pass in their package name (e.g. com.getmoai.samples). The script then builds a libmoai.so that uses their package, and generates a host folder they can use to build to Android devices.

This Android host folder only requires the user to fill out a settings file and the rest is handled by the script. By configuring this settings file, you control how the host is generated. Then, you just execute run.sh and it will dynamically generate a proper host for you, copy one or more Lua folders you've specified and bundle them into specified destination folders on the device, and then configures the host to run a list of Lua files you specify in the settings file, in order. The script uninstalls the app from whatever device you have connected, builds a new package, reinstalls it to the device, launches the app, then stars the Logcat console output filtering for only Moai print outs.

I also completely overhauled the libmoai build scripts, bringing them more in line with standard Android JNI practices and removing redundant header search paths, extraneous library links, etc. I introduce a wildcard directory search to add files for the Moai core classes, so you no longer need to maintain this list manually. I made it build for ARM instead of THUMB. I plan to add support for setting this easily, but for now it's just configured for ARM. Lastly, I made a single script for building libcrypto that works on OSX and Windows.

Once this change is integrated, there will need to be some work done to make the build server refer to the new build files. I'd only suggest taking this pull request if you are willing to spend some time fixing the build in response to this.