X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=libs%2Fardour%2Fsystem_exec.cc;h=aec89564223511a08834ca51b2e180850d16e010;hb=6946bdc0830c9f0971d2cd0d54b27e343c54d96a;hp=90e729a7f683d51df0f761fb3947ebf942afd6f1;hpb=ce72458d0934c009cc716b5b3171178c34df2152;p=ardour.git diff --git a/libs/ardour/system_exec.cc b/libs/ardour/system_exec.cc index 90e729a7f6..aec8956422 100644 --- a/libs/ardour/system_exec.cc +++ b/libs/ardour/system_exec.cc @@ -19,14 +19,13 @@ */ #include -#include "pbd/pathscanner.h" #include "pbd/file_utils.h" #include "pbd/error.h" #include "ardour/filesystem_paths.h" #include "ardour/system_exec.h" -using namespace ARDOUR; +namespace ARDOUR { char * SystemExec::_vfork_exec_wrapper = NULL; @@ -35,11 +34,14 @@ static char *vfork_exec_wrapper_path() { return NULL; #else std::string vfork_exec_wrapper; - if (!PBD::find_file_in_search_path ( - PBD::Searchpath(Glib::build_filename(ARDOUR::ardour_dll_directory(), "vfork")), + if (!PBD::find_file ( + PBD::Searchpath( + ARDOUR::ardour_dll_directory() // deployed + + G_SEARCHPATH_SEPARATOR_S + Glib::build_filename(ARDOUR::ardour_dll_directory(), "vfork") // src, build (ardev, etc) + ), "ardour-exec-wrapper", vfork_exec_wrapper)) { - PBD::warning << "vfork exec wrapper not found..'" << endmsg; - return NULL; + PBD::fatal << "vfork exec wrapper 'ardour-exec-wrapper' was not found in $PATH." << endmsg; + abort(); /*NOTREACHED*/ } return strdup(vfork_exec_wrapper.c_str()); #endif @@ -65,4 +67,16 @@ SystemExec::SystemExec (std::string c, std::string a) #endif } +SystemExec::SystemExec (std::string c, const std::map subs) + : PBD::SystemExec(c, subs) +{ +#ifndef PLATFORM_WINDOWS + if (!_vfork_exec_wrapper) { + _vfork_exec_wrapper = vfork_exec_wrapper_path(); + } +#endif +} + SystemExec::~SystemExec() { } + +} // namespace ARDOUR