SuperTux: put a data archive inside the assetpack archive, there's no other way
This commit is contained in:
1
project/jni/application/supertux/.gitignore
vendored
1
project/jni/application/supertux/.gitignore
vendored
@@ -1 +1,2 @@
|
|||||||
/data.zip
|
/data.zip
|
||||||
|
/AndroidData/assetpack
|
||||||
|
|||||||
@@ -1 +0,0 @@
|
|||||||
../supertux/data
|
|
||||||
11
project/jni/application/supertux/AndroidPreBuild.sh
Executable file
11
project/jni/application/supertux/AndroidPreBuild.sh
Executable file
@@ -0,0 +1,11 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
mkdir -p AndroidData/assetpack
|
||||||
|
[ -e AndroidData/assetpack/data.zip ] && exit 0
|
||||||
|
cd supertux/data || exit 1
|
||||||
|
sed 's/@LOGO_FILE@/logo_final.sprite/g' levels/misc/menu.stl.in > levels/misc/menu.stl
|
||||||
|
if [ -e $HOME/.local/share/supertux2/tilecache ]; then
|
||||||
|
mkdir -p tilecache
|
||||||
|
cp -f $HOME/.local/share/supertux2/tilecache/* tilecache/
|
||||||
|
fi
|
||||||
|
zip -r -9 ../../AndroidData/assetpack/data.zip .
|
||||||
@@ -1,28 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
# Set path to your Android keystore and your keystore alias here, or put them in your environment
|
|
||||||
PASS=
|
|
||||||
[ -n "$ANDROID_UPLOAD_KEYSTORE_PASS" ] && PASS="-storepass:env ANDROID_UPLOAD_KEYSTORE_PASS"
|
|
||||||
[ -n "$ANDROID_UPLOAD_KEYSTORE_PASS_FILE" ] && PASS="-storepass:file $ANDROID_UPLOAD_KEYSTORE_PASS_FILE"
|
|
||||||
|
|
||||||
cd ../../../../
|
|
||||||
|
|
||||||
APPNAME=`grep AppName AndroidAppSettings.cfg | sed 's/.*=//' | tr -d '"' | tr " '/" '---'`
|
|
||||||
APPVER=`grep AppVersionName AndroidAppSettings.cfg | sed 's/.*=//' | tr -d '"' | tr " '/" '---'`
|
|
||||||
|
|
||||||
rm -rf supertux-tmp
|
|
||||||
mkdir -p supertux-tmp
|
|
||||||
cd supertux-tmp
|
|
||||||
unzip ../$APPNAME-$APPVER.aab || exit 1
|
|
||||||
rm -rf META-INF
|
|
||||||
mv assetpack/assets/* assetpack/
|
|
||||||
rm ../$APPNAME-$APPVER.aab
|
|
||||||
zip -r ../$APPNAME-$APPVER.aab .
|
|
||||||
cd ..
|
|
||||||
rm -rf supertux-tmp
|
|
||||||
# Sign with the new certificate
|
|
||||||
echo Using keystore $ANDROID_UPLOAD_KEYSTORE_FILE and alias $ANDROID_UPLOAD_KEYSTORE_ALIAS
|
|
||||||
stty -echo
|
|
||||||
jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore $ANDROID_UPLOAD_KEYSTORE_FILE $PASS $APPNAME-$APPVER.aab $ANDROID_UPLOAD_KEYSTORE_ALIAS || exit 1
|
|
||||||
stty echo
|
|
||||||
echo
|
|
||||||
Reference in New Issue
Block a user