#include <jack/jack.h>
-#include "ardour/svn_revision.h"
+#include "ardour/revision.h"
#include "ardour/version.h"
#include "ardour/ardour.h"
#include "ardour/audioengine.h"
#include "i18n.h"
+#ifdef __APPLE__
+#include <Carbon/Carbon.h>
+#endif
+
using namespace std;
using namespace Gtk;
using namespace ARDOUR_COMMAND_LINE;
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/clearlooks");
+ 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
*/
setenv ("GDK_PIXBUF_MODULE_FILE", Glib::build_filename (bundle_dir, "Resources/gdk-pixbuf.loaders").c_str(), 1);
}
-#include <Carbon/Carbon.h>
-
static void load_custom_fonts() {
-#if 0 // untested OSX code
+/* 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)) {
CFURLRef fontURL;
CFErrorRef error;
ttf = CFStringCreateWithBytes(
- kCFAllocatorDefault, ardour_mono_filec_str(),
+ kCFAllocatorDefault, (UInt8*) ardour_mono_file.c_str(),
ardour_mono_file.length(),
kCFStringEncodingUTF8, FALSE);
fontURL = CFURLCreateWithFileSystemPath(kCFAllocatorDefault, ttf, kCFURLPOSIXPathStyle, TRUE);
export_search_path (dir_path, "LADSPA_PATH", "/plugins");
export_search_path (dir_path, "VAMP_PATH", "/lib");
export_search_path (dir_path, "SUIL_MODULE_DIR", "/lib");
+ export_search_path (dir_path, "GTK_PATH", "/lib/gtkengines");
- export_search_path (dir_path, "GTK_PATH", "/lib/clearlooks");
+ 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
*/
cout << PROGRAM_NAME
<< VERSIONSTRING
<< _(" (built using ")
- << svn_revision
+ << revision
#ifdef __GNUC__
<< _(" and GCC version ") << __VERSION__
#endif