summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@collabora.com>2015-01-22 08:35:40 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2015-01-26 10:27:43 +0100
commitae924ed3d0a3a9b4f8438c4f1187d8378777bf92 (patch)
tree060ade2c414c020839cd6ac196fd38980aa81aef
parent2d584cb7cc5c5b14d3e158690fb30cd2866ab7c5 (diff)
android: Rename 'make sign' to 'make release-apk'.
This now also allows to specify the version number; now you want to use: cd android/ make versionCode=<previous_version_num+1> key=<key_name> release-apk Change-Id: I078e8dbbe671969fc3b228ac987cdb9a4a53b281
-rw-r--r--android/Bootstrap/Makefile.shared6
-rw-r--r--android/Makefile5
-rw-r--r--android/experimental/LOAndroid3/AndroidManifest.xml.in6
-rw-r--r--configure.ac10
4 files changed, 13 insertions, 14 deletions
diff --git a/android/Bootstrap/Makefile.shared b/android/Bootstrap/Makefile.shared
index fd48132a4c4e..64efa932ba66 100644
--- a/android/Bootstrap/Makefile.shared
+++ b/android/Bootstrap/Makefile.shared
@@ -182,7 +182,11 @@ copy-stuff:
echo 'BuildVersion=' >> assets/program/versionrc
echo 'buildid=$(shell cd $(SRCDIR) && git log -1 --format=%H)' >> assets/program/versionrc
echo 'ReferenceOOoMajorMinor=4.1' >> assets/program/versionrc
- sed -i 's|android:versionName=".*"|android:versionName="$(LIBO_VERSION_MAJOR).$(LIBO_VERSION_MINOR).$(LIBO_VERSION_MICRO).$(LIBO_VERSION_PATCH)$(LIBO_VERSION_SUFFIX)$(LIBO_VERSION_SUFFIX_SUFFIX)/$(shell cd $(SRCDIR) && git log -1 --format=%H)/$(OOO_VENDOR)"|' AndroidManifest.xml
+ sed -e 's|@ANDROID_DEBUGGABLE@|$(if $(ENABLE_DEBUG),android:debuggable="true",)|' \
+ -e 's|@ANDROID_INSTALL_LOCATION@|$(if $(ENABLE_DEBUG),internalOnly,preferExternal)|' \
+ -e 's|@ANDROID_VERSION_NAME@|$(LIBO_VERSION_MAJOR).$(LIBO_VERSION_MINOR).$(LIBO_VERSION_MICRO).$(LIBO_VERSION_PATCH)$(LIBO_VERSION_SUFFIX)$(LIBO_VERSION_SUFFIX_SUFFIX)/$(shell cd $(SRCDIR) && git log -1 --format=%h)/$(OOO_VENDOR)|' \
+ -e 's|@ANDROID_VERSION_NUMBER@|$(if $(versionCode),$(versionCode),1)|' \
+ < AndroidManifest.xml.in > AndroidManifest.xml
#
# .res files
mkdir -p assets/program/resource
diff --git a/android/Makefile b/android/Makefile
index 8a2bdbd5475a..644d0e6e1638 100644
--- a/android/Makefile
+++ b/android/Makefile
@@ -13,8 +13,11 @@ include $(module_directory)/../solenv/gbuild/partial_build.mk
.PHONY: sign
SIGNED_APK := $(BUILDDIR)/android/experimental/LOAndroid3/bin/LibreOfficeViewer.apk
+RELEASE_APK_USAGE := echo; echo "Usage: make versionCode=<version_num+1> key=<key_name> release-apk"
-sign: build
+release-apk: build
+ @if test -z "$(versionCode)" ; then $(RELEASE_APK_USAGE) ; exit 1 ; fi
+ @if test -z "$(key)" ; then $(RELEASE_APK_USAGE) ; exit 1 ; fi
rm -f $(SIGNED_APK)
jarsigner --verbose -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore ~/.keystore $(BUILDDIR)/android/experimental/LOAndroid3/bin/LibreOfficeViewer-release-unsigned.apk $(key)
$(ANDROID_SDK_HOME)/build-tools/*/zipalign -v 4 $(BUILDDIR)/android/experimental/LOAndroid3/bin/LibreOfficeViewer-release-unsigned.apk $(SIGNED_APK)
diff --git a/android/experimental/LOAndroid3/AndroidManifest.xml.in b/android/experimental/LOAndroid3/AndroidManifest.xml.in
index ac2c8af2a530..3a17f6297e07 100644
--- a/android/experimental/LOAndroid3/AndroidManifest.xml.in
+++ b/android/experimental/LOAndroid3/AndroidManifest.xml.in
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.libreoffice"
- @ANDROID_INSTALL_LOCATION@
- android:versionCode="1"
- android:versionName="@ANDROID_VERSION@">
+ android:installLocation="@ANDROID_INSTALL_LOCATION@"
+ android:versionCode="@ANDROID_VERSION_NUMBER@"
+ android:versionName="@ANDROID_VERSION_NAME@">
<!-- App requires OpenGL ES 2.0 -->
<uses-feature android:glEsVersion="0x00020000" android:required="true" />
diff --git a/configure.ac b/configure.ac
index 8ae285280676..484de1336c38 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3789,8 +3789,6 @@ fi
if test -n "$ENABLE_DBGUTIL" -o \( -n "$enable_debug" -a "$enable_debug" != "no" \) ; then
ENABLE_DEBUG="TRUE"
- ANDROID_DEBUGGABLE='android:debuggable="true"'
- ANDROID_INSTALL_LOCATION='android:installLocation="internalOnly"'
if test -n "$ENABLE_DBGUTIL" ; then
AC_MSG_RESULT([yes (dbgutil)])
else
@@ -3798,13 +3796,9 @@ if test -n "$ENABLE_DBGUTIL" -o \( -n "$enable_debug" -a "$enable_debug" != "no"
fi
else
ENABLE_DEBUG=""
- ANDROID_DEBUGGABLE=""
- ANDROID_INSTALL_LOCATION='android:installLocation="preferExternal"'
AC_MSG_RESULT([no])
fi
AC_SUBST(ENABLE_DEBUG)
-AC_SUBST(ANDROID_DEBUGGABLE)
-AC_SUBST(ANDROID_INSTALL_LOCATION)
if test "$enable_sal_log" = yes; then
ENABLE_SAL_LOG=TRUE
@@ -4420,7 +4414,6 @@ if test "$cross_compiling" = "yes"; then
bin/get_config_variables \
solenv/bin/getcompver.awk \
solenv/inc/langlist.mk \
- android/experimental/LOAndroid3/AndroidManifest.xml.in \
config_host.mk.in \
Makefile.in \
lo.xcent.in \
@@ -12795,8 +12788,7 @@ if test -f config_host.mk; then
config_md5=`$MD5SUM config_host.mk | sed "s/ .*//"`
fi
-AC_CONFIG_FILES([android/experimental/LOAndroid3/AndroidManifest.xml
- config_host.mk
+AC_CONFIG_FILES([config_host.mk
Makefile
lo.xcent
instsetoo_native/util/openoffice.lst