Commit d260f365 authored by Oliver Wolff's avatar Oliver Wolff
Browse files

WinRT: Create mapping file for deployment when build is finished



Task-number: QTCREATORBUG-13275
Change-Id: I1fb8b951468793bd6edc0e10e53d708a876c0bf3
Reviewed-by: default avatarAndrew Knight <andrew.knight@theqtcompany.com>
Reviewed-by: default avatarJoerg Bornemann <joerg.bornemann@theqtcompany.com>
parent 9287229d
......@@ -99,13 +99,30 @@ bool WinRtPackageDeploymentStep::init()
QString args = QtcProcess::quoteArg(QDir::toNativeSeparators(m_targetFilePath));
args += QLatin1Char(' ') + m_args;
m_manifestFileName = QStringLiteral("AppxManifest");
if (qt->type() == QLatin1String(Constants::WINRT_WINPHONEQT))
if (qt->type() == QLatin1String(Constants::WINRT_WINPHONEQT)) {
m_createMappingFile = true;
args += QLatin1String(" -list mapping");
}
ProcessParameters *params = processParameters();
params->setCommand(QLatin1String("windeployqt.exe"));
params->setArguments(args);
params->setEnvironment(target()->activeBuildConfiguration()->environment());
return AbstractProcessStep::init();
}
void WinRtPackageDeploymentStep::run(QFutureInterface<bool> &fi)
{
AbstractProcessStep::run(fi);
const QtSupport::BaseQtVersion *qt = QtSupport::QtKitInformation::qtVersion(target()->kit());
if (!qt)
return;
m_manifestFileName = QStringLiteral("AppxManifest");
if (m_createMappingFile) {
args += QLatin1String(" -list mapping");
m_mappingFileContent = QLatin1String("[Files]\n");
QDir assetDirectory(m_targetDirPath + QLatin1String("assets"));
......@@ -116,7 +133,7 @@ bool WinRtPackageDeploymentStep::init()
if (!parseIconsAndExecutableFromManifest(fullManifestPath, &iconsToDeploy,
&m_executablePathInManifest)) {
raiseError(tr("Cannot parse manifest file %1.").arg(fullManifestPath));
return false;
return;
}
foreach (const QString &icon, iconsToDeploy) {
m_mappingFileContent += QLatin1Char('"')
......@@ -125,13 +142,6 @@ bool WinRtPackageDeploymentStep::init()
}
}
}
ProcessParameters *params = processParameters();
params->setCommand(QLatin1String("windeployqt.exe"));
params->setArguments(args);
params->setEnvironment(target()->activeBuildConfiguration()->environment());
return AbstractProcessStep::init();
}
bool WinRtPackageDeploymentStep::processSucceeded(int exitCode, QProcess::ExitStatus status)
......
......@@ -42,6 +42,7 @@ class WinRtPackageDeploymentStep : public ProjectExplorer::AbstractProcessStep
public:
explicit WinRtPackageDeploymentStep(ProjectExplorer::BuildStepList *bsl);
bool init();
void run(QFutureInterface<bool> &fi);
bool processSucceeded(int exitCode, QProcess::ExitStatus status);
void stdOutput(const QString &line);
ProjectExplorer::BuildStepConfigWidget *createConfigWidget();
......@@ -51,6 +52,7 @@ public:
QString defaultWinDeployQtArguments() const;
void raiseError(const QString &errorMessage);
void raiseWarning(const QString &warningMessage);
bool fromMap(const QVariantMap &map);
QVariantMap toMap() const;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment