ddnet/scripts/make_android.sh

28 lines
1.1 KiB
Bash
Raw Normal View History

2015-07-22 20:49:20 +00:00
# This is how I build DDNet for Android:
2014-07-14 23:19:01 +00:00
# Cloning the building repo with the SDL port for Android by Pelya
cd /media
git clone https://github.com/pelya/commandergenius.git
# Get the most recent DDNet source
cd /media/commandergenius/project/jni/application/teeworlds
2015-07-31 19:19:35 +00:00
rm -rf src master.zip*
2015-08-17 00:25:37 +00:00
wget "https://github.com/ddnet/ddnet/archive/master.zip"
2015-07-31 19:19:35 +00:00
unzip ddnet-master.zip
mv ddnet-master src
2014-07-14 23:19:01 +00:00
mkdir src/src/game/generated
# Also the generated files don't get generated, copy them by hand
cp /media/ddrace/src/game/generated/* src/src/game/generated
rm -rf AndroidData
./AndroidPreBuild.sh
# Actual compilation, needs a key to sign
cd /media/commandergenius
2015-09-03 09:50:40 +00:00
ln -s teeworlds project/jni/application/src
2014-07-14 23:19:01 +00:00
./changeAppSettings.sh -a
android update project -p project
./build.sh
jarsigner -verbose -keystore ~/.android/release.keystore -storepass MYSECRETPASS -sigalg MD5withRSA -digestalg SHA1 project/bin/MainActivity-release-unsigned.apk androidreleasekey
zipalign 4 project/bin/MainActivity-release-unsigned.apk project/bin/MainActivity-release.apk
scp project/bin/MainActivity-release.apk ddnet:/var/www/downloads/DDNet-$VERSION.apk