- path = dir_path;
- path += "/etc:";
- path += dir_path;
- path += "/lib/surfaces:";
- path += dir_path;
- path += "/lib/panners:";
-
- setenv ("ARDOUR_MODULE_PATH", path.c_str(), 1);
-
- path = userconfigdir;
- path += ':';
- path += dir_path;
- path += "/etc/icons:";
- path += dir_path;
- path += "/etc/pixmaps:";
- path += dir_path;
- path += "/share:";
- path += dir_path;
- path += "/etc";
-
- setenv ("ARDOUR_PATH", path.c_str(), 1);
- setenv ("ARDOUR_CONFIG_PATH", path.c_str(), 1);
-
- path = dir_path;
- path += "/etc";
- setenv ("ARDOUR_INSTANT_XML_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/exports");
-
- path = dir_path;
- path += "/lib/clearlooks";
- setenv ("GTK_PATH", path.c_str(), 1);
-
- /* unset GTK_RC_FILES so that we only load the RC files that we define
- */
-
- unsetenv ("GTK_RC_FILES");
-
- if (!ARDOUR::translations_are_disabled ()) {
- path = dir_path;
- path += "/share/locale";
-
- localedir = strdup (path.c_str());
- setenv ("GTK_LOCALEDIR", localedir, 1);
- }
+ g_setenv ("PATH", (dir_path + "/bin:" + std::string(getenv ("PATH"))).c_str(), 1);
+
+ /* unset GTK_RC_FILES so that we only load the RC files that we define
+ */
+
+ g_unsetenv ("GTK_RC_FILES");
+
+ /* Tell fontconfig where to find fonts.conf. Use the system version
+ if it exists, otherwise use the stuff we included in the bundle
+ */
+
+ if (Glib::file_test ("/etc/fonts/fonts.conf", Glib::FILE_TEST_EXISTS)) {
+ g_setenv ("FONTCONFIG_FILE", "/etc/fonts/fonts.conf", 1);
+ g_setenv ("FONTCONFIG_PATH", "/etc/fonts", 1);
+ } else {
+ error << _("No fontconfig file found on your system. Things may looked very odd or ugly") << endmsg;
+ }