-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathRecompileAllApps.sh
43 lines (38 loc) · 1.35 KB
/
RecompileAllApps.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#!/bin/sh
KEYSTORE=~/.ssh/android.keystore
ALIAS=pelya
APPS_SKIP="src jooleem_0.1.4 lbreakout2-2.6.1 glxgears"
echo -n "Enter password for keystore at $KEYSTORE alias $ALIAS: "
stty -echo
read PASSWORD
stty echo
echo
# First edit app settings if their format was changed
for APP1 in project/jni/application/*/AppSettings.cfg; do
APP=`echo $APP1 | sed 's@project/jni/application/\([^/]*\)/.*@\1@'`
if echo $APPS_SKIP | grep $APP > /dev/null ; then
continue
fi
rm project/jni/application/src
ln -s $APP project/jni/application/src
echo
echo ===== Settings for $APP =====
./ChangeAppSettings.sh
rm -f $APP.apk
done
for APP1 in project/jni/application/*/AppSettings.cfg; do
APP=`echo $APP1 | sed 's@project/jni/application/\([^/]*\)/.*@\1@'`
if echo $APPS_SKIP | grep $APP > /dev/null ; then
continue
fi
rm -f project/jni/application/src
ln -s $APP project/jni/application/src
rm -rf project/bin/ndk/local/*/libapplication.so project/bin/ndk/local/*/objs/application
rm -rf project/bin/ndk/local/*/libsdl*.so project/bin/ndk/local/*/objs/sdl*
./ChangeAppSettings.sh -a
echo Compiling $APP
OLDPATH="`pwd`"
( cd project && nice -n5 ndk-build -j2 V=1 && ant release && \
jarsigner -verbose -keystore "$KEYSTORE" -storepass "$PASSWORD" bin/DemoActivity-unsigned.apk $ALIAS && \
zipalign 4 bin/DemoActivity-unsigned.apk ../$APP.apk && cd .. ) || exit 1
done