aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordhewg2011-04-09 18:37:06 +0200
committerdhewg2011-04-09 18:40:04 +0200
commitb0351e1b85a550ec4f2422d4439e5ce17150f5a3 (patch)
tree06805f883370ee3d7d597923d5b2038908326cc6
parent90f47c7b1d9725c13d972a0e2a61b2cd966bbab5 (diff)
downloadscummvm-rg350-b0351e1b85a550ec4f2422d4439e5ce17150f5a3.tar.gz
scummvm-rg350-b0351e1b85a550ec4f2422d4439e5ce17150f5a3.tar.bz2
scummvm-rg350-b0351e1b85a550ec4f2422d4439e5ce17150f5a3.zip
ANDROID: Automate the Manifest's versionCode
-rw-r--r--backends/platform/android/android.mk8
-rw-r--r--dists/android/AndroidManifest.xml2
-rw-r--r--dists/android/AndroidManifest.xml.in2
3 files changed, 8 insertions, 4 deletions
diff --git a/backends/platform/android/android.mk b/backends/platform/android/android.mk
index fdb0f8096a..7cf6587cc0 100644
--- a/backends/platform/android/android.mk
+++ b/backends/platform/android/android.mk
@@ -1,7 +1,7 @@
# Android specific build targets
# These must be incremented for each market upload
-#ANDROID_VERSIONCODE = 6 Specified in dists/android/AndroidManifest.xml.in
+ANDROID_VERSIONCODE = 6
ANDROID_PLUGIN_VERSIONCODE = 6
JAVA_FILES = \
@@ -72,7 +72,8 @@ PATH_GEN = $(PATH_GEN_TOP)/$(PATH_REL)
PATH_CLASSES_MAIN = $(PATH_BUILD_CLASSES_MAIN_TOP)/$(PATH_REL)
PATH_CLASSES_PLUGIN = $(PATH_BUILD_CLASSES_PLUGIN_TOP)/$(PATH_REL)
-FILE_MANIFEST = $(srcdir)/dists/android/AndroidManifest.xml
+FILE_MANIFEST_SRC = $(srcdir)/dists/android/AndroidManifest.xml
+FILE_MANIFEST = $(PATH_BUILD)/AndroidManifest.xml
FILE_DEX = $(PATH_BUILD)/classes.dex
FILE_DEX_PLUGIN = $(PATH_BUILD)/plugins/classes.dex
FILE_RESOURCES = resources.ap_
@@ -87,6 +88,9 @@ CLASSES_PLUGIN = $(addprefix $(PATH_CLASSES_PLUGIN)/, $(JAVA_FILES_PLUGIN:%.java
APK_MAIN = scummvm.apk
APK_PLUGINS = $(patsubst plugins/lib%.so, scummvm-engine-%.apk, $(PLUGINS))
+$(FILE_MANIFEST): $(FILE_MANIFEST_SRC)
+ sed "s/@ANDROID_VERSIONCODE@/$(ANDROID_VERSIONCODE)/" < $< > $@
+
$(SRC_GEN): $(FILE_MANIFEST) $(filter %.xml,$(RESOURCES)) $(ANDROID_JAR8)
@$(MKDIR) -p $(PATH_GEN_TOP)
$(AAPT) package -m -J $(PATH_GEN_TOP) -M $< -S $(PATH_RESOURCES) -I $(ANDROID_JAR8)
diff --git a/dists/android/AndroidManifest.xml b/dists/android/AndroidManifest.xml
index 68c58d9aea..cae1f369e7 100644
--- a/dists/android/AndroidManifest.xml
+++ b/dists/android/AndroidManifest.xml
@@ -3,7 +3,7 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.inodes.gus.scummvm"
- android:versionCode="6"
+ android:versionCode="@ANDROID_VERSIONCODE@"
android:versionName="1.3.0git"
android:installLocation="preferExternal">
diff --git a/dists/android/AndroidManifest.xml.in b/dists/android/AndroidManifest.xml.in
index 7a75b6fd0b..a8d40bdddc 100644
--- a/dists/android/AndroidManifest.xml.in
+++ b/dists/android/AndroidManifest.xml.in
@@ -3,7 +3,7 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.inodes.gus.scummvm"
- android:versionCode="6"
+ android:versionCode="@ANDROID_VERSIONCODE@"
android:versionName="@VERSION@"
android:installLocation="preferExternal">