summaryrefslogtreecommitdiff
path: root/gtk2_ardour/engine_dialog.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2007-08-15 17:41:07 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2007-08-15 17:41:07 +0000
commit8b4232bb56c218ee31ebfd05c37c70a46eaf0216 (patch)
tree447e592808469e404b218e6967733ff68ccdbe1a /gtk2_ardour/engine_dialog.cc
parente96e4bacbeadd832e9deb251d91124eb012a5a49 (diff)
more SAE + gtkosx changes - try to find jackd in the bundle; hard code SAE session params
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@2305 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/engine_dialog.cc')
-rw-r--r--gtk2_ardour/engine_dialog.cc68
1 files changed, 50 insertions, 18 deletions
diff --git a/gtk2_ardour/engine_dialog.cc b/gtk2_ardour/engine_dialog.cc
index 970525411d..908f5d222a 100644
--- a/gtk2_ardour/engine_dialog.cc
+++ b/gtk2_ardour/engine_dialog.cc
@@ -4,6 +4,7 @@
#include <glibmm.h>
+#include <ardour/profile.h>
#include <jack/jack.h>
#include <gtkmm/stock.h>
@@ -197,24 +198,7 @@ EngineControl::EngineControl ()
strings.clear ();
- if (Glib::file_test ("/usr/bin/jackd", FILE_TEST_EXISTS)) {
- strings.push_back ("/usr/bin/jackd");
- }
- if (Glib::file_test ("/usr/local/bin/jackd", FILE_TEST_EXISTS)) {
- strings.push_back ("/usr/local/bin/jackd");
- }
- if (Glib::file_test ("/opt/bin/jackd", FILE_TEST_EXISTS)) {
- strings.push_back ("/opt/bin/jackd");
- }
- if (Glib::file_test ("/usr/bin/jackdmp", FILE_TEST_EXISTS)) {
- strings.push_back ("/usr/bin/jackd");
- }
- if (Glib::file_test ("/usr/local/bin/jackdmp", FILE_TEST_EXISTS)) {
- strings.push_back ("/usr/local/bin/jackd");
- }
- if (Glib::file_test ("/opt/bin/jackdmp", FILE_TEST_EXISTS)) {
- strings.push_back ("/opt/bin/jackd");
- }
+ find_jack_servers (strings);
if (strings.empty()) {
fatal << _("No JACK server found anywhere on this system. Please install JACK and restart") << endmsg;
@@ -587,3 +571,51 @@ EngineControl::audio_mode_changed ()
output_device_combo.set_sensitive (true);
}
}
+
+void
+EngineControl::find_jack_servers (vector<string>& strings)
+{
+#ifdef __APPLE
+ if (Profile->get_single_package()) {
+
+ /* this magic lets us finds the path to the OSX bundle, and then
+ we infer JACK's location from there
+ */
+
+ CFURLRef pluginRef = CFBundleCopyBundleURL(CFBundleGetMainBundle());
+ CFStringRef macPath = CFURLCopyFileSystemPath(pluginRef,
+ kCFURLPOSIXPathStyle);
+ std::string path = CFStringGetCStringPtr(macPath,
+ CFStringGetSystemEncoding());
+ CFRelease(pluginRef);
+ CFRelease(macPath);
+
+ path += '/jackd';
+
+ if (Glib::file_test (path, FILE_TEST_EXISTS)) {
+ strings.push_back ();
+ } else {
+ warning << _("JACK appears to be missing from the Ardour bundle") << endmsg;
+ }
+#endif
+
+ if (Glib::file_test ("/usr/bin/jackd", FILE_TEST_EXISTS)) {
+ strings.push_back ("/usr/bin/jackd");
+ }
+ if (Glib::file_test ("/usr/local/bin/jackd", FILE_TEST_EXISTS)) {
+ strings.push_back ("/usr/local/bin/jackd");
+ }
+ if (Glib::file_test ("/opt/bin/jackd", FILE_TEST_EXISTS)) {
+ strings.push_back ("/opt/bin/jackd");
+ }
+ if (Glib::file_test ("/usr/bin/jackdmp", FILE_TEST_EXISTS)) {
+ strings.push_back ("/usr/bin/jackd");
+ }
+ if (Glib::file_test ("/usr/local/bin/jackdmp", FILE_TEST_EXISTS)) {
+ strings.push_back ("/usr/local/bin/jackd");
+ }
+ if (Glib::file_test ("/opt/bin/jackdmp", FILE_TEST_EXISTS)) {
+ strings.push_back ("/opt/bin/jackd");
+ }
+
+}