fix up initialization of various path vars in bundled OS X version; make LADSPA_PATH...
authorPaul Davis <paul@linuxaudiosystems.com>
Fri, 17 Oct 2008 09:50:32 +0000 (09:50 +0000)
committerPaul Davis <paul@linuxaudiosystems.com>
Fri, 17 Oct 2008 09:50:32 +0000 (09:50 +0000)
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@3978 d708f5d6-7413-0410-9779-e7cbd77b26cf

gtk2_ardour/main.cc
libs/ardour/plugin_manager.cc
svn_revision.h

index 51c1928d20025d910af870c0b11c129e0eecf840..c4b9b9a8976fa0e15103ee8545e28c126bf5aa4a 100644 (file)
@@ -83,7 +83,10 @@ fixup_bundle_environment ()
        Glib::ustring path;
        const char *cstr = getenv ("PATH");
 
-       /* ensure that we find any bundled executables (e.g. JACK) */
+       /* ensure that we find any bundled executables (e.g. JACK),
+          and find them before any instances of the same name
+          elsewhere in PATH
+       */
 
        path = dir_path;
        if (cstr) {
@@ -118,8 +121,10 @@ fixup_bundle_environment ()
        if (cstr) {
                path = cstr;
                path += ':';
+       } else {
+               path = "";
        }
-       path = dir_path;
+       path += dir_path;
        path += "/../Plugins";
        
        setenv ("LADSPA_PATH", path.c_str(), 1);
@@ -128,8 +133,10 @@ fixup_bundle_environment ()
        if (cstr) {
                path = cstr;
                path += ':';
+       } else {
+               path = "";
        }
-       path = dir_path;
+       path += dir_path;
        path += "/../Frameworks";
        
        setenv ("VAMP_PATH", path.c_str(), 1);
@@ -138,8 +145,10 @@ fixup_bundle_environment ()
        if (cstr) {
                path = cstr;
                path += ':';
+       } else {
+               path = "";
        }
-       path = dir_path;
+       path += dir_path;
        path += "/../Surfaces";
        
        setenv ("ARDOUR_CONTROL_SURFACE_PATH", path.c_str(), 1);
@@ -148,8 +157,10 @@ fixup_bundle_environment ()
        if (cstr) {
                path = cstr;
                path += ':';
+       } else {
+               path = "";
        }
-       path = dir_path;
+       path += dir_path;
        path += "/../Plugins";
        
        setenv ("LV2_PATH", path.c_str(), 1);
@@ -184,8 +195,11 @@ fixup_bundle_environment ()
                        error << string_compose (_("cannot open pango.rc file %1") , path) << endmsg;
                } else {
                        pangorc << "[Pango]\nModuleFiles=";
-                       Glib::ustring mpath = dir_path;
+                       Glib::ustring mpath;
+
+                       mpath = dir_path;
                        mpath += "/../Resources/pango.modules";
+
                        pangorc << mpath << endl;
                        
                        pangorc.close ();
index 6dac06f8701fabfdc52a2a728c7d4bee1311729d..ad94019aad171500f469a7871b14776de887bfec 100644 (file)
@@ -150,9 +150,15 @@ void
 PluginManager::ladspa_refresh ()
 {
        _ladspa_plugin_info.clear ();
+       static const char *standard_path = "/usr/local/lib64/ladspa:/usr/local/lib/ladspa:/usr/lib64/ladspa:/usr/lib/ladspa:/Library/Audio/Plug-Ins/LADSPA";
+       
+       /* allow LADSPA_PATH to augment, not override standard locations */
 
-       if (ladspa_path.length() == 0) {
-               ladspa_path = "/usr/local/lib64/ladspa:/usr/local/lib/ladspa:/usr/lib64/ladspa:/usr/lib/ladspa:/Library/Audio/Plug-Ins/LADSPA";
+       if (ladspa_path.empty()) {
+               ladspa_path = standard_path;
+       } else {
+               ladspa_path += ":";
+               ladspa_path += standard_path;
        }
 
        ladspa_discover_from_path (ladspa_path);
index c89592b652f533a6b2884f0c2fb09981564052fb..22d9301de82a6dc586c5680a87ace632e6b4969d 100644 (file)
@@ -1,4 +1,4 @@
 #ifndef __ardour_svn_revision_h__
 #define __ardour_svn_revision_h__
-static const char* ardour_svn_revision = "3930";
+static const char* ardour_svn_revision = "3963";
 #endif