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
This commit is contained in:
Jan Holesovsky
2015-01-22 08:35:40 +01:00
committed by Miklos Vajna
parent 2d584cb7cc
commit ae924ed3d0
4 changed files with 13 additions and 14 deletions

View File

@@ -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

View File

@@ -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)

View File

@@ -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" />

View File

@@ -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