diff options
author | Friedemann Kleint <[email protected]> | 2011-08-10 12:10:35 +0200 |
---|---|---|
committer | Friedemann Kleint <[email protected]> | 2011-08-10 12:19:45 +0200 |
commit | d78d7dbce3d4a85e7f111db719dde0b943814575 (patch) | |
tree | 4002d66f80e4165734e59437ca4eefba0e9d684f | |
parent | fb550c4ff1d29126fcc3c0390d7768c41b33c573 (diff) |
Fix running applications in Windows SDK 7.1.v2.3.0-rc
Fix start of applications with varying Qt-versions when Qt Creator
is launched from an Windows SDK command prompt (prevent
PATH from being reset by setenv.cmd).
Change-Id: I74f75f3663be4836c368a4b9d8c7f8fc5ec351d7
Reviewed-on: http://codereview.qt.nokia.com/2818
Reviewed-by: Qt Sanity Bot <[email protected]>
Reviewed-by: Eike Ziller <[email protected]>
-rw-r--r-- | src/plugins/projectexplorer/msvctoolchain.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/plugins/projectexplorer/msvctoolchain.cpp b/src/plugins/projectexplorer/msvctoolchain.cpp index 9cf2ea89481..6eda22eebed 100644 --- a/src/plugins/projectexplorer/msvctoolchain.cpp +++ b/src/plugins/projectexplorer/msvctoolchain.cpp @@ -260,7 +260,7 @@ static QString winExpandDelayedEnvReferences(QString in, const Utils::Environmen static Utils::Environment msvcReadEnvironmentSetting(const QString &varsBat, const QString &args, - const Utils::Environment &env) + Utils::Environment env) { // Run the setup script and extract the variables Utils::Environment result = env; @@ -286,6 +286,10 @@ static Utils::Environment msvcReadEnvironmentSetting(const QString &varsBat, } Utils::QtcProcess run; + // As of WinSDK 7.1, there is logic preventing the path from being set + // correctly if "ORIGINALPATH" is already set. That can cause problems + // if Creator is launched within a session set up by setenv.cmd. + env.unset(QLatin1String("ORIGINALPATH")); run.setEnvironment(env); const QString cmdPath = QString::fromLocal8Bit(qgetenv("COMSPEC")); // Windows SDK setup scripts require command line switches for environment expansion. |