winrt: Use full path when running windeployqt

As winrt does not have the concept of a run environment acquiring the
path to windeployqt from the environment might lead to unexpected results
like using windeployqt from a different Qt installation. Calling the
program with its absolute path is the safer alternative and thus should
be the default anyways.

Task-number: QTBUG-70175
Change-Id: I6eb5416275d7ff243f396bf1fccdbcb9d04f7e15
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
Oliver Wolff
2018-09-04 08:48:03 +02:00
parent e40b250d13
commit 74c5512475

View File

@@ -93,7 +93,14 @@ bool WinRtPackageDeploymentStep::init(QList<const BuildStep *> &earlierSteps)
} }
ProcessParameters *params = processParameters(); ProcessParameters *params = processParameters();
params->setCommand(QLatin1String("windeployqt.exe")); const QString windeployqtPath
= Utils::FileUtils::resolvePath(qt->binPath().toString(), "windeployqt.exe");
if (!QFile::exists(windeployqtPath)) {
raiseError(tr("Cannot find windeployqt.exe in \"%1\".").arg(
QDir::toNativeSeparators(qt->binPath().toString())));
return false;
}
params->setCommand(windeployqtPath);
params->setArguments(args); params->setArguments(args);
params->setEnvironment(target()->activeBuildConfiguration()->environment()); params->setEnvironment(target()->activeBuildConfiguration()->environment());