Changes between Version 242 and Version 243 of AndroidPort
- Timestamp:
- Jan 25, 2015, 9:37:18 PM (9 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
AndroidPort
v242 v243 153 153 A window with installable packages should open. In addition to any packages checked by default, make sure '''Android SDK Platform-tools''', and '''Android 4.4.2 (API 19) -> SDK Platform''' are checked and click 'Install packages'. '''Android 4.4.2 (API 19) -> SDK Platform''' is needed only to build the APK, the game will still run on lower API (it needs API-12 or higher). 154 154 155 ~~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.~~156 157 ~~Download the r8-crystax-1 NDK release from [http://www.crystax.net/en/android/ndk this page] to the working directory and then unpack there, e.g.:~~158 159 155 Download the [http://developer.android.com/sdk/ndk/index.html official NDK]. 160 156 {{{ … … 189 185 Download and install [http://www.qt.io/download-open-source Qt SDK] '''for Android'''. Pyrogenesis doesn't depend on Qt, it needs it just to build the engine and create APK. You'll use !QtCreator to manage, build, '''run & debug on Android'' Pyrogenesis. If you are not used with !QtCreator, [http://www.kdab.com/qtcreator here] you can find its reference card. 190 186 191 Finally, download the game sources from ''' a temporary github location''' to any location, e.g.:187 Finally, download the game sources from '''Git''' to any location, e.g.: 192 188 {{{ 193 189 $ git clone https://github.com/bog-dan-ro/0ad.git 194 190 }}} 195 196 197 ~~Finally, download the game sources from SVN to any location, e.g.:~~198 ~~$ svn co http://svn.wildfiregames.com/public/ps/trunk/ ~/android/0ad-game~~199 191 200 192 === Compiling dependencies and game === … … 211 203 212 204 Do not try to start the game if you didn't push the game data (check the next step). 213 214 ~~Build the game like:~~215 ~~cd build/workspaces/~~216 ~~./update-workspaces.sh --gles --android --without-audio --disable-atlas --with-system-mozjs185 --with-system-enet --with-system-nvtt --without-nvtt~~217 218 ~~cd gcc/~~219 ~~TOOLCHAIN=${HOME}/android/toolchain-0ad PKG_CONFIG_LIBDIR=${TOOLCHAIN}/sysroot/usr/local/lib/pkgconfig LDFLAGS="-lSDL2 -L=/usr/local/lib -L../../android/sdl-project/libs/armeabi" INCLUDES="--sysroot=${TOOLCHAIN}/sysroot -I${TOOLCHAIN}/arm-linux-androideabi/include/c++/4.6/arm-linux-androideabi/armv7-a/ -I../../android/sdl-project/jni/SDL/include -isystem=/usr/local/include/boost-1_45" CXX=${TOOLCHAIN}/bin/arm-linux-androideabi-g++ make pyrogenesis -j3 config=debug~~220 221 ~~Then attach a device, and in `build/android/sdl-project/` run "`make push-apk`" and "`make push-so`". Run `/sdcard/0ad.apk` on the device to install.~~222 223 ~~The .apk is basically just the standard SDL android-project, and it loads `/data/local/libpyrogenesis_dbg.so` which contains all the engine code. That means you can recompile and then upload the engine code (via "`make push-so`") on the host PC, and don't have to manually reinstall the app after each change. If you want a non-debug build, remove the "`config=debug`" when building the game, then copy `binaries/system/libpyrogenesis.so` to `libpyrogenesis_dbg.so` before running "`make push-so`".~~224 205 225 206 You need to use the game engine to create `public.zip` and `mod.zip` for data files, since it has to convert all the textures/models/animations/etc into a different format before zipping them up. Build a standard non-Android copy of the game, then run it like … … 245 226 246 227 Then finally, try running/debugging the game using !QtCreator (press Ctrl+R run, F5 debug). 247 248 ~~~Then try running the game, and use "`adb logcat`" to see what fails, and fix it.~~~