aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Anton Lundin <glance@acc.umu.se>2016-06-23 22:56:33 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2016-06-23 16:34:41 -0700
commit7386d0b5b4dbfbc10434a51febd048e564c34408 (patch)
tree45922aedc451fc006909833df9b3ac40fc6bd349
parent4ef90638d4fca7fe6e1123e4bca42a75721e1e94 (diff)
downloadsubsurface-7386d0b5b4dbfbc10434a51febd048e564c34408.tar.gz
android: Set version and build for desktop app
Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r--android/AndroidManifest.xml4
-rw-r--r--packaging/android/build.sh19
2 files changed, 16 insertions, 7 deletions
diff --git a/android/AndroidManifest.xml b/android/AndroidManifest.xml
index 11c87f943..83f93ac4d 100644
--- a/android/AndroidManifest.xml
+++ b/android/AndroidManifest.xml
@@ -2,8 +2,8 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.subsurfacedivelog"
android:installLocation="auto"
- android:versionCode="1"
- android:versionName="1.0" >
+ android:versionCode=@BUILD_NR@
+ android:versionName=@SUBSURFACE_VERSION@ >
<application
android:name="org.qtproject.qt5.android.bindings.QtApplication"
diff --git a/packaging/android/build.sh b/packaging/android/build.sh
index a035d63c0..5c99c7b21 100644
--- a/packaging/android/build.sh
+++ b/packaging/android/build.sh
@@ -363,12 +363,21 @@ sed -i -e "s/-lcrypto//g" CMakeFiles/subsurface-mobile.dir/link.txt
rm -f ssrf-version.h
make version
-SUBSURFACE_MOBILE_VERSION=$(grep MOBILE_VERSION_STRING ssrf-version.h | awk '{ print $3 }' | tr -d \" )
-SUBSURFACE_MOBILE_VERSION="${SUBSURFACE_MOBILE_VERSION} ($(grep CANONICAL_VERSION_STRING ssrf-version.h | awk '{ print $3 }' | tr -d \"))"
-rm -rf android-mobile
-cp -a $SUBSURFACE_SOURCE/android-mobile .
-sed -i -e "s/@SUBSURFACE_MOBILE_VERSION@/\"$SUBSURFACE_MOBILE_VERSION\"/;s/@BUILD_NR@/$BUILD_NR/" android-mobile/AndroidManifest.xml
+if [ ! -z "$SUBSURFACE_MOBILE" ] ; then
+ SUBSURFACE_MOBILE_VERSION=$(grep MOBILE_VERSION_STRING ssrf-version.h | awk '{ print $3 }' | tr -d \" )
+ SUBSURFACE_MOBILE_VERSION="${SUBSURFACE_MOBILE_VERSION} ($(grep CANONICAL_VERSION_STRING ssrf-version.h | awk '{ print $3 }' | tr -d \"))"
+
+ rm -rf android-mobile
+ cp -a $SUBSURFACE_SOURCE/android-mobile .
+ sed -i -e "s/@SUBSURFACE_MOBILE_VERSION@/\"$SUBSURFACE_MOBILE_VERSION\"/;s/@BUILD_NR@/$BUILD_NR/" android-mobile/AndroidManifest.xml
+else
+ SUBSURFACE_VERSION=$(grep CANONICAL_VERSION_STRING ssrf-version.h | awk '{ print $3 }' | tr -d \")
+
+ rm -rf android
+ cp -a $SUBSURFACE_SOURCE/android .
+ sed -i -e "s/@SUBSURFACE_VERSION@/\"$SUBSURFACE_VERSION\"/;s/@BUILD_NR@/$BUILD_NR/" android/AndroidManifest.xml
+fi
# now make the translations
make translations