diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2017-05-27 14:54:28 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2017-05-27 17:41:28 -0700 |
commit | 01d610b383c597e61e5209f5c38b6d6a1c09d12e (patch) | |
tree | b275e1cc895dd03a03fb44b59de21cb9da8ce0c3 /packaging | |
parent | 9d1ebffe1f078c254c09a49dbccff5a2d6d60ad7 (diff) | |
download | subsurface-01d610b383c597e61e5209f5c38b6d6a1c09d12e.tar.gz |
Update Android build scripts
- prepare for Qt 5.9
- remove references to ANT
- adjust to changed location of the resulting apk
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'packaging')
-rw-r--r-- | packaging/android/android-build-wrapper.sh | 8 | ||||
-rwxr-xr-x | packaging/android/build.sh | 15 |
2 files changed, 10 insertions, 13 deletions
diff --git a/packaging/android/android-build-wrapper.sh b/packaging/android/android-build-wrapper.sh index e532c7a21..dcc2ec493 100644 --- a/packaging/android/android-build-wrapper.sh +++ b/packaging/android/android-build-wrapper.sh @@ -122,7 +122,7 @@ fi ((BUILDNR++)) echo "${BUILDNR}" > ./buildnr.dat -echo "Building Subsurface-mobile ${VERSION} for Android, build nr ${BUILDNR} as Subsurface-mobile-$VERSION-${NAME}arm.apk" +echo "Building Subsurface-mobile ${VERSION} for Android, build nr ${BUILDNR} as Subsurface-mobile-${VERSION}-arm.apk" if [ "$1" = release ] || [ "$1" = Release ] || [ "$1" = debug ] || [ "$1" = Debug ] ; then RELEASE=$1 @@ -131,14 +131,14 @@ else RELEASE=Debug fi -rm -f ./subsurface-mobile-build-arm/bin/QtApp-debug.apk +rm -f ./subsurface-mobile-build-arm/build/outputs/apk/*.apk rm -d ./subsurface-mobile-build-arm/AndroidManifest.xml -rm -d ./subsurface-mobile-build-arm/bin/AndroidManifest.xml + if [ "$USE_X" ] ; then bash "$USE_X" subsurface/packaging/android/build.sh "$RELEASE" -buildnr "$BUILDNR" arm "$@" else bash subsurface/packaging/android/build.sh "$RELEASE" -buildnr "$BUILDNR" arm "$@" fi -ls -l ./subsurface-mobile-build-arm/bin/*.apk +ls -l ./subsurface-mobile-build-arm/build/outputs/apk/*.apk diff --git a/packaging/android/build.sh b/packaging/android/build.sh index b22e569bf..23f80c033 100755 --- a/packaging/android/build.sh +++ b/packaging/android/build.sh @@ -76,6 +76,8 @@ export ANDROID_NDK_ROOT=${ANDROID_NDK_ROOT-$SUBSURFACE_SOURCE/../android-ndk-r13 if [ -n "${QT5_ANDROID+X}" ] ; then echo "Using Qt5 in $QT5_ANDROID" +elif [ -d "$SUBSURFACE_SOURCE/../Qt/5.9" ] ; then + export QT5_ANDROID=$SUBSURFACE_SOURCE/../Qt/5.9 elif [ -d "$SUBSURFACE_SOURCE/../Qt/5.8" ] ; then export QT5_ANDROID=$SUBSURFACE_SOURCE/../Qt/5.8 elif [ -d "$SUBSURFACE_SOURCE/../Qt/5.7" ] ; then @@ -85,7 +87,7 @@ elif [ -d "$SUBSURFACE_SOURCE/../Qt/5.6" ] ; then elif [ -d "$SUBSURFACE_SOURCE/../Qt/5.5" ] ; then export QT5_ANDROID=$SUBSURFACE_SOURCE/../Qt/5.5 else - echo "Cannot find Qt 5.7, 5.6 or 5.5 under $SUBSURFACE_SOURCE/../Qt" + echo "Cannot find Qt 5.5 or newer under $SUBSURFACE_SOURCE/../Qt" exit 1 fi @@ -342,24 +344,22 @@ if [ ! -z "$SUBSURFACE_MOBILE" ] ; then mkdir -p subsurface-mobile-build-"$ARCH" cd subsurface-mobile-build-"$ARCH" MOBILE_CMAKE=-DSUBSURFACE_TARGET_EXECUTABLE=MobileExecutable + BUILD_NAME=Subsurface-mobile else MOBILE_CMAKE="" mkdir -p subsurface-build-"$ARCH" cd subsurface-build-"$ARCH" + BUILD_NAME=Subsurface fi -# something in the qt-android-cmake-thingies mangles your path, so thats why we need to hard-code ant and pkg-config here. if [ "$PLATFORM" = "Darwin" ] ; then - ANT=/usr/local/bin/ant FTDI=OFF else - ANT=/usr/bin/ant FTDI=ON fi PKGCONF=$(which pkg-config) cmake $MOBILE_CMAKE \ - -DQT_ANDROID_ANT=${ANT} \ -DPKG_CONFIG_EXECUTABLE="$PKGCONF" \ -DQT_ANDROID_SDK_ROOT="$ANDROID_SDK_ROOT" \ -DQT_ANDROID_NDK_ROOT="$ANDROID_NDK_ROOT" \ @@ -410,7 +410,4 @@ cp -a translations/*.qm assets/translations # now build Subsurface and use the rest of the command line arguments make "$@" -#make install INSTALL_ROOT=android_build -# bug in androiddeployqt? why is it looking for something with the builddir in it? -#ln -fs android-libsubsurface.so-deployment-settings.json android-libsubsurface-build-${ARCH}.so-deployment-settings.json -#$QT5_ANDROID_BIN/androiddeployqt --output android_build +echo "Done building $BUILD_NAME for Android" |