| 1 | = Building the Lol Engine for Android platforms = |
| 2 | |
| 3 | == Android SDK == |
| 4 | |
| 5 | * Download the [http://developer.android.com/sdk/index.html SDK], unpack it to ''e.g.'' `~/android/` and optionally run the SDK and AVD manager: `./tools/android` |
| 6 | * Set the following environment variables (make sure the directory names match your versions): |
| 7 | {{{ |
| 8 | #!sh |
| 9 | PATH="$PATH:$HOME/android/android-sdk-linux_86/tools" |
| 10 | PATH="$PATH:$HOME/android/android-sdk-linux_86/platform-tools" |
| 11 | export PATH |
| 12 | }}} |
| 13 | * To run the emulator, run `emulator @foo` where `foo` is the name of the image |
| 14 | |
| 15 | == Android NDK == |
| 16 | |
| 17 | * Download the [http://developer.android.com/sdk/ndk/index.html NDK], unpack it to `~/android/`. |
| 18 | * Set the following environment variables (make sure the directory names match your versions): |
| 19 | {{{ |
| 20 | #!sh |
| 21 | ANDROID_NDK_ROOT="$HOME/android/android-ndk-r9" |
| 22 | ANDROID_NDK_ARM_TOOLCHAIN="$HOME/android/arm-linux-androideabi" |
| 23 | }}} |
| 24 | |
| 25 | * Run the following command: |
| 26 | {{{ |
| 27 | #!sh |
| 28 | $ANDROID_NDK_ROOT/build/tools/make-standalone-toolchain.sh \ |
| 29 | --arch=arm --install-dir=$ANDROID_NDK_ARM_TOOLCHAIN \ |
| 30 | --ndk-dir=$ANDROID_NDK_ROOT --platform=android-14 |
| 31 | }}} |
| 32 | |
| 33 | * Add `$ANDROID_NDK_ARM_TOOLCHAIN/bin` to `PATH`. |
| 34 | |
| 35 | == Autobuilder configuration (build bots only) == |
| 36 | |
| 37 | Add the following section to the bitten machine file: |
| 38 | |
| 39 | {{{ |
| 40 | #!ini |
| 41 | [ndk] |
| 42 | version = 9 |
| 43 | }}} |
| 44 | |
| 45 | == Notes == |
| 46 | |
| 47 | * [http://codemaemo.appforce.org/2010/07/tutorial-using-eclipse-for-ndk-projects/ Using Eclipse for NDK Projects] |
| 48 | * [http://www.slideshare.net/owenhsu/happy-porting-x86-application-to-android-4734253 Happy porting x86 application to android] |
| 49 | * [http://androgeek.info/?p=275 Load png from assets in NDK] |
| 50 | * [http://www.netmite.com/android/mydroid/1.6/development/ndk/docs/ANDROID-MK.TXT Android.mk format] |