Files
ports/devel/codeblocks/patches/patch-src_plugins_compilergcc_compilergcc_cpp
rsadowski bb4797bf7d Update codeblocks to 25.03
"After six years, the Code::Blocks IDE has a new release.
The changelog is at https://www.codeblocks.org/changelogs/25.03/"

Update diff from maintainer Josh Grosse, thanks
2025-05-11 08:56:17 +00:00

51 lines
2.3 KiB
Plaintext

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
@@ -167,7 +167,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("'"));
@@ -1879,8 +1879,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:
@@ -2033,7 +2032,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());
@@ -2071,8 +2070,6 @@ int CompilerGCC::Run(ProjectBuildTarget* target)
if (target->GetUseConsoleRunner())
{
- if (wxFileExists(baseDir + strSLASH + strCONSOLE_RUNNER))
- {
command << crunnStr << strSPACE;
if (!platform::windows)
@@ -2084,7 +2081,6 @@ int CompilerGCC::Run(ProjectBuildTarget* target)
QuoteStringIfNeeded(strLinkerPath);
command << strLinkerPath << strSPACE;
}
- }
}
}