diff options
author | Robin Gareus <robin@gareus.org> | 2016-02-28 17:06:28 +0100 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2016-02-28 17:06:28 +0100 |
commit | 88c839d0789b80330c934024e4c9ae9faafe916e (patch) | |
tree | ffdd9279cbcf190a62afec570bc1aff734c1f5ff /gtk2_ardour/video_tool_paths.cc | |
parent | 2c47dd98c57084f7cdf5a20edb2ad31e001ab8ad (diff) |
allow to configure custom path to video monitor
Diffstat (limited to 'gtk2_ardour/video_tool_paths.cc')
-rw-r--r-- | gtk2_ardour/video_tool_paths.cc | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/gtk2_ardour/video_tool_paths.cc b/gtk2_ardour/video_tool_paths.cc index 2ac4f4d401..df273cd3e5 100644 --- a/gtk2_ardour/video_tool_paths.cc +++ b/gtk2_ardour/video_tool_paths.cc @@ -27,6 +27,7 @@ #endif #include "pbd/file_utils.h" +#include "ui_config.h" #include "video_tool_paths.h" #include "i18n.h" @@ -107,8 +108,18 @@ ArdourVideoToolPaths::xjadeo_exe (std::string &xjadeo_exe) std::string reg; std::string program_files = PBD::get_win_special_folder_path (CSIDL_PROGRAM_FILES); #endif + xjadeo_exe = X_(""); + if (getenv("XJREMOTE")) { xjadeo_exe = getenv("XJREMOTE"); +#ifdef __APPLE__ + } else if (!UIConfiguration::instance().get_xjadeo_binary().empty() + && Glib::file_test (UIConfiguration::instance().get_xjadeo_binary() + "/Contents/MacOS/xjadeo", Glib::FILE_TEST_EXISTS|Glib::FILE_TEST_IS_EXECUTABLE)) { + xjadeo_exe = UIConfiguration::instance().get_xjadeo_binary() + "/Contents/MacOS/xjadeo"; +#endif + } else if (!UIConfiguration::instance().get_xjadeo_binary().empty() + && Glib::file_test (UIConfiguration::instance().get_xjadeo_binary(), Glib::FILE_TEST_EXISTS|Glib::FILE_TEST_IS_EXECUTABLE)) { + xjadeo_exe = UIConfiguration::instance().get_xjadeo_binary(); } else if (find_file (Searchpath(Glib::getenv("PATH")), X_("xjremote"), xjadeo_file_path)) { xjadeo_exe = xjadeo_file_path; } else if (find_file (Searchpath(Glib::getenv("PATH")), X_("xjadeo"), xjadeo_file_path)) { @@ -139,11 +150,8 @@ ArdourVideoToolPaths::xjadeo_exe (std::string &xjadeo_exe) xjadeo_exe = X_("C:\\Program Files\\xjadeo\\xjadeo.exe"); } #endif - else { - xjadeo_exe = X_(""); - return false; - } - return true; + + return (!xjadeo_exe.empty() && Glib::file_test(xjadeo_exe, Glib::FILE_TEST_EXISTS|Glib::FILE_TEST_IS_EXECUTABLE)); } bool |