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>
Avoid removing the openssl dir if the selected path already exist
and is not empty, rather just recommend selecting a different path
or empty the provided one.
Fixes: QTCREATORBUG-24173
Change-Id: I1e501b361d4917a59a5720146b11580e79ac32aa
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
This was using serialNumber instead of avdname, whereas the
reverse function avdName() actually used avdname.
Change-Id: Ieb91f97323f2adcf9306c90c91b145e494f177c0
Reviewed-by: David Schulz <david.schulz@qt.io>
Keep the old method for now to ease downstream porting.
The change is kept mechanical, there's a lot of cleanup possible now
on the user code side.
Change-Id: I936baedd45b7ba057f1c789a1bec896886f48eff
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
It's returning a FilePath, so it's a better fit.
Keep the old versions as inline function now to ease downstream migration.
Change-Id: I535887928018f42b92895c8b0c82527f0d55e5ca
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Use label text instead of icon for Auto SDK download button.
Fixes: QTCREATORBUG-23774
Change-Id: I5f10bafb0cdf88210f7121504778885291169e07
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
If Qt Creator is not run in fullscreen or the user's resolution is too
small it is possible, that the licenses which have to be accepted are not
visible when the according message box is shown.
In these cases we scroll down to the SDK manager so that it's obvious that
the licenses have to be accepted there and no additional message box will
be shown.
Task-number: QTBUG-79664
Change-Id: Ic24bd8c4457a43011b4035b659063dd45b321bcc
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
sdkmanager only works with version 8 of JDK specifically. We should warn
the user if a different version is used.
Task-number: QTBUG-79664
Change-Id: I5be8d068e4ec119453654adda1a684dc65b4c631
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
sdkmanager only works correctly with JDK 8, so we should not point to the
latest JDK release, but specifically that one.
Task-number: QTBUG-79664
Change-Id: I29dc2d26d41eed96c1abc03907ee835d70b9553b
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
By default, copy the sdk_definitions.json to Qt Creator user resource
path. The user can use that to make any updates if desired.
Add SdkDownloader instance as a member of AndroidSettingsWidget.
Change-Id: Ieabc9c6ddecbe63586f750b26bcf4ca990caee26
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Use QListWidget to show all installed NDKs (from SDK manager), and NDKs
Added manually by the user. Each item has an icon to indicate if it's
removable when added by the user, or non-removable if installed from the
SDK manager.
Change-Id: I26ae5909ce930d5cc8af561b6b4e9cc5415d12f1
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This serves as a convenience addition to allow users to directly
include OpenSSL prebuilt libs for Android. The path of the OpenSSL
would be defined once in the Android options page, and always used
to include the libs when needed by the user.
How this works:
1- A download button is provided, it first tries to automatically
git clone the OpenSSL repo to the defined path. If the cloning fails,
the repo URL is opened externally for maunual download.
2- If SDK tools auto download is used (like for first time setup),
the OpenSSL download will start after SDK eseentials are installed.
3- Once the libs path is set, it can be used by AndroidBuildApkWidget
to include() function to the project (qmake/cmake). It also, should
detect if the include() part already exists in the project file.
Task-number: QTBUG-80625
Change-Id: I338e916f03f4ff55db25a118f1ea08f1da5dd103
Reviewed-by: hjk <hjk@qt.io>
This adds the option for the user to add a custom NDK out of the
predefined list installed from SDK manager. Once an NDK is added and
settings saved, both the toolchains and debuggers will be detected
automatically. The user then can create a custom kit with those added
toolchains and debuggers.
Task-number: QTCREATORBUG-23286
Change-Id: I46200accca6fc956b73f211213bfe2a495093934
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
It seems that forcing sdkmanager reloadPackages is causing a duplication
in all packages and ndk listings.
Change-Id: I7e92d1c6dcec2a09db088d9596aca31a3d8b437f
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Make sure the UI ticks are updated directly after SDK Tools package
is downloaded.
Change-Id: If1d94c624dcbc5be14246f61b197d849438d19e5
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
AndroidSettingsWidget::onSdkPathChanged() is being called then
m_sdkManager->reloadPackages(true) after it at start, that's not
necessary.
Change-Id: I6171e8a5fb765fa26aecb505ca50231c3e609b74
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
The change 286266 was causing an unwanted modal dialog upon entering
Options > Devices page, this fixes that.
Also, this fixes the synchronous SDK and AVD list reloading that was
causing some hang time upon opening Devices page.
Fixes: QTCREATORBUG-23581
Change-Id: I1a55aaadb873c77612aced1c687cc5a0ded3441d
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Based on change 286266, we can find a correct NDK version for Qt for
Andriod version. This change allows Android plugin to get relevant NDK
information and registers appropriate toolchains and kits settings.
[ChangeLog][Android] Automatically use correct NDK version
corresponding to used Qt version.
Task-number: QTCREATORBUG-23583
Change-Id: Ic6b0d7a1ae8962c075b77498de88e018a008ac3e
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
... or when reading non-Qt config files. FilePath::fromString would make
FilePath keep native dir delimiters, which would cause wrong negatives
for example in FilePath::isChildOf().
This change here fixes that AndroidToolChain:::isValid incorrectly
returned true.
Change-Id: I28b321fe3c4064f61b78dc7fc36b8af3d18b806c
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Reviewed-by: hjk <hjk@qt.io>
Automatically download Android SDK Tools to default path
used by Android Studio, then essential packages will be installed
using the sdkmanager tool. Automatic installation can also be
triggered by an added button in the settings page.
Essentials packages include NDK Bundle and other NDK versions
required by previous Qt versions.
An sdk_definitions.json file holds download paths for SDK Tools,
and other (Qt version <-> essential packages) combinations.
[ChangeLog][Android] Automatically download SDK Tools, NDKs and
all essential packages for Android builds.
Task-number: QTCREATORBUG-23285
Change-Id: I90e7aafecd017d2bdc959e403711d9d440a6bbb2
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>