X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=gtk2_ardour%2Fmain.cc;h=21e534397976b39930a1e02fd8c7f3fb2dc21a55;hb=af3056769cdc09d9ce3b21f9f8e0aa8145ed8f0e;hp=a5973b03b36dee46792da39efb24943e9ce6fe2a;hpb=5907f3eb036bb0252e61f332c155eddd706465aa;p=ardour.git diff --git a/gtk2_ardour/main.cc b/gtk2_ardour/main.cc index a5973b03b3..21e5343979 100644 --- a/gtk2_ardour/main.cc +++ b/gtk2_ardour/main.cc @@ -38,7 +38,7 @@ #include -#include "ardour/svn_revision.h" +#include "ardour/revision.h" #include "ardour/version.h" #include "ardour/ardour.h" #include "ardour/audioengine.h" @@ -184,6 +184,8 @@ fixup_bundle_environment (int, char* []) 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 */ @@ -222,7 +224,11 @@ fixup_bundle_environment (int, char* []) } static void load_custom_fonts() { -#if MAC_OS_X_VERSION_MIN_REQUIRED > 1060 +/* this code will only compile on OS X 10.6 and above, and we currently do not + * need it for earlier versions since we fall back on a non-monospace, + * non-custom font. + */ +#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1060 std::string ardour_mono_file; if (!find_file_in_search_path (ardour_data_search_path(), "ArdourMono.ttf", ardour_mono_file)) { @@ -240,8 +246,6 @@ static void load_custom_fonts() { if (CTFontManagerRegisterFontsForURL(fontURL, kCTFontManagerScopeProcess, &error) != true) { cerr << _("Cannot load ArdourMono TrueType font.") << endl; } -#else - /* no real usable API for this on OS X 10.5 or below */ #endif } @@ -290,6 +294,8 @@ fixup_bundle_environment (int /*argc*/, char* argv[]) export_search_path (dir_path, "SUIL_MODULE_DIR", "/lib"); export_search_path (dir_path, "GTK_PATH", "/lib/gtkengines"); + 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 */ @@ -483,7 +489,7 @@ int main (int argc, char *argv[]) cout << PROGRAM_NAME << VERSIONSTRING << _(" (built using ") - << svn_revision + << revision #ifdef __GNUC__ << _(" and GCC version ") << __VERSION__ #endif