forked from qt-creator/qt-creator
fix/hack deployment of qt examples
qt assumes that it is being installed (possibly into an install root), not deployed, and leaves the translation of host paths to device paths to the deploying agent - which is qt creator. Task-number: QTCREATORBUG-17466 Change-Id: If9065b1079df607732e0f81132f29dbaf18ff602 Started-by: Christian Kandeler <christian.kandeler@qt.io> Reviewed-by: Tobias Hunger <tobias.hunger@qt.io> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -2372,10 +2372,18 @@ InstallsList QmakeProFileNode::installsList(const QtSupport::ProFileReader *read
|
||||
if (!reader)
|
||||
return result;
|
||||
const QStringList &itemList = reader->values(QLatin1String("INSTALLS"));
|
||||
if (itemList.isEmpty())
|
||||
return result;
|
||||
|
||||
const QString installPrefix
|
||||
= reader->propertyValue(QLatin1String("QT_INSTALL_PREFIX"));
|
||||
const QString devInstallPrefix
|
||||
= reader->propertyValue(QLatin1String("QT_INSTALL_PREFIX/dev"));
|
||||
bool fixInstallPrefix = (installPrefix != devInstallPrefix);
|
||||
|
||||
foreach (const QString &item, itemList) {
|
||||
bool active = !reader->values(item + QLatin1String(".CONFIG"))
|
||||
.contains(QLatin1String("no_default_install"));
|
||||
QString itemPath;
|
||||
const QString pathVar = item + QLatin1String(".path");
|
||||
const QStringList &itemPaths = reader->values(pathVar);
|
||||
if (itemPaths.count() != 1) {
|
||||
@@ -2387,8 +2395,16 @@ InstallsList QmakeProFileNode::installsList(const QtSupport::ProFileReader *read
|
||||
continue;
|
||||
}
|
||||
}
|
||||
itemPath = itemPaths.last();
|
||||
|
||||
QString itemPath = itemPaths.last();
|
||||
if (fixInstallPrefix && itemPath.startsWith(installPrefix)) {
|
||||
// This is a hack for projects which install into $$[QT_INSTALL_*],
|
||||
// in particular Qt itself, examples being most relevant.
|
||||
// Projects which implement their own install path policy must
|
||||
// parametrize their INSTALLS themselves depending on the intended
|
||||
// installation/deployment mode.
|
||||
itemPath.replace(0, installPrefix.length(), devInstallPrefix);
|
||||
}
|
||||
if (item == QLatin1String("target")) {
|
||||
if (active)
|
||||
result.targetPath = itemPath;
|
||||
|
||||
Reference in New Issue
Block a user