Changes between Version 232 and Version 233 of AndroidPort
- Timestamp:
- Feb 15, 2012, 10:55:44 AM (12 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
AndroidPort
v232 v233 163 163 Google publishes a [http://developer.android.com/sdk/ndk/index.html Native Development Kit] (NDK), which is a set of tools for building native applications for the Android platform. Unfortunately, the official NDK does not and will not support the `std::wstring` (wide characters) datatype, which is required by the game, so we'll have to use the unofficial [http://www.crystax.net/android/ndk.php Crystax NDK]. This is merely an extension of the official NDK, adding support for wide characters and other features maligned by Google. 164 164 165 Currently, the port of the Boost C++ Libraries that we use require us to use the !r5 version of the NDK. Download the package from [http://www.crystax.net/da/android/ndk/5 this page]to the working directory and then unpack there, e.g.:166 167 {{{ 168 $ cd ~/android 169 $ tar -xvf android-ndk-r 5-crystax-2-linux-x86.tar.bz2165 Download the latest release from [http://www.crystax.net/en/android/ndk this page] to the working directory and then unpack there, e.g.: 166 167 {{{ 168 $ cd ~/android 169 $ tar -xvf android-ndk-r7-crystax-4-linux-x86.tar.bz2 170 170 }}} 171 171 Now use the NDK to set up a standalone toolchain: 172 172 173 173 {{{ 174 $ ~/android/android-ndk-r 5-crystax-2/build/tools/make-standalone-toolchain.sh --platform=android-9 --install-dir=$HOME/android/toolchain174 $ ~/android/android-ndk-r7-crystax-4/build/tools/make-standalone-toolchain.sh --platform=android-9 --install-dir=$HOME/android/toolchain 175 175 }}} 176 176 You also must install a Java Development Kit (JDK) if you haven't already, e.g. [https://apps.ubuntu.com/cat/applications/oneiric/default-jdk/ the standard JDK from Ubuntu Software Center]: … … 201 201 {{{ 202 202 $ SDK=$HOME/android/android-sdk-linux/ 203 $ NDK=$HOME/android/android-ndk-r 5-crystax-2203 $ NDK=$HOME/android/android-ndk-r7-crystax-4 204 204 $ TOOLCHAIN=$HOME/android/toolchain 205 205 $ SYSROOT=$TOOLCHAIN/sysroot … … 217 217 $ cd MysticTreeGames-Boost-for-Android-70838fc 218 218 }}} 219 Apply [http://www.wildfiregames.com/forum/index.php?showtopic=15436&view=findpost&p=234163 this patch] somehow. 220 219 221 Then execute the following command to download the Boost C++ Libraries package and compile it for the target device: 220 222 221 223 {{{ 222 $ ./build-android.sh $ NDK224 $ ./build-android.sh $TOOLCHAIN 223 225 }}} 224 226 Copy the resulting headers and library files into the `usr` directory in the toolchain's sysroot: … … 227 229 $ cp -r build/* $SYSROOT/usr/ 228 230 }}} 231 Fix some weird path issue: 232 233 {{{ 234 $ mv $SYSROOT/usr/include/boost-1_45/boost $SYSROOT/usr/include 235 }}} 236 237 229 238 Spidermonkey is designed to build against an older version of the NDK than that of our main compiler toolchain. Download [http://ftp.mozilla.org/pub/mozilla.org/mobile/source/android-ndk-r4c-0moz3.tar.bz2 Mozilla's own toolchain] to the working directory and then unpack it there, e.g.: 230 239 … … 272 281 $ make install 273 282 }}} 274 Set up the environment for cross-compiling using the standalone toolchain: 283 Finally, hand-edit the mozjs185.pc file to remove the requirement for NSPR somehow. 284 285 Set up the environment for cross-compiling using the main standalone toolchain: 275 286 276 287 {{{