forked from qt-creator/qt-creator
Android: Add proper QBS support
Now we can use QtCreator to build, deploy, run & debug QBS projects. [ChangeLog][Android][QBS] Add Android support for QBS projects. Fixes: QTCREATORBUG-15573 Fixes: QTCREATORBUG-19880 Fixes: QTCREATORBUG-22182 Change-Id: I08b153a44dcf7ca178689c1c30fa2201c4cc0dbb Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
committed by
BogDan Vatra
parent
f8202239d6
commit
57c48630a8
@@ -30,6 +30,7 @@
|
||||
#include "qbsprojectmanagerconstants.h"
|
||||
#include "qbsrunconfiguration.h"
|
||||
|
||||
#include <android/androidconstants.h>
|
||||
#include <coreplugin/fileiconprovider.h>
|
||||
#include <coreplugin/idocument.h>
|
||||
#include <projectexplorer/projectexplorerconstants.h>
|
||||
@@ -399,6 +400,54 @@ QString QbsProductNode::buildKey() const
|
||||
return QbsProject::uniqueProductName(m_qbsProductData);
|
||||
}
|
||||
|
||||
QVariant QbsProductNode::data(Core::Id role) const
|
||||
{
|
||||
// if (role == Android::Constants::AndroidExtraLibs)
|
||||
// return value("ANDROID_EXTRA_LIBS");
|
||||
|
||||
if (role == Android::Constants::AndroidDeploySettingsFile) {
|
||||
for (const auto &artifact : m_qbsProductData.generatedArtifacts()) {
|
||||
if (artifact.fileTags().contains("qt_androiddeployqt_input"))
|
||||
return artifact.filePath();
|
||||
}
|
||||
return {};
|
||||
}
|
||||
|
||||
if (role == Android::Constants::AndroidSoLibPath) {
|
||||
QStringList ret{m_qbsProductData.buildDirectory()};
|
||||
for (const auto &artifact : m_qbsProductData.generatedArtifacts()) {
|
||||
if (artifact.fileTags().contains("dynamiclibrary")) {
|
||||
ret << QFileInfo(artifact.filePath()).path();
|
||||
qDebug() << artifact.properties().toString();
|
||||
}
|
||||
}
|
||||
ret.removeDuplicates();
|
||||
qDebug() << ret;
|
||||
return ret;
|
||||
}
|
||||
|
||||
if (role == Android::Constants::AndroidManifest) {
|
||||
for (const auto &artifact : m_qbsProductData.generatedArtifacts()) {
|
||||
if (artifact.fileTags().contains("android.manifest_final"))
|
||||
return artifact.filePath();
|
||||
}
|
||||
return {};
|
||||
}
|
||||
|
||||
if (role == Android::Constants::AndroidApk) {
|
||||
// qDebug() << m_qbsProductData.name() << m_qbsProductData.targetExecutable() << m_qbsProductData.properties();
|
||||
// for (const auto &artifact : m_qbsProductData.installableArtifacts()) {
|
||||
// qDebug() << artifact.fileTags() << artifact.filePath();
|
||||
// }
|
||||
// for (const auto &artifact : m_qbsProductData.generatedArtifacts()) {
|
||||
// qDebug() << artifact.fileTags() << artifact.filePath();
|
||||
// }
|
||||
return m_qbsProductData.targetExecutable();
|
||||
}
|
||||
|
||||
return {};
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------
|
||||
// QbsProjectNode:
|
||||
// --------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user