X-Git-Url: http://deadsoftware.ru/gitweb?a=blobdiff_plain;f=android%2FREADME;h=3b76d7230422b9f0e47026e67492838e37dbaf85;hb=refs%2Fheads%2Ffbo;hp=af6f4fc1140ddb109e1d7347925963e4f745b3e5;hpb=aa5964216b3e1aacc436a54c870b719bb8a034db;p=d2df-sdl.git diff --git a/android/README b/android/README index af6f4fc..3b76d72 100644 --- a/android/README +++ b/android/README @@ -8,19 +8,20 @@ Building Requirements: * Android SDK build-tools >= 19.1.0; -* Android SDK platforms >= android-19; +* Android SDK platforms >= android-16; * Android NDK >= r16b; * Open JDK >= 8; * FPC >= 3.0.4; -* SDL >= 2.0.7; +* SDL == 2.0.7; * SDL_mixer >= 2.0; -* libenet >= 1.3.13; -* nanoGL. +* libenet >= 1.3.13. -D2DF uses special version of nanoGL ( https://github.com/DeaDDooMER/nanogl ) with some added functions. Build all shared libraries using NDK toolchain and put into directory ./ass/lib/armeabi-v7a/. Also you need to build FPC crosscompiler ( http://wiki.freepascal.org/Android ). +If you want to pack game resources into APK, add it into directory "resources". +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). + Generate keys: ``` keytool -genkey -validity 10000 \ @@ -40,16 +41,10 @@ rm -rf tmp mkdir -p tmp cd ../src/game ppcrossarm \ - -g -gl -dUSE_SDLMIXER -dUSE_NANOGL -O3 \ + -g -gl -dUSE_SDLMIXER -dUSE_GLES1 -O3 \ -Tandroid \ -Cparmv7a \ -Cfvfpv3 \ - -Fi../lib/vampimg \ - -Fi../lib/vampimg/JpegLib \ - -Fi../lib/vampimg/ZLib \ - -Fu../lib/vampimg \ - -Fu../lib/vampimg/JpegLib \ - -Fu../lib/vampimg/ZLib \ -FU../../android/tmp \ -FE../../android/ass/lib/armeabi-v7a \ -Fl../../android/ass/lib/armeabi-v7a \ @@ -60,7 +55,7 @@ ppcrossarm \ Build APK and sign it: ``` rm -rf bin obj gen -mkdir -p bin obj gen +mkdir -p bin obj gen resources aapt package -f -m -S res -J gen -M AndroidManifest.xml -I ${ANDROID_JAR} javac -source 1.6 -target 1.6 -d obj -bootclasspath ${ANDROID_JAR} -sourcepath src `find src -name '*.java'` dx --dex --output=bin/classes.dex obj @@ -70,6 +65,7 @@ aapt package -f \ -J gen \ -I ${ANDROID_JAR} \ -F bin/d2df.unsigned.apk \ + -A resources bin ass jarsigner -sigalg SHA1withRSA -digestalg SHA1 \ -keystore d2df.keystore \ @@ -79,4 +75,4 @@ jarsigner -sigalg SHA1withRSA -digestalg SHA1 \ bin/d2df.unsigned.apk androiddebugkey ``` -Where ${ANDROID_JAR} is path to android.jar file. Typically placed in ~/Android/android-sdk/platforms/android-19/android.jar. +Where ${ANDROID_JAR} is path to android.jar file. Typically placed in ~/Android/android-sdk/platforms/android-16/android.jar.