- pangorc << "[Pango]\nModuleFiles=";
-
- pangopath = dir_path;
- pangopath /= "..";
- pangopath /= "Resources";
- pangopath /= "pango.modules";
-
- pangorc << pangopath.to_string() << endl;
-
- pangorc.close ();
-
- setenv ("PANGO_RC_FILE", path.c_str(), 1);
- }
-
- // gettext charset aliases
-
- setenv ("CHARSETALIASDIR", path.c_str(), 1);
-
- // font config
-
- path = dir_path;
- path += "/../Resources/fonts.conf";
-
- setenv ("FONTCONFIG_FILE", path.c_str(), 1);
-
- // GDK Pixbuf loader module file
-
- path = dir_path;
- path += "/../Resources/gdk-pixbuf.loaders";
-
- setenv ("GDK_PIXBUF_MODULE_FILE", path.c_str(), 1);
-
- if (getenv ("ARDOUR_WITH_JACK")) {
- // JACK driver dir
-
- path = dir_path;
- path += "/../Frameworks";
-
- setenv ("JACK_DRIVER_DIR", path.c_str(), 1);
+
+ path = Glib::build_filename (userconfigdir, "pango.rc");
+ std::ofstream pangorc (path.c_str());
+ if (!pangorc) {
+ error << string_compose (_("cannot open pango.rc file %1") , path) << endmsg;
+ } else {
+ pangorc << "[Pango]\nModuleFiles="
+ << Glib::build_filename (bundle_dir, "Resources/pango.modules")
+ << endl;
+ pangorc.close ();
+
+ setenv ("PANGO_RC_FILE", path.c_str(), 1);
+ }