diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2020-12-29 17:35:06 -0800 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2020-12-30 08:57:12 -0800 |
commit | 4ebd8485f480bbbb78029556c5e032333c3d6311 (patch) | |
tree | 13a521b70c348eff3258b372a76f0e00e9a9d03b /packaging | |
parent | 8cbde0829d209fa2f27d07e0ad875fd938b8e1f3 (diff) | |
download | subsurface-4ebd8485f480bbbb78029556c5e032333c3d6311.tar.gz |
cleanup: remove obsolete Android scripts
These have all been replaced with the current qmake based build process.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'packaging')
-rwxr-xr-x | packaging/android/android-build-wrapper.sh | 186 | ||||
-rwxr-xr-x | packaging/android/build.sh | 428 | ||||
-rw-r--r-- | packaging/android/qt-installer-noninteractive.qs | 61 | ||||
-rw-r--r-- | packaging/android/warning-ndk18b.txt | 21 |
4 files changed, 0 insertions, 696 deletions
diff --git a/packaging/android/android-build-wrapper.sh b/packaging/android/android-build-wrapper.sh deleted file mode 100755 index 86df1aa68..000000000 --- a/packaging/android/android-build-wrapper.sh +++ /dev/null @@ -1,186 +0,0 @@ -#!/bin/bash -eu - -# THIS IS OBSOLETE AN ONLY WORKS UP TO Qt 5.13 -# for now keeping it around for reference - - - -# run this in the top level folder you want to create Android binaries in -# -# it seems that with Qt5.7 (and later) and current cmake there is an odd bug where -# cmake fails reporting :No known features for CXX compiler "GNU". In that -# case simly comment out the "set(property(TARGET Qt5::Core PROPERTY...)" -# at line 101 of -# Qt/5.7/android_armv7/lib/cmake/Qt5Core/Qt5CoreConfigExtras.cmake -# or at line 95 of -# Qt/5.8/android_armv7/lib/cmake/Qt5Core/Qt5CoreConfigExtras.cmake -# or at line 105 of -# Qt/5.9/android_armv7/lib/cmake/Qt5Core/Qt5CoreConfigExtras.cmake -# (this script tries to do this automatically) - -exec 1> >(tee ./build.log) 2>&1 - -USE_X=$(case $- in *x*) echo "-x" ;; esac) -QUICK="" -RELEASE="" - -# deal with the command line arguments -while [[ $# -gt 0 ]] ; do - arg="$1" - case $arg in - -prep-only) - # only download the dependencies, don't build - PREP_ONLY="1" - ;; - -quick) - # pass through to build.sh - QUICK="-quick" - ;; - release|Release) - # pass through to build.sh - RELEASE="release" - ;; - *) - echo "Unknown command line argument $arg" - echo "Usage: $0 [-prep-only]" - exit 1 - ;; - esac - shift -done - -# these are the current versions for Qt, Android SDK & NDK: -SCRIPTDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" > /dev/null && pwd )" -source "$SCRIPTDIR"/variables.sh - -PLATFORM=$(uname) - -export SUBSURFACE_SOURCE="$SCRIPTDIR"/../.. - -if [ "$PLATFORM" = Linux ] ; then - NDK_BINARIES=${ANDROID_NDK}-linux-x86_64.zip - SDK_TOOLS=sdk-tools-linux-${SDK_VERSION}.zip -else - echo "only on Linux so far" - exit 1 -fi - -# make sure we have the required commands installed -MISSING= -for i in git cmake autoconf libtool java wget unzip; do - command -v $i >/dev/null || - if [ $i = libtool ] ; then - MISSING="${MISSING}libtool-bin " - elif [ $i = java ] ; then - MISSING="${MISSING}openjdk-8-jdk " - else - MISSING="${MISSING}${i} " - fi -done -if [ "$MISSING" ] ; then - echo "The following packages are missing: $MISSING" - echo "Please install via your package manager." - exit 1 -fi - -# first we need to get the Android SDK and NDK -if [ ! -d "$ANDROID_NDK" ] ; then - if [ ! -f "$NDK_BINARIES" ] ; then - wget -q https://dl.google.com/android/repository/"$NDK_BINARIES" - fi - unzip -q "$NDK_BINARIES" -fi - -if [ ! -e ndk-"$ARCH" ] ; then - "$ANDROID_NDK/build/tools/make_standalone_toolchain.py" --arch=arm --install-dir=ndk-arm --api=$ANDROID_PLATFORM_LEVEL - "$ANDROID_NDK/build/tools/make_standalone_toolchain.py" --arch=arm64 --install-dir=ndk-arm64 --api=$ANDROID_PLATFORM_LEVEL -fi - -if [ ! -d "$ANDROID_SDK"/build-tools/"${ANDROID_BUILDTOOLS_REVISION}" ] || - [ ! -d "$ANDROID_SDK"/platforms/"${ANDROID_PLATFORMS}" ] || - [ ! -d "$ANDROID_SDK"/platforms/"${ANDROID_PLATFORM}" ] ; then - if [ ! -d "$ANDROID_SDK" ] ; then - if [ ! -f "$SDK_TOOLS" ] ; then - wget -q https://dl.google.com/android/repository/"$SDK_TOOLS" - fi - mkdir "$ANDROID_SDK" - pushd "$ANDROID_SDK" - unzip -q ../"$SDK_TOOLS" - yes | tools/bin/sdkmanager --licenses > /dev/null 2>&1 || echo "d56f5187479451eabf01fb78af6dfcb131a6481e" > licenses/android-sdk-license - cat licenses/android-sdk-license - yes | tools/bin/sdkmanager tools platform-tools 'platforms;'"${ANDROID_PLATFORM}" 'platforms;'"${ANDROID_PLATFORMS}" 'build-tools;'"${ANDROID_BUILDTOOLS_REVISION}" > /dev/null - echo "" - else - pushd "$ANDROID_SDK" - yes | tools/bin/sdkmanager tools platform-tools 'platforms;'"${ANDROID_PLATFORM}" 'platforms;'"${ANDROID_PLATFORMS}" 'build-tools;'"${ANDROID_BUILDTOOLS_REVISION}" > /dev/null - fi - popd -fi - -# now that we have an NDK, copy the font that we need for OnePlus phones -# due to https://bugreports.qt.io/browse/QTBUG-69494 -cp "$ANDROID_SDK"/platforms/"${ANDROID_PLATFORM}"/data/fonts/Roboto-Regular.ttf "$SUBSURFACE_SOURCE"/android-mobile || exit 1 - -if [ ! -d Qt/"${LATEST_QT}"/android_armv7 ] ; then - # download the Qt installer including Android bits and unpack / install - bash "$SCRIPTDIR"/install-qt.sh --version ${LATEST_QT} --target android --toolchain android_armv7 \ - qtbase qtdeclarative qttranslations qttools qtsvg \ - qtquickcontrols qtquickcontrols2 qtlocation qtimageformats \ - qtgraphicaleffects qtconnectivity qtandroidextras \ - --directory Qt -fi -if [ ! -d Qt/"${LATEST_QT}"/android_arm64_v8a ] ; then - bash "$SCRIPTDIR"/install-qt.sh --version ${LATEST_QT} --target android --toolchain android_arm64_v8a \ - qtbase qtdeclarative qttranslations qttools qtsvg \ - qtquickcontrols qtquickcontrols2 qtlocation qtimageformats \ - qtgraphicaleffects qtconnectivity qtandroidextras \ - --directory Qt -fi - -if [ ! -z ${PREP_ONLY+x} ] ; then - exit 0 -fi - -if [ ! -d subsurface/libdivecomputer/src ] ; then - pushd subsurface - git submodule init - git submodule update --recursive - popd -fi - -# always reconfigure here -rm -f subsurface/libdivecomputer/configure -pushd subsurface/libdivecomputer -autoreconf --install --force -autoreconf --install --force -popd - -# and now we need a monotonic build number... -if [ ! -f ./buildnr.dat ] ; then - BUILDNR=0 -else - BUILDNR=$(cat ./buildnr.dat) -fi -BUILDNR=$((BUILDNR+1)) -echo "${BUILDNR}" > ./buildnr.dat - -echo "Building Subsurface-mobile for Android, build nr ${BUILDNR}" - -rm -f ./subsurface-mobile-build-arm/build/outputs/apk/debug/*.apk -rm -df ./subsurface-mobile-build-arm/AndroidManifest.xml - -if [ "$USE_X" ] ; then - bash "$USE_X" "$SUBSURFACE_SOURCE"/packaging/android/build.sh -buildnr "$BUILDNR" arm $QUICK $RELEASE - # the arm64 APK has to have a higher build number - BUILDNR=$((BUILDNR+1)) - echo "${BUILDNR}" > ./buildnr.dat - bash "$USE_X" "$SUBSURFACE_SOURCE"/packaging/android/build.sh -buildnr "$BUILDNR" arm64 $QUICK $RELEASE -else - bash "$SUBSURFACE_SOURCE"/packaging/android/build.sh -buildnr "$BUILDNR" arm $QUICK $RELEASE - # the arm64 APK has to have a higher build number - BUILDNR=$((BUILDNR+1)) - echo "${BUILDNR}" > ./buildnr.dat - bash "$SUBSURFACE_SOURCE"/packaging/android/build.sh -buildnr "$BUILDNR" arm64 $QUICK $RELEASE -fi - -ls -l subsurface-mobile-build-arm*/*mobile*/build/outputs/apk/*/*.apk diff --git a/packaging/android/build.sh b/packaging/android/build.sh deleted file mode 100755 index 53b22c7b8..000000000 --- a/packaging/android/build.sh +++ /dev/null @@ -1,428 +0,0 @@ -#!/bin/bash -# -# THIS IS OBSOLETE AN ONLY WORKS UP TO Qt 5.13 -# for now keeping it around for reference - - - -# -# Filesystem layout considerations... -# for this explanation I assume that your Subsurface sources are in -# ~/src/subsurface -# -# You need to have a version of Qt that contains the Android bits -# installed. You should be able to find the correct installer for -# Linux or Mac here: -# http://download.qt.io/official_releases/qt/ -# make sure you pick one with 'android' in its name. -# -# Install this wherever you want - and then have a link named ~/src/Qt that -# points to it. -# So let's assume that you are installing the package above in ~/Qt -# (which I think is the default location), then simply do -# cd ~/src -# ln -s ~/Qt Qt -# -# you also need to have the current Android SDK and NDK installed under ~/src -# -# Or just set QT5_ANDROID, ANDROID_SDK_ROOT and ANDROID_NDK_ROOT to where ever you have them. -# -set -eu -PLATFORM=$(uname) -# (trick to get the absolute path, either if we're called with a -# absolute path or a relative path) -pushd "$(dirname "$0")/../../" -export SUBSURFACE_SOURCE=$PWD -popd - -# Set build defaults -# is this a release or debug build -BUILD_TYPE=Debug -# Build-nr in the android manifest. -BUILD_NR=0 -# Should we build the desktop ui or the mobile ui? -SUBSURFACE_DESKTOP=OFF -# Which arch should we build for? -ARCH=arm -# Read build variables -source $SUBSURFACE_SOURCE/packaging/android/variables.sh - -QUICK="" - -while [ "$#" -gt 0 ] ; do - case "$1" in - Release|release) - shift - BUILD_TYPE=Release - ;; - Debug|debug) - # this is the default - still need to eat the argument if given - BUILD_TYPE=Debug - shift - ;; - -buildnr) - shift - BUILD_NR=$1 - shift - ;; - desktop) - SUBSURFACE_DESKTOP=ON - shift - ;; - arm|arm64|x86|x86_64) - ARCH=$1 - shift - ;; - -quick) - QUICK="1" - shift - ;; - --) - shift - break - ;; - *) - echo "Unknown argument $1" - exit 1 - ;; - esac -done - -# Its needed by all sub-cmds -export ARCH - -# Configure where we can find things here -export ANDROID_NDK_ROOT=${ANDROID_NDK_ROOT-$SUBSURFACE_SOURCE/../${ANDROID_NDK}} -export ANDROID_NDK_HOME=$ANDROID_NDK_ROOT - -if [ -n "${QT5_ANDROID+X}" ] ; then - echo "Using Qt5 in $QT5_ANDROID" -elif [ -d "$SUBSURFACE_SOURCE/../Qt/${LATEST_QT}" ] ; then - export QT5_ANDROID=$SUBSURFACE_SOURCE/../Qt/${LATEST_QT} -else - echo "Cannot find Qt 5.12 or newer under $SUBSURFACE_SOURCE/../Qt" - exit 1 -fi - -if [ "$PLATFORM" = "Darwin" ] ; then - export ANDROID_SDK_ROOT=${ANDROID_SDK_ROOT-$SUBSURFACE_SOURCE/../android-sdk-macosx} - export ANDROID_NDK_HOST=darwin-x86_64 -else - export ANDROID_SDK_ROOT=${ANDROID_SDK_ROOT-$SUBSURFACE_SOURCE/../android-sdk-linux} - export ANDROID_NDK_HOST=linux-x86_64 -fi - -if [ "$ARCH" = "arm" ] ; then - QT_ARCH=armv7 - BUILDCHAIN=arm-linux-androideabi - OPENSSL_MACHINE=armv7 - ANDROID_ABI=armeabi-v7a -elif [ "$ARCH" = "arm64" ] ; then # requires Qt 5.12 - QT_ARCH=arm64_v8a - BUILDCHAIN=aarch64-linux-android - ANDROID_ABI=arm64-v8a - OPENSSL_MACHINE=aarch64 -elif [ "$ARCH" = "x86" ] ; then - QT_ARCH=$ARCH - BUILDCHAIN=i686-linux-android - OPENSSL_MACHINE=i686 - ANDROID_ABI=x86 -elif [ "$ARCH" = "x86_64" ] ; then - QT_ARCH=$ARCH - BUILDCHAIN=x86_64-linux-android - OPENSSL_MACHINE=$ARCH - ANDROID_ABI=$ARCH -fi - -# Verify Qt install and adjust for single-arch Qt install layout -# (e.g. when building Qt from scratch) -export QT5_ANDROID_CMAKE -if [ -d "${QT5_ANDROID}/android_${QT_ARCH}/lib/cmake" ] ; then - export QT5_ANDROID_CMAKE=$QT5_ANDROID/android_${QT_ARCH}/lib/cmake -elif [ -d "${QT5_ANDROID}/lib/cmake" ] ; then - export QT5_ANDROID_CMAKE=$QT5_ANDROID/lib/cmake -else - echo "Cannot find Qt cmake configuration" - exit 1 -fi - -if [ ! -e ndk-"$ARCH" ] ; then - "$ANDROID_NDK_ROOT/build/tools/make_standalone_toolchain.py" --arch="$ARCH" --install-dir=ndk-"$ARCH" --api=$ANDROID_PLATFORM_LEVEL -fi - -export BUILDROOT=$PWD -mkdir -p "${BUILDROOT}"/install-root-"${ARCH}" -export PREFIX="${BUILDROOT}"/install-root-"${ARCH}" -export PATH=${BUILDROOT}/ndk-$ARCH/bin:$PATH -export PKG_CONFIG_LIBDIR=$PREFIX/lib/pkgconfig -export CC=${BUILDROOT}/ndk-$ARCH/bin/clang -export CXX=${BUILDROOT}/ndk-$ARCH/bin/clang++ -# autoconf seems to get lost without this -export SYSROOT=${BUILDROOT}/ndk-$ARCH/sysroot -export CFLAGS="--sysroot=${SYSROOT} -fPIC" -export CPPFLAGS="--sysroot=${SYSROOT} -fPIC" -export CXXFLAGS="--sysroot=${SYSROOT} -fPIC" - -if [ "$PLATFORM" = "Darwin" ] ; then - JAVA_HOME=$(/usr/libexec/java_home) - export JAVA_HOME -else - export JAVA_HOME=/usr -fi - -# find qmake -QMAKE=$QT5_ANDROID/android_$QT_ARCH/bin/qmake -echo $QMAKE -$QMAKE -query - -# if we are just doing a quick rebuild, don't bother with any of the dependencies - -if [ "$QUICK" = "" ] ; then - - # don't adjust indentation to make this a more reasonable commit - # build google maps plugin - "${SUBSURFACE_SOURCE}"/scripts/get-dep-lib.sh singleAndroid . googlemaps - # find qmake - QMAKE=$QT5_ANDROID/android_$QT_ARCH/bin/qmake - $QMAKE -query - QT_PLUGINS_PATH=$($QMAKE -query QT_INSTALL_PLUGINS) - GOOGLEMAPS_BIN=libqtgeoservices_googlemaps.so - if [ ! -e "$QT_PLUGINS_PATH"/geoservices/$GOOGLEMAPS_BIN ] || [ googlemaps/.git/HEAD -nt "$QT_PLUGINS_PATH"/geoservices/$GOOGLEMAPS_BIN ] ; then - mkdir -p googlemaps-build-"$ARCH" - pushd googlemaps-build-"$ARCH" - $QMAKE ../googlemaps/googlemaps.pro - # on Travis the compiler doesn't support c++1z, yet qmake adds that flag; - # since things compile fine with c++11, let's just hack that away - # similarly, don't use -Wdata-time - sed -i.bak -e 's/std=c++1z/std=c++11/g ; s/-Wdate-time//' Makefile - make -j4 - $QMAKE -install qinstall -exe $GOOGLEMAPS_BIN "$QT_PLUGINS_PATH"/geoservices/$GOOGLEMAPS_BIN - popd - fi - - "${SUBSURFACE_SOURCE}"/scripts/get-dep-lib.sh singleAndroid . sqlite - if [ ! -e "$PKG_CONFIG_LIBDIR/sqlite3.pc" ] ; then - mkdir -p sqlite-build-"$ARCH" - pushd sqlite-build-"$ARCH" - ../sqlite/configure --host=${BUILDCHAIN} --prefix="$PREFIX" --enable-static --disable-shared - make - make install - popd - fi - - "${SUBSURFACE_SOURCE}"/scripts/get-dep-lib.sh singleAndroid . libxml2 - if [ ! -e libxml2/configure ] ; then - pushd libxml2 - autoreconf --install - popd - fi - if [ ! -e "$PKG_CONFIG_LIBDIR/libxml-2.0.pc" ] ; then - mkdir -p libxml2-build-"$ARCH" - pushd libxml2-build-"$ARCH" - ../libxml2/configure --host=${BUILDCHAIN} --prefix="$PREFIX" --without-python --without-iconv --enable-static --disable-shared - perl -pi -e 's/runtest\$\(EXEEXT\)//' Makefile - perl -pi -e 's/testrecurse\$\(EXEEXT\)//' Makefile - make - make install - popd - fi - - "${SUBSURFACE_SOURCE}"/scripts/get-dep-lib.sh singleAndroid . libxslt - if [ ! -e libxslt/configure ] ; then - pushd libxslt - autoreconf --install - popd - fi - if [ ! -e "$PKG_CONFIG_LIBDIR/libxslt.pc" ] ; then - mkdir -p libxslt-build-"$ARCH" - pushd libxslt-build-"$ARCH" - ../libxslt/configure --host=${BUILDCHAIN} --prefix="$PREFIX" --with-libxml-prefix="$PREFIX" --without-python --without-crypto --enable-static --disable-shared - make - make install - popd - fi - - - "${SUBSURFACE_SOURCE}"/scripts/get-dep-lib.sh singleAndroid . openssl - if [ ! -e "$PKG_CONFIG_LIBDIR/libssl.pc" ] ; then - mkdir -p openssl-build-"$ARCH" - cp -r openssl/* openssl-build-"$ARCH" - pushd openssl-build-"$ARCH" - perl -pi -e 's/-mandroid//g' Configure - # Use env to make all these temporary, so they don't pollute later builds. - env PATH=$ANDROID_NDK_HOME/toolchains/llvm/prebuilt/linux-x86_64/bin:$PATH \ - CC=clang \ - ./Configure shared android-"$ARCH" no-ssl2 no-ssl3 no-comp no-hw no-engine no-asm \ - --prefix="$PREFIX" -DOPENSSL_NO_UI_CONSOLE -DOPENSSL_NO_STDIO \ - -D__ANDROID_API__=$ANDROID_PLATFORM_LEVEL - make depend - # follow the suggestions here: https://doc.qt.io/qt-5/android-openssl-support.html - make SHLIB_VERSION_NUMBER= SHLIB_EXT=_1_1.so build_libs - - cp -RL include/openssl $PREFIX/include/openssl - cp libcrypto.a $PREFIX/lib - cp libcrypto_1_1.so* $PREFIX/lib - cp libssl.a $PREFIX/lib - cp libssl_1_1.so* $PREFIX/lib - cp *.pc $PKG_CONFIG_LIBDIR - - popd - fi - - "${SUBSURFACE_SOURCE}"/scripts/get-dep-lib.sh singleAndroid . libzip - if [ ! -e "$PKG_CONFIG_LIBDIR/libzip.pc" ] ; then - # libzip expects a predefined macro that isn't there for our compiler - pushd libzip - git reset --hard - sed -i 's/SIZEOF_SIZE_T/__SIZEOF_SIZE_T__/g' lib/compat.h - # also, don't deal with manuals and bzip2 - sed -i 's/ADD_SUBDIRECTORY(man)//' CMakeLists.txt - sed -i 's/^FIND_PACKAGE(ZLIB/#&/' CMakeLists.txt - popd - mkdir -p libzip-build-"$ARCH" - pushd libzip-build-"$ARCH" - cmake \ - -DCMAKE_C_COMPILER="$CC" \ - -DCMAKE_LINKER="$CC" \ - -DCMAKE_INSTALL_PREFIX="$PREFIX" \ - -DCMAKE_INSTALL_LIBDIR="lib" \ - -DBUILD_SHARED_LIBS=OFF \ - -DCMAKE_DISABLE_FIND_PACKAGE_BZip2=TRUE \ - -DZLIB_VERSION_STRING=1.2.7 \ - -DZLIB_LIBRARY=z \ - ../libzip/ - make - make install - popd - fi - - "${SUBSURFACE_SOURCE}"/scripts/get-dep-lib.sh singleAndroid . libgit2 - if [ ! -e "$PKG_CONFIG_LIBDIR/libgit2.pc" ] ; then - # We don't want to find the HTTP_Parser package of the build host by mistake - mkdir -p libgit2-build-"$ARCH" - pushd libgit2-build-"$ARCH" - cmake \ - -DCMAKE_C_COMPILER="$CC" \ - -DCMAKE_LINKER="$CC" \ - -DBUILD_CLAR=OFF -DBUILD_SHARED_LIBS=OFF \ - -DCMAKE_INSTALL_PREFIX="$PREFIX" \ - -DCURL=OFF \ - -DUSE_SSH=OFF \ - -DOPENSSL_SSL_LIBRARY="$PREFIX"/lib/libssl_1_1.so \ - -DOPENSSL_CRYPTO_LIBRARY="$PREFIX"/lib/libcrypto_1_1.so \ - -DOPENSSL_INCLUDE_DIR="$PREFIX"/include \ - -D_OPENSSL_VERSION="${OPENSSL_VERSION}" \ - -DCMAKE_DISABLE_FIND_PACKAGE_HTTP_Parser=TRUE \ - ../libgit2/ - make - make install - # Patch away pkg-config dependency to zlib, its there, i promise - perl -pi -e 's/^(Requires.private:.*)zlib(.*)$/$1 $2/' "$PKG_CONFIG_LIBDIR"/libgit2.pc - popd - fi - -fi # QUICK - -pushd "$SUBSURFACE_SOURCE" -git submodule update --recursive -popd -CURRENT_SHA=$(cd "$SUBSURFACE_SOURCE"/libdivecomputer ; git describe) -PREVIOUS_SHA=$(cat "libdivecomputer-${ARCH}.SHA" 2>/dev/null || echo) -if [ ! "$CURRENT_SHA" = "$PREVIOUS_SHA" ] || [ ! -e "$PKG_CONFIG_LIBDIR/libdivecomputer.pc" ] ; then - mkdir -p libdivecomputer-build-"$ARCH" - pushd libdivecomputer-build-"$ARCH" - "$SUBSURFACE_SOURCE"/libdivecomputer/configure --host=${BUILDCHAIN} --prefix="$PREFIX" --enable-static --disable-shared --enable-examples=no - make - make install - popd - echo "$CURRENT_SHA" > "libdivecomputer-${ARCH}.SHA" -fi - -"${SUBSURFACE_SOURCE}"/scripts/get-dep-lib.sh singleAndroid . qt-android-cmake -# the Qt Android cmake addon runs androiddeployqt with '--verbose' which -# is, err, rather verbose. Let's not do that. -sed -i -e 's/--verbose//' qt-android-cmake/AddQtAndroidApk.cmake - -# Should we build the mobile ui or the desktop ui? -# doing this backwards in order not to break people's setup -if [ "$SUBSURFACE_DESKTOP" = "ON" ] ; then - SUBSURFACE_MOBILE= -else - SUBSURFACE_MOBILE=ON -fi - -# if we are building Subsurface-mobile and this isn't just a quick -# rebuild, pull kirigami, icons, etc -if [ "$SUBSURFACE_MOBILE" = "ON" ] && [ "$QUICK" = "" ] ; then - pushd "$SUBSURFACE_SOURCE" - bash ./scripts/mobilecomponents.sh - popd -fi - -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 - -PKGCONF=$(which pkg-config) -cmake $MOBILE_CMAKE \ - -DCMAKE_SYSTEM_NAME="Android" \ - -DANDROID_ABI=$ANDROID_ABI \ - -DANDROID_PLATFORM="$ANDROID_PLATFORM" \ - -DQT_ANDROID_SDK_ROOT="$ANDROID_SDK_ROOT" \ - -DQT_ANDROID_NDK_ROOT="$ANDROID_NDK_ROOT" \ - -DPKG_CONFIG_EXECUTABLE="$PKGCONF" \ - -DCMAKE_TOOLCHAIN_FILE="$ANDROID_NDK_ROOT"/build/cmake/android.toolchain.cmake \ - -DQT_ANDROID_CMAKE="$BUILDROOT"/qt-android-cmake/AddQtAndroidApk.cmake \ - -DANDROID_STL="c++_shared" \ - -DFORCE_LIBSSH=OFF \ - -DLIBDC_FROM_PKGCONFIG=ON \ - -DLIBGIT2_FROM_PKGCONFIG=ON \ - -DNO_PRINTING=ON \ - -DNO_USERMANUAL=ON \ - -DNO_DOCS=ON \ - -DCMAKE_PREFIX_PATH:UNINITIALIZED="$QT5_ANDROID_CMAKE" \ - -DCMAKE_BUILD_TYPE="$BUILD_TYPE" \ - -DMAKE_TESTS=OFF \ - -DFTDISUPPORT=OFF \ - -DANDROID_NATIVE_LIBSSL="$PREFIX/lib/libssl_1_1.so" \ - -DANDROID_NATIVE_LIBCRYPT="$PREFIX/lib/libcrypto_1_1.so" \ - -DCMAKE_MAKE_PROGRAM="make" \ - "$SUBSURFACE_SOURCE" - -# set up the version number - -rm -f ssrf-version.h -make version - -SUBSURFACE_VERSION=$(grep CANONICAL_VERSION_STRING ssrf-version.h | awk '{ print $3 }' | tr -d \") -if [ ! -z "$SUBSURFACE_MOBILE" ] ; then - SUBSURFACE_MOBILE_VERSION=$(grep MOBILE_VERSION_STRING ssrf-version.h | awk '{ print $3 }' | tr -d \" ) - SUBSURFACE_MOBILE_VERSION="$SUBSURFACE_MOBILE_VERSION (${SUBSURFACE_VERSION})" - - rm -rf android-mobile - cp -a "$SUBSURFACE_SOURCE/android-mobile" . - sed -i -e "s/@SUBSURFACE_MOBILE_VERSION@/$SUBSURFACE_MOBILE_VERSION/;s/@BUILD_NR@/$BUILD_NR/" android-mobile/AndroidManifest.xml -else - # android-mobile is hardcoded in CMakeLists.txt nowadays. - rm -rf android-mobile - cp -a "$SUBSURFACE_SOURCE/android" android-mobile - sed -i -e "s/@SUBSURFACE_VERSION@/\"$SUBSURFACE_VERSION\"/;s/@BUILD_NR@/$BUILD_NR/" android-mobile/AndroidManifest.xml -fi - -# now make the translations -make translations -mkdir -p subsurface-mobile-"$ANDROID_ABI"/assets/translations -cp -a translations/*.qm subsurface-mobile-"$ANDROID_ABI"/assets/translations - -# now build Subsurface and use the rest of the command line arguments -make "$@" - -echo "Done building $BUILD_NAME for Android" diff --git a/packaging/android/qt-installer-noninteractive.qs b/packaging/android/qt-installer-noninteractive.qs deleted file mode 100644 index 4b679e519..000000000 --- a/packaging/android/qt-installer-noninteractive.qs +++ /dev/null @@ -1,61 +0,0 @@ -// http://stackoverflow.com/a/34032216/78204 - -function Controller() { - installer.autoRejectMessageBoxes(); - installer.setMessageBoxAutomaticAnswer("OverwriteTargetDirectory", QMessageBox.Yes); - installer.installationFinished.connect(function() { - gui.clickButton(buttons.NextButton); - }) -} - -Controller.prototype.WelcomePageCallback = function() { - gui.clickButton(buttons.NextButton,3000); -} - -Controller.prototype.CredentialsPageCallback = function() { - gui.clickButton(buttons.NextButton); -} - -Controller.prototype.IntroductionPageCallback = function() { - gui.clickButton(buttons.NextButton); -} - -Controller.prototype.TargetDirectoryPageCallback = function() -{ - //gui.currentPageWidget().TargetDirectoryLineEdit.setText(installer.value("HomeDir") + "/Qt"); - gui.currentPageWidget().TargetDirectoryLineEdit.setText(installer.value("InstallerDirPath") + "/Qt"); - //gui.currentPageWidget().TargetDirectoryLineEdit.setText("/scratch/Qt"); - gui.clickButton(buttons.NextButton); -} - -Controller.prototype.ComponentSelectionPageCallback = function() { - var widget = gui.currentPageWidget(); - - widget.deselectAll(); - widget.selectComponent('qt.qt5.5131.android_armv7'); - widget.selectComponent('qt.qt5.5131.android_arm64_v8a'); - - gui.clickButton(buttons.NextButton); -} - -Controller.prototype.LicenseAgreementPageCallback = function() { - gui.currentPageWidget().AcceptLicenseRadioButton.setChecked(true); - gui.clickButton(buttons.NextButton); -} - -Controller.prototype.StartMenuDirectoryPageCallback = function() { - gui.clickButton(buttons.NextButton); -} - -Controller.prototype.ReadyForInstallationPageCallback = function() -{ - gui.clickButton(buttons.NextButton); -} - -Controller.prototype.FinishedPageCallback = function() { -var checkBoxForm = gui.currentPageWidget().LaunchQtCreatorCheckBoxForm -if (checkBoxForm && checkBoxForm.launchQtCreatorCheckBox) { - checkBoxForm.launchQtCreatorCheckBox.checked = false; -} - gui.clickButton(buttons.FinishButton); -} diff --git a/packaging/android/warning-ndk18b.txt b/packaging/android/warning-ndk18b.txt deleted file mode 100644 index 64d49ef52..000000000 --- a/packaging/android/warning-ndk18b.txt +++ /dev/null @@ -1,21 +0,0 @@ -WARNING -------- - -Using Cmake, Clang, NDK 18b, Qt 5.12 beta 4, some Subsurface code does -not compile. At this point in time, its fully unclear to me why we see the -error as it is. - -Thing fail deep down in Qt and NDK headers on #include <cmath>. Error like -"::signbit is not in the global namespace". The most logic reason is an -improper order in which include paths are constructed in the build process. -Any attempt to find the real reason failed. Even very similar command lines -from a qmake build that succeed fail with a cmake style build. - -The very very dirty hack is commenting out some lines in NDK 18b: - -"./android-ndk-r18b/sources/cxx-stl/llvm-libc++/include/cmath - -Comment lines 313-325, and all build, links and runs with no errors -related to this known at this point. - -Signed-off-by: Jan Mulder <jlmulder@xs4all.nl> |