SDL: support for AndroidPostBuild.sh script, to customize .apk file after it was generated

This commit is contained in:
Sergii Pylypenko
2016-06-06 19:40:42 +03:00
parent 608c89d692
commit ed2f31189c
4 changed files with 11 additions and 2 deletions

View File

@@ -182,6 +182,11 @@ cd project && env PATH=$NDKBUILDPATH BUILD_NUM_CPUS=$NCPU nice -n19 ndk-build -j
ln -s -f libs lib ; \
zip -u -r bin/MainActivity-release-unsigned.apk lib assets || exit 1 ; \
} || ant release || exit 1 ; \
[ '!' -x jni/application/src/AndroidPostBuild.sh ] || {
cd jni/application/src ; \
./AndroidPostBuild.sh `pwd`/../../../bin/MainActivity-release-unsigned.apk || exit 1 ; \
cd ../../.. ; \
} || exit 1 ; \
jarsigner -tsa http://timestamp.digicert.com -verbose -keystore ~/.android/debug.keystore -storepass android -sigalg MD5withRSA -digestalg SHA1 bin/MainActivity-release-unsigned.apk androiddebugkey || exit 1 ; \
rm -f bin/MainActivity-debug.apk ; \
zipalign 4 bin/MainActivity-release-unsigned.apk bin/MainActivity-debug.apk || exit 1 ; \

View File

@@ -18,7 +18,7 @@ AppVersionName="0.4.0.10"
# If the URL does not contain 'http://' it is treated as file from 'project/jni/application/src/AndroidData' dir -
# these files are put inside .apk package by build system
# You can specify Google Play expansion files in the form 'obb:main.12345' or 'obb:patch.12345' where 12345 is the app version, first associated with the file
AppDataDownloadUrl="!Data files|:data.zip:obb:main.4008|:data.zip:http://sourceforge.net/projects/libsdl-android/files/SuperTux/data-5.zip^!SSL certificates|:ca-certificates.crt:ca-certificates.crt"
AppDataDownloadUrl="!SSL certificates|:ca-certificates.crt:ca-certificates.crt"
# Reset SDL config when updating application to the new version (y) / (n)
ResetSdlConfigForThisVersion=n

View File

@@ -0,0 +1,4 @@
#!/bin/sh
cd supertux/data || exit 1
zip -r -n .png:.ogg:.jpg $1 * || exit 1