From: James Cowgill <jcowgill@debian.org>
Date: Mon, 21 Feb 2022 20:37:25 +0100
Subject: Move most helper binaries to /usr/lib/codelite

---
 CodeLite/cl_standard_paths.cpp | 3 +--
 CodeLite/macros.h              | 2 +-
 LiteEditor/app.cpp             | 3 +--
 Plugin/pipedprocess.cpp        | 3 +--
 4 files changed, 4 insertions(+), 7 deletions(-)

--- a/CodeLite/cl_standard_paths.cpp
+++ b/CodeLite/cl_standard_paths.cpp
@@ -119,8 +119,7 @@
 
 wxString clStandardPaths::GetBinFolder() const
 {
-    wxFileName fnExe(wxStandardPaths::Get().GetExecutablePath());
-    return fnExe.GetPath();
+    return wxStandardPaths::Get().GetPluginsDir();
 }
 
 wxString clStandardPaths::GetBinaryFullPath(const wxString& toolname) const
--- a/CodeLite/macros.h
+++ b/CodeLite/macros.h
@@ -110,7 +110,7 @@
 #ifdef __WXGTK__
 #define TERMINAL_CMD                                               \
     wxString::Format(wxT("%s/codelite_xterm '$(TITLE)' '$(CMD)'"), \
-                     wxFileName(clStandardPaths::Get().GetExecutablePath()).GetPath().c_str())
+                     clStandardPaths::Get().GetBinFolder().c_str())
 #elif defined(__WXMAC__)
 #define TERMINAL_CMD wxString::Format(wxT("%s/OpenTerm '$(CMD)'"), clStandardPaths::Get().GetDataDir().c_str())
 #else
--- a/LiteEditor/app.cpp
+++ b/LiteEditor/app.cpp
@@ -699,8 +699,7 @@
 #endif
     wxString oldpath;
     wxGetEnv(wxT("PATH"), &oldpath);
-    wxFileName execfpath(clStandardPaths::Get().GetExecutablePath());
-    wxSetEnv(wxT("PATH"), oldpath + pathsep + execfpath.GetPath());
+    wxSetEnv(wxT("PATH"), oldpath + pathsep + clStandardPaths::Get().GetBinFolder());
     wxString newpath;
     wxGetEnv(wxT("PATH"), &newpath);
 
--- a/Plugin/pipedprocess.cpp
+++ b/Plugin/pipedprocess.cpp
@@ -49,8 +49,7 @@
 {
 #ifdef __WXGTK__
     wxString cmd;
-    wxFileName exePath(clStandardPaths::Get().GetExecutablePath());
-    wxFileName script(exePath.GetPath(), wxT("codelite_kill_children"));
+    wxFileName script(clStandardPaths::Get().GetBinaryFullPath("codelite_kill_children"));
     cmd << wxT("/bin/bash -f ") << script.GetFullPath() << wxT(" ") << GetPid();
     wxExecute(cmd, wxEXEC_ASYNC);
 #else
