+ export_search_path (bundle_dir, "ARDOUR_DATA_PATH", "/Resources");
+ export_search_path (bundle_dir, "ARDOUR_CONFIG_PATH", "/Resources");
+ export_search_path (bundle_dir, "ARDOUR_INSTANT_XML_PATH", "/Resources");
+ export_search_path (bundle_dir, "LADSPA_PATH", "/Plugins");
+ export_search_path (bundle_dir, "VAMP_PATH", "/lib");
+ export_search_path (bundle_dir, "SUIL_MODULE_DIR", "/lib");
+ export_search_path (bundle_dir, "GTK_PATH", "/lib/gtkengines");
+
+ setenv ("PATH", (bundle_dir + "/MacOS:" + std::string(getenv ("PATH"))).c_str(), 1);
+
+ /* unset GTK_RC_FILES so that we only load the RC files that we define
+ */
+
+ unsetenv ("GTK_RC_FILES");
+
+ /* write a pango.rc file and tell pango to use it. we'd love
+ to put this into the PROGRAM_NAME.app bundle and leave it there,
+ but the user may not have write permission. so ...
+
+ we also have to make sure that the user ardour directory
+ actually exists ...
+ */
+
+ if (g_mkdir_with_parents (userconfigdir.c_str(), 0755) < 0) {
+ error << string_compose (_("cannot create user %3 folder %1 (%2)"), userconfigdir, strerror (errno), PROGRAM_NAME)
+ << endmsg;