aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorOliver Wolff <oliver.wolff@qt.io>2018-09-04 08:48:03 +0200
committerOliver Wolff <oliver.wolff@qt.io>2018-09-04 07:43:26 +0000
commit74c55124754f63be11ac026201b82e398e9ca1bb (patch)
treedd97ceed38f73a7670da16307ac2cd93df4acadc /src
parente40b250d13b80fe2fed66b20266deafb14ac5df1 (diff)
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>
Diffstat (limited to 'src')
-rw-r--r--src/plugins/winrt/winrtpackagedeploymentstep.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/plugins/winrt/winrtpackagedeploymentstep.cpp b/src/plugins/winrt/winrtpackagedeploymentstep.cpp
index 9d2710192d..b18a1f4e4b 100644
--- a/src/plugins/winrt/winrtpackagedeploymentstep.cpp
+++ b/src/plugins/winrt/winrtpackagedeploymentstep.cpp
@@ -93,7 +93,14 @@ bool WinRtPackageDeploymentStep::init(QList<const BuildStep *> &earlierSteps)
}
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->setEnvironment(target()->activeBuildConfiguration()->environment());