make Session::get_remote_nth_stripable() ignore hidden stripables unless asked.
[ardour.git] / libs / ardour / system_exec.cc
index c99863f2e5372a4addff9420f9282f3989d6ed4b..b85b2347aebb76d9e8001f1a76d4914bc0dbb195 100644 (file)
@@ -19,7 +19,6 @@
 */
 
 #include <glibmm/miscutils.h>
-#include "pbd/pathscanner.h"
 #include "pbd/file_utils.h"
 #include "pbd/error.h"
 
@@ -31,30 +30,51 @@ using namespace ARDOUR;
 char * SystemExec::_vfork_exec_wrapper = NULL;
 
 static char *vfork_exec_wrapper_path() {
+#ifdef PLATFORM_WINDOWS
+       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
 }
 
 SystemExec::SystemExec (std::string c, char ** a)
        : PBD::SystemExec(c, a)
 {
+#ifndef PLATFORM_WINDOWS
        if (!_vfork_exec_wrapper) {
                _vfork_exec_wrapper = vfork_exec_wrapper_path();
        }
+#endif
 }
 
 SystemExec::SystemExec (std::string c, std::string a)
        : PBD::SystemExec(c, a)
 {
+#ifndef PLATFORM_WINDOWS
        if (!_vfork_exec_wrapper) {
                _vfork_exec_wrapper = vfork_exec_wrapper_path();
        }
+#endif
+}
+
+SystemExec::SystemExec (std::string c, const std::map<char, std::string> subs)
+       : PBD::SystemExec(c, subs)
+{
+#ifndef PLATFORM_WINDOWS
+       if (!_vfork_exec_wrapper) {
+               _vfork_exec_wrapper = vfork_exec_wrapper_path();
+       }
+#endif
 }
 
 SystemExec::~SystemExec() { }