...in Release builds
Signed Release builds are now deployed correctly by giving
androiddeployqt the --release flag during the Deployment step
for Release builds.
Unsigned Release apks are now correctly built under the release
directory by giving androiddeployqt the --release flag during the Build
step for Release builds instead of determining build type from whether
or not the package is signed.
Fixes: QTCREATORBUG-28163
Change-Id: I319bc95325c88fb84a5997c9237df65eb7983c0e
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
- gatherFilesToPull depends on AndroidManager::setDeviceAbis
- use the same path for app_process. gatherFilesToPull pulls app_process
to AndroidManager::buildDirectory(target) which might be different than
activeRunConfig->buildTargetInfo().workingDirectory.
Change-Id: Id47c4380fed5a8b3ad922359e5f9f25e529bacff
Reviewed-by: hjk <hjk@qt.io>
There is no need to keep m_process as a class member,
since it's only used in just one function.
Change-Id: I156b978a18ab25a41b0e52d00fcb90c0f7f12ddd
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
If for some reason the device abi list is empty, don't stop the
deployment, let it continue and potentially fail later.
Amends c1512dce87.
Task-number: QTCREATORBUG-27103
Change-Id: I484fbd1ddb365d5e96686eebc3ba76032684e506
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
If for some reason we cannot get the list of kit's ABIs or it's not set,
don't stop the deployment because of that, let it continue and fail
later.
Fixes: QTCREATORBUG-27103
Change-Id: I973e5ffdca1e8fb6af3f6e6438969b38b8e375c8
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Introduce EventLoopMode enum and pass it to the
QtcProcess::runBlocking() instead. There is no need to
store this setting. By default this value is NoEventLoop.
Change-Id: Icad98b77bec5280b79039b7e5aa4ec408261521c
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Add error messages for cases in the different steps (e.g. build, deploy,
etc.) for user. This makes it easier for the user to know what's wrong
instead of just failing with no explanation.
Change-Id: I96ea65f5c73edf14c2214b699503211b740d029c
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
The deploy step widget most useful aspect is the uninstall before
deploy checkbox, and having it expanded by default would improve the
UX a bit by avoiding one extra mouse click.
Change-Id: I23ebc90daf9290d229d93dca1b9b25629902e3f2
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
clean, rename and delete unused constants, we well as unify the
usage between qmake, cmake, and qbs.
Change-Id: I8827ac2f2f7660e337694fef17f744e727bd776a
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Currently, on deploy/debug steps on Android, an AndroidDeviceDialog
is popped up each time a deployement is done to select a device. This
can be avoidable by using Qt Creator DeviceKitAspect to have the list
of devices easily selectable from the project mini-menu.
This is better than the current way because it:
* reduces the time from deployment to running the app
* reduces the number of clicks
* avoids having to select the same device each time or
* if a default device is selected, this avoids having to go to project
settings to reset the default device to be able to deploy to a new
device.
* it looks cleaner and more compatible with Creator.
Task-number: QTCREATORBUG-23991
Change-Id: Ida4ab7245c1a3b0ca26c5ccdc9a21a072edf0725
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
With CMake, it seems that the abi was being empty string because
looking for ANDROID_ABIS is not defined and instead there's ANDROID_ABI.
Also make sure to handle the case of ANDROID_ABIS, which might be
declared in future versions like Qt 6.3 which can support multi-abi
builds.
Change-Id: I805c5c25409a4e20a237b8747082d256bd72e275
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
The Android deployment file for CMake project was constructed based
on the main project target and thus was always expecting the file
to be under the build folder root path. This makes sure the correct
path to the output path is retrieved.
This practically different problems with running examples when the
main project is a Qt module, for both qmake and cmake.
Fixes: QTCREATORBUG-25793
Change-Id: I5fdedd94c7c4c84c351c28476ca14b0f95f99f22
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Deploy step uses AndroidManager::minimumSDK() which looks for the
version in the AndroidManifest.xml file which used to contain the
minimum and target sdk, but if the manifest doesn't contain that
value, this logic returns 0. So, return the defaultMinimumSDK()
in case the first way fails.
Change-Id: Id10e552d7c8de4d3544b7fa8f26ae5dd9e974df5
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
When installing a signed apk, adb might throw the following log
"All files should be loaded. Notifying the device." which is being
treated as an error and will stop the deployment from going forward
until user input is given. The current condition is not catching it
probably because it has a \n at the end, but let's treat it as a
warning.
Change-Id: If071730b39871b4e60f8755d14ba352b86e7c244
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
The Windows-only restriction is nowadays handled inside QtcProcess.
Change-Id: I77d6914831ff172026665a429b497940c60970ac
Reviewed-by: David Schulz <david.schulz@qt.io>
Some functions do not work and should therefore not be used.
Line-based processing of the output interferes with the internal
automatic usage of the ChannelBuffers.
Remove the respective functions and move the line parsing over
to the client.
Change-Id: Iaaa58c181e35e132fae863ddb808547142c99221
Reviewed-by: hjk <hjk@qt.io>
This is already baked into QtcProcess::Result.
Change-Id: I02b017c7d26b5c42ea4e00cea5c3b393274edfdc
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
To make clear that this is not just any finish.
Also change FinishedError to FinishedWithError, to create
symmetry.
Also adapt enum member description to reality.
Change-Id: I13e05391eb86fdb24e2ae660f14dfddb282e1104
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Make functionality dependent on an (intentionally ugly)
setProcessUserEventWhileRunning call.
Also, back-paddle a bit on API combination of QtcProcess and
SynchronousPrceoss for now and prevent the QtcProcess-and-
runBlocking and SynchronousProcess-and-start combinations.
Goal is still to have all in QtcProcess in the end, but this
may take a while.
Change-Id: Ic146ec5db0ab8dc9613e5b2af5f4dc90bc7465ca
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Makes run() more similar to what start() looks like.
Also add some asserts to make sure run() and related functions are
only called on SyncronousProcesses, as these are currently the only
ones where this works.
Change-Id: Idee6076c3f40a484db5c17f5bb348698cc83d220
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This was requiring parameters the process object already knows.
This is a slight behavior change in most cases, it now includes
always the command line arguments, which previously only happened
in gcctoolchain.cpp and iarewtoolchain.cpp.
Change-Id: Id25a68c397e2f1d8bf52ab29210e215b1de46c6d
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
The result is fully stored in the object anyway. Using the extra
SynchronousProcessResponse structure only causes copies of
the data and complicates access on the user side in
a lot of cases.
The result bits are now also accessible individually.
There's obvious room for follow-up changes on the topic, e.g.
ShellCommand::runCommand's parameter list could shrink to
just a SynchronousProcess parameter.
Change-Id: I45aa7eb23832340be06905929280c012e1217263
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Mechanical to prepare merging the actual classes.
Adapting #includes.
Change-Id: I77a2c28129287778bc870c30cb890cd26bc2e62b
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
The display name is continuously read and written from/to settings.
Let's not add markup each occurrence, it accumulates.
BuildStep::summaryText has the logic to add the markup for the UI.
Change-Id: Ifbb74ccb8d2f0adcebbd69cc012a5b1376154934
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: hjk <hjk@qt.io>
Since this is not really an error but it is outputted to stderr,
we need to explicitly ignore it so it does not show an error
dialog.
Change-Id: Ia972cf134278216c317649b5483e3deac683374d
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
In most cases, the layout constructed in the builder was set
on a widget which in turn was put into a vbox in the actual
widget. This is not necessary, but needs some re-ordering.
Also make sure that using not-yet-parented widgets during
layout construction does not cause visible artifacts.
Change-Id: I75727a571da093d3131ea6fba467c2c646cdb6f1
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Qt 6.0 + CMake: The name for the Android deployment settings file needs
to be determined by using the build key of the current run configuration
rather than by using the display name of the project root node.
Since in contrast to qmake/Qbs, CMake does not supply us with the file
name and we have to contruct it ourselves. Therefore, it makes sense to
move the value into the Android plugin.
This change adds AndroidQtVersion::androidDeploymentSettings which lets
qmake and Qbs still provide the value as before while handling the CMake
fallback.
Fixes: QTCREATORBUG-25209
Change-Id: I12314d06a45d6e045cb654d9140f9d2ed4602f67
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
The output of androiddeployqt that is picked by QC, can contain newline
char at the start of the received line like:
"\nNote: Recompile with -Xlint:deprecation for details."
Such output is sould be only a warning
and not an error, that's we try to remove the newline from the start to
avdoid this behavior.
Fixes: QTCREATORBUG-24881
Change-Id: Iad7556917cb0f53dc691dfb316f999ad504976e9
Reviewed-by: hjk <hjk@qt.io>
Use buildSystem::property()/setProperty() to keep track of the
selected ABI and avoid polluting the *.pro file with it.
Task-number: QTCREATORBUG-24674
Change-Id: I5516a77c9f2d1a8975045e1d7c383e72c52db9d7
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
Reviewed-by: hjk <hjk@qt.io>