diff --git a/NEWS.md b/NEWS.md index 30589111..4e5c19b7 100644 --- a/NEWS.md +++ b/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. - fix: Layout for function tips. - 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 diff --git a/RedPandaIDE/compiler/compiler.cpp b/RedPandaIDE/compiler/compiler.cpp index d0324a37..fe0a5ce9 100644 --- a/RedPandaIDE/compiler/compiler.cpp +++ b/RedPandaIDE/compiler/compiler.cpp @@ -713,6 +713,15 @@ void Compiler::runCommand(const QString &cmd, const QStringList &arguments, cons bool compilerErrorUTF8=compilerSet()->isCompilerInfoUsingUTF8(); bool outputUTF8=compilerSet()->forceUTF8(); 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()) { QString path = env.value("PATH"); if (path.isEmpty()) { @@ -722,6 +731,7 @@ void Compiler::runCommand(const QString &cmd, const QStringList &arguments, cons } env.insert("PATH",path); } +#endif if (compilerSet() && compilerSet()->forceEnglishOutput()) env.insert("LANG","en"); //env.insert("LDFLAGS","-Wl,--stack,12582912");