summaryrefslogtreecommitdiffstats
path: root/src/tools/androiddeployqt/main.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Search extra library paths for Android dependency XML files as wellVolker Krause2023-10-071-0/+5
| | | | | | | | | | | | | | | This fixes a regression compared to Qt5. In Qt5 absoluteFilePath() unconditionally searched for all files in extra prefix dirs and the Qt install prefix, in particular also the -android-dependencies.xml files. After the changes in Qt6 up to now however those files are only searched in the Qt install prefix. This broke external libraries also making use of the -android-dependencies.xml mechanism, such as some KDE frameworks. Pick-to: 6.5 6.6 Change-Id: Ic53aab50c70f853f3b1d621d6de6edb3df223905 Reviewed-by: Assam Boudjelthia <[email protected]>
* Android: bump Android target API level to 33Assam Boudjelthia2023-09-231-1/+1
| | | | | | | | | To follow latest Play Store requirement. Pick-to: 6.6.0 6.6 6.5 Fixes: QTBUG-112637 Change-Id: I1ef4f8b639f4b0cc759a2363b7b9b9864b159509 Reviewed-by: Ville Voutilainen <[email protected]>
* Iterate over all extraPrefixDirs when collecting "directories"Alexey Edelev2023-09-151-5/+22
| | | | | | | | | | | | | | | | | When collecting plugins required for the android application according to linked targets we should take into account all prefix directories. But not only the first one. Otherwise the order we use when adding paths to extraPrefixDirs will affect collecting of the plugins. This specifically leads to the issue if the user project builds custom Qt plugins. The plugin directory from user project build tree will be found first and all plugins from Qt installation directory are discarded. Pick-to: 6.6 6.5 Fixes: QTBUG-116920 Change-Id: Id94ebaf5ccd1a279a74b38b59ff535f45230e1b4 Reviewed-by: Assam Boudjelthia <[email protected]> Reviewed-by: Alexandru Croitor <[email protected]>
* tools: use const methods moreAnton Kudryavtsev2023-09-081-1/+1
| | | | | | | to avoid implicit detach Change-Id: I6268d4397631a2a2ff54263dfd0b28a7990c5993 Reviewed-by: Volker Hilsheimer <[email protected]>
* androiddeployqt: Fix generation of qtDataDirectoryAaron McCarthy2023-08-151-1/+1
| | | | | | | | | | | | | Commit 9db5ca87897340873a4606c651a37e0356e8f1a0 sets the default qtDataDirectory to the value of qtInstallDirectory, which results in an invalid path when appended to the SDK. This results in build failures for Android when building with qbs. cmake builds are not affected as the data directory is explicitly set in the build scripts. Pick-to: 6.6 6.5 Change-Id: Ia29c5bae7648f5fccefe019c225e187985bd2592 Reviewed-by: Alexey Edelev <[email protected]> Reviewed-by: Assam Boudjelthia <[email protected]>
* Android: allow using string based versions in compileSdkVersionAssam Boudjelthia2023-04-051-8/+42
| | | | | | | | | | | | | | | | Some platform sdk packages have names that contains non-integer characters such as android-33-ext5 or android-UpsideDownCake which fail building with androiddeployqt because build.gradle expects an integer only. This allows using string based versions and also fallbacks to setting an integer only value if it finds that the build.gradle of the project is still explicitly converting to integer (this to avoid breaking existing projects). Fixes: QTBUG-112465 Pick-to: 6.5 6.2 5.15 Change-Id: If8cfc0fb84f0880a43644dc0a4188671736d3e21 Reviewed-by: Ivan Solovev <[email protected]> Reviewed-by: Ville Voutilainen <[email protected]>
* Android: fix manual deployment with ANDROID_DEPLOYMENT_DEPENDENCIESAssam Boudjelthia2023-04-051-9/+21
| | | | | | | | | | | Fix the qtforandroid (i.e. libplugins_platforms_qtforandroid) check and avoid calling llvm-readobj on non-library files and only add them to the dependency list. Task-number: QTBUG-94232 Pick-to: 6.2 6.5 Change-Id: Id1a415b6d9834daaf5337e9bd15e7daf69fd574f Reviewed-by: Ville Voutilainen <[email protected]>
* Android: don't break when finding opengl pluginAssam Boudjelthia2023-04-051-1/+0
| | | | | | | | | | | | | avoid breaking when looking for the android plugin when the dependencies include opengl lib, since that was valid only in the early days where the Android plugin was separated into two raster and opengl. Now, that assumption is wrong and might affect the way the manual dependency works. Task-number: QTBUG-94232 Pick-to: 6.2 6.5 5.15 Change-Id: I025a5c8b2b064bb43a356a4ad5cb4a1ada41b09b Reviewed-by: Ville Voutilainen <[email protected]>
* Change android target SDK version to 31Fabio Falsini2023-03-211-1/+1
| | | | | | | | Play Store now accept only app with target SDK version set to 31 or above Change-Id: I7f7fb677798c3f2d3ce327226ac13a69f0bab442 Reviewed-by: BogDan Vatra <[email protected]>
* Android: demistify the "No platform plugin" androiddeployqt errorAssam Boudjelthia2023-03-151-9/+4
| | | | | | | | | | | | | | | | | | | | | Make the error message clearly mention that a Qt for Android app require linking to Qt Gui library. Along the way get rid of the libqtforandroidGL mention which was valid when Qt for Android had separate plugins for raster and opengl, which was removed some time ago in 8a9bd001c947e6888d37e99fc456339fd2b51b36. Pick-to: 6.5 6.4 6.2 5.15 Task-number: QTBUG-111933 Task-number: QTBUG-111934 Task-number: QTBUG-108643 Task-number: QTBUG-97636 Task-number: QTBUG-83997 Fixes: QTBUG-85544 Task-number: QTBUG-93185 Change-Id: I24f6c08f619d805e0d82758d35aebaf32038206c Reviewed-by: Alexandru Croitor <[email protected]>
* androiddeployqt: remove infinity loop in deleteMissingFilesBartlomiej Moskal2023-03-151-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | There was a possibility of infinite loop and eventually crash when androiddeployqt was used for the second time. Everything because of deleteMissingFiles function for clean up previous build. When we find the same names and those are directories, we call recursively deleteMissingFiles. The parameters we use are absoluteDir, not absoluteFilePath. As we use parent of found dir, deleteMissingFiles is called with the same values as before. This commit removes possibility of infinite loop by using absoluteFilePath. That allows to avoid calling deleteMissingFiles with the same parameters. There is still a possibility, that directory that was found is not the same as we were looking for. That will cause not needed files removing, but those file will be copied again later. This regression was created by 7dc05252a0df829bb5ea3994160d425bb0da26cb commit Pick-to: 6.5 6.2 Fixes: QTBUG-111027 Change-Id: I195b4c407068b14e2ef94800ad1945adc66408cb Reviewed-by: Assam Boudjelthia <[email protected]>
* androiddeployqt: make --help documentation-friendlyVille Voutilainen2023-02-071-106/+106
| | | | | Change-Id: I08558d23230ec162928fea2c413ae8e2498617d7 Reviewed-by: Nicholas Bennett <[email protected]>
* Revert "Revert "Add support for MultiABI with custom install dir of the ↵Alexey Edelev2023-02-021-25/+139
| | | | | | | | | | | | android-build"" This reverts commit d7e8d5bb1b5a9c4b21a3d824780c672eaf4e56b1. Reason for revert: Found a working solution for the issue. Change-Id: Ia720cc63ece9dfb1a24067cdd9c3d79d4edbe3be Reviewed-by: Alexandru Croitor <[email protected]> Reviewed-by: Assam Boudjelthia <[email protected]>
* Revert "Add support for MultiABI with custom install dir of the android-build"Alexandru Croitor2023-02-011-139/+25
| | | | | | | | | | This reverts commit 979a21dc4ee0c6f483c6b55e9242a153d659ab6f. Reason for revert: Caused QTBUG-110836 Task-number: QTBUG-110836 Change-Id: I4f31018954e6bb0f4e7b6db0df76d04c0a56d9b1 Reviewed-by: Alexandru Croitor <[email protected]>
* Add support for MultiABI with custom install dir of the android-buildFab Stz2023-01-301-25/+139
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Right now, "multi abi builds" of android projects works only if the android-build installation doesn't use custom install dirs (INSTALL_PREFIX, INSTALL_BINDIR...) At the same time, it fixes QTBUG-106533. The patches are the same as the ones in that bugreport. Add new items to android-*-deployment-settings.json: qtDataDirectory qtLibsDirectory qtLibExecsDirectory qtPluginsDirectory qtQmlDirectory Update androiddeployqt to be able to get files from their install location BTW (fixes QTBUG-106533): Install src/android/templates into INSTALL_DATADIR Install src/3rdparty/gradle into INSTALL_DATADIR Install src/android/java files into INSTALL_DATADIR Install all jars into INSTALL_DATADIR Add missing path to target_qt.conf Update target_qt.conf to have all path. Otherwise qmake wouldn't have the path when installing the android-build with custom install dirs like INSTALL_LIBDIR & friends Add support for a new cmake variable that can be set at build time of the android projects: QT_ANDROID_PATH_CMAKE_DIR_${abi} (Name chosen as brother of QT_HOST_PATH_CMAKE_DIR) Pick-to: 6.5 Fixes: QTBUG-106533 Fixes: QTBUG-107207 Change-Id: Ia3751362ab1b5f877ecafbe02f263feac167119c Reviewed-by: Qt CI Bot <[email protected]> Reviewed-by: Alexandru Croitor <[email protected]>
* Move '--sign' argument to the end of the androiddeployqt commandAlexey Edelev2023-01-021-1/+7
| | | | | | | | | | | | | | | The '--sign' argument may and may not accept two follow arguments to specify signing path and alias from the command line. This functionality breaks the parsing of command line arguments that follow the '--sign' argument and expect that '--sign' is used with no follow arguments. It does make sense to check if the arguments passed after the --sign staring with '--' to make sure that '--sign' with no arguments is meant to be used. Pick-to: 6.4 6.5 Fixes: QTBUG-109619 Change-Id: I4ee7fe953e5378c00760d84ec58f9e89e4348944 Reviewed-by: Jörg Bornemann <[email protected]>
* Clean up unused variablesLu YaNing2022-12-221-3/+0
| | | | | | | | Amends commit 5bb178c479a247720fbc3fbb7f06a32b725193ac and c8b07f7da3ff55f92378a1e98522f318bbc43077 Change-Id: I709390e52263bf0fadb083d6f2c29562b1877a8b Reviewed-by: Assam Boudjelthia <[email protected]>
* androiddeployqt: Avoid extra modifying of gradle's *.properties filesAlessandro Portale2022-12-021-1/+1
| | | | | | | | On each run of androiddeployqt involving gradle, the "merging" of gradle's *.properties files inserted empty lines. Change-Id: I7a8314cd0adf4d85663f17ac22967a08cab42b91 Reviewed-by: Assam Boudjelthia <[email protected]>
* Make sure that module can be imported by the provided QML import pathAlexey Edelev2022-11-081-11/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When resolving QML module dependencies we scan the produced by the build system import paths for the required QML modules. Previously the check in androiddeployqt only was confirming that the required import starts with the one of import paths. This worked well unless the required import is nested in higher level import path. In the situation when we have the following build structure: build_dir/ imports/ MyModule/ ... and both 'build_dir' and 'build_dir/imports' directories are in QML import paths, the MyModule QML module is resolved by the 'build_dir/imports'. But androiddeployqt assumed that it's found by 'build_dir' import path and copied the whole 'imports' directory as the 'MyModule' QML module. The resulting bundle then had the following content: qml/ imports/ MyModule/ ... ... instead of the correct one: qml/ MyModule/ ... ... This checks if import path contains the required url-based module path before using it as the base directory to copy the module. Amends 0a73fb10005053945571e6cdb0b03d916715c112 Pick-to: 6.2 6.4 Fixes: QTBUG-108194 Change-Id: I79e1a8a67f62e5ae4a899ba1a4f49ee4ad44ebf9 Reviewed-by: Qt CI Bot <[email protected]> Reviewed-by: Dominik Holland <[email protected]>
* Remove the special handling of the qml directory when parsing xml depsAlexey Edelev2022-11-031-5/+0
| | | | | | | | | | | | | | | | | | | | | | The 'qml-root-path' option is not mandatory to have value when using CMake, even if Qml/Quick is used in the project. This happens when the project doesn't use .qml files. In this case the 'qml' directory from Qt6Quick_<abi>-android-dependencies.xml is treated as a normal folder for scanning and androiddeployqt deploys all the QML plugins with their dependencies. It looks like the 'qml' directory was added to bundled file in times when qmlimportscanner was not implemented, so the need of its use is redundant. This removes both adding the 'qml' directory as the bundled dependency and the special case that avoids its scanning. This fix is applicable for both CMake and qmake. Amends 54c959643ea92c0b87a7807c64f2351328cdce7d Task-number: QTBUG-106035 Task-number: QTBUG-107589 Change-Id: Idd55617b8ca8ab1d210cce737548ee486ea94986 Reviewed-by: Alexandru Croitor <[email protected]>
* androiddeployqt: Add the missing return value checkAlexey Edelev2022-11-031-2/+7
| | | | | | | | | | | | | | The check doesn't affect the flow, since the same check fails the androiddeployqt execution later, when resolving all elf dependencies. Skipping the dependency from xml at earlier stage will allow to continue deployment procedure, without the missing plugins and their dependencies. Amends 54c959643ea92c0b87a7807c64f2351328cdce7d Task-number: QTBUG-106035 Task-number: QTBUG-107589 Change-Id: Ic3d38e05f8ad283244c87858fee29d1035a0da15 Reviewed-by: Mårten Nordheim <[email protected]>
* Android: Fix signing of APKs that are generated when an AAB is also builtVille Voutilainen2022-11-021-45/+8
| | | | | | | | | | | | To simplify matters, this removes the support for signing APKs with just jarsigner. apksigner is always used for APKs, and jarsigner is used for AABs. I consider that to be just fine, you _have_ to start using apksigner eventually, and the time for that is long past. Pick-to: 6.4 6.2 5.15 Task-number: QTBUG-91255 Change-Id: I211ae796db0f2619265deb1f30ab3cc5d1ecfbc9 Reviewed-by: Assam Boudjelthia <[email protected]>
* Add flag that skips Qml import scanning to android deployment settingsAlexey Edelev2022-10-311-5/+11
| | | | | | | | | | | | | If Qml module is not found it doesn't make sense to run any functionality that is related to Qml inside androiddeployqt. Add the deployment setting option that indicates this explicitly and set it to true when Qml module is not found by CMake or by qmake. Task-number: QTBUG-106939 Pick-to: 6.4 6.2 Change-Id: I1e6cffbdd230007feffe7448617097c10238a6c9 Reviewed-by: Alexandru Croitor <[email protected]> Reviewed-by: Assam Boudjelthia <[email protected]>
* Add Qt plugins to the dependency list with their dependenciesAlexey Edelev2022-10-251-4/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In androiddeployqt we try to add all plugins that belong to the Qt modules that Android application links. This works in case if all the plugin dependencies are linked to the Android application explicitly or implicitly using a build system linking mechanism. But plugins may have dependencies that should be resolved implicitly by androiddeployqt. The following situation is handled by this change: App1 links QtLib1.so QtLib1.so promotes its plugin plugin1.so to be included to an apk plugin1.so links QtLib2.so In the described example App1 expects that plugin1.so with all the dependencies is deployed to an apk without the need of linking QtLib2.so explicitly. There is a negative side effect of this change. plugin1.so is added to apk unconditionally so there could be a situation when the plugin is unused. So QtLib2.so with its dependencies will be included to an apk without necessity and will increase the size of the apk significantly. Cleanup forward declarations in androiddeployqt's main.cpp by moving them to the top of the file. TODO: Need to add the API which allows to exclude such plugins from apk or to specify the list of essential plugins that are used in the Android application. See QTBUG-107634 for details. [ChangeLog][Android] All plugins that belong to the Qt modules that are linked to the Android application are now deployed with their dependencies. androiddeployqt tries to find and resolve plugin dependencies implicitly instead of skipping plugins with dependencies that are not resolved explicitly in the user project. Fixes: QTBUG-107589 Fixes: QTBUG-106035 Change-Id: Ib6d9abd74ae5e21e856d7ccd02789a7a65602f40 Reviewed-by: Ivan Solovev <[email protected]> Reviewed-by: Alexandru Croitor <[email protected]> Reviewed-by: Assam Boudjelthia <[email protected]>
* Android: fix Gradle warning about using enableUncompressedNativeLibsAssam Boudjelthia2022-10-211-2/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The warning is as follows: WARNING:The option setting 'android.bundle.enableUncompressedNativeLibs=false' is deprecated. The current default is 'true'. It will be removed in version 8.0 of the Android Gradle plugin. You can add the following to your build.gradle instead: android { packagingOptions { jniLibs { useLegacyPackaging = true } } } We already define that property in build.gradle, but we also need to account for cases where an old build.gradle file that doesn't have that property is used. So androiddeployqt checks if useLegacyPackaging is set (and not commented out) whether it's true or false, if it's set to true, then that's what Qt wants to set, and if it's set to false, then we assume the user setting it to false is explicit and we don't want to change that. Pick-to: 6.4 6.2 5.15 Fixes: QTBUG-106713 Change-Id: I566232207c458daa4484623beee670c6c6679313 Reviewed-by: Ivan Solovev <[email protected]> Reviewed-by: Qt CI Bot <[email protected]> Reviewed-by: Ville Voutilainen <[email protected]>
* Port from qAsConst() to std::as_const()Marc Mutz2022-10-111-6/+6
| | | | | | | | | | | | | | | | We've been requiring C++17 since Qt 6.0, and our qAsConst use finally starts to bother us (QTBUG-99313), so time to port away from it now. Since qAsConst has exactly the same semantics as std::as_const (down to rvalue treatment, constexpr'ness and noexcept'ness), there's really nothing more to it than a global search-and-replace, with manual unstaging of the actual definition and documentation in dist/, src/corelib/doc/ and src/corelib/global/. Task-number: QTBUG-99313 Change-Id: I4c7114444a325ad4e62d0fcbfd347d2bbfb21541 Reviewed-by: Ivan Solovev <[email protected]>
* Port from container.count()/length() to size()Marc Mutz2022-10-041-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is semantic patch using ClangTidyTransformator: auto QtContainerClass = expr(hasType(namedDecl(hasAnyName(<classes>)))).bind(o) makeRule(cxxMemberCallExpr(on(QtContainerClass), callee(cxxMethodDecl(hasAnyName({"count", "length"), parameterCountIs(0))))), changeTo(cat(access(o, cat("size"), "()"))), cat("use 'size()' instead of 'count()/length()'")) a.k.a qt-port-to-std-compatible-api with config Scope: 'Container'. <classes> are: // sequential: "QByteArray", "QList", "QQueue", "QStack", "QString", "QVarLengthArray", "QVector", // associative: "QHash", "QMultiHash", "QMap", "QMultiMap", "QSet", // Qt has no QMultiSet Change-Id: Ibe8837be96e8d30d1846881ecd65180c1bc459af Reviewed-by: Qt CI Bot <[email protected]> Reviewed-by: Volker Hilsheimer <[email protected]>
* Fix condition that runs the scanning of the Qml importsAlexey Edelev2022-09-271-1/+1
| | | | | | | | | | | Scanning of the Qml imports should be run if either Qml root paths or .qrc files are specified for androiddeployqt. Task-number: QTBUG-106939 Pick-to: 6.2 6.4 Change-Id: I3229ec6d3f2ac17ef751b4a6ed74e8e98db7465e Reviewed-by: Alexandru Croitor <[email protected]> Reviewed-by: Assam Boudjelthia <[email protected]>
* 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 <[email protected]>
* 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 <[email protected]>
* 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 <[email protected]>
* 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 <[email protected]> Reviewed-by: Alexey Edelev <[email protected]>
* 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 <[email protected]> Reviewed-by: Jörg Bornemann <[email protected]>
* 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 <[email protected]> Reviewed-by: Qt CI Bot <[email protected]>
* Add option to not include native libraries in APKTinja Paavoseppä2022-05-201-19/+80
| | | | | | | | | | | | | | | | | 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 <[email protected]>
* Use SPDX license identifiersLucie Gérard2022-05-161-27/+2
| | | | | | | | | | | | | 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 <[email protected]> Reviewed-by: Lars Knoll <[email protected]> Reviewed-by: Jörg Bornemann <[email protected]>
* 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 <[email protected]> Reviewed-by: Fabian Kosmale <[email protected]>
* 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 <[email protected]>
* Android: remove what appears to be non-necessary debug print leftoversAssam Boudjelthia2022-04-211-2/+1
| | | | | Change-Id: Ib87c6ada78180dcc686d24a048dbcfa159cac974 Reviewed-by: Ivan Solovev <[email protected]>
* 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 <[email protected]>
* 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 <[email protected]>
* 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 <[email protected]>
* 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 <[email protected]>
* 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 <[email protected]> Reviewed-by: Ivan Solovev <[email protected]> Reviewed-by: Assam Boudjelthia <[email protected]>
* 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 <[email protected]>
* 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 <[email protected]>
* 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 <[email protected]> Reviewed-by: Qt CI Bot <[email protected]>
* 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 <[email protected]>
* 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 <[email protected]>
* 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 <[email protected]>