forked from qt-creator/qt-creator
GenericProject: Set deployment data, if available
We use the same approach as for CMake, namely the QtCreatorDeployment.txt file. Fixes: QTCREATORBUG-19202 Change-Id: I50605b8236b26f0c911e2448330019e94753af19 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -28,6 +28,7 @@
|
||||
#include <utils/algorithm.h>
|
||||
|
||||
#include <QFile>
|
||||
#include <QFileInfo>
|
||||
#include <QTextStream>
|
||||
|
||||
namespace ProjectExplorer {
|
||||
@@ -87,7 +88,13 @@ QString DeploymentData::addFilesFromDeploymentFile(const QString &deploymentFile
|
||||
if (!line.contains(':'))
|
||||
continue;
|
||||
QStringList file = line.split(':');
|
||||
addFile(sourcePrefix + file.at(0), deploymentPrefix + file.at(1));
|
||||
QString sourceFile = file.at(0);
|
||||
if (QFileInfo(sourceFile).isRelative())
|
||||
sourceFile.prepend(sourcePrefix);
|
||||
QString targetFile = file.at(1);
|
||||
if (QFileInfo(targetFile).isRelative())
|
||||
targetFile.prepend(deploymentPrefix);
|
||||
addFile(sourceFile, targetFile);
|
||||
}
|
||||
}
|
||||
return deploymentPrefix;
|
||||
|
||||
Reference in New Issue
Block a user