diff options
author | Robin Gareus <robin@gareus.org> | 2014-04-24 02:08:19 +0200 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2014-04-24 02:08:19 +0200 |
commit | 1929cbffb4230dc4f7eb458f8fbe00974c784a59 (patch) | |
tree | 80b491c44e6cce70735c37cb2256c169bf0ccab3 /gtk2_ardour/video_server_dialog.cc | |
parent | 8a8dc9ca04c9ca2f9f7e30b525ca5c3251753b19 (diff) |
query windows registry for xjadeo & harvid path
Diffstat (limited to 'gtk2_ardour/video_server_dialog.cc')
-rw-r--r-- | gtk2_ardour/video_server_dialog.cc | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/gtk2_ardour/video_server_dialog.cc b/gtk2_ardour/video_server_dialog.cc index bc9e8be442..f9a50821b5 100644 --- a/gtk2_ardour/video_server_dialog.cc +++ b/gtk2_ardour/video_server_dialog.cc @@ -83,10 +83,24 @@ VideoServerDialog::VideoServerDialog (Session* s) listenaddr_combo.append_text("0.0.0.0"); listenaddr_combo.set_active(0); +#ifdef PLATFORM_WINDOWS + HKEY key; + DWORD size = PATH_MAX; + char tmp[PATH_MAX+1]; +#endif + std::string icsd_file_path; if (find_file_in_search_path (PBD::Searchpath(Glib::getenv("PATH")), X_("harvid"), icsd_file_path)) { path_entry.set_text(icsd_file_path); } +#ifdef PLATFORM_WINDOWS + else if ( (ERROR_SUCCESS == RegOpenKeyExA (HKEY_LOCAL_MACHINE, "Software\\RSS\\harvid", 0, KEY_READ, &key)) + && (ERROR_SUCCESS == RegQueryValueExA (key, "Install_Dir", 0, NULL, reinterpret_cast<LPBYTE>(tmp), &size)) + ) + { + path_entry.set_text(g_build_filename(Glib::locale_to_utf8(tmp).c_str(), "harvid.exe", 0)); + } +#endif else if (Glib::file_test(X_("C:\\Program Files\\harvid\\harvid.exe"), Glib::FILE_TEST_EXISTS)) { path_entry.set_text(X_("C:\\Program Files\\harvid\\harvid.exe")); } |