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 <alexandru.croitor@qt.io>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
They should contain the executable suffix .exe when
androiddeployqt is run on Windows, because androiddeployqt does not
add the suffix itself when the tool paths read from the json file.
Amends 4fc14b1933
Amends 176136ce60
Pick-to: 6.4
Fixes: QTBUG-105133
Fixes: QTCREATORBUG-27868
Change-Id: I8c5bac2fa6c82d122f8a70c5ff2a561298327a34
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
When building a shared library (with qmake) in a user project
targeting Android, the library gets a QT_ARCH suffix added to its
name.
This suffix is not added when building a static library
(CONFIG += staticlib).
In the context of a multi-abi android qmake build, all the arch
specific static libraries would have the same name and would
override each other.
This happens with Qt 5.15 and it would also happen in Qt 6,
but we don't support multi-abi qmake builds in Qt 6 so far.
When the original fix to include the arch suffix for shared libraries
was done in Qt 5, d463a63bb9
it was likely an oversight that it was not applied to static
libraries as well.
The !static part of the condition was added in
72d4f0750b .
The change only handled installation responsibilities, not naming of
libraries.
Fix static libraries to include the arch suffix, but only in Qt 6.
It's too late to fix it in Qt 5, there might be projects that rely on
there not being a suffix in static library names. Adding the suffix
would suddenly cause linking errors.
Amends d463a63bb9
[ChangeLog][Android][qmake] Static libraries targeting Android will
now include an arch suffix when built using qmake.
Fixes: QTBUG-83165
Change-Id: I6f68dcb74cec30b4c8f0bc5a819d89843e9d695e
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
To allow using Android 12 APIs.
Pick-to: 6.2 5.15
Change-Id: I5e9da66c84457888ec723125d16876891232a99b
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
With single_android_abi, the file qmake_qmake_immediate.qrc is laid
directly into the root of the build dir and not under different abis
dirs.
Pick-to: 6.2.0 6.2 5.15
Fixes: QTBUG-87669
Fixes: QTBUG-95202
Fixes: QTBUG-95235
Change-Id: Ie13cccdf2fc323e8fd725a94f3aacab465fa1287
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
It is no longer handled separately from Android.
This effectively reverts commit 6d50f746fe
Change-Id: Ic2d75b8c5a09895810913311ab2fe3355d4d2983
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
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>
comply with the api version used by default with androiddeployqt and
in docs. Google play also requires api 29 as minimum.
Task-number: QTBUG-90943
Pick-to: 6.1 6.0
Change-Id: I05e2a90b4d7f2120b0198e3fb7b8b1b2398eba93
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
On Windows shell, using unix path format might not work, since the shell
expects backslash paths only.
Pick-to: 5.15
Task-number: QTBUG-87066
Change-Id: I51741b475c1ede11336df63ee1c6092c792c16ef
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
qmlimportscanner and rcc in Qt 6.0 are part of the host installation
and not in the target installation which androiddeployqt expects it to be.
Fixes: QTBUG-86831
Change-Id: I9d7a6fce3d2f109bab933fcfd7fdd5d2c83821a8
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
AndroidManifest.xml file and the Android plugin already has a way
to provide commandline-arguments to app with the tag
"android.app.arguments". This change allow to set it from qmake/cmake
and allow Qt Creator to use that.
Task-number: QTCREATORBUG-23712
Change-Id: I3e680f40fd36ba6aaac7f344fb9509d2c3360e74
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
When configuring with Qt only with one ABI, certain code paths were
not triggered, which led to a few issues:
- The deployment json file generated by androiddeployqt listed
no architectures.
- The compiled shared library did not have a lib prefix and arch suffix,
which androiddeployqt during the deployment / make apk step.
To fix the architectures missing in the json file, ANDROID_ABIS needs
to be set in android/resolve_config.prf also in the single abi case.
To get the correct file names, android.prf needs to apply the prefixes
and suffixes not only in the build_pass case (multi-abi) but also in
the single abi case (except for config.tests).
The application-binary entry in the json file needs to be without the
extra prefixes and suffixes though, so make a copy of the TARGET value
to be used in the json file, before the name manipulations are
applied.
Pick-to: 5.15
Task-number: QTBUG-85399
Change-Id: Idde92ab7fe883636ccc65a87b91c8a3fc72eefbb
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
QML2_IMPORT_PATH it's usually set by CI to tell the QML apps where to
find the QML components
Change-Id: I57d1cbc3d0fce9be257648268da0a5f9d61d81e9
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
This amends 0ef46b41d8 to ensure the
new configuration is styled correctly for qmake.
Task-number: QTBUG-80938
Change-Id: Iebfff3ff0570d2e92d01d4eb1178c0d6261468f9
Pick-to: 5.15
Reviewed-by: Lars Schmertmann <lars.schmertmann@governikus.de>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
First of all cmake and qmake used a different standard.
Secondly, the qmake logic enforced lvl 23 (if it was installed which
is the case on the failing machine). When this is combined with
f71a400bf6 which requires lvl 28 API to build, the android build fails to compile.
cmake logic was even worse as it enforced lvl 21 API to be used if installed.
This change requires pick to 5.15 as f71a400bf6 was picked as well.
Pick-to: 5.15
Change-Id: I89a7193b711b8bf927d02907343a49d6f27082ce
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
There are certain APIs we need which cannot be used without this,
and in general it simplifies some code.
[ChangeLog][Android] Minimum Android version is now Android 6.0,
API level 23.
Change-Id: I72ca3b429bf48969e16e2bc6b99d9c4af993ea77
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
This amends ce04fa345d to correctly get
the information out of the variables when using str_member and str_size,
as it wants a string rather than a variable for these.
Fixes: QTBUG-80582
Change-Id: I8e18e05c605ba1596a7ed7a013f5c6677ab76891
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
The extra targets should be added to the project regardless so that
qmake can handle it appropriately. This enables make apk to work
correctly then from a SUBDIRS project.
Fixes: QTBUG-80351
Change-Id: If5903e0d2f543babfdb4ebbb13502e32ab97c6fc
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
When passing the resources used to the android deployment setting json
file it needs to check the variable generated by the qtquickcompiler
feature so that it can still find the qrc files originally populated in
the resources. This ensures that qmlimportscanner can still scan the
original qrc files when determining which QML import plugins are
needed.
Fixes: QTBUG-80713
Change-Id: I695b289eaaa78cc6c355fa8abd22a8a1031a9f6c
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
When doing a multi ABI build in one go, if the TARGET is the same,
we'll endup with only one library which is not okay.
Task-number: QTBUG-80351
Change-Id: I0c5ff24480446d671e59dbd5a045f9889dff39e9
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
With the qrcFiles entry in the deployment JSON for Android, it can now
pass this on to qmlimportscanner for scanning the qrc files for the
available imports. This enables qmake to populate the qrc files it has
referenced in the project, be it generated by qmake or added by the
user.
Task-number: QTBUG-55259
Change-Id: Ic512ce6f24508b3ea09ebdd07ac4446debfd9155
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Move aab, apk, apk_install_target to !build_pass, otherwise these targets
will be executed for each android abi.
Change-Id: I18f6c8946f503f2c08338f24758bf9059987fe0f
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
-android-toolchain-version is not needed anymore as we are using exclusively the llvm toolchain.
Change-Id: Ia033297a6a2c968352c364758eb1436380a5f96e
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
Multi arch build in one go is need to support the new .aab packaging format.
By default the users apps are built for all Android ABIs: arm64-v8a armeabi-v7a x86_64 x86
The user can pass ANDROID_ABIS to qmake to filter the ABIs during development,
e.g. qmake ANDROID_ABIS="arm64-v8a armeabi-v7a" will build only for arm ABIs.
[ChangeLog][Android] Android multi arch build in one go,
needed to support the new .aab packaging format.
Change-Id: I3a64caf9621c2a195863976a62a57cdf47e6e3b5
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
The make executable that comes with Android's NDK tries to execute the
shell-builtin "move" as a stand-alone executable unless you trick it
to execute "move" through the shell by surrounding one argument with
double quotes or such.
Force the execution of "move" through shell by altering QMAKE_MOVE for
Android on Windows.
Change-Id: I5b1490ad0606960dbd06a4cafb0b0b983e265159
Fixes: QTBUG-35713
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
Mips archs were removed from Android NDK long time ago.
Change-Id: Icf64a1e2cfbe3fe7307c7898b14fd199d9eeaad3
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Now creating an .apk it's easier than ever.
"$ make apk" is all you need to run to create an apk for your application.
[ChangeLog][Android] Introduce "make apk" target, an easy way to create an apk.
Change-Id: I12565e7ed32beb42da40d8ce42a52339038be950
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
This makes it much easier to have the version information set for an
Android APK without having to manually modify the AndroidManifest.xml
each time.
[ChangeLog][Android][qmake] Can now set the version name and code for
Android using ANDROID_VERSION_NAME and ANDROID_VERSION_CODE respectively
in the pro file.
Change-Id: Ie6813bc3a7444f7baa5e772b93bc2695d9b81e57
Done-with: Markus Maier <markus.maier@rosenberger.de>
Reviewed-by: Markus Maier <markus.maier@rosenberger.de>
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
With the current distribution, this is 90% of active devices, and
it was released in 2014. Qt 5.12 is LTS and will continue to support
older Android versions for a long time to come.
This is to reduce the testing needed on outdated platforms and
allow ourselves to use some newer APIs unconditionally in Qt.
Android 21 was chosen because it is the minimum version that supports
64 bit builds.
[ChangeLog][Android] Increased the minimum supported Android version
to Android 5.0 (API level 21).
Fixes: QTBUG-70508
Change-Id: Ia7b4345e42ca05a25a292f11ccbb8cbd692cf8f0
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
In NDKr18 Google removed GCC, most probably the massacre will not end
there and they will remove all GNU tools, so we need to start using LLVM
ones.
This patch still keeps the compatibility with GNU tools if the Qt was
built with android-g++ mkspec.
Change-Id: Ibe1979577e08ce63604d55fc5bbd5f64b3737675
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
The Embedded Android build (Boot to Qt Android injection) is defined by
having both Q_OS_ANDROID and Q_OS_ANDROID_EMBEDDED flags defined,
as well as having Qt config android-embedded.
This commit enables the possibility to build embedded Android builds.
(i.e. Qt build for Android baselayer only, without JNI)
Change-Id: I8406e959fdf1c8d9efebbbe53f1a391fa25f336a
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
clang+libc++ is the only supported way by Google nowadays.
libstdc++ is too old and already fails to build some C++11 apps
e.g. missing std::to_string().
android-g++ mkspec still uses libstdc++ and g++.
Use -isystem to include system headers instead of QMAKE_INCDIR_POST (-I).
Task-number: QTBUG-60455
Change-Id: Iba8b04594c2e5e2832e6cf480e4e52ff31ad4106
Reviewed-by: Sérgio Martins <sergio.martins@kdab.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
This reverts commit c0e94dd093, as it
introduced a regression for applications that sets an installation
target (on Android), which a lot of our examples do. The installation
target for Android applications/libraries needs to be within in the
application bundle's directory tree, or it won't work.
Task-number: QTBUG-61635
Change-Id: I8c919ef3888d7679b0f9659796f5e590bc1faa57
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
these are not meant to be deployed, so the install hack should skip
them.
Task-number: QTBUG-42830
Change-Id: I870499dca2cfea87bf0048f019d651ce9cc5d788
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>