ports/devel/codeblocks/patches/patch-src_plugins_compilergcc_compilergcc_cpp

50 lines
2.3 KiB
Text

Always use cb_console_runner from installed PREFIX.
Index: src/plugins/compilergcc/compilergcc.cpp
--- src/plugins/compilergcc/compilergcc.cpp.orig
+++ src/plugins/compilergcc/compilergcc.cpp
@@ -166,7 +166,7 @@ namespace
{
PluginRegistrant<CompilerGCC> reg(_T("Compiler"));
- static const wxString strCONSOLE_RUNNER(platform::windows ? _T("cb_console_runner.exe") : _T("cb_console_runner"));
+ static const wxString strCONSOLE_RUNNER(platform::windows ? _T("cb_console_runner.exe") : _T("${PREFIX}/bin/cb_console_runner"));
static const wxString strSLASH(_T("/"));
static const wxString strSPACE(_T(" "));
static const wxString strQUOTE(platform::windows ? _T("\"") : _T("'"));
@@ -1855,8 +1855,7 @@ int CompilerGCC::RunSingleFile(const wxString& filenam
wxString baseDir = ConfigManager::GetExecutableFolder();
wxString crunnStr = strQUOTE + baseDir + strSLASH + strCONSOLE_RUNNER + strQUOTE;
- if ( wxFileExists(baseDir + strSLASH + strCONSOLE_RUNNER) )
- command << crunnStr << strSPACE;
+ command << strCONSOLE_RUNNER << strSPACE;
if (!command.Replace(_T("$SCRIPT"), exe_filename))
command << strQUOTE << exe_filename << strQUOTE; // if they didn't specify $SCRIPT, append:
@@ -1973,7 +1972,7 @@ int CompilerGCC::Run(ProjectBuildTarget* target)
: EscapeSpaces(m_CdRun);
wxString crunnStr = platform::windows
? strQUOTE + baseDir + strSLASH + strCONSOLE_RUNNER + strQUOTE
- : EscapeSpaces(baseDir + strSLASH + strCONSOLE_RUNNER);
+ : EscapeSpaces(strCONSOLE_RUNNER);
wxString hostapStr = platform::windows
? strQUOTE + target->GetHostApplication() + strQUOTE
: EscapeSpaces(target->GetHostApplication());
@@ -2011,8 +2010,6 @@ int CompilerGCC::Run(ProjectBuildTarget* target)
if (target->GetUseConsoleRunner())
{
- if (wxFileExists(baseDir + strSLASH + strCONSOLE_RUNNER))
- {
command << crunnStr << strSPACE;
if (!platform::windows)
@@ -2024,7 +2021,6 @@ int CompilerGCC::Run(ProjectBuildTarget* target)
QuoteStringIfNeeded(strLinkerPath);
command << strLinkerPath << strSPACE;
}
- }
}
}