mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-08 07:45:00 +01:00
prepare for upcoming Jadeo.app -> Xjadeo.app rename on OSX.
also add Windows code while we're at it and fallback to xjadeo on GNU/Linux.
This commit is contained in:
parent
ffd5c24fa5
commit
ab22a06ec7
1 changed files with 32 additions and 3 deletions
|
|
@ -39,6 +39,10 @@
|
||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
#include <curl/curl.h>
|
#include <curl/curl.h>
|
||||||
|
|
||||||
|
#ifdef PLATFORM_WINDOWS
|
||||||
|
#include <windows.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "i18n.h"
|
#include "i18n.h"
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
@ -718,20 +722,45 @@ void
|
||||||
VideoTimeLine::find_xjadeo () {
|
VideoTimeLine::find_xjadeo () {
|
||||||
std::string xjadeo_file_path;
|
std::string xjadeo_file_path;
|
||||||
if (getenv("XJREMOTE")) {
|
if (getenv("XJREMOTE")) {
|
||||||
_xjadeo_bin = strdup(getenv("XJREMOTE")); // XXX TODO: free it?!
|
_xjadeo_bin = getenv("XJREMOTE");
|
||||||
} else if (find_file_in_search_path (SearchPath(Glib::getenv("PATH")), X_("xjremote"), xjadeo_file_path)) {
|
}
|
||||||
|
else if (find_file_in_search_path (SearchPath(Glib::getenv("PATH")), X_("xjremote"), xjadeo_file_path)) {
|
||||||
_xjadeo_bin = xjadeo_file_path;
|
_xjadeo_bin = xjadeo_file_path;
|
||||||
}
|
}
|
||||||
|
else if (find_file_in_search_path (SearchPath(Glib::getenv("PATH")), X_("xjadeo"), xjadeo_file_path)) {
|
||||||
|
_xjadeo_bin = xjadeo_file_path;
|
||||||
|
}
|
||||||
|
#ifdef __APPLE__
|
||||||
|
else if (Glib::file_test(X_("/Applications/Xjadeo.app/Contents/MacOS/xjremote"), Glib::FILE_TEST_EXISTS|Glib::FILE_TEST_IS_EXECUTABLE)) {
|
||||||
|
_xjadeo_bin = X_("/Applications/Xjadeo.app/Contents/MacOS/xjremote");
|
||||||
|
}
|
||||||
else if (Glib::file_test(X_("/Applications/Jadeo.app/Contents/MacOS/xjremote"), Glib::FILE_TEST_EXISTS|Glib::FILE_TEST_IS_EXECUTABLE)) {
|
else if (Glib::file_test(X_("/Applications/Jadeo.app/Contents/MacOS/xjremote"), Glib::FILE_TEST_EXISTS|Glib::FILE_TEST_IS_EXECUTABLE)) {
|
||||||
_xjadeo_bin = X_("/Applications/Jadeo.app/Contents/MacOS/xjremote");
|
_xjadeo_bin = X_("/Applications/Jadeo.app/Contents/MacOS/xjremote");
|
||||||
}
|
}
|
||||||
/* TODO: win32: allow to configure PATH to xjremote */
|
#endif
|
||||||
|
#ifdef PLATFORM_WINDOWS
|
||||||
|
else {
|
||||||
|
HKEY key;
|
||||||
|
DWORD size = PATH_MAX;
|
||||||
|
char path[PATH_MAX+1];
|
||||||
|
xjadeo_file_path = X_("");
|
||||||
|
if ( (ERROR_SUCCESS == RegOpenKeyExA (HKEY_LOCAL_MACHINE, "Software\\RSS\\xjadeo", 0, KEY_READ, &key))
|
||||||
|
&& (ERROR_SUCCESS == RegQueryValueExA (key, "Install_Dir", 0, NULL, (LPBYTE)path, &size))
|
||||||
|
)
|
||||||
|
{
|
||||||
|
xjadeo_file_path = g_build_filename(path, X_("xjadeo.exe"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (Glib::file_test(xjadeo_file_path, Glib::FILE_TEST_EXISTS)) {
|
||||||
|
_xjadeo_bin = xjadeo_file_path;
|
||||||
|
}
|
||||||
else if (Glib::file_test(X_("C:\\Program Files\\xjadeo\\xjremote.exe"), Glib::FILE_TEST_EXISTS)) {
|
else if (Glib::file_test(X_("C:\\Program Files\\xjadeo\\xjremote.exe"), Glib::FILE_TEST_EXISTS)) {
|
||||||
_xjadeo_bin = X_("C:\\Program Files\\xjadeo\\xjremote.exe");
|
_xjadeo_bin = X_("C:\\Program Files\\xjadeo\\xjremote.exe");
|
||||||
}
|
}
|
||||||
else if (Glib::file_test(X_("C:\\Program Files\\xjadeo\\xjremote.bat"), Glib::FILE_TEST_EXISTS)) {
|
else if (Glib::file_test(X_("C:\\Program Files\\xjadeo\\xjremote.bat"), Glib::FILE_TEST_EXISTS)) {
|
||||||
_xjadeo_bin = X_("C:\\Program Files\\xjadeo\\xjremote.bat");
|
_xjadeo_bin = X_("C:\\Program Files\\xjadeo\\xjremote.bat");
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
else {
|
else {
|
||||||
_xjadeo_bin = X_("");
|
_xjadeo_bin = X_("");
|
||||||
warning << _("Video-monitor 'xjadeo' was not found. Please install http://xjadeo.sf.net/ "
|
warning << _("Video-monitor 'xjadeo' was not found. Please install http://xjadeo.sf.net/ "
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue