forked from qt-creator/qt-creator
QmakeProjectManager: Take "executable" CONFIG value into account
... when setting up deployment data. Fixes: QTCREATORBUG-22663 Change-Id: I88c428177b76a7bb59fc884c0b727fd0f26a780f Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
This commit is contained in:
@@ -1860,8 +1860,9 @@ InstallsList QmakeProFile::installsList(const QtSupport::ProFileReader *reader,
|
|||||||
bool fixInstallPrefix = (installPrefix != devInstallPrefix);
|
bool fixInstallPrefix = (installPrefix != devInstallPrefix);
|
||||||
|
|
||||||
foreach (const QString &item, itemList) {
|
foreach (const QString &item, itemList) {
|
||||||
bool active = !reader->values(item + QLatin1String(".CONFIG"))
|
const QStringList config = reader->values(item + ".CONFIG");
|
||||||
.contains(QLatin1String("no_default_install"));
|
const bool active = !config.contains("no_default_install");
|
||||||
|
const bool executable = config.contains("executable");
|
||||||
const QString pathVar = item + QLatin1String(".path");
|
const QString pathVar = item + QLatin1String(".path");
|
||||||
const QStringList &itemPaths = reader->values(pathVar);
|
const QStringList &itemPaths = reader->values(pathVar);
|
||||||
if (itemPaths.count() != 1) {
|
if (itemPaths.count() != 1) {
|
||||||
@@ -1889,7 +1890,7 @@ InstallsList QmakeProFile::installsList(const QtSupport::ProFileReader *reader,
|
|||||||
} else {
|
} else {
|
||||||
const auto &itemFiles = reader->fixifiedValues(
|
const auto &itemFiles = reader->fixifiedValues(
|
||||||
item + QLatin1String(".files"), projectDir, buildDir, true);
|
item + QLatin1String(".files"), projectDir, buildDir, true);
|
||||||
result.items << InstallsItem(itemPath, itemFiles, active);
|
result.items << InstallsItem(itemPath, itemFiles, active, executable);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
|
@@ -265,11 +265,12 @@ public:
|
|||||||
class QMAKEPROJECTMANAGER_EXPORT InstallsItem {
|
class QMAKEPROJECTMANAGER_EXPORT InstallsItem {
|
||||||
public:
|
public:
|
||||||
InstallsItem() = default;
|
InstallsItem() = default;
|
||||||
InstallsItem(QString p, QVector<ProFileEvaluator::SourceFile> f, bool a)
|
InstallsItem(QString p, QVector<ProFileEvaluator::SourceFile> f, bool a, bool e)
|
||||||
: path(p), files(f), active(a) {}
|
: path(p), files(f), active(a), executable(e) {}
|
||||||
QString path;
|
QString path;
|
||||||
QVector<ProFileEvaluator::SourceFile> files;
|
QVector<ProFileEvaluator::SourceFile> files;
|
||||||
bool active = false;
|
bool active = false;
|
||||||
|
bool executable = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
class QMAKEPROJECTMANAGER_EXPORT InstallsList {
|
class QMAKEPROJECTMANAGER_EXPORT InstallsList {
|
||||||
|
@@ -1062,8 +1062,10 @@ void QmakeProject::collectData(const QmakeProFile *file, DeploymentData &deploym
|
|||||||
for (const InstallsItem &item : installsList.items) {
|
for (const InstallsItem &item : installsList.items) {
|
||||||
if (!item.active)
|
if (!item.active)
|
||||||
continue;
|
continue;
|
||||||
foreach (const auto &localFile, item.files)
|
for (const auto &localFile : item.files) {
|
||||||
deploymentData.addFile(localFile.fileName, item.path);
|
deploymentData.addFile(localFile.fileName, item.path, item.executable
|
||||||
|
? DeployableFile::TypeExecutable : DeployableFile::TypeNormal);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (file->projectType()) {
|
switch (file->projectType()) {
|
||||||
|
Reference in New Issue
Block a user