Changes between Version 201 and Version 202 of AndroidPort


Ignore:
Timestamp:
Feb 6, 2012, 3:54:19 AM (12 years ago)
Author:
Anders Feder
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • AndroidPort

    v201 v202  
    190190}}}
    191191=== Installing dependencies ===
    192 The game has a range of external dependencies. Each of these has to be compiled for the target device's processor architecture and installed in the compiler toolchain's SYSROOT, so we can link against them when building the game itself.
     192The game has a range of external dependencies. Each of these has to be compiled for the target device's processor architecture and installed in the compiler toolchain's sysroot, so we can link against them when building the game itself.
    193193
    194194Download the !MysticTreeGames [https://github.com/MysticTreeGames/Boost-for-Android/tarball/master port of the Boost C++ Libraries] to the working directory and unpack it there, e.g.:
     
    208208$ ./build-android.sh ~/android/android-ndk-r5-crystax-2
    209209}}}
    210 Copy the resulting headers and library files into the `usr` directory in the toolchain's SYSROOT:
     210Copy the resulting headers and library files into the `usr` directory in the toolchain's sysroot:
    211211
    212212{{{
     
    366366$ make install
    367367}}}
    368 !SpiderMonkey.
    369 
    370368FCollada.
     369
     370=== Spidermonkey ===
     371Get [http://ftp.mozilla.org/pub/mozilla.org/mobile/source/android-ndk-r4c-0moz3.tar.bz2 android-ndk-r4c-0moz3].
     372
     373Get js-1.8.5.
     374
     375Get NSPR.
     376
     377First, regenerate configure in the js dir:
     378
     379{{{
     380cd $moz/js/src && autoconf2.13
     381}}}
     382
     383
     384Then create a nspr directory, configure nspr, and build it:
     385
     386{{{
     387cd $out
     388mkdir nspr
     389cd nspr
     390$moz/nsprpub/configure \
     391  --target=arm-android-eabi \
     392  --with-android-ndk=$NDK 
     393make -s
     394}}}
     395
     396
     397Then do the same for JS, telling it where to find the NSPR you just built:
     398
     399{{{
     400cd $out
     401mkdir js
     402cd js
     403$moz/js/src/configure \
     404  --target=arm-android-eabi \
     405  --with-android-ndk=$NDK \
     406  --with-nspr-cflags=-I$out/nspr/dist/include/nspr \
     407  --with-nspr-libs='-L$out/nspr/dist/lib -lnspr4 -lplc4 -lplds4' \
     408  --with-endian=little \
     409  --with-arm-kuser
     410make -s
     411}}}
     412
     413
     414
     415
     416
    371417
    372418=== Building the game ===
    373419The native library (i.e. the actual game) is built using the standard Premake build system as follows.
    374420
    375 ''(Note: You currently need to reset your environment if it is still set up for cross-compiling from the previous section. Close any open terminal windows and open a new one.) '''
     421''(Note: You currently need to reset your environment if it is still set up for cross-compiling from the previous section. Close any open terminal windows and open a new one.) ''
    376422
    377423Download the game from SVN to any location, e.g.: