This follow the rough pattern of recent *RunConfigurationFactory changes
for build and deploy configurations.
- Collapse the two lines of constructors similar to what
890c1906e6 did for RunConfigurations
* Deploy* was purely mechanical
* Build* ctors are split in connects() in the ctor body
to create "empty shell for clone" etc
and build step additions in initialize() functions which
are only used in the create() case.
-- Allows to collapse the shared 'ctor()' functions, too.
- Move FooBuildConfigurationFactory::create() implementations
to FooBuildConfiguration() constructor. That was a strange
and unneeded ping-pong between factories and objects, and
furthermore allows one level less of indirection (and for a
later, left out here, some reduction of the
FooBuildConfiguration interfaces that were only used to
accommodate the *Factory::create() functions.
- Most {Build,Deploy}Configuration{,Factory} classes had a canHandle(),
but there wasn't one in the base classses. Have one there.
- Most canHandle() functions were checking simple restrictions on
e.g. project or target types, specify those by setters in the
constructors instead and check them in the base canHandle()
- clone() is generally replaced by a creation of a "shell object"
and a fromMap(source->toMap()), implemented in the base, there
are two cases left for Android and Qbs that needed(?) some extra
polish
- generally use canHandle() in base implementation, instead
of doing that in all Derived::canFoo()
- as a result, canCreate/create/canClone/clone reimplementations
are not needed anymore, keep the base implementation for
now (could be inlined into their only users later), but
de-virtualize them.
- Combine Ios{Preset,DSym}BuildStepFactory. There was only one
'dsym' build step they could create.
- Split the 'mangled' id into the ProjectConfiguration subtype
specific constant identifier, and a QString extraId() bit.
Only maintain the mangled id in saved settings.
- Make ProjectConfiguration::m_id a constant member, adapt
all constructors of derived classe.
Not done in this patch:
- Finish possible cosmetic changes on top
- Add a way to specify restrictions to supported Qt versions
(used in Android/Ios), as the base implementation does not
depend on the qtsupport plugin
- Combine the QList<X> availableFoo() + createFoo(X) function
pairs to somthing like a direct
QList<struct { X; std::function<X()>; }> fooCreators()
to avoid e.g. the baseId.withSuffix() <-> id.suffixAfter(base)
pingpong
- Remove the *Factories from the global object pool
- Do something about priority(). Falling back to plain
qmake in android+qmake setup is not helpful.
Change-Id: I2be7d88d554c5aa8b7db8edf5b93278e1ae0112a
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Ministro is an advanced deployment option which requires knowledge of
how to set up and maintain a Ministro repository. Place it with the
other advanced options instead of as a checkbox alongside the normal
deployent mechanism which is used by default and probably in the vast
majority of cases, in order to reduce cognitive load on the user and
clean up the UI a bit (since two options in a radio selection doesn't
make much sense).
Task-number: QTBUG-62995
Change-Id: If33b3c73db4fcc66717dd4ff0f7923f0250e8418
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
All GUI options to choose between ant and gradle are removed.
Gradle is the only java build tool used now.
Change-Id: I309ff66256c5d40920a5d77a8331c5917c53c185
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
This is only usable with versions of Android older than 5. Now that
Android 8 is the current version, we say goodbye to this feature as it
is almost certainly no longer of use to anyone.
Task-number: QTBUG-62995
Change-Id: I19795eb385b18f4dd87a1bb8df57d36c3fa28dc5
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
android tool is deprecated since sdk tools version 25.3.0.
Use the new avdmanager tool
Task-number: QTCREATORBUG-17814
Change-Id: Id6f495f14e12d0069df08164cac1929b76d9e932
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
The old ones did not convey their meaning very well. In particular,
NormalOutput and MessageOutput were easily confused.
Change-Id: Ia0a8c1b1c366ab3f5c59f751b37b8b1f68f6831d
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
BREAKS BACKWARD COMPATIBILITY OF TOOLCHAIN SETTINGS!
* Convert old ToolChainKitInformation to new version
* Store several toolchains in one kit (one per language)
Change-Id: Ia59a2ad067c57971ec34ce9b2e43758344443755
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
This removes 900 lines of duplicated code, some duplicated checks at
runtime and some (minor) quadratic behavior when gathering display names.
canClone(), canRestore() and canCreate() and restore() use the same
pattern. Handle that on the core side once. Leave retore() virtual to let
the ios code unmodified (which is likely not needed, later...). Introduce
'Unclonable' and 'Uncreatable' flags to keep Android package installation
and WinRT deployment (non-)functionality unchanged.
Change-Id: I0325479aff818a4038b2f241ca733b8d8cd66f2f
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
waitForFinish returns false if the process is no longer running at
the time of the call. Handle that throughout the codebase.
Change-Id: Ia7194095454e82efbd4eb88f2d55926bdd09e094
Reviewed-by: hjk <hjk@theqtcompany.com>
while (!proc.waitForFinished(200)) { ... } effectively behaves as
endless loop if proc is already crashed at that time.
Change-Id: Ia2228ceddc9c45a37816209deb7e4fd69c7ab7b9
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
Remove the finished() signal that is (sometimes) used to report that
a buildstep is done and use the FutureInterface for that purpose
consistently.
Change-Id: Ibe5520b562b91f1a7f4fc73ee898b33b930029ec
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
Reuse the data for the following AndroidDeployQtSteps that
are in the same batch submitted to the BuildManager.
This should fix Qt Creator asking for the device multiple times
when building projects that depend on other projects.
Task-number: QTCREATORBUG-15338
Change-Id: I4fbb04d4d8e492f6a766461bca3e6f9683824def
Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
This information can be used to get information from earlier steps,
which e.g. queried for android devices to deploy to.
Change-Id: Iefe1c9443915cb6211f86f98ff7aaf3cb75145ba
Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
As apparently Samsung devices don't have it. The new algorithm
is:
- If it is a 64 bit device
- Either pull /system/bin/app_process64 (64bit process)
- or pull /system/bin/app_process32 (32bit process)
- If it is a 32 bit device
- First try /system/bin/app_process32
- If that doesn't exist try /system/bin/app_process
The old code did a symlink resolution on one of app_process[32|64|],
but I believe the symlink resolution was only needed for a symlink
from app_process to app_process32, which is covered by this code.
Change-Id: Iedeeb247c3059931e1ddf6d01e8b2aab13156470
Task-number: QTCREATORBUG-15006
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
On an 64 bit Android, libc.so for 64 bit apps is located in /system/lib64/.
Change-Id: I93f0e4658e552c9a32822706bab3e503642a8c59
Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>
Apparently the readlink on android M no longer supports that
option.
Change-Id: I27d5539ad746daa82b928801391597e43ed96cca
Reviewed-by: BogDan Vatra <bogdan@kde.org>
On arm64 devices /system/bin/app_process is a symlink to /system/bin/
app_process64, the problem is that we are pulling it also for 32bit
apps, which will make the debugging impossible because arm-linux-
androideabi-gdb 32bit can't mix the architectures.
Change-Id: I37e071456fb89051b0433ee2e7635085257616ea
Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>
We used to only identify the avd by api level and abi. That was
obviously incorrect, but at the time I didn't know how to get
the actual avd name from a running emulator.
Turns out this is reasonable easy via telnet on the emulator port.
Change-Id: I387901a5294674f44399c0726abcc9feea221e8d
Task-number: QTCREATORBUG-13095
Reviewed-by: BogDan Vatra <bogdan@kde.org>
/system/bin/app_process can be a link to e.g. /system/bin/app_process32,
which we resolve first via "adb shell" before calling "adb pull".
Task-number: QTCREATORBUG-14201
Change-Id: Ic133cf0bcec3234839680584ff4807f443161e6c
Reviewed-by: hjk <hjk@theqtcompany.com>
Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>
Reviewed-by: Alessandro Portale <alessandro.portale@theqtcompany.com>
This works around missing support for standalone installations
of signed packages in androiddeployqt. The tool will use its
arguments to decide what the package to install is named, so
the arguments need to match the ones used to build the package.
In particular, we need to tell it that we are creating a signed
package.
This is intended as a temporary solution. The tool should be fixed
to support this use case properly, but the changes needed there
were deemed too risky at this point in the release cycle, so we
apply the work-around for now.
Task-number: QTCREATORBUG-13431
Change-Id: I03163582979715e7daa389c49bf10a88b5879db7
Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>
Reviewed-by: BogDan Vatra <bogdan@kde.org>
Debug Deployment broke with Android 5. Also show Android 5 devices
as incompatible in the device dialog if we are using debug deployment.
Task-number: QTCREATORBUG-13419
Change-Id: Ic321cfa46eb724f87f338af9c4b50face06c7c06
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
Reviewed-by: BogDan Vatra <bogdan@kde.org>
Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>
Switching from Ant to Gradle brings lots of advantages:
- it is way faster when rebuilding (25-50% faster than ant).
- it enables first class Android Studio integration.
- adding Android Extras libs (e.g. Google Play services, OBB, etc.) to
your project is now painless.
[ChangeLog][Android] Added Gradle support to build the APK.
Change-Id: Iee492954f8ffb2c22e6ab14a8a25faf644de9a51
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
Less typing and less cycles than join(QString) where appropriate
Change-Id: I6ebc0e17e4d7fd9845864dd95b7de4ba4dad6906
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
On Qt < 5.4 androiddeployqt can't be used to only install the package
(and qt libs if the debug deployment was chose).
Change-Id: Ia7939e7988163ec04bdc7a927fd3a89e4d824782
Reviewed-by: Daniel Teske <daniel.teske@digia.com>