aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorRaphaël Cotty <raphael.cotty@gmail.com>2020-01-20 15:22:11 +0100
committerRaphaël Cotty <raphael.cotty@gmail.com>2020-02-04 12:40:58 +0000
commite130e492ebe6ad266a74df7b7d5efdef55dc0ff7 (patch)
treed46ae28bb6471b9dca6cccff316ac6842742ff6a /scripts
parent7811e70970294ff4c4c1fd76221727696e479cfb (diff)
Android: Update support to qt 5.14 and multi-arch apks for Qt apps
Before qt 5.14. The profile property "moduleProviders.Qt.qmakeFilePaths" is set with one or more paths to the different android architectures. Each qmake path belongs to a different android architecture installation. So each qmake is used to generated the Qt module corresponding to the architecture. Although qbs can generate multi-arch apks using multiplex mode, this is not possible when the project depends on qt libraries. This is because of the restriction of the qt tool androiddeployqt used by qbs. Now with qt 5.14. All android architectures are installed in the same directory. So the profile property "moduleProviders.Qt.qmakeFilePaths" is set with one qmake path. This directly impacts the qbs-setup-android tool and the generation of the Qt modules. Because qt libraries are installed in the the same directory, they have the abi in their name (libQt5Core_armeabi-v7a.so). So the rules that generate the apks are also impacted. The new androiddeployqt have a new interface (json config file format and requires to have the input libraries installed in the deployment directory) which allows the generation of multi-arch apks. So Qt.android_support modules needs to be updated as well. Fixes: QBS-1497 Change-Id: Ibd546f356c38a05f42dfcac0a4ec92bd82d6f700 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/test-qt-for-android.sh23
1 files changed, 20 insertions, 3 deletions
diff --git a/scripts/test-qt-for-android.sh b/scripts/test-qt-for-android.sh
index 877afbc30..44a64db21 100755
--- a/scripts/test-qt-for-android.sh
+++ b/scripts/test-qt-for-android.sh
@@ -50,16 +50,33 @@ echo "Android SDK installed at ${ANDROID_SDK_ROOT}"
echo "Android NDK installed at ${ANDROID_NDK_ROOT}"
echo "Qt installed at ${QT_INSTALL_DIR}"
+# Cleaning profiles
+qbs config --unset profiles.qbs_autotests-android
+qbs config --unset profiles.qbs_autotests-android-qt
+
+# Setting auto test profiles
qbs setup-android --ndk-dir ${ANDROID_HOME}/ndk-bundle --sdk-dir ${ANDROID_HOME} qbs_autotests-android
qbs setup-android --ndk-dir ${ANDROID_HOME}/ndk-bundle --sdk-dir ${ANDROID_HOME} --qt-dir ${QT_INSTALL_DIR} qbs_autotests-android-qt
+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"
+ qbs config --list
+ tst_blackbox-android
+
+ echo "Using multi-arch data sets for qml tests (only for qt version >= 5.14) with only armv7a and x86_64"
+ qbs config profiles.qbs_autotests-android-qt.qbs.architectures '["armv7a","x86_64"]'
+ qbs config --list
+ tst_blackbox-android
+fi;
+
+echo "Using single-arch (armv7a) data sets for qml tests"
qbs config --unset profiles.qbs_autotests-android-qt.qbs.architectures
qbs config profiles.qbs_autotests-android-qt.qbs.architecture armv7a
qbs config --list
-export QBS_AUTOTEST_PROFILE=qbs_autotests-android
-export QBS_AUTOTEST_ALWAYS_LOG_STDERR=true
-
tst_blackbox-android