mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-07 15:25:01 +01:00
cleanup repeated pattern for setting in-bundle search paths and add ARDOUR_EXPORT_FORMATS_PATH to that list
git-svn-id: svn://localhost/ardour2/branches/3.0@9262 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
483a88d54e
commit
7d30cc243f
1 changed files with 28 additions and 120 deletions
|
|
@ -100,6 +100,22 @@ Please consider the possibilities, and perhaps (re)start JACK."));
|
||||||
win.run ();
|
win.run ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void export_search_path (const string& base_dir, const char* varname, const char* dir)
|
||||||
|
{
|
||||||
|
string path;
|
||||||
|
const char * cstr = getenv (varname);
|
||||||
|
|
||||||
|
if (cstr) {
|
||||||
|
path = cstr;
|
||||||
|
path += ':';
|
||||||
|
} else {
|
||||||
|
path = "";
|
||||||
|
}
|
||||||
|
path += base_dir;
|
||||||
|
path += dir;
|
||||||
|
|
||||||
|
setenv (varname, path.c_str(), 1);
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef __APPLE__
|
#ifdef __APPLE__
|
||||||
|
|
||||||
|
|
@ -177,65 +193,12 @@ fixup_bundle_environment (int, char* [])
|
||||||
path += "/../Resources";
|
path += "/../Resources";
|
||||||
setenv ("ARDOUR_INSTANT_XML_PATH", path.c_str(), 1);
|
setenv ("ARDOUR_INSTANT_XML_PATH", path.c_str(), 1);
|
||||||
|
|
||||||
cstr = getenv ("LADSPA_PATH");
|
export_search_path (dir_path, "LADSPA_PATH", "/../Plugins");
|
||||||
if (cstr) {
|
export_search_path (dir_path, "VAMP_PATH", "/../Frameworks");
|
||||||
path = cstr;
|
export_search_path (dir_path, "ARDOUR_PANNER_PATH", "/lib/panners");
|
||||||
path += ':';
|
export_search_path (dir_path, "ARDOUR_SURFACES_PATH", "/lib/surfaces");
|
||||||
} else {
|
export_search_path (dir_path, "ARDOUR_MIDIMAPS_PATH", "/share/midi_maps");
|
||||||
path = "";
|
export_search_path (dir_path, "ARDOUR_EXPORT_FORMATS_PATH", "/share/exports");
|
||||||
}
|
|
||||||
path += dir_path;
|
|
||||||
path += "/../Plugins";
|
|
||||||
|
|
||||||
setenv ("LADSPA_PATH", path.c_str(), 1);
|
|
||||||
|
|
||||||
cstr = getenv ("VAMP_PATH");
|
|
||||||
if (cstr) {
|
|
||||||
path = cstr;
|
|
||||||
path += ':';
|
|
||||||
} else {
|
|
||||||
path = "";
|
|
||||||
}
|
|
||||||
path += dir_path;
|
|
||||||
path += "/../Frameworks";
|
|
||||||
|
|
||||||
setenv ("VAMP_PATH", path.c_str(), 1);
|
|
||||||
|
|
||||||
cstr = getenv ("ARDOUR_PANNER_PATH");
|
|
||||||
if (cstr) {
|
|
||||||
path = cstr;
|
|
||||||
path += ':';
|
|
||||||
} else {
|
|
||||||
path = "";
|
|
||||||
}
|
|
||||||
path += dir_path;
|
|
||||||
path += "/lib/panners";
|
|
||||||
|
|
||||||
setenv ("ARDOUR_PANNER_PATH", path.c_str(), 1);
|
|
||||||
|
|
||||||
cstr = getenv ("ARDOUR_SURFACES_PATH");
|
|
||||||
if (cstr) {
|
|
||||||
path = cstr;
|
|
||||||
path += ':';
|
|
||||||
} else {
|
|
||||||
path = "";
|
|
||||||
}
|
|
||||||
path += dir_path;
|
|
||||||
path += "/lib/surfaces";
|
|
||||||
|
|
||||||
setenv ("ARDOUR_SURFACES_PATH", path.c_str(), 1);
|
|
||||||
|
|
||||||
cstr = getenv ("ARDOUR_MIDIMAPS_PATH");
|
|
||||||
if (cstr) {
|
|
||||||
path = cstr;
|
|
||||||
path += ':';
|
|
||||||
} else {
|
|
||||||
path = "";
|
|
||||||
}
|
|
||||||
path += dir_path;
|
|
||||||
path += "/share/midi_maps";
|
|
||||||
|
|
||||||
setenv ("ARDOUR_MIDIMAPS_PATH", path.c_str(), 1);
|
|
||||||
|
|
||||||
path = dir_path;
|
path = dir_path;
|
||||||
path += "/../Frameworks/clearlooks";
|
path += "/../Frameworks/clearlooks";
|
||||||
|
|
@ -336,7 +299,6 @@ fixup_bundle_environment (int /*argc*/, char* argv[])
|
||||||
Glib::ustring exec_path = argv[0];
|
Glib::ustring exec_path = argv[0];
|
||||||
Glib::ustring dir_path = Glib::path_get_dirname (Glib::path_get_dirname (exec_path));
|
Glib::ustring dir_path = Glib::path_get_dirname (Glib::path_get_dirname (exec_path));
|
||||||
Glib::ustring path;
|
Glib::ustring path;
|
||||||
const char *cstr = getenv ("PATH");
|
|
||||||
Glib::ustring userconfigdir = user_config_directory().to_string();
|
Glib::ustring userconfigdir = user_config_directory().to_string();
|
||||||
|
|
||||||
/* ensure that we find any bundled executables (e.g. JACK),
|
/* ensure that we find any bundled executables (e.g. JACK),
|
||||||
|
|
@ -375,69 +337,15 @@ fixup_bundle_environment (int /*argc*/, char* argv[])
|
||||||
path += "/etc";
|
path += "/etc";
|
||||||
setenv ("ARDOUR_INSTANT_XML_PATH", path.c_str(), 1);
|
setenv ("ARDOUR_INSTANT_XML_PATH", path.c_str(), 1);
|
||||||
|
|
||||||
cstr = getenv ("LADSPA_PATH");
|
export_search_path (dir_path, "LADSPA_PATH", "/../plugins");
|
||||||
if (cstr) {
|
export_search_path (dir_path, "VAMP_PATH", "/lib");
|
||||||
path = cstr;
|
export_search_path (dir_path, "ARDOUR_PANNER_PATH", "/lib/panners");
|
||||||
path += ':';
|
export_search_path (dir_path, "ARDOUR_SURFACES_PATH", "/lib/surfaces");
|
||||||
} else {
|
export_search_path (dir_path, "ARDOUR_MIDIMAPS_PATH", "/share/midi_maps");
|
||||||
path = "";
|
export_search_path (dir_path, "ARDOUR_EXPORT_FORMATS_PATH", "/share/exports");
|
||||||
}
|
|
||||||
path += dir_path;
|
|
||||||
path += "/lib/plugins";
|
|
||||||
|
|
||||||
setenv ("LADSPA_PATH", path.c_str(), 1);
|
|
||||||
|
|
||||||
cstr = getenv ("VAMP_PATH");
|
|
||||||
if (cstr) {
|
|
||||||
path = cstr;
|
|
||||||
path += ':';
|
|
||||||
} else {
|
|
||||||
path = "";
|
|
||||||
}
|
|
||||||
path += dir_path;
|
|
||||||
path += "/lib";
|
|
||||||
|
|
||||||
setenv ("VAMP_PATH", path.c_str(), 1);
|
|
||||||
|
|
||||||
cstr = getenv ("ARDOUR_PANNER_PATH");
|
|
||||||
if (cstr) {
|
|
||||||
path = cstr;
|
|
||||||
path += ':';
|
|
||||||
} else {
|
|
||||||
path = "";
|
|
||||||
}
|
|
||||||
path += dir_path;
|
|
||||||
path += "/lib/panners";
|
|
||||||
|
|
||||||
setenv ("ARDOUR_PANNER_PATH", path.c_str(), 1);
|
|
||||||
|
|
||||||
cstr = getenv ("ARDOUR_SURFACES_PATH");
|
|
||||||
if (cstr) {
|
|
||||||
path = cstr;
|
|
||||||
path += ':';
|
|
||||||
} else {
|
|
||||||
path = "";
|
|
||||||
}
|
|
||||||
path += dir_path;
|
|
||||||
path += "/lib/surfaces";
|
|
||||||
|
|
||||||
setenv ("ARDOUR_SURFACES_PATH", path.c_str(), 1);
|
|
||||||
|
|
||||||
cstr = getenv ("ARDOUR_MIDIMAPS_PATH");
|
|
||||||
if (cstr) {
|
|
||||||
path = cstr;
|
|
||||||
path += ':';
|
|
||||||
} else {
|
|
||||||
path = "";
|
|
||||||
}
|
|
||||||
path += dir_path;
|
|
||||||
path += "/share/midi_maps";
|
|
||||||
|
|
||||||
setenv ("ARDOUR_MIDIMAPS_PATH", path.c_str(), 1);
|
|
||||||
|
|
||||||
path = dir_path;
|
path = dir_path;
|
||||||
path += "/lib/clearlooks";
|
path += "/lib/clearlooks";
|
||||||
|
|
||||||
setenv ("GTK_PATH", path.c_str(), 1);
|
setenv ("GTK_PATH", path.c_str(), 1);
|
||||||
|
|
||||||
/* unset GTK_RC_FILES so that we only load the RC files that we define
|
/* unset GTK_RC_FILES so that we only load the RC files that we define
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue