summaryrefslogtreecommitdiffstats
path: root/src/tools/androiddeployqt
Commit message (Collapse)AuthorAgeFilesLines
* Add license headers to cmake filesLucie Gérard2022-08-031-0/+3
| | | | | | | | | | | | CMakeLists.txt and .cmake files of significant size (more than 2 lines according to our check in tst_license.pl) now have the copyright and license header. Existing copyright statements remain intact Task-number: QTBUG-88621 Change-Id: I3b98cdc55ead806ec81ce09af9271f9b95af97fa Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* Fix build with missing qml-root-pathAndré Klitzing2022-07-281-1/+1
| | | | | | | | | | | | | Commit 42d0089d44bec5628884d8cf6bf2b910a298a141 added support for multiple root paths. This works fine but it also added "options->inputFileName" as fallback if nothing was provided. The inputFileName cannot be used as root path (directory). So let's use absolutePath() of that file. Pick-to: 6.4 6.3 6.2 Change-Id: Id76a2cd79a82966bdac8240644b3c03ac4248066 Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
* CMake: Don't use PUBLIC_LIBRARIES for executablesAlexandru Croitor2022-07-251-1/+1
| | | | | Change-Id: I5648fbed3542395e65f86e35825b1b50f824133e Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
* fix androiddeployqt with user application with in-tree QML modulesMoody Liu2022-06-281-4/+9
| | | | | | | | | | | | | | | | | | | | | when deploying user applications with QML modules located under user's subdirectories, (e.g. some third-party QML components used as git submomdule). The qmldir for such QML modules will be, typically, generated under BUILD_DIR/android-qml. if a BUILD_DIR is under the source directory, androiddeployqt will skip those QML modules incorrectly because they "appeared to be under the QML root path so that seems can be imported", however without deploying them, it's impossible to import those modules on an Android device. this patch adds a check that also tests if a root path plus the module's url can actually lead to the correct module path, so a QML module under android-qml subdir would not pass the test, and thus won't be skipped. Task-number: QTBUG-103593 Pick-to: 6.4 6.3 Change-Id: I8af76bd38cd55700e17794cf2fff0e50a90ac87e Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* Fix an incorrect invocation of llvm-readobjVille Voutilainen2022-06-281-2/+2
| | | | | | | | | | | | | | It's never been entirely sound or necessarily correct to use single-dash options for long options. Various other things invoked by androiddeployqt seem to provide only single-dash options, but llvm tools and GNU tools always provide a double-dash option. Therefore we can just change the --needed-libs option to use double-dash without any particular version checks or differences. Task-number: QTBUG-104580 Pick-to: 6.4 6.3 6.2 5.15 Change-Id: I5649b0f9565989157d934c802da1f3c4c43fca0f Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
* Android: Do not set release flag for signed packageBartlomiej Moskal2022-06-271-4/+1
| | | | | | | | | | | | | | | Before this change, signing package by androiddeployqt automatically implied the --release option. It is possible to create both debug and release packages when signing on Android, so we shouldn't be enforcing this restriction on Qt app builds. Commit removes setting releasePackage option, when processing the --sign argument in androiddeployqt. Task-number: QTBUG-103281 Change-Id: Id40a41255e51d6820b44f078667dc8318a90bbc5 Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
* androiddeployqt: use QFile::exists instead of QDir().existsAlexandru Croitor2022-06-101-3/+3
| | | | | | | | | Internally QDir().exists calls QFile::exists(filePath(name)) Pick-to: 6.2 6.3 6.4 Change-Id: I2993d924268b10135bd9df4e9f8165b869946efc Reviewed-by: Alexey Edelev <alexey.edelev@qt.io> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* androiddeployqt: Only pass qt_install_dir/qml directory if it existsAlexandru Croitor2022-06-101-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | In Conan's case, the qtbase installed package directory lacks a qml directory. We pass that as a valid qml import path via CMake -> deployment json file -> androiddeployqt -> qmlimportscanner which causes the qmlimportscanner to fail with qmlimportscanner: No such file or directory: "~/package/some_sha_1/qml" Invalid json output from qmlimportscanner. which in turn fails the androiddeploqt build step. Make sure to only pass qtbase_install_dir/qml if it actually exists. Amends 4ef3da04c3390f02bcb0507128372e6a299dc8fd Amends c08b9a49ba70b1cbb0704668dd3f2c487d7f585e Pick-to: 6.2 6.3 6.4 Fixes: QTBUG-104056 Task-number: QTBUG-88519 Task-number: QTBUG-89588 Change-Id: I4310eb4e265ae8d3e3f09e1e1dbed79210e23de6 Reviewed-by: Alexey Edelev <alexey.edelev@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Add option to not include native libraries in APKTinja Paavoseppä2022-05-202-19/+106
| | | | | | | | | | | | | | | | | Sometimes it is not desirable to include the libraries in the APK, e.g. system and vendor apps could prefer having one set of libraries installed on the device. If unbundled deployment is specified, native libraries will not be included in the APK. With unbundled deployment, optional arguments can be passed to set the path to load the libraries on the device. [ChangeLog][Android][Deployment Changes] Adds option for Unbundled deployment, where native libraries are not packaged in the APK. Task-number: QAA-771 Change-Id: Ica51ef83a24dad58c7586bf610a58abe21fc1100 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* Use SPDX license identifiersLucie Gérard2022-05-162-53/+4
| | | | | | | | | | | | | Replace the current license disclaimer in files by a SPDX-License-Identifier. Files that have to be modified by hand are modified. License files are organized under LICENSES directory. Task-number: QTBUG-67283 Change-Id: Id880c92784c40f3bbde861c0d93f58151c18b9f1 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* Android: use Qt major version for detecting OpenGL and QtQuick librariesSona Kurazyan2022-04-221-2/+4
| | | | | | | Change-Id: Ia7651ad09d7aab70cf32fcd56f9fb75202ace768 Pick-to: 6.3 6.2 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Android: de-duplicate shellquote helpers code in deploy and test toolsAssam Boudjelthia2022-04-211-73/+1
| | | | | | | | Move shellquote helper functions into a common place instead of having a copy in each tool's code. Change-Id: I9723c11f894a211864788a7635773610c0fde739 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* Android: remove what appears to be non-necessary debug print leftoversAssam Boudjelthia2022-04-211-2/+1
| | | | | Change-Id: Ib87c6ada78180dcc686d24a048dbcfa159cac974 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* Android: add helper functions to append .exe/.bat suffix when neededAssam Boudjelthia2022-04-211-86/+76
| | | | | | | | Instead of having to do that each time for multiple paths, a common helper function is better. Change-Id: Ice2499f390a5790c5768eca037d186ad2e656ec7 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* Android: remove unused function in androiddeployqtAssam Boudjelthia2022-04-211-58/+1
| | | | | | | | The "android" tool is deprecated and never used now, and this function is not called by anything either. Change-Id: I6fdb09934c93f5bc03610bcc4fd677f8bb2d4189 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* Android: remove the old copy of gradle.properties after reading itAssam Boudjelthia2022-04-211-3/+5
| | | | | | | | | | The file is going to be remove anyways in the next build, so just delete it once we're done with it, this also makes the build folder doesn't have files that are not needed. Pick-to: 6.2 6.3 5.15 Change-Id: I948f028e9151b38a3ccc1ec628239ac91397e0d0 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* Android: use libexec path for qmlimportscannerAssam Boudjelthia2022-04-191-3/+5
| | | | | | | | This should've been done already for Qt 6.2. Pick-to: 6.2 6.3 Change-Id: I2f943254698a4f0f2742619fd7fcab9ac3a5014a Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Android: replace remaining uses of QLatin1String with QLatin1StringViewSona Kurazyan2022-04-141-4/+4
| | | | | | | | Task-number: QTBUG-98434 Change-Id: I35a97eef61746039738b4a5f2271c3bffd5711b4 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Ivan Solovev <ivan.solovev@qt.io> Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* Android: use _L1 for for creating Latin-1 string literalsSona Kurazyan2022-04-141-315/+310
| | | | | | Task-number: QTBUG-98434 Change-Id: I5ee5fe079c9a4530f636e59f6171abfa523591f4 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* Android: stop using QLatin1Char constructor for creating char literalsSona Kurazyan2022-04-141-65/+63
| | | | | | | | | | | Required for porting away from QLatin1Char/QLatin1String in scope of QTBUG-98434. As a drive-by, fix qsizetype -> int narrowing conversion warnings for the touched lines. Change-Id: Iebcbdbd7cecac09d0a7039e3ef6a4509d33039ba Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* Android: Throw an error if project uses versioned shared libraryAlexey Edelev2022-03-301-4/+20
| | | | | | | | | | | | | | | | | | | | Android internally cannot handle versioned shared libraries. There is no explicit rule for that, but indirect signs point to this. This adds an explicit error to androiddeployqt to give the clear understanding of the error nature to user. Error is also thrown if versioned library was used when linking Qt libraries. E.g. when linking Qt with liba.so it might be symlink to liba.so.1.0 This means that liba.so.1.0 Qt will require liba.so.1.0 at runtime. But since Android doesn't handle versioned shared libraries, liba.so.1.0 will never be packaged correctly. Most build systems support generating of versionless shared libraries, and this should be used when building 3rdparty libraries for Android. Task-number: QTBUG-101346 Change-Id: Ic49d1a0d7d3a4c5c0dc308a570e98e8a0a223053 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Misc: Do not depend on transitive includesFabian Kosmale2022-03-171-0/+3
| | | | | | | | As a drive-by, remove superfluous includes from qnetworkmanagerservice.h and obey the coding conventions for includes in a few more places. Change-Id: I65b68c0cef7598d06a125e97637040392d4be9ff Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Android: document how to handle code that loads QML from stringsAssam Boudjelthia2022-02-101-0/+6
| | | | | | | | | | | | | If an app is loading QML from a string at runtime from C++, the dependencies/imports might not be bundled into the app package, and then the app might fail at runtime. A fix is to have a QML file with needed imports to properly deploy those impots' libs. Fixes: QTBUG-100394 Pick-to: 6.2 6.3 Change-Id: I10136dc2dd1ac1f4ffe00bcf2cfd6c98e050ef28 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Unify indentation in help information of androiddeployqtAlessandro Portale2022-01-241-9/+9
| | | | | | | | | Some of the parameters in the help information were indented by 3 characters instead of by 4. Pick-to: 6.3 Change-Id: Id11cda79d61c4eab82ee09e33034db55730123c5 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* Check if QML plugin has the embedded QML files before copying to the Android ↵Alexey Edelev2021-12-211-16/+22
| | | | | | | | | | | | | | bundle We can detect if QML module has the embedded into the plugin QML files using the 'prefer' record from qmldir files. No need to duplicate QML files inside the android_rcc_bundle if 'prefer' record starts with ':/'. Pick-to: 6.3 Fixes: QTBUG-95984 Change-Id: Iee4f2248e3c0239c4f95a5db6e8fb3f16be636c5 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Copy only files that belongs to QML moduleAlexey Edelev2021-12-201-20/+51
| | | | | | | | | | | Instead of copying all files that the QML module directory contains, this approach only copies files that belong to the QML module according to the qmlimportscanner output. Pick-to: 6.3 Fixes: QTBUG-97834 Change-Id: I881a6fba28ca24be4f33de8693b41b6dfefe8d6b Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* androiddeployqt: Fix signing of paths with spacesKai Köhne2021-12-031-21/+24
| | | | | | | | | | Only use shellQuote() if the path is actually passed to a native API. For QFile API, use the unquoted path. Fixes: QTBUG-97649 Pick-to: 5.15 6.2 Change-Id: I9d8131819010bbd2faa8a81eef367245d90a767f Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* Use depfile to control ABI-specific builds of executable targetsAlexey Edelev2021-12-021-4/+13
| | | | | | | | | | | | | qt_internal_${target}_copy_apk_dependencies should use CMake DEPFILE approach when it's possible. Since we don't have any specific artifact that androiddeployqt can produce when collecting dependencies this change adds simple timestamp file that is touched each time when androiddeployqt is running. The timestamp is used then as a file-level dependency for the qt_internal_${target}_copy_apk_dependencies target. Task-number: QTBUG-88841 Change-Id: I985535c7b6e471cb4cfbf90128628087dadc72d0 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Change the external projects approach for multi-abi buildsAlexey Edelev2021-12-021-2/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of generating external projects that build the project tree for each target, this creates a single project for each ABI that have the common for all targets configure steps. Each executable target then adds additional build step to each ABI-specific external project, that builds and copies dependencies to the "main" project build tree. To resolve dependencies from the build tree, when building multi-abi apk instead of scanning the build directories of external projects for dependencies, it makes sense to run androiddeployqt for each ABI-specific external project to copy all necessary libraries. This is done by adding --copy-dependencies-only flag to androiddeployqt that only copies the apk dependencies, but avoids creating apk and all the essential steps. The ABI-specific external project now handles the deploying of the build artifacts to the end-point apk deployment directory and the "main" project assembles the apk using collected artifacts. The ABI-specific external project uses the qt_internal_${target}_copy_apk_dependencies target to run androiddeployqt with the introduced --copy-dependencies-only flag. TODO: Build steps that build and copy the ABI-specific apk dependencies are non-skipable and will run each time top-level build is triggered. This behavior should be fixed by adding dependencies to the generated by androiddeployqt DEPFILES for each ABI in the top-level build. Task-number: QTBUG-88841 Tash-number: QTBUG-94714 Change-Id: Id442a9fbd589f58b70f4204c5215645056b379a2 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Docs: Move manifest and androiddeployqt docs to where code livesNicholas Bennett2021-11-191-0/+246
| | | | | | | | | | | Removed content describing androiddeployqt from deployment-android.html to androiddeployqt.html,the qdoc source now living in qtbase. Docs src locations added to the qtcore.qdocconf. Task-number: QTBUG-97842 Pick-to: 6.2 Change-Id: I94783520280098ce1ab35f335a644bea70b8131a Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* Add --no-rcc-bundle-cleanup option to androiddeployqt toolAlexey Edelev2021-10-291-2/+13
| | | | | | | | | | | Add --no-rcc-bundle-cleanup option to androiddeployqt tool that helps to debug android build procedures and check the raw rcc bundle for missing items. Also add the QT_INTERNAL_NO_ANDROID_RCC_BUNDLE_CLEANUP CMake variable that adds the option when configuring projects for Android. Change-Id: I1f30ba979f9fb3274e44a53fdc5ebde4e65f0843 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* Replace deleteRecursively function with QDir::removeRecursivelyAlexey Edelev2021-10-291-18/+1
| | | | | | | | | Use QDir::removeRecursively instead of deleteRecursively when cleaning up top-level build folders. Change-Id: Ifb406fc1965a0781eab4fd63a3764a84f4309d25 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Android: replace ndk.dir with android.ndkVersion in build.gradleAssam Boudjelthia2021-10-131-3/+14
| | | | | | | | | | | | The use of ndk.dir in local.properties is deprecated in favor of android.ndkVersion in build.gradle, and will be totatlly removed in the future, so we need to adapt to that. Fixes: QTBUG-91391 Pick-to: 6.2 Change-Id: I54c57113a759d43c3685c9cdf2b9dcc5c948c0fd Reviewed-by: BogDan Vatra <bogdan@kdab.com> Reviewed-by: Rami Potinkara <rami.potinkara@qt.io>
* androiddeployqt: Use QElapsedTimer to get elapsed timeFabian Kosmale2021-10-081-33/+18
| | | | | | | | | No need to reinevent the wheel. Also, use nanoseconds now that we have the precision available. Change-Id: I287d06198edc3f5bdf7f85bd5f3e235b1fea95a3 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* androiddeployqt: only write enabled architectures to build.gradleAndreas Buhr2021-10-041-0/+2
| | | | | | | | | | androiddeployqt writes a list of architectures into the build.gradle file. This list should only contain the architectures which are enabled. This patch adapts the generation of this list accordingly. Amends 07cfab07a2a489e021b56226824a2d9b1211fad7. Change-Id: I5c7c1886c54cc3b9a7e42af6eefbaf2a067a67d5 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* androiddeployqt: Allow to also provide multiple qt install directoriesRaphael Cotty2021-10-011-17/+91
| | | | | | | | | | | | | | | | | | The "qt" property can also be filled with a json object like this: "qt": { "x86":"/home/.../Qt/6.3.0/android_x86", "x86_64":"/home/.../Qt/6.3.0/android_x86_64", "arm64-v8a":"/home/.../Qt/6.3.0/android_arm64_v8a", "armeabi-v7a":"/home/.../Qt/6.3.0/android_armv7"} That allows to update the options.qtInstallDirectory when changing the current architecture. The "qtHostDir" property is also added to provide the path to the qt host installation (rcc, qmlimportscanner). Change-Id: I3f0c36cc7a7030d45adc1a4dccaaad61dd538aea Task-number: QTBUG-88841 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* Specify Android architecture in gradle filesAndreas Buhr2021-09-301-1/+7
| | | | | | | | | | | | | | | | | | | When building for armeabi-v7a, building and APK using "ninja foo_make_apk" works. Building it by calling "gradlew assembleDebug" works. Opening the "android-build" folder in Android Studio and clicking the "Build" button works. But clicking the "Run" or "Debug" button in Android Studio does not work when the attached phone is arm64-v8a. Then Android Studio automatically selects the v8 architecture which does not find the Qt libraries. This patch adds explicit ABI selection to the gradle configuration files. With explicit ABI selection, Android Studio does not try to outsmart you. Pick-to: 6.2 Fixes: QTBUG-96701 Task-number: QTBUG-87022 Change-Id: I4ad6356c38b7eca004c0e0dbbb357cab7de84c0f Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* Rename variable to not reference Qt5Andreas Buhr2021-09-301-0/+4
| | | | | | | | | In the Android gradle files, the variable qt5AndroidDir refers to Qt5 and might confuse users. This patch renames to qtAndroidDir. Pick-to: 6.2 Change-Id: Ib18a3cd2c38646e4c6c0435dae9234f0f7887eb5 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* Skip unnecessary commands when cross-building toolsJoerg Bornemann2021-09-271-0/+1
| | | | | | | | | | | | | | | Introduce a new macro qt_internal_return_unless_building_tools which simply calls return() if tools are not built. This macro is supposed to be called after qt_internal_add_tool(). Using this macro avoids having to special-case code for when qt_internal_add_tool() creates imported targets in cross-builds. Adjust pro2cmake accordingly. Task-number: QTBUG-85084 Change-Id: I9e1c455c29535dd8c318efa890ebd739c42effc1 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Android: fix error when signing bundlesAssam Boudjelthia2021-09-241-1/+1
| | | | | | | | | | | | | | The jarsigner command that was being used was malformed before the file path leading to wrong signing command. A sample of the malformed command part "-storepass password⍣/path/to/package", note the char after 'password'. So having auto produces a QStringBuilder that's returning the malformed char. Fixes: QTBUG-96838 Change-Id: I5477f6913a74d79ebaf029ef7f4e2745c9f7ced0 Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io> (cherry picked from commit f492790611fe15a4745c8ad0c97259f438c91b6b) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Support deploying of libraries from a build tree when building android apkAlexey Edelev2021-09-091-0/+22
| | | | | | | | | | | | | | | | | | | | | | | | | If the project consists of an executable and multiple libraries that are linked to the executable, currently you need to specify them manually using QT_ANDROID_EXTRA_LIBS target property. This automates deploying of the libraries that are a part of the project build tree. _qt_internal_collect_target_apk_dependencies collects all the known non-imported shared libraries from the project build tree. When running androiddeployqt we specify extra library directories that point to the collected library locations in build tree, to help androiddeployqt resolve shared libraries that are build as a part of the project. The described procedure is running automatically if CMake version is greater than or equal to 3.18 is. For the CMake versions less than 3.18 users need to call a new public qt_finalize_project function at the end of project's top-level CMakeLists.txt Task-number: QTBUG-94714 Change-Id: I400ca4e49e940cfc25ae90d65372e79825bee55a Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* androiddeployqt: Add support of multiple qml root pathsAlexey Edelev2021-09-081-20/+37
| | | | | | | | | | | | | | | | | If application uses qml files from multiple locations, e.g. subdirectories inside source directory it's important to provide this information to qmlimportscanner to produce consistent set of QML modules that need to be included into the end-point application apk. This makes possible to specify more than one QT_QML_ROOT_PATH per target and propagates these paths to the qmlimportscanner using androiddeployqt tool. Pick-to: 6.2 Task-number: QTBUG-93340 Change-Id: Ic31017b3f2671108adb6d6118ef1c75f1ccc3ec5 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* Allow building android{deployqt, testrunner} under target host_toolsAssam Boudjelthia2021-09-072-7/+11
| | | | | | | | | | | When doing a cross build for Android we need only the host tools which are available under cmake's host_tools target, but androiddeployqt and androidtestrunner are not part of that. This fixes that. Pick-to: 6.2 Change-Id: Icdbc4a78ca050b66ec8df656d9ec766ef6c9f4b9 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Update Android default SDK from 29 to 30Juha Vuolle2021-08-271-1/+1
| | | | | | | | | | | By the time of Qt 6.2 release all new apps targeting Play store must target API level 30 (Android 11) or above (starting in 08/2021 for new apps and 11/2021 for existing apps' updates). Pick-to: 6.2 5.15 Task-number: QTBUG-94451 Change-Id: Id7fa2fd62899a7259e365c917292c6c3ac0d2b0d Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* Add the json option to disable the zstd based compressionAlexey Edelev2021-08-231-1/+13
| | | | | | | | | | | | | Need to disable zstd compression if its support is not built in Qt for Android. The flag is dected when configuring user's project and is a part of the deployment settings. This partially fixes loading of android_rcc_bundle.rcc. Pick-to: 6.2 Task-number: QTBUG-93340 Task-number: QTBUG-95969 Change-Id: I635afb3f9e182a559d53e9344e07f62788f9837d Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* QDirIterator: add nextFileInfo()Marc Mutz2021-07-281-2/+1
| | | | | | | | | | | | | | | | | | | | | | | Before this change, next() was the only way to advance the iterator, whether the caller was ultimately interested in just the filePath() (good) or not (bad luck, had to call .fileInfo()). Add a new function, nextFileInfo(), with returns fileInfo() instead. Incidentally, the returned object has already been constructed as part of advance()ing the iterator, so the new function is faster than next() even if the result is ignored, because we're not calculating a QString result the caller may not be interested in. Use the new function around the code. Fix a couple of cases of next(); fileInfo().filePath() (just use next()'s return value) as a drive-by. [ChangeLog][QtCore][QDirIterator] Added nextFileInfo(), which is like next(), but returns fileInfo() instead of filePath(). Change-Id: I601220575961169b44139fc55b9eae6c3197afb4 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Fix C++20 compilation of androiddeployqtMarc Mutz2021-07-091-3/+3
| | | | | | | | | | | | u8 literals changed type from const char[] to const char8_t[] in C++20 and Qt APIs that don't use QUtf8StringView aren't prepared for it. Use a classical char literal for the time being. Amends 857be50b2e193b92de37c3e2bb5124d24d21a253. Pick-to: 6.2 Change-Id: I7f194befc08ab50cdef321d8900ee3553599a19e Reviewed-by: Andreas Buhr <andreas.buhr@qt.io>
* Let androiddeployqt write a dependency fileAndreas Buhr2021-07-082-0/+54
| | | | | | | | | Let androiddeployqt write a dependency file so that the build system knows when to re-run it. Fixes: QTBUG-94567 Change-Id: I5985d707f257b22789013a74f0a6f7c4de6e5e88 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Android: Make the manifest less to scary to read and editAssam Boudjelthia2021-07-011-13/+10
| | | | | | | | | | | | | | | | | Remove unnecessary elements from the manifest file, making it easier to manage and read. Mostly, the removed elements are more internal data that is populated by the build system and the user shouldn't have to worry or confront that. Also, use the same formatting used by Android Studio. [ChangeLog][Android] Remove some elements from the manifest file that are internal, to make it easier to deal with the manifest. Pick-to: 6.2 Change-Id: I6a1f275b579370972c0bf022502a8fbfe7d0bfd1 Reviewed-by: BogDan Vatra <bogdan@kdab.com>
* Remove ministro codeAssam Boudjelthia2021-07-011-16/+7
| | | | | | | | | | | | | | Since Ministro no longer work on recent Android versions (Android 8+), and it hasn't been maintained and the repos are not updated, the existing code is practically a dead code. [ChangeLog][Android] Remove ministro code since it's been unmaintained and not working with recent Android versions. Task-number: QTBUG-85201 Pick-to: 6.2 Change-Id: I18d7b1e209cba3cfd04674060e9bf39aa5a5510f Reviewed-by: BogDan Vatra <bogdan@kdab.com>