forked from qt-creator/qt-creator
Android: Allow adding custom NDKs and auto detect their toolchains
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>
This commit is contained in:
@@ -160,9 +160,12 @@ public:
|
||||
Utils::FilePath aaptToolPath() const;
|
||||
|
||||
Utils::FilePath toolchainPath(const QtSupport::BaseQtVersion *qtVersion) const;
|
||||
Utils::FilePath toolchainPathFromNdk(const Utils::FilePath &ndkLocation) const;
|
||||
Utils::FilePath clangPath(const QtSupport::BaseQtVersion *qtVersion) const;
|
||||
Utils::FilePath clangPathFromNdk(const Utils::FilePath &ndkLocation) const;
|
||||
|
||||
Utils::FilePath gdbPath(const ProjectExplorer::Abi &abi, const QtSupport::BaseQtVersion *qtVersion) const;
|
||||
Utils::FilePath gdbPathFromNdk(const ProjectExplorer::Abi &abi, const Utils::FilePath &ndkLocation) const;
|
||||
Utils::FilePath makePath(const QtSupport::BaseQtVersion *qtVersion) const;
|
||||
Utils::FilePath makePathFromNdk(const Utils::FilePath &ndkLocation) const;
|
||||
|
||||
@@ -188,6 +191,11 @@ public:
|
||||
bool sdkFullyConfigured() const { return m_sdkFullyConfigured; };
|
||||
void setSdkFullyConfigured(bool allEssentialsInstalled) { m_sdkFullyConfigured = allEssentialsInstalled; };
|
||||
|
||||
bool isValidNdk(const QString &ndkLocation) const;
|
||||
QStringList getCustomNdkList() const;
|
||||
void addCustomNdk(const QString &customNdk);
|
||||
void removeCustomNdk(const QString &customNdk);
|
||||
|
||||
private:
|
||||
static QString getDeviceProperty(const Utils::FilePath &adbToolPath,
|
||||
const QString &device, const QString &property);
|
||||
@@ -216,6 +224,7 @@ private:
|
||||
QStringList m_commonEssentialPkgs;
|
||||
SdkForQtVersions m_defaultSdkDepends;
|
||||
QList<SdkForQtVersions> m_specificQtVersions;
|
||||
QStringList m_customNdkList;
|
||||
bool m_sdkFullyConfigured = false;
|
||||
|
||||
//caches
|
||||
@@ -237,6 +246,7 @@ public:
|
||||
static QString defaultDevice(ProjectExplorer::Project *project, const QString &abi); // serial number or avd name
|
||||
static void clearDefaultDevices(ProjectExplorer::Project *project);
|
||||
static void registerNewToolChains();
|
||||
static void registerCustomToolChainsAndDebuggers();
|
||||
static void removeUnusedDebuggers();
|
||||
static void removeOldToolChains();
|
||||
static void updateAutomaticKitList();
|
||||
|
||||
Reference in New Issue
Block a user