forked from swissmicros/free42
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build-android
33 lines (29 loc) · 1.05 KB
/
build-android
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
#!/bin/sh -e
# This script builds and packages the Android version.
# If you want to run it under Windows (Cygwin) or Linux, modify the absolute
# paths in ant.properties and local.properties accordingly.
mkdir -p packages
# Build Android version
mkdir android-tmp
cd android-tmp
svn checkout svn://mactv/free42/trunk free42
cd free42/android
VERSION_CODE=`cat version.code`
# VERSION_CODE=`expr $VERSION_CODE + 1`
# echo $VERSION_CODE > version.code
# svn commit -m 'Automatic version.code bump' version.code
sed "s/android:versionCode=\"[^\"]*\"/android:versionCode=\"$VERSION_CODE\"/" < AndroidManifest.xml > TMP
mv TMP AndroidManifest.xml
VERSION_NAME=`cat ../VERSION`
sed "s/android:versionName=\"[^\"]*\"/android:versionName=\"$VERSION_NAME\"/" < AndroidManifest.xml > TMP
mv TMP AndroidManifest.xml
cd jni
sh ./copy-files-release.sh
sh ./build-intel-lib.sh
/opt/android-ndk/ndk-build
cd ..
echo "======== ATTENTION: Possible Password Prompt ========"
ant release
mv bin/Free42Android-release.apk ../../../packages/Free42Android.apk
cd ../../..
rm -rf android-tmp