mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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>
This commit is contained in:
parent
9d1ebffe1f
commit
01d610b383
2 changed files with 10 additions and 13 deletions
|
@ -122,7 +122,7 @@ fi
|
||||||
((BUILDNR++))
|
((BUILDNR++))
|
||||||
echo "${BUILDNR}" > ./buildnr.dat
|
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
|
if [ "$1" = release ] || [ "$1" = Release ] || [ "$1" = debug ] || [ "$1" = Debug ] ; then
|
||||||
RELEASE=$1
|
RELEASE=$1
|
||||||
|
@ -131,14 +131,14 @@ else
|
||||||
RELEASE=Debug
|
RELEASE=Debug
|
||||||
fi
|
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/AndroidManifest.xml
|
||||||
rm -d ./subsurface-mobile-build-arm/bin/AndroidManifest.xml
|
|
||||||
if [ "$USE_X" ] ; then
|
if [ "$USE_X" ] ; then
|
||||||
bash "$USE_X" subsurface/packaging/android/build.sh "$RELEASE" -buildnr "$BUILDNR" arm "$@"
|
bash "$USE_X" subsurface/packaging/android/build.sh "$RELEASE" -buildnr "$BUILDNR" arm "$@"
|
||||||
else
|
else
|
||||||
bash subsurface/packaging/android/build.sh "$RELEASE" -buildnr "$BUILDNR" arm "$@"
|
bash subsurface/packaging/android/build.sh "$RELEASE" -buildnr "$BUILDNR" arm "$@"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
ls -l ./subsurface-mobile-build-arm/bin/*.apk
|
ls -l ./subsurface-mobile-build-arm/build/outputs/apk/*.apk
|
||||||
|
|
||||||
|
|
|
@ -76,6 +76,8 @@ export ANDROID_NDK_ROOT=${ANDROID_NDK_ROOT-$SUBSURFACE_SOURCE/../android-ndk-r13
|
||||||
|
|
||||||
if [ -n "${QT5_ANDROID+X}" ] ; then
|
if [ -n "${QT5_ANDROID+X}" ] ; then
|
||||||
echo "Using Qt5 in $QT5_ANDROID"
|
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
|
elif [ -d "$SUBSURFACE_SOURCE/../Qt/5.8" ] ; then
|
||||||
export QT5_ANDROID=$SUBSURFACE_SOURCE/../Qt/5.8
|
export QT5_ANDROID=$SUBSURFACE_SOURCE/../Qt/5.8
|
||||||
elif [ -d "$SUBSURFACE_SOURCE/../Qt/5.7" ] ; then
|
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
|
elif [ -d "$SUBSURFACE_SOURCE/../Qt/5.5" ] ; then
|
||||||
export QT5_ANDROID=$SUBSURFACE_SOURCE/../Qt/5.5
|
export QT5_ANDROID=$SUBSURFACE_SOURCE/../Qt/5.5
|
||||||
else
|
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
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -342,24 +344,22 @@ if [ ! -z "$SUBSURFACE_MOBILE" ] ; then
|
||||||
mkdir -p subsurface-mobile-build-"$ARCH"
|
mkdir -p subsurface-mobile-build-"$ARCH"
|
||||||
cd subsurface-mobile-build-"$ARCH"
|
cd subsurface-mobile-build-"$ARCH"
|
||||||
MOBILE_CMAKE=-DSUBSURFACE_TARGET_EXECUTABLE=MobileExecutable
|
MOBILE_CMAKE=-DSUBSURFACE_TARGET_EXECUTABLE=MobileExecutable
|
||||||
|
BUILD_NAME=Subsurface-mobile
|
||||||
else
|
else
|
||||||
MOBILE_CMAKE=""
|
MOBILE_CMAKE=""
|
||||||
mkdir -p subsurface-build-"$ARCH"
|
mkdir -p subsurface-build-"$ARCH"
|
||||||
cd subsurface-build-"$ARCH"
|
cd subsurface-build-"$ARCH"
|
||||||
|
BUILD_NAME=Subsurface
|
||||||
fi
|
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
|
if [ "$PLATFORM" = "Darwin" ] ; then
|
||||||
ANT=/usr/local/bin/ant
|
|
||||||
FTDI=OFF
|
FTDI=OFF
|
||||||
else
|
else
|
||||||
ANT=/usr/bin/ant
|
|
||||||
FTDI=ON
|
FTDI=ON
|
||||||
fi
|
fi
|
||||||
|
|
||||||
PKGCONF=$(which pkg-config)
|
PKGCONF=$(which pkg-config)
|
||||||
cmake $MOBILE_CMAKE \
|
cmake $MOBILE_CMAKE \
|
||||||
-DQT_ANDROID_ANT=${ANT} \
|
|
||||||
-DPKG_CONFIG_EXECUTABLE="$PKGCONF" \
|
-DPKG_CONFIG_EXECUTABLE="$PKGCONF" \
|
||||||
-DQT_ANDROID_SDK_ROOT="$ANDROID_SDK_ROOT" \
|
-DQT_ANDROID_SDK_ROOT="$ANDROID_SDK_ROOT" \
|
||||||
-DQT_ANDROID_NDK_ROOT="$ANDROID_NDK_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
|
# now build Subsurface and use the rest of the command line arguments
|
||||||
make "$@"
|
make "$@"
|
||||||
|
|
||||||
#make install INSTALL_ROOT=android_build
|
echo "Done building $BUILD_NAME for Android"
|
||||||
# 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
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue