minor tweaks to Cut Time dialog. Use an enum to tell preferred_edit_location what...
[ardour.git] / gtk2_ardour / bundle_env_msvc.cc
index 6e565437280044431769306fb81a9bcb620e1116..7189892f5f106fb8ceab3099dbd8ee895cacf7dd 100644 (file)
@@ -238,7 +238,7 @@ string fonts_conf_file;
                fonts_conf_file += PROGRAM_NAME;
                fonts_conf_file += FONTS_CONF_LOCATION;
 #else
-       if (PBD::find_file_in_search_path (ARDOUR::ardour_config_search_path(), "fonts.conf", fonts_conf_file)) {
+       if (PBD::find_file (ARDOUR::ardour_config_search_path(), "fonts.conf", fonts_conf_file)) {
 #endif
                Glib::setenv ("FONTCONFIG_FILE", fonts_conf_file, true);
 
@@ -271,7 +271,7 @@ string pango_modules_file;
 #endif
                pango_modules_path.resize (pango_modules_path.size()-14); // Remove "/pango.modules" from the end
 #else
-       if (PBD::find_file_in_search_path (ARDOUR::ardour_config_search_path(), "pango.modules", pango_modules_file)) {
+       if (PBD::find_file (ARDOUR::ardour_config_search_path(), "pango.modules", pango_modules_file)) {
 
                Glib::ustring pango_modules_path = pango_modules_file;
                pango_modules_path.resize (pango_modules_path.size()-14); // Remove "/pango.modules" from the end
@@ -301,7 +301,7 @@ string gdk_pixbuf_loaders_file;
                gdk_pixbuf_loaders_file += PROGRAM_NAME;
                gdk_pixbuf_loaders_file += PIXBUFLOADERS_CONF_LOCATION;
 #else
-       if (PBD::find_file_in_search_path (ARDOUR::ardour_config_search_path(), "gdk-pixbuf.loaders", gdk_pixbuf_loaders_file)) {
+       if (PBD::find_file (ARDOUR::ardour_config_search_path(), "gdk-pixbuf.loaders", gdk_pixbuf_loaders_file)) {
 #endif
                // Set an environment variable so we can find our pixbuf modules.
                Glib::setenv ("GDK_PIXBUF_MODULE_FILE", Glib::filename_from_utf8(gdk_pixbuf_loaders_file), true);
@@ -327,7 +327,7 @@ string clearlooks_la_file;
                clearlooks_la_file += PROGRAM_NAME;
                clearlooks_la_file += CLEARLOOKS_CONF_LOCATION;
 #else
-       if (PBD::find_file_in_search_path (ARDOUR::ardour_config_search_path(), "libclearlooks.la", clearlooks_la_file)) {
+       if (PBD::find_file (ARDOUR::ardour_config_search_path(), "libclearlooks.la", clearlooks_la_file)) {
 #endif
                // Set an environment variable so we can find our clearlooks engine.
                // Note that this requires a modified version of libgtk (gtkthemes.c)
@@ -341,7 +341,7 @@ string clearlooks_la_file;
 }
 
 void
-fixup_bundle_environment (int argc, char* argv[], const char** localedir)
+fixup_bundle_environment (int argc, char* argv[], string & localedir)
 {
        std::string exec_path = argv[0];
        std::string dir_path  = Glib::path_get_dirname (exec_path);
@@ -411,6 +411,10 @@ fixup_bundle_environment (int argc, char* argv[], const char** localedir)
        Glib::setenv ("LADSPA_PATH", path, true);
 
 
+       // Next, set up 'SUIL_MODULE_DIR'
+       Glib::setenv ("SUIL_MODULE_DIR", Glib::build_filename(ardour_dll_directory(), "suil"), true);
+
+
        // Next, set up 'VAMP_PATH'
        cstr = getenv ("VAMP_PATH");
        if (cstr) {
@@ -446,7 +450,7 @@ fixup_bundle_environment (int argc, char* argv[], const char** localedir)
                Glib::setenv ("GTK_LOCALEDIR", path, true);
 
                // and return the same path to our caller
-               (*localedir) = strdup (path.c_str());
+               localedir = path;
        }
 
 
@@ -475,9 +479,14 @@ fixup_bundle_environment (int argc, char* argv[], const char** localedir)
        }
 
        fixup_fonts_config();
-       fixup_pango_config();
        fixup_clearlooks_config();
+
+#ifdef DLL_PIXBUF_LOADERS
        fixup_pixbuf_loaders_config();
+#endif
+#ifdef DLL_PANGO_MODULES
+       fixup_pango_config();
+#endif
 }
 
 
@@ -485,7 +494,7 @@ void load_custom_fonts()
 {
        std::string ardour_mono_file;
 
-       if (!find_file_in_search_path (ardour_data_search_path(), "ArdourMono.ttf", ardour_mono_file)) {
+       if (!find_file (ardour_data_search_path(), "ArdourMono.ttf", ardour_mono_file)) {
                cerr << _("Cannot find ArdourMono TrueType font") << endl;
        }