diff options
author | Raphaël Cotty <raphael.cotty@gmail.com> | 2020-10-16 22:44:41 +0200 |
---|---|---|
committer | Raphaël Cotty <raphael.cotty@gmail.com> | 2020-11-17 19:22:18 +0000 |
commit | e8b186610738a16fe8ddaacd39797d863828c7aa (patch) | |
tree | 1d9e2d60012739ccdfd5375b208580092ef8bc80 /scripts | |
parent | f4c76e08f24b48e142683cea54b4c64a75083f17 (diff) | |
download | qbs-e8b186610738a16fe8ddaacd39797d863828c7aa.tar.gz |
Android: Update for Qt 6
Manage the new directory layout of Qt6.
Update generation of the input file for androiddeployqt.
Fixes: QBS-1613
Fixes: QBS-1609
Change-Id: Ie633fad467f310bfc4cd42e9c32d9cfc2e734582
Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/install-qt.sh | 22 | ||||
-rwxr-xr-x | scripts/test-qt-for-android.sh | 4 |
2 files changed, 20 insertions, 6 deletions
diff --git a/scripts/install-qt.sh b/scripts/install-qt.sh index a73300ae4..f029b62c2 100755 --- a/scripts/install-qt.sh +++ b/scripts/install-qt.sh @@ -231,6 +231,7 @@ function compute_url(){ local COMPONENT=$1 local CURL="curl -s -L" local BASE_URL="http://download.qt.io/online/qtsdkrepository/${HOST_OS}/${TARGET_PLATFORM}" + local ANDROID_ARCH=$(echo ${TOOLCHAIN##android_}) if [[ "${COMPONENT}" =~ "qtcreator" ]]; then @@ -244,6 +245,10 @@ function compute_url(){ else REMOTE_BASES=( + # New repository format (>=6.0.0) + "qt6_${VERSION//./}/qt.qt6.${VERSION//./}.${TOOLCHAIN}" + "qt6_${VERSION//./}_${ANDROID_ARCH}/qt.qt6.${VERSION//./}.${TOOLCHAIN}" + "qt6_${VERSION//./}_${ANDROID_ARCH}/qt.qt6.${VERSION//./}.${COMPONENT}.${TOOLCHAIN}" # New repository format (>=5.9.6) "qt5_${VERSION//./}/qt.qt5.${VERSION//./}.${TOOLCHAIN}" "qt5_${VERSION//./}/qt.qt5.${VERSION//./}.${COMPONENT}.${TOOLCHAIN}" @@ -274,7 +279,7 @@ rm -f "${HASH_FILEPATH}" for COMPONENT in ${COMPONENTS}; do URL="$(compute_url ${COMPONENT})" - echo "Downloading ${COMPONENT}..." >&2 + echo "Downloading ${COMPONENT} ${URL}..." >&2 curl --progress-bar -L -o ${DOWNLOAD_DIR}/package.7z ${URL} >&2 7z x -y -o${INSTALL_DIR} ${DOWNLOAD_DIR}/package.7z >/dev/null 2>&1 7z l -ba -slt -y ${DOWNLOAD_DIR}/package.7z | tr '\\' '/' | sed -n -e "s|^Path\ =\ |${INSTALL_DIR}/|p" >> "${HASH_FILEPATH}" 2>/dev/null @@ -298,9 +303,18 @@ for COMPONENT in ${COMPONENTS}; do SUBDIR="${TOOLCHAIN}" fi - CONF_FILE="${INSTALL_DIR}/${VERSION}/${SUBDIR}/bin/qt.conf" - echo "[Paths]" > ${CONF_FILE} - echo "Prefix = .." >> ${CONF_FILE} + if [ "${TARGET_PLATFORM}" == "android" ] && [ ! "${QT_VERSION}" \< "6.0.0" ]; then + CONF_FILE="${INSTALL_DIR}/${VERSION}/${SUBDIR}/bin/target_qt.conf" + sed -i "s|target|../$TOOLCHAIN|g" "${CONF_FILE}" + sed -i "/HostPrefix/ s|$|gcc_64|g" "${CONF_FILE}" + ANDROID_QMAKE_FILE="${INSTALL_DIR}/${VERSION}/${SUBDIR}/bin/qmake" + QMAKE_FILE="${INSTALL_DIR}/${VERSION}/gcc_64/bin/qmake" + sed -i "s|\/home\/qt\/work\/install\/bin\/qmake|$QMAKE_FILE|g" "${ANDROID_QMAKE_FILE}" + else + CONF_FILE="${INSTALL_DIR}/${VERSION}/${SUBDIR}/bin/qt.conf" + echo "[Paths]" > ${CONF_FILE} + echo "Prefix = .." >> ${CONF_FILE} + fi # Adjust the license to be able to run qmake # sed with -i requires intermediate file on Mac OS diff --git a/scripts/test-qt-for-android.sh b/scripts/test-qt-for-android.sh index 06d89cedf..793ba248d 100755 --- a/scripts/test-qt-for-android.sh +++ b/scripts/test-qt-for-android.sh @@ -63,8 +63,8 @@ qbs setup-android --ndk-dir ${ANDROID_HOME}/ndk-bundle --sdk-dir ${ANDROID_HOME} export QBS_AUTOTEST_PROFILE=qbs_autotests-android export QBS_AUTOTEST_ALWAYS_LOG_STDERR=true -if [ ! "${QT_VERSION}" \< "5.14.0" ]; then - echo "Using multi-arch data sets for qml tests (only for qt version >= 5.14) with all architectures" +if [ ! "${QT_VERSION}" \< "5.14.0" ] && [ "${QT_VERSION}" \< "6.0.0" ]; then + echo "Using multi-arch data sets for qml tests (only for qt version >= 5.14 and < 6.0.0) with all architectures" qbs config --list tst_blackbox-android |