diff --git a/.gitignore b/.gitignore index a7a77eb71..243b8aa55 100644 --- a/.gitignore +++ b/.gitignore @@ -37,6 +37,10 @@ Subsurface.app build* nightly-builds/ mobile-widgets/qml/kirigami +mobile-widgets/3rdparty/ECM/ +mobile-widgets/3rdparty/breeze-icons/ +mobile-widgets/3rdparty/extra-cmake-modules/ +mobile-widgets/3rdparty/kirigami/ packaging/ios/install-root packaging/ios/Info.plist packaging/ios/Qt @@ -44,4 +48,4 @@ packaging/ios/asset_catalog_compiler.Info.plist appdata/subsurface.appdata.xml scripts/docker/android-build-container/android-build-setup.sh scripts/docker/android-build-container/variables.sh - +android-mobile/Roboto-Regular.ttf diff --git a/packaging/android/.gitignore b/packaging/android/.gitignore index d25632a41..ae79a7a1b 100644 --- a/packaging/android/.gitignore +++ b/packaging/android/.gitignore @@ -7,3 +7,4 @@ libzip-*/ libgit2-*/ ndk-*/ sqlite-autoconf-*/ +translation-assets/ diff --git a/packaging/android/qmake-build.sh b/packaging/android/qmake-build.sh index 229f3e0d2..d231c6090 100755 --- a/packaging/android/qmake-build.sh +++ b/packaging/android/qmake-build.sh @@ -402,6 +402,29 @@ fi # now build the Subsurface aab make apk -if [ -n "${OUTPUT_DIR+X}" ] ; then - mv $(find . -name Subsurface-mobile.apk) "$OUTPUT_DIR"/Subsurface-mobile-"$CANONICALVERSION".apk +popd + +APK=$(find . -name Subsurface-mobile.apk) +APK_DIR=$(dirname ${APK}) +APK_FILE=$(basename ${APK}) + +pushd ${APK_DIR} +if [ -n "${KEYSTORE_STRING+X}" ] ; then + # Generate the string to be supplied to the script with 'openssl base64 < subsurface.keystore | tr -d '\n'' + set +x + echo ${KEYSTORE_STRING} | base64 -di > /tmp/subsurface.keystore + set -x + + zip -d ${APK_FILE} 'META-INF/*.SF' 'META-INF/*.RSA' + ${BUILDROOT}/build-tools/29.0.3/zipalign -p 4 ${APK_FILE} $(basename ${APK_FILE} .apk)-aligned.apk + ${BUILDROOT}/build-tools/29.0.3/apksigner sign -ks /tmp/subsurface.keystore -ks-pass pass:nopass -in $(basename ${APK_FILE} .apk)-aligned.apk -out Subsurface-mobile-"${CANONICALVERSION}".apk + + rm /tmp/subsurface.keystore +else + mv ${APK_FILE} Subsurface-mobile-"${CANONICALVERSION}".apk fi + +if [ -n "${OUTPUT_DIR+X}" ] ; then + mv Subsurface-mobile-"${CANONICALVERSION}".apk "${OUTPUT_DIR}"/ +fi +popd