forked from qt-creator/qt-creator
MSVC: Do not ask to return utf-8 from Windows Vista and earlier
Do not ask the script getting the MSVC environment to return utf-8 output prior to windows 7. Attempting that breaks the script and makes it return empty output. Task-number: QTCREATORBUG-17501 Change-Id: Ic5a87f87cea9e77687744c712c4f24aa9b20a6e5 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
committed by
Tim Jenssen
parent
24b2347ace
commit
0859095b7c
@@ -30,10 +30,12 @@
|
|||||||
#include <projectexplorer/projectexplorer.h>
|
#include <projectexplorer/projectexplorer.h>
|
||||||
#include <projectexplorer/projectexplorersettings.h>
|
#include <projectexplorer/projectexplorersettings.h>
|
||||||
|
|
||||||
|
#include <utils/hostosinfo.h>
|
||||||
#include <utils/qtcprocess.h>
|
#include <utils/qtcprocess.h>
|
||||||
#include <utils/synchronousprocess.h>
|
#include <utils/synchronousprocess.h>
|
||||||
|
|
||||||
#include <QDir>
|
#include <QDir>
|
||||||
|
#include <QSysInfo>
|
||||||
#include <QTemporaryFile>
|
#include <QTemporaryFile>
|
||||||
#include <QTextCodec>
|
#include <QTextCodec>
|
||||||
|
|
||||||
@@ -271,7 +273,8 @@ bool AbstractMsvcToolChain::generateEnvironmentSettings(Utils::Environment &env,
|
|||||||
call += ' ';
|
call += ' ';
|
||||||
call += batchArgs.toLocal8Bit();
|
call += batchArgs.toLocal8Bit();
|
||||||
}
|
}
|
||||||
saver.write("chcp 65001\r\n");
|
if (Utils::HostOsInfo::isWindowsHost() && QSysInfo::WindowsVersion >= QSysInfo::WV_WINDOWS7)
|
||||||
|
saver.write("chcp 65001\r\n"); // Only works for Windows 7 or later
|
||||||
saver.write(call + "\r\n");
|
saver.write(call + "\r\n");
|
||||||
saver.write("@echo " + marker.toLocal8Bit() + "\r\n");
|
saver.write("@echo " + marker.toLocal8Bit() + "\r\n");
|
||||||
saver.write("set\r\n");
|
saver.write("set\r\n");
|
||||||
|
Reference in New Issue
Block a user