- cstr = getenv ("LADSPA_PATH");
- if (cstr) {
- path = cstr;
- path += ':';
- } else {
- path = "";
- }
- 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_CONTROL_SURFACE_PATH");
- if (cstr) {
- path = cstr;
- path += ':';
- } else {
- path = "";
- }
- path += dir_path;
- path += "/lib/surfaces";
-
- setenv ("ARDOUR_CONTROL_SURFACE_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 ("LV2_PATH");
- if (cstr) {
- path = cstr;
- path += ':';
- } else {
- path = "";
- }
- path += dir_path;
- path += "/lib/plugins";
-
- setenv ("LV2_PATH", path.c_str(), 1);
+ export_search_path (dir_path, "LADSPA_PATH", "/../plugins");
+ export_search_path (dir_path, "VAMP_PATH", "/lib");
+ export_search_path (dir_path, "ARDOUR_PANNER_PATH", "/lib/panners");
+ export_search_path (dir_path, "ARDOUR_SURFACES_PATH", "/lib/surfaces");
+ export_search_path (dir_path, "ARDOUR_MIDIMAPS_PATH", "/share/midi_maps");
+ export_search_path (dir_path, "ARDOUR_EXPORT_FORMATS_PATH", "/share/export");