Commit Graph

258 Commits

Author SHA1 Message Date
Daniel Teske
0ec265259d Android: Fix wrong return in isBoot2Qt
Change-Id: Ie697a36747118de61fb1d35cbfc71bc939a88600
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2013-11-20 09:10:58 +01:00
Daniel Teske
721d6546a6 Android: android.bat needs a special environment
See the below task for details:

Task-number: QTCREATORBUG-10575
Change-Id: I7756d8780b33ede4c3d4eac7e281c9eabfa47e35
Reviewed-by: Robert Loehning <robert.loehning@digia.com>
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
2013-11-19 18:21:33 +01:00
Eike Ziller
8fe04ce0ad Merge remote-tracking branch 'origin/3.0' 2013-11-19 07:41:47 +01:00
Daniel Teske
fe0e3701b7 Android: getAbis prevent endless loop
We need to check all ro.product.cpu.abi# properties,
but there's a limited amount of those. So only check up to 5 to ensure
that the loop always terminates. On irc a user reported that on his
device adb shell getprop returns  "/bin/sh: getprop: not found", so
this loop was never terminated.

Change-Id: I819b28cdbedb0bf557ba58e8495a8da5eeb8dc8d
Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
2013-11-15 17:56:43 +01:00
Daniel Teske
095d911452 Android: Skip boot to qt devices
Change-Id: Ibce483484975e2817ad28ce00ea1f2d9ae06a497
Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
2013-11-15 17:56:32 +01:00
Daniel Teske
e79cdc1690 Android: Rewrite waitForAvd()
Now takes a QFutureInterface to enable canceling and beautify the code
by splitting it up.

Change-Id: Ifedf19c3ad1a37a9b7cb6b7db8ec799ceebc5392
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2013-11-14 12:07:50 +01:00
Daniel Teske
adc25d1e02 Android: findAvd() return serialNumber instead of bool
So that the function can be reused by waitForAvd.

Change-Id: I0b7a86a13bf6a5f5b16d1d1cab362e7200a9a26f
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2013-11-14 12:07:45 +01:00
Daniel Teske
f9ff630346 Android: Don't create kits if there is no device
Task-number: QTCREATORBUG-10574

Change-Id: I169762ce9d2388866f1aa16f2b7128cfd42e7cee
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
2013-10-30 17:04:13 +01:00
Tobias Hunger
ab8999832a Debugger: Move classes into their own files
Change-Id: I89853ffb4192b0da1f34d471e250d4ec32daa3da
Reviewed-by: hjk <hjk121@nokiamail.com>
2013-10-28 17:50:49 +01:00
Daniel Teske
7d42f74338 Android: Reset debugger in existing kits
For users upgrading from a broken 3.0 beta installation

Change-Id: Ieecf38f74879d1efacbfd775ab29eba9e17a4c43
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
2013-10-23 13:41:12 +02:00
El Mehdi Fekari
36e6a70505 Debugger: Fix the way to register/add new debuggers
DebuggerItemManager::registerDebugger() should return the id
of the added debugger in order to use it when setting a kit's debugger
(addDebugger() creates and adds a copy of the passed
debugger object with a unique id).

The DebuggerKitInformation::setDebugger() method should set only already
existing and registered debuggers.

Task-number: QTCREATORBUG-10436

Change-Id: Icdcd1ed92aafe9eda44abf831aa9983dd6801980
Reviewed-by: hjk <hjk121@nokiamail.com>
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
2013-10-22 20:14:14 +02:00
Daniel Teske
04ea1898b5 Android: Search for a suitable emulator before starting a new avd
Note, that we don't know the names of the started avds, so we look
for a avd that has the same abi and apiLevel.

Task-number: QTCREATORBUG-10411
Change-Id: I5f6ff3ee0dddcf2bb8fca981ccedf437e32da677
Reviewed-by: BogDan Vatra <bogdan@kde.org>
2013-10-22 17:48:38 +02:00
BogDan Vatra
d8aadac323 Remove adb daemon logs
If adb daemon is not started, adb devices command will add two lines to
the output, messing up the devices list.

Change-Id: I40dcf586d2661df2de0a56aaac543c3b4739ab0d
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
2013-10-22 13:05:08 +02:00
Daniel Teske
1df66a18d1 Android: Rework sdkTargets() to cache the output of adb
Also rename/change highestAvailablePlatform to highestAvailableSdk.
This fixes a bug reported on irc, where the lists for sdk and ndk
were different and the highestAvailablePlatform was not available
as in the sdk.

Change-Id: I17fec9e8ce1913e933ddcf8eaa21d6bb6e14c5be
Reviewed-by: BogDan Vatra <bogdan@kde.org>
2013-10-18 13:09:27 +02:00
Daniel Teske
723d4a973f Android: Distinguish between platforms in the ndk and the sdk
The available platforms in the ndk might not be the same as in the sdk.
This patch is renames everything using the ndk platform list to
ndkPlatforms, except the highestAvailablePlatform which wrongly uses
the ndk platform list.

Change-Id: I02d9b68bbc27b0c748281678fe654d5f4244578d
Reviewed-by: BogDan Vatra <bogdan@kde.org>
2013-10-18 13:09:22 +02:00
Daniel Teske
2bd789aeb9 Android: Detect JAVA_HOME by looking for libs/tools.jar
Task-number: QTCREATORBUG-10241
Change-Id: I8245547f851174314b99bde857f257692ed35bfb
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2013-10-11 14:56:54 +02:00
hjk
68a6ce2a1b Android: Minor API fixes in AndroidToolChain
Change-Id: I818ba7d95c52b87a84de6bfdaac8436258ac249a
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
2013-10-11 12:36:40 +02:00
Daniel Teske
7d5eebb846 Android Virtual Device: Create avds with hw.gpu.enabled
Task-number: QTCREATORBUG-10006
Change-Id: I7e10ef1280ed2388c1e9341dad32935d22ce05ed
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2013-10-11 12:22:05 +02:00
hjk
0d57c8fb30 Android: Don't check Qt version for secondary toolchains
Change-Id: Iee529e1c43c4b1a37d7894edee0ea4ecc81762d2
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
2013-10-10 19:50:41 +02:00
hjk
dd1e51076a Android: Fix debugger autodetection
Task-number: QTCREATORBUG-10341
Change-Id: I197ae5745d5caba12bce3e148ada2a589ac7f9b3
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
2013-10-10 19:50:18 +02:00
Daniel Teske
911226bf97 Android: Removing qt should remove its kits
Task-number: QTCREATORBUG-10224
Change-Id: I3d360a095ef76674e762e5bd795f21ab21685953
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2013-10-09 11:34:49 +02:00
Daniel Teske
1262310798 Android: androiddeployqt support
Change-Id: I37d706b4e11c6e1353a8ee73378b7d080080678c
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2013-09-26 17:13:27 +02:00
hjk
394045b218 Debugger: Export Debugger::DebuggerItem to fix BlackBerry setup
Task-number: QTCREATORBUG-10189
Change-Id: Icddd09a1a931371133a1d03ca8cf600e76295eac
Reviewed-by: David Kaspar <dkaspar@blackberry.com>
Reviewed-by: hjk <hjk121@nokiamail.com>
2013-09-25 14:45:04 +02:00
hjk
c4d1d7f278 Core: Clean up some ICore::instance() uses
Change-Id: I888b30094ed75818ee3af58c94ebf8468afa5eb9
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-09-24 09:57:55 +02:00
Daniel Teske
3bb7339fd4 Android: Implement device selection dialog
Change-Id: I1f4f3065a09837414429bbfc68110ada85ea174a
Reviewed-by: BogDan Vatra <bogdan@kde.org>
2013-09-13 12:34:46 +02:00
Orgad Shaneh
bc7778a31d Utils: Introduce sleep function
Use it in Android plugin

Change-Id: Id3ae707d5425e99a2e5b993e1ed98dddd73809a9
Reviewed-by: hjk <hjk121@nokiamail.com>
2013-09-09 15:52:49 +02:00
hjk
cd17a0e400 Debugger: Don't add invalid items during validation
Change-Id: I3b6427ec038d61ea3166880ae51292f87f7b861b
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: hjk <hjk121@nokiamail.com>
2013-09-05 10:52:51 +02:00
Tobias Hunger
a82654a485 Android: Remove some Android namespace usages
Change-Id: I74df950ff9de6ddc639a4b32bec55c269b5fb0e1
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
2013-09-03 16:18:26 +02:00
Daniel Teske
0aae98fb13 Android: Only create Kits for the newest toolchains
It's rare that users will want older toolchains.
In updateAutomaticKits distinguish between a Kit being removed since
the toolchain doesn't exist anymore. Which happens on e.g. changing
the ndk path. If the toolchain still exists, then it isn't the
newest anymore, so demote the Kit to a manual kit thus enabling the
user to remove it if he no longer needs it.

Change-Id: I59203abc9bed5f2c46a002cea68fd72a84283840
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-09-02 11:37:05 +02:00
Daniel Teske
7f6265f62f Android: Ensure that our autodetected kits stay sticky
Change-Id: Id62c9ffb875f5bb9e19b04d477d85726c2503964
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-09-02 10:40:19 +02:00
hjk
0ed9b97a1f QtVersionManager et al: Code cosmetics
Apply static 'pattern' for QtVersionManager, de-noise using code.

Change-Id: Id66ac90094cd7312d1e72abbdbce4c02b078456e
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-08-30 10:54:16 +02:00
hjk
e4b2947c6f ProjectExplorer et al: Code cosmetics
Apply static 'pattern' for ToolChainManager, de-noise using code.

Change-Id: I196dc6f39dc2c61b1783aecad3faa0b23849e00a
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-08-29 16:45:25 +02:00
hjk
36227d5c3a ProjectExplorer: Introduce per-kit debugger configuration page
Change-Id: I65c76f3ff43e1479075926c7e3fa460cca74d8fe
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-08-29 16:12:08 +02:00
Daniel Teske
211e56b5b7 Android: Detect "unauthorized" devices.
For now just show that in the compile output.

Change-Id: I332a8cae5653155175abfb1a4877ca1ca7cce8d5
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2013-08-28 15:00:45 +02:00
Daniel Teske
de1af231e9 Compile
Change-Id: I39c69bace0926e381b3569818401ddda8dd2c986
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
2013-08-28 15:00:29 +02:00
Daniel Teske
1c633eb1e9 Android: Connected devices should list all devices
E. g. waitForAvd needs all devices to correctly work.

Change-Id: I1b704e85bd7449d4c45ed36be48973f39148b8c4
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2013-08-28 14:54:56 +02:00
hjk
7e09b90723 Android: De-noise androidconfigurations.cpp
Change-Id: Iba945476c4534c2901232f22b4510d023b929ebd
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
2013-08-26 13:09:07 +02:00
Tobias Hunger
1b4b6ed6ca Kit: Use FileName for icon path
Change-Id: Ica6cf20c4ae1c7d58386d4970e468a105a3263b3
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-08-23 10:18:55 +02:00
Tobias Hunger
95859289b8 KitManager: Use static API as other singletons do
Change-Id: Ia49c6552a5aae72870687ef9c64f2642fbe24155
Reviewed-by: hjk <hjk121@nokiamail.com>
2013-08-21 16:55:16 +02:00
Tobias Hunger
4eccb04eaa Android: Fix warning about ! being applied to left side only
Change-Id: Ic48e4efb4992f1724ff150c2686e3e99c39dbd97
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
2013-08-19 16:36:37 +02:00
BogDan Vatra
24b14fa2b4 Export android specific settings to QBS
Change-Id: I3640272dc027047a1d27a2b55329c9f5093e8f1f
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-08-19 15:29:05 +02:00
Daniel Teske
480f7c09fc Android virtual devices: Fix starting a avd
This cleans up various bits of the avd support in Creator.
- Adds a abi combobox to the create avd dialog.
- Moves the startAvd code into a separate thread, so that
  starting a avd while deploying doesn't block creator anymore.
- Implements a better waitForAvd function that works even
  if a emulator is already running and accurately can
  detect that it has finished booting.

Note: There are still many problems in the avd support in creator.
- The "clean libs on device" and "install qasi" functionality block
  the gui thread if they are run on a avd.
- If no avd exists and no suitable hardware is attached, the user gets
  a create Avd dialog, which doesn't tell him why he needs to create a
  avd. That information is hidden in the compile output.

Still this fixes the main use case of hitting run on a newly created
project with no actual device attached.

Change-Id: I76b3fdb1bdf3eadac07f82ad7d145ce6af453326
Reviewed-by: BogDan Vatra <bogdan@kde.org>
2013-08-19 12:58:49 +02:00
Christian Kandeler
6d68422026 Utils: Introduce new class OsSpecificAspects.
This is basically a generalization of HostOsInfo for
a system that might not be the host system. HostOsInfo
is now implemented in terms of the new class.
Prospective use case: Untie Utils::Environment from
the host system.

Change-Id: If333b96674652109fcb0ad79f75aaaf5e86e17e3
Reviewed-by: hjk <hjk121@nokiamail.com>
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
2013-08-16 08:05:41 +02:00
Daniel Teske
2654141511 Android Kits: Use ANDROID_TARGET_ARCH in display name
Note this only affects newly generated kits.

Task-number: QTCREATORBUG-9865
Change-Id: I9f62c1d1932aa32e1a307b92ce0f8ba80bb6ed5c
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2013-08-02 12:55:14 +02:00
Daniel Teske
87507893e8 Android: Make automatic kits sticky. We don't want the user changing them
Change-Id: I5e4a1a2441765a002097492c7ac71fb07c91b442
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-08-01 15:05:07 +02:00
Daniel Teske
47f683f45e Android Create AVD Dialog: Simpler code
Change-Id: I953ff641f46caedc47551298dd1fedb62008ee92
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
2013-07-08 19:32:00 +02:00
Daniel Teske
7517a3408a Android: Show more information in the compile output for devices
Task-number: QTCREATORBUG-9690
Change-Id: I9b3e20db9049edc42364b005a7920a040f3feaf7
Reviewed-by: Nikita Baryshnikov <nib952051@gmail.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
2013-07-08 11:47:02 +02:00
Daniel Teske
6773d47a63 AndroidDeviceInfo: Rename cpuABI to cpuAbi
Coding style.

Change-Id: I433b4d47f54c5a3a9aed68d99b2ab64a7e82d698
Reviewed-by: hjk <hjk121@nokiamail.com>
2013-07-04 13:05:29 +02:00
Daniel Teske
7449297dc4 Android: Remove apiLevel parameter from connectedDevices
Both callers do filtering on the api level afterwards, so it pratically
serves no purpose.

Change-Id: I8f54f9050a66185a3799ea5b5446dec935d2d5ac
Reviewed-by: Nikita Baryshnikov <nib952051@gmail.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2013-07-04 12:27:53 +02:00
Daniel Teske
16908f5733 Android: Make getDeployDeviceSerialNumber not start a avd automatically
This allows the caller to do that as a fallback.

Change-Id: Ifd50036317c7df4fe77fc34ea0f616c07611a517
Reviewed-by: Nikita Baryshnikov <nib952051@gmail.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2013-07-04 12:27:41 +02:00