Commit Graph

49 Commits

Author SHA1 Message Date
hjk
6aeb06c8d3 Android: Move CreateAndroidManifestWizard and related build step to base
It does not directly depend on qmake anymore.

Change-Id: I3b9625e54d98c79ef137059cf4554b3f2807e88e
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
2018-07-11 07:45:13 +00:00
Vikas Pachdha
aa4407e332 Android: add logging for build and run
Change-Id: Idca5a45713762aa9e2861dcc58c3bbd96cbe687e
Reviewed-by: hjk <hjk@qt.io>
2018-07-04 07:04:03 +00:00
hjk
c08aab7b96 Android: Move most of QmakeAndroidBuildApkStepWidget to base
... as new AndroidBuildApkStepWidget, after renaming the previous
AndroidBuildApkStepWidget to AndroidBuildApkStepInnerWidget as this
is only a part of the whole widget.

There is clean up potential left for a later change.

Change-Id: Ie631537dfdaeb41b8d3b178047825312972d7439
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
2018-07-02 09:21:29 +00:00
hjk
d4f5b74df9 Android: Move some generic apk build step code to base
Change-Id: Id11e5d684e2e1003178d06b4421ec34df334fca2
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
2018-06-22 12:45:50 +00:00
hjk
b774dff4e8 QmakeAndroid: Move some build-system agnostic items to Android base
Change-Id: I0f258ee5e4afcb3abc7c2bbbaa612b1912a8d2b9
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
2018-06-13 11:23:59 +00:00
hjk
ded34daa2b QmakeAndroid: Introduce two new functions in QmakeAndroidQtSupport
... and use them to remove direct dependency of the QmakeAndroidBuildApkStep
on qmake, so it can be merged into the base AndroidApkStep, leaving
less build system dependent code in the QmakeAndroid plugin.

Change-Id: Id7c6a9cb0e51d6b38850a0ad0e0e83a602f53338
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
2018-05-09 10:36:37 +00:00
hjk
59d2505441 Remove two unneeded uses of ICore::instance()
The functions are static nowadays.

Change-Id: Ic6f6cb9c58319f3b33d8201aefb630b9381b2af3
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-02-02 07:23:23 +00:00
Robert Loehning
63e47f903f Improve translated strings and make them consistent
Change-Id: I88a6e6ceaa44b22539449037faa788caa9f349fc
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2018-01-22 11:56:01 +00:00
hjk
53a151074a ProjectExplorer/all: Re-organize BuildSteps/{Deploy,Build}Config setup
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>
2017-12-08 11:17:55 +00:00
Tobias Hunger
18f38ff18e Project: Make Project::files return a FileNameList
Change-Id: I75ceb22ac65b8288d824f229d44089cba6fc8ea3
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-12-08 09:09:59 +00:00
Eike Ziller
7f626b1182 Merge remote-tracking branch 'origin/4.5'
Change-Id: Iceaa4ca40b5318744bde8a76c6d3ccca08df71bb
2017-10-25 16:07:21 +02:00
Eike Ziller
4d0bf8a093 Android: Fix translation issues
Add missing Q_OBJECT macros

Change-Id: Ic2b01374e4426a7c90e9a8b4c3676e00c200300d
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-10-24 14:36:06 +00:00
Eike Ziller
1c1dd45bfe Merge remote-tracking branch 'origin/4.5'
Change-Id: Iebd340258966aff910fb9ab0e45b5149e8f242f0
2017-10-12 09:49:14 +02:00
Vikas Pachdha
ec4fe5f04f Android: Refactor Android SDK packages
Introduce a hierarchy for Android SDK packages and refactor the
code accordingly. This is ground work for sdk management and
automatic android setup

Task-number: QTCREATORBUG-18978
Change-Id: Idef545e3b3a8e33e920be52b26094fb8046afcd3
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
2017-10-11 11:58:16 +00:00
Jake Petroules
845271e957 Android: turn "use Ministro" into a checkbox
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>
2017-10-10 14:41:12 +00:00
Vikas Pachdha
027383814a Android: Remove Ant and make gradle as the default java build tool
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>
2017-09-14 09:01:12 +00:00
Jarek Kobus
b506fce0fe Fix string messages
Found during translating.

Change-Id: I9626b3393d7b53300f7c806acbc5e12bc58574d2
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-09-11 08:29:41 +00:00
Jake Petroules
6458473414 Android: remove support for local/debug deployment option
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>
2017-09-06 18:21:26 +00:00
BogDan Vatra
2ebd51fca3 Android: Search for gradle template in QT_DIR/src/3rdparty/gradle
Qt 5.6.3 LTS adds gradle template but QtCreator failed to use it
because it compares Qt versions instead to search for gradle templates
in QT_DIR/src/3rdparty/gradle

Task-number: QTCREATORBUG-18811
Change-Id: I97c817f143a1d76fe4e2544b138cad9f4914eeee
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
2017-08-30 12:36:43 +00:00
Vikas Pachdha
319a52cc3e Android: Fix SDK tool's version displayed in the error
Task-number: QTCREATORBUG-18655
Change-Id: Iaee5118a74b4e83903af50d03e72c8bd6fa4a8b4
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2017-07-31 11:45:51 +00:00
Tim Jenssen
533f92c1bd Mobile platforms: initialize params in one go
Change-Id: I2b6097b6c1212e750b27f95055331fed6736b182
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
2017-06-22 08:27:28 +00:00
Tobias Hunger
190f2d9e8d Mobile platforms: Do not use QLatin1String in BuildSteps
Change-Id: I3d67e94e7dc2d86ac1eba641562ee4a045f95d6c
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
2017-06-13 12:46:51 +00:00
Vikas Pachdha
8dc98995fa Android: Force Gradle build post SDK tools version 25.3.0
Task-number: QTCREATORBUG-18013
Change-Id: Ic912427783d079f5f6bf06e3bf9a44657d24a96f
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
2017-04-12 13:54:24 +00:00
BogDan Vatra
750f25d9e6 Fix release builds debugging
Add gdbserver all the time, except when the user signs the package.
Even then the user can "Force debugging" by checking the checkbox.

Change-Id: I274243786f3d6d6b88f41e532bebc24213f5e9db
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2017-04-12 06:33:55 +00:00
Tim Jenssen
2631ffabd5 Remove spaces in initializer lists
Format initializer lists code style like.

Change-Id: Ib82c235e4ba7dc75ee96a7abc0c47eff7b0a9013
Reviewed-by: hjk <hjk@qt.io>
2017-02-22 16:25:09 +00:00
Orgad Shaneh
585ef766cc Android: Use correct form of error message
Change-Id: Ie2756514d68fb02e15fbe97216bbf3c56ddfe77a
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2017-01-20 08:15:37 +00:00
Orgad Shaneh
5f3442d25e Android: Fix compilation
Change-Id: I72be1ccb8afc235441c9c1ba65d3cef4fc6e6779
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
2017-01-20 06:39:53 +00:00
Christian Kandeler
c05a3fdb3d Give the values of BuildStep::OutputFormat better names
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>
2017-01-19 16:08:57 +00:00
Vikas Pachdha
3fa45170b5 Android: Do sanity check for keystore path and certificate alias
Task-number: QTCREATORBUG-17304
Change-Id: Ifc0e354789d49efa3cb1d3e3e67eb40b331b40c7
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
2017-01-16 15:06:28 +00:00
Eike Ziller
b1f1ccb32e Merge remote-tracking branch 'origin/4.2'
Conflicts:
	src/plugins/android/androidbuildapkstep.cpp
	src/plugins/genericprojectmanager/genericproject.cpp

Change-Id: I3484b668f9323ed0c05de99f8dfed07c9e65ab98
2017-01-11 09:29:37 +01:00
Vikas Pachdha
acb07875b7 Android: Fix workflow issues in package signing password dialogs
Task-number: QTCREATORBUG-17545
Change-Id: Ide0c322a50455997c7b8fb2350dbdef1d76257c9
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-01-10 11:30:47 +00:00
BogDan Vatra
c4afe5d79b Android: Fix keytool result handling
keytool return code != 0 if the password is incorrect.

Task-number: QTCREATORBUG-17317
Change-Id: I248b4a687ef48a849d42a70940009738d29a609c
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-01-05 09:07:20 +00:00
Tobias Hunger
732b832973 AbstractProcessStep: Clean up code
Change-Id: Iae3d1e7cbd02d34da5cebbf0291948dbdd2e95df
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2016-12-07 13:17:59 +00:00
Tobias Hunger
ab20b08d6d Android: Initialize all members
Change-Id: Id10174da9c8b6e2cf34ac3465f0bf57361990e7e
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2016-12-07 08:39:36 +00:00
Vikas Pachdha
23c36076da Handling minimum required Android API level for Qt 5.7
The build breaks now with a clear warning if the minimum API level set is less than the minimum required by the kit.
The device dialog also used to show incorrect devices on the first compile cycle in case of the missing manifest file. Now
stock manifest file is used from the kit to analyze the minumun API level for the devices

Task-number: QTCREATORBUG-16740
Change-Id: Icd4d8209dad870cba5f99af1dd700830517f9294
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
2016-08-24 11:59:13 +00:00
Orgad Shaneh
1b34f2a4b8 Merge remote-tracking branch 'origin/4.1'
Change-Id: Ia90424d479936a898705c433e5810c77ae088b2c
2016-07-22 15:18:00 +03:00
Vikas Pachdha
316ad743fa Signal to notify gradle selection
Change-Id: Ie9db0ca4b4133e63f06cda8fe9f3be8080eeaae9
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-07-19 10:09:47 +00:00
Tobias Hunger
5efd82468b SynchronousProcess: Store raw bytes from stdout/stderr of the process
Only convert the raw output later in a stdOut() and stdErr() method of
the SynchronousProcessResponse.

This is necessary since we have processes that use different encodings
for different sections of the file (I am looking at you, git).

Also remove the signals for raw data on stdout/stderr, leaving only the
signals returning buffered QString lines. This should be safe, even
with UTF-16 output.

Change-Id: Ida613fa86d1468cbd33bc6b3a1506a849c2d1c0a
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-07-15 14:16:03 +00:00
Tobias Hunger
ddefe062c7 Fix up QProcess::waitForFinished()
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>
2016-05-11 10:04:38 +00:00
Tobias Hunger
397e7f4843 Update License according to agreement with Free Qt Foundation
* Update files in src/plugins

Change-Id: Ia5d77fad7d19d4bb3498e78661982f68729adb22
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2016-01-19 15:57:01 +00:00
Tobias Hunger
79f82d0d0a BuildManager: Provide context of earlier build steps to init
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>
2015-11-16 14:04:59 +00:00
Ulf Hermann
69377f0de4 Introduce Profile build mode
We define a Profile build to be a Release build with separate debug
info. You can thus change a given build from Release to Profile of vice
versa by toggling the separate debug info checkbox. The messaging for
future user interaction about Profile builds has to take this into
account.

Task-number: QTCREATORBUG-14009
Change-Id: I62a5b13993b20bf36329b1eefa8b1b6096f31644
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2015-10-20 16:15:18 +00:00
Eike Ziller
3c85058694 Update License
Change-Id: I711d5fb475ef814a1dc9d2822740e827f3f67125
Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
2015-01-16 12:37:56 +01:00
Daniel Teske
697b2074d3 Android: Make Bundle Qt Deployment the default deployment method.
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>
2014-11-18 12:05:06 +01:00
Eike Ziller
9c7019f0b2 License update.
Change-Id: I0acde2c3b995693de682679471f03af85bdd0a61
Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
2014-10-15 15:19:55 +02:00
BogDan Vatra
3bcae52584 Android: Say hello to gradle!
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>
2014-09-25 13:15:25 +02:00
BogDan Vatra
49707ff3f0 Android: Check if DebugDeployment is usable.
It might happen when the user changes the kit from Qt 5.4 to Qt 5.3.

Change-Id: Ib9597ac0189bdc1ac4e82ac8b5de5e090f09283e
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
2014-08-01 12:19:30 +02:00
BogDan Vatra
30bad4b3f0 Use debug deployment method by default.
Alongside with Ministro is by far the fastest deployment method.

Change-Id: I02de831d312d60c50762e8130ccffefcf1f36843
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
2014-07-22 13:30:12 +02:00
BogDan Vatra
64e5a543a8 Move qmake specific part to qmake plugin, generalize android support
- Split up androiddeployqt into two steps: One building the apk,
  and one deploying it to the device.
- The build apk step base class AndroidBuildApkStep is ihneritaged by
  the qmake specific class QmakeAndroidBuildApkStep.
- The deployment step is still called androiddeployqt
- Move all qmake specific code to the qmakeprojectmanager plguin
- Flip the depencency between the android and qmake plugin, now
  the qmake plugin depends on the android plugin, implementing
  a interface the android plugin provides.

- Note: This removes the debug deployment for now.

Change-Id: I1c386640159ed14b637668abde8eb3b9009ab803
Reviewed-by: BogDan Vatra <bogdan@kde.org>
2014-07-21 12:41:28 +02:00