Android build: pass in build nr

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2016-03-05 21:23:27 -08:00
parent a64eef7f82
commit e9e453b009
2 changed files with 8 additions and 2 deletions

View file

@ -2,7 +2,7 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android" <manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.subsurfacedivelog.mobile" package="org.subsurfacedivelog.mobile"
android:installLocation="auto" android:installLocation="auto"
android:versionCode="1" android:versionCode=@BUILD_NR@
android:versionName=@SUBSURFACE_MOBILE_VERSION@ > android:versionName=@SUBSURFACE_MOBILE_VERSION@ >
<application <application

View file

@ -18,6 +18,12 @@ if [ "$1" = "debug" ] || [ "$1" = "Debug" ] ; then
shift shift
fi fi
if [ "$1" = "-buildnr" ] ; then
shift
BUILD_NR="\"$1\""
shift
fi
# Configure where we can find things here # Configure where we can find things here
export ANDROID_NDK_ROOT=$SUBSURFACE_SOURCE/../android-ndk-r10e export ANDROID_NDK_ROOT=$SUBSURFACE_SOURCE/../android-ndk-r10e
@ -352,7 +358,7 @@ sed -i -e "s/-lcrypto//g" CMakeFiles/subsurface-mobile.dir/link.txt
SUBSURFACE_MOBILE_VERSION=$(grep MOBILE_VERSION_STRING ssrf-version.h | awk "{ print \$3 }" ) SUBSURFACE_MOBILE_VERSION=$(grep MOBILE_VERSION_STRING ssrf-version.h | awk "{ print \$3 }" )
rm -rf android-mobile rm -rf android-mobile
cp -a $SUBSURFACE_SOURCE/android-mobile . cp -a $SUBSURFACE_SOURCE/android-mobile .
sed -i -e "s/@SUBSURFACE_MOBILE_VERSION@/$SUBSURFACE_MOBILE_VERSION/" android-mobile/AndroidManifest.xml sed -i -e "s/@SUBSURFACE_MOBILE_VERSION@/$SUBSURFACE_MOBILE_VERSION/;s/@BUILD_NR@/$BUILD_NR/" android-mobile/AndroidManifest.xml
# now build Subsurface and use the rest of the command line arguments # now build Subsurface and use the rest of the command line arguments
make $@ make $@