4 Doom 2D Forever port for Android 4.0+
9 Tools, files and libraries used for official builds:
10 * Android Platform Tools r21 (adb)
11 * Android Build Tools r21 (dx, aapt)
12 * Android Platform 19 (android.jar)
13 * OpenJDK 8 (javac, jarsigner)
21 Official packages builded for following Android ABIs (fpc options):
22 * armeabi (-CpARMV5TE -CfSOFT -CaEABI -O2) [1]
23 * armeabi-v7a (-CpARMV7A -CfVFPV3_D16 -CaEABI -O2) [1]
24 * arm64-v8a (-CpARMV8 -CfVFP -O2) [2]
25 * mips (-CpMIPS32 -CfMIPS3 -O2) [1][3][not tested]
26 * x86 (-CpPENTIUM4 -CfSSSE3 -O-) [1][4][5]
27 * x86_64 (-CpCOREI -CfSSE42 -O-) [2][4][5][not tested]
29 [1] 32-bit builds linked with Android Platform 14 shared libraries
30 [2] 64-bit builds linked with Android Platform 21 shared libraries
31 [3] FPU instruction set can be incorrect for generic builds
32 [4] CPU instruction set can be incorrect for generic builds
34 Build all shared libraries using NDK toolchain and put into directory ./ass/lib/armeabi-v7a/.
35 Also you need to build FPC crosscompiler ( http://wiki.freepascal.org/Android ).
37 If you want to pack game resources into APK, add it into directory "resources".
38 If you want to play MIDI music, add instruments and timidity.cfg into directory "resources" (you can grab it from https://www.libsdl.org/projects/SDL_mixer/timidity/timidity.tar.gz).
40 Generate your personal keys (only onece):
42 keytool -genkey -validity 10000 \
43 -dname "CN=AndroidDebug, O=Android, C=US" \
44 -keystore d2df.keystore \
47 -alias androiddebugkey \
53 Build D2DF for android armeabi-v7a:
58 ppcrossarm -g -gl -O2 \
59 -Tandroid -CpARMV7A -CfVFPV3_D16 -CaEABI \
60 -dUSE_SDL2 -dUSE_SDLMIXER -dUSE_GLES1 -dUSE_MINIUPNPC -O2 \
61 -FU../../android/tmp \
62 -FE../../android/ass/lib/armeabi-v7a \
63 -Fl../../android/ass/lib/armeabi-v7a \
68 Build APK and sign it (${ANDROID_JAR} are path to android.jar):
71 mkdir -p bin obj gen resources
72 aapt package -f -m -S res -J gen -M AndroidManifest.xml -I ${ANDROID_JAR}
73 javac -source 1.6 -target 1.6 -d obj -bootclasspath ${ANDROID_JAR} -sourcepath src `find src -name '*.java'`
74 dx --dex --output=bin/classes.dex obj
76 -M AndroidManifest.xml \
80 -F bin/d2df.unsigned.apk \
83 jarsigner -sigalg SHA1withRSA -digestalg SHA1 \
84 -keystore d2df.keystore \
87 -signedjar bin/d2df.signed.apk \
88 bin/d2df.unsigned.apk androiddebugkey
91 Install APK on your device via adb:
93 adb install -r bin/d2df.signed.apk