Skip to content
Snippets Groups Projects
Commit d78d7dbc authored by Friedemann Kleint's avatar Friedemann Kleint
Browse files

Fix running applications in Windows SDK 7.1.

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: default avatarQt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: default avatarEike Ziller <eike.ziller@nokia.com>
parent fb550c4f
No related branches found
No related tags found
No related merge requests found
......@@ -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.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment