Changes between Version 136 and Version 137 of AndroidPort


Ignore:
Timestamp:
Jan 22, 2012, 9:50:15 AM (12 years ago)
Author:
Anders Feder
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • AndroidPort

    v136 v137  
    160160$ tar -xvf android-ndk-r7-crystax-4-linux-x86.tar.bz2
    161161}}}
     162
     163Now use the NDK to set up a standalone toolchain:
     164
     165{{{
     166$ ~/android/android-ndk-r7-crystax-4/build/tools/make-standalone-toolchain.sh --platform=android-14 --install-dir=$HOME/android/toolchain
     167}}}
     168
    162169You 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]:
    163170
     
    194201$ mv SDL-1.3.0-6172/ ~/android/0ad/jni/SDL
    195202}}}
     203
     204=== Installing replacement libraries ===
     205Download the following libraries to the working directory and then unpack them there:
     206
     207 * [http://www.boost.org/users/download/#live Boost] (latest version)
     208 * [https://developer.mozilla.org/en/SpiderMonkey/1.8.5 SpiderMonkey] (1.8.5)
     209
     210Move the source code directory of each library into the `~/android/toolchain/sysroot/usr/include/` directory, e.g.:
     211
     212{{{
     213$ cd ~/android
     214$ mkdir 0ad/jni/lib
     215$ mv boost_1_48_0/boost ~/android/toolchain/sysroot/usr/include/boost
     216$ mv js-1.8.5/js/src ~/android/toolchain/sysroot/usr/include/js
     217}}}
     218Also copy the SDL source code into the directory:
     219
     220{{{
     221$ cp -r ~/android/0ad/jni/SDL/src ~/android/toolchain/sysroot/usr/include/SDL
     222}}}
     223
     224Now we must build SpiderMonkey. Change directory to the SpiderMonkey source code directory, e.g.:
     225
     226{{{
     227$ cd ~/android/0ad/jni/lib/js
     228}}}
     229Then execute the following commands to compile SpiderMonkey as a static library:
     230
     231{{{
     232$ ./configure --disable-shared-js
     233$ make
     234}}}
     235
    196236=== Building the application ===
    197237The native library (i.e. the actual game) is built using the standard Premake build system as follows.
    198238
    199 First install a standalone toolchain:
    200 
    201 {{{
    202 $ ~/android/android-ndk-r7-crystax-4/build/tools/make-standalone-toolchain.sh --platform=android-14 --install-dir=$HOME/android/toolchain
    203 }}}
    204 Set up external libraries with the new toolchain somehow, or do an ugly hack that will at least let it start compiling enough for now:
    205 
    206 {{{
    207 $ ln -s /usr/include/boost ~/android/toolchain/sysroot/usr/include/
    208 $ ln -s /usr/include/iconv.h ~/android/toolchain/sysroot/usr/include/
    209 }}}
    210239Download the game from SVN to any location, as normal.
    211240