The cmdline-tools package used to have the folder structure "tools/bin".
However, latest packages are using the structure "cmdline-tools/bin".
And since subsequent updates we are installing "cmdline-tools;latest"
package, it will be put in "cmdline-tools/latest" folder, so we cannot
extract to that path, or otherwise sdkmanager will complain that the
path is in use.
Currently we extract it and put it under the SDK path, then use it to
install the essential packages, then it won't be used at all. This patch
changes that by extracting the downloaded package into a temporary
location, and use sdkmanager from there directly.
Also, this patch updates the links to the cmdline-tools along the way.
Fixes: QTCREATORBUG-27174
Change-Id: I1f5d0e38f5a026631e8a3852821d85a69d543c32
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
SDK setup process currently downloads the SDK tools, then checks
the mandatory packages, asks the user if they want to install them,
then show a dialog with package details, then asks again whether
the user wants to check the licenses.
The following two steps are redundant because there's a dialog which
guards the package installation and waits for user's input:
* Asking the user if they want to install the mandatory packages
* Asking the user if they want to verify the licenses
Change-Id: If06c0adea9444107a149c3ec32be67061954d1bb
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
The exctraction of the downloaded commandlinetools zip file via java's
jar tool did suddenly not work anymore on Windows. The exit code of
jarExtractProc in AndroidSdkDownloader::extractSdk would be != 0.
Instead of fixing the jar usage, this change replaces it with the
recently added Utils::Archive.
That has the advantage that it preserves the file permissions while
exctracting, so that we can also get rid of setSdkFilesExecPermission.
Another advantage is that the SDK can be extracted even before a jdk
has been selected.
Change-Id: I99cc2aff8e183108eb11dbf96f06557e5b299d56
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
This adds a "Make Default" button next to the NDKs list view. The
default NDK version is then used to override the NDK version for all Qt
versions in the sdk_definitions.json.
Fixes: QTCREATORBUG-21755
Fixes: QTCREATORBUG-22389
Fixes: QTCREATORBUG-24248
Fixes: QTCREATORBUG-26281
Change-Id: I460daafdd7f2d6380c0114bcd14cb0c46226d516
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Since the AVD manager moved into the "Devices" option page, the SDK
manager tab was left alone in the QTabWidget. One single tab looks
strange and uses more space than needed.
This change turns the SDK manager area into a QGroupBox, which is
consistent with the rest of the Android Options page. This patch also
adjusts the margins and spacings of the SDK manager widget to fit to the
rest of the options page.
Change-Id: Id1ed38862e8f9e984f53cdfb59492e30902162a7
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Add an info message when sdkmanager is reloading the packages, and also
don't expand the summary widget when the widgets are not active,
which can be when the packages are being reloaded or when the licenses
are being reviewed, this will give more space for reviewing the licenses
instead of having the summary take most of the settings page space.
Change-Id: I6acf3f6edc3b3d3fa78f0ba00308a21f8bb4fa72
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Since the config can be expected to modify configuration values
(e.g. setEmulatorArgs()) it shouldn't be const, but can be set
to const whenever creating a reference that is not meant for
modifying the config.
Change-Id: I8c816a5422d4d57afa158c723d908e3a9a9a0db8
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Move AVD management and creation to Qt Creator's DeviceManager
facilities. This allows AVDs to be created from the Devices settings
page and their details and control/action buttons for starting/stopping,
etc. are added there as well. This makes the process similar to other
device types that Qt Creator supports, to get a similar experience.
Task-number: QTCREATORBUG-23991
Change-Id: I16c52b3cc73035e0ee12fd54ae9dad4595c8cda5
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
When reading a path from file chooser, settings or environment variable,
make sure it is portable and "clean".
Avoids extra compiler registrations, invalid Kits and similar issues.
Fixes: QTCREATORBUG-26092
Change-Id: I2a11563f40973d5f595bf00e37ff045a503aa9f7
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Mid-term plan is to concentrate on use of QtcProcess::result()
instead which is a bit more system-agnostic.
There's quite a bit of potential for downstream cleanup by
re-using QtcProcess::exitMessage() now.
Change-Id: I3806b3f5933d96e64b7cfb18cc6c52823fddcbcd
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
The main QtcProcess interface is nowadays a CommandLine, with no
explicit references left to QtcProcess::Arguments and related static
helper functions, so it only clutters the QtcProcess class interface
So move these items out of QtcProcess, later potentially to a separate
file pair.
Change-Id: I45c300b656f5b30e2e2717232c855fdd97c2d1d7
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Mechanical to prepare merging the actual classes.
Adapting #includes.
Change-Id: I77a2c28129287778bc870c30cb890cd26bc2e62b
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Calling first() or last() on temporary container may
unnecessarily detach the container. Fix it by calling
constFirst() and constLast().
Change-Id: I2460efd5dbee1534eec8a514d9bff2a947bfddf9
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
The android emulator supports many more command-line startup options
than "-partition-size". Let's allow the user to take advantage of the
full functionalty, by providing a free-text input field for the options.
A link to the online documentation is also provided.
As a side-effect, the issue that an overridden parition size can cause
the "Cold Boot: different AVD configuration" warning is solved by not
having -partition-size by default.
Task-number: QTCREATORBUG-24735
Change-Id: I41d7b826133708c7ff447c1e257f62368745dea1
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
This amends faad83d5a3 by undoing the
insertion of a QScrollArea + QWidget under the whole form. The reason
for adding this was to be able to scroll down to the license agreements.
Since Core::SettingsDialog already puts the settings widget into a
QScrollArea, we have two of those and one is superfluous. When using a
dark theme (e.g. flat-dark), this extra QScrollArea introduces wrong
background color. Also, it complicates the already quite blown
androidsettingswidget.ui
This change removes the QSrollArea + QWidget while keeping the feature
of scrolling to the license text. This is achieved by searching through
the parent chain for a QScrollArea and using the first found one for
scrolling.
Task-number: QTCREATORBUG-24379
Change-Id: I2bdae9367eb06b68fa47badf2556eb1ec7ebcafb
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Give the columns with potentailly more content some space.
Change-Id: I4c213f97df077801e3b11ef09519973a61c58c4f
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Relying on the PathChooser::rawPathChanged handlers to initially
validate default paths with clean settings does not work (I think)
because of a mix of interdependent (via m_androidConfig) synchronous
and asynchronous validations.
Let's assign the initial values for jdk, sdk and openssl also to
m_androidConfig, so that everything works on the first run.
Task-number: QTCREATORBUG-24372
Change-Id: Id6945d7bf81949a1f90cd20f9b3bd4e14a5bbe07
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Rename QHashSeedType to QHashValueType and use it also for return
values.
Use qHashMulti directly instead of continuing using temporary QPairs.
Avoids ugly namespace tricks to find the new pair overloads, and is
actually clearer.
Classes used in signals cannot be forward-declared. ...
Change-Id: I22450a0c642437a43f876e8e89cc8788fff3db61
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
The NDK is installed via sdkmanager anyways, and custom NDK paths are
verified upon choosing in the file dialog and rejected if not valid.
Change-Id: I18f876dfacdbc1045679c6b082a500527a933673
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Show JDK downlaod button on Linux and point it to OpenJDK becuse
it's the most used on Linux. Otherwise, recommend AdoptOpenJDK because
it works on all platforms and easy to install as well.
Change-Id: I94fd61262fe759b96db59a9e2abfbd063f6795f0
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
The download icon might suggest that clicking that button causes an
automated download/installation. Since we have similar automation in the
Android settings, that could be misleading.
Change-Id: Ia1e4f1cfe15f79daf090546ee7c991f93b23fd13
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* Validate Jdk path at the start to avoid showing valide settings on
empty path.
* Reload sdkmanager after jdk path is changed to reflect changes.
Change-Id: Ib5eafead9d4f695cf79c55b79866bd3269dadbd5
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
* There were two functions to detect jdk path, unified them.
* First try to find jdk 1.8, if not found, look for newer versions.
SDK Tools version 26.x needs jdk 1.8 however, the new cmdline-tools
can work with the newest jdk, so the UI will warn the user if the
selected jdk cannot run sdkmanager potentially because of the jdk
version.
Change-Id: Iee2c378598c26e8a9a8245262110ac20322a2d2b
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
The native SDK and AVD manager buttons are no longer useful, since the
original, visual Java-basd tool for managing SDK and AVDs were removed
from Google's offering. The replacement is a set of command line tools
and a visual tool within Android Studio, which can not directly be
launched from Qt Creator.
Qt Creator has it's UI on top of the command line tools.
Change-Id: If660d7f566c173f46d9b2a97c9204746d33270e6
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
We need to hold the user off from doing funky stuff while cloning, like
for example from pressing the clone button multiple times in a row.
Change-Id: Ib20218e0b0fa28852412da2b71ec5ba410d682e8
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
In case the path was non-existent before the cloning, it should not be
"red" anymore after cloning.
Change-Id: If33cfbd07710e317505a9fe1e4b3b9f19a10d5db
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
This was caused by 7419e09d0f.
Change-Id: I423047d353698798c712f9a32603e955ae1ee15c
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: hjk <hjk@qt.io>