summaryrefslogtreecommitdiff
path: root/gtk2_ardour/video_timeline.cc
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2014-04-24 13:22:17 +0200
committerRobin Gareus <robin@gareus.org>2014-04-24 13:22:17 +0200
commit9f266e90611f8bb713f74c9f745b9b1c83d316c1 (patch)
tree0f111409845e188ab76384cc4a06b6c9af3d3069 /gtk2_ardour/video_timeline.cc
parent1929cbffb4230dc4f7eb458f8fbe00974c784a59 (diff)
try get_win_special_folder() for harvid & xjadeo (if registry fails)
Diffstat (limited to 'gtk2_ardour/video_timeline.cc')
-rw-r--r--gtk2_ardour/video_timeline.cc12
1 files changed, 12 insertions, 0 deletions
diff --git a/gtk2_ardour/video_timeline.cc b/gtk2_ardour/video_timeline.cc
index 0ef0f4c5d8..0defa56be7 100644
--- a/gtk2_ardour/video_timeline.cc
+++ b/gtk2_ardour/video_timeline.cc
@@ -25,6 +25,12 @@
#include "pbd/convert.h"
#include "ardour/session_directory.h"
+#ifdef PLATFORM_WINDOWS
+#include <windows.h>
+#include <shlobj.h> // CSIDL_*
+#include "pbd/windows_special_dirs.h"
+#endif
+
#include "ardour_ui.h"
#include "public_editor.h"
#include "gui_thread.h"
@@ -720,6 +726,7 @@ VideoTimeLine::find_xjadeo () {
HKEY key;
DWORD size = PATH_MAX;
char tmp[PATH_MAX+1];
+ const char *program_files = PBD::get_win_special_folder (CSIDL_PROGRAM_FILES);
#endif
if (getenv("XJREMOTE")) {
_xjadeo_bin = getenv("XJREMOTE");
@@ -740,7 +747,12 @@ VideoTimeLine::find_xjadeo () {
{
_xjadeo_bin = std::string(g_build_filename(Glib::locale_to_utf8(tmp).c_str(), "xjadeo.exe", 0));
}
+ else if (program_files && Glib::file_test(g_build_filename(program_files, "xjadeo", "xjadeo.exe", 0), Glib::FILE_TEST_EXISTS))
+ {
+ _xjadeo_bin = std::string(g_build_filename(program_files, "harvid", "xjadeo.exe", 0));
+ }
#endif
+ /* generic fallbacks to try */
#ifdef __APPLE__
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");