- fix: Mingw32-make doesn't work correctly if there are bash in the path.
This commit is contained in:
parent
87bbb23fa2
commit
7aa85611e3
1
NEWS.md
1
NEWS.md
|
@ -12,6 +12,7 @@ Red Panda C++ Version 3.1
|
||||||
- enhancement: When problems info from competitive-companion received, show tips in the status bar.
|
- enhancement: When problems info from competitive-companion received, show tips in the status bar.
|
||||||
- fix: Layout for function tips.
|
- fix: Layout for function tips.
|
||||||
- enhancement: More elements in the demo of editor color theme optiont page.
|
- enhancement: More elements in the demo of editor color theme optiont page.
|
||||||
|
- fix: Mingw32-make doesn't work correctly if there are bash in the path.
|
||||||
|
|
||||||
Red Panda C++ Version 3.0
|
Red Panda C++ Version 3.0
|
||||||
|
|
||||||
|
|
|
@ -713,6 +713,15 @@ void Compiler::runCommand(const QString &cmd, const QStringList &arguments, cons
|
||||||
bool compilerErrorUTF8=compilerSet()->isCompilerInfoUsingUTF8();
|
bool compilerErrorUTF8=compilerSet()->isCompilerInfoUsingUTF8();
|
||||||
bool outputUTF8=compilerSet()->forceUTF8();
|
bool outputUTF8=compilerSet()->forceUTF8();
|
||||||
QProcessEnvironment env = QProcessEnvironment::systemEnvironment();
|
QProcessEnvironment env = QProcessEnvironment::systemEnvironment();
|
||||||
|
#ifdef Q_OS_WIN
|
||||||
|
QStringList binDirs=compilerSet()->binDirs();
|
||||||
|
if (!cmdDir.isEmpty())
|
||||||
|
binDirs.insert(0, cmdDir);
|
||||||
|
QString windir = env.value("windir");
|
||||||
|
binDirs.append(windir+"\\system32");
|
||||||
|
binDirs.append(windir);
|
||||||
|
env.insert("PATH",binDirs.join(PATH_SEPARATOR));
|
||||||
|
#else
|
||||||
if (!cmdDir.isEmpty()) {
|
if (!cmdDir.isEmpty()) {
|
||||||
QString path = env.value("PATH");
|
QString path = env.value("PATH");
|
||||||
if (path.isEmpty()) {
|
if (path.isEmpty()) {
|
||||||
|
@ -722,6 +731,7 @@ void Compiler::runCommand(const QString &cmd, const QStringList &arguments, cons
|
||||||
}
|
}
|
||||||
env.insert("PATH",path);
|
env.insert("PATH",path);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
if (compilerSet() && compilerSet()->forceEnglishOutput())
|
if (compilerSet() && compilerSet()->forceEnglishOutput())
|
||||||
env.insert("LANG","en");
|
env.insert("LANG","en");
|
||||||
//env.insert("LDFLAGS","-Wl,--stack,12582912");
|
//env.insert("LDFLAGS","-Wl,--stack,12582912");
|
||||||
|
|
Loading…
Reference in New Issue