Mackie protocol: set-session-from-edit-range moved to shift+marker
[ardour.git] / gtk2_ardour / video_tool_paths.cc
index eab6c5b39946e7c38235d5d97a9035d564528a02..2ac4f4d401f0eb06031f55572eda09329edc11ab 100644 (file)
@@ -27,7 +27,6 @@
 #endif
 
 #include "pbd/file_utils.h"
-#include "pbd/error.h"
 #include "video_tool_paths.h"
 #include "i18n.h"
 
@@ -67,7 +66,7 @@ ArdourVideoToolPaths::harvid_exe (std::string &harvid_exe)
 
 #ifdef PLATFORM_WINDOWS
        std::string reg;
-       const char *program_files = PBD::get_win_special_folder (CSIDL_PROGRAM_FILES);
+       std::string program_files = PBD::get_win_special_folder_path (CSIDL_PROGRAM_FILES);
 #endif
 
        harvid_exe = "";
@@ -85,9 +84,9 @@ ArdourVideoToolPaths::harvid_exe (std::string &harvid_exe)
        {
                harvid_exe = g_build_filename(reg.c_str(), "harvid.exe", NULL);
        }
-       else if (program_files && Glib::file_test(g_build_filename(program_files, "harvid", "harvid.exe", NULL), Glib::FILE_TEST_EXISTS))
+       else if (!program_files.empty() && Glib::file_test(g_build_filename(program_files.c_str(), "harvid", "harvid.exe", NULL), Glib::FILE_TEST_EXISTS))
        {
-               harvid_exe = g_build_filename(program_files, "harvid", "harvid.exe", NULL);
+               harvid_exe = g_build_filename(program_files.c_str(), "harvid", "harvid.exe", NULL);
        }
        else if (Glib::file_test(X_("C:\\Program Files\\harvid\\harvid.exe"), Glib::FILE_TEST_EXISTS)) {
                harvid_exe = X_("C:\\Program Files\\harvid\\harvid.exe");
@@ -106,16 +105,14 @@ ArdourVideoToolPaths::xjadeo_exe (std::string &xjadeo_exe)
        std::string xjadeo_file_path;
 #ifdef PLATFORM_WINDOWS
        std::string reg;
-       const char *program_files = PBD::get_win_special_folder (CSIDL_PROGRAM_FILES);
+       std::string program_files = PBD::get_win_special_folder_path (CSIDL_PROGRAM_FILES);
 #endif
        if (getenv("XJREMOTE")) {
                xjadeo_exe = getenv("XJREMOTE");
        } else if (find_file (Searchpath(Glib::getenv("PATH")), X_("xjremote"), xjadeo_file_path)) {
                xjadeo_exe = xjadeo_file_path;
-               info << "xjadeo from XJREMOTE: " << xjadeo_exe << endmsg;
        } else if (find_file (Searchpath(Glib::getenv("PATH")), X_("xjadeo"), xjadeo_file_path)) {
                xjadeo_exe = xjadeo_file_path;
-               info << "xjadeo from PATH: " << xjadeo_exe << endmsg;
        }
 #ifdef __APPLE__
        else if (Glib::file_test(X_("/Applications/Xjadeo.app/Contents/MacOS/xjadeo"), Glib::FILE_TEST_EXISTS|Glib::FILE_TEST_IS_EXECUTABLE)) {
@@ -129,21 +126,17 @@ ArdourVideoToolPaths::xjadeo_exe (std::string &xjadeo_exe)
        else if ( windows_install_dir("Software\\" PROGRAM_NAME "\\v" PROGRAM_VERSION "\\video", reg))
        {
                xjadeo_exe = std::string(g_build_filename(reg.c_str(), "xjadeo", "xjadeo.exe", NULL));
-               info << "xjadeo.exe from reg: " << "Software\\" PROGRAM_NAME "\\v" PROGRAM_VERSION "\\video" << ": " << xjadeo_exe << endmsg;
        }
        else if ( windows_install_dir("Software\\RSS\\xjadeo", reg))
        {
                xjadeo_exe = std::string(g_build_filename(reg.c_str(), "xjadeo.exe", NULL));
-               info << "xjadeo.exe from reg: Software\\RSS\\xjadeo: " << xjadeo_exe << endmsg;
        }
-       else if (program_files && Glib::file_test(g_build_filename(program_files, "xjadeo", "xjadeo.exe", NULL), Glib::FILE_TEST_EXISTS))
+       else if (!program_files.empty() && Glib::file_test(g_build_filename(program_files.c_str(), "xjadeo", "xjadeo.exe", NULL), Glib::FILE_TEST_EXISTS))
        {
-               xjadeo_exe = std::string(g_build_filename(program_files, "xjadeo", "xjadeo.exe", NULL));
-               info << "xjadeo.exe from CSIDL_PROGRAM_FILES: " << xjadeo_exe << endmsg;
+               xjadeo_exe = std::string(g_build_filename(program_files.c_str(), "xjadeo", "xjadeo.exe", NULL));
        }
        else if (Glib::file_test(X_("C:\\Program Files\\xjadeo\\xjadeo.exe"), Glib::FILE_TEST_EXISTS)) {
                xjadeo_exe = X_("C:\\Program Files\\xjadeo\\xjadeo.exe");
-               info << "xjadeo.exe from C:\\Program Files\\xjadeo\\ :" << xjadeo_exe << endmsg;
        }
 #endif
        else  {
@@ -158,7 +151,7 @@ ArdourVideoToolPaths::transcoder_exe (std::string &ffmpeg_exe, std::string &ffpr
 {
 #ifdef PLATFORM_WINDOWS
        std::string reg;
-       const char *program_files = PBD::get_win_special_folder (CSIDL_PROGRAM_FILES);
+       std::string program_files = PBD::get_win_special_folder_path (CSIDL_PROGRAM_FILES);
 #endif
 
        ffmpeg_exe = X_("");
@@ -183,8 +176,8 @@ ArdourVideoToolPaths::transcoder_exe (std::string &ffmpeg_exe, std::string &ffpr
        if (Glib::file_test(ffmpeg_exe, Glib::FILE_TEST_EXISTS)) {
                ;
        }
-       else if (program_files && Glib::file_test(g_build_filename(program_files, "harvid", "ffmpeg.exe", NULL), Glib::FILE_TEST_EXISTS)) {
-               ffmpeg_exe = g_build_filename(program_files, "harvid", "ffmpeg.exe", NULL);
+       else if (!program_files.empty() && Glib::file_test(g_build_filename(program_files.c_str(), "harvid", "ffmpeg.exe", NULL), Glib::FILE_TEST_EXISTS)) {
+               ffmpeg_exe = g_build_filename(program_files.c_str(), "harvid", "ffmpeg.exe", NULL);
        }
        else if (Glib::file_test(X_("C:\\Program Files\\ffmpeg\\ffmpeg.exe"), Glib::FILE_TEST_EXISTS)) {
                ffmpeg_exe = X_("C:\\Program Files\\ffmpeg\\ffmpeg.exe");
@@ -200,8 +193,8 @@ ArdourVideoToolPaths::transcoder_exe (std::string &ffmpeg_exe, std::string &ffpr
        if (Glib::file_test(ffprobe_exe, Glib::FILE_TEST_EXISTS)) {
                ;
        }
-       else if (program_files && Glib::file_test(g_build_filename(program_files, "harvid", "ffprobe.exe", NULL), Glib::FILE_TEST_EXISTS)) {
-               ffprobe_exe = g_build_filename(program_files, "harvid", "ffprobe.exe", NULL);
+       else if (!program_files.empty() && Glib::file_test(g_build_filename(program_files.c_str(), "harvid", "ffprobe.exe", NULL), Glib::FILE_TEST_EXISTS)) {
+               ffprobe_exe = g_build_filename(program_files.c_str(), "harvid", "ffprobe.exe", NULL);
        }
        else if (Glib::file_test(X_("C:\\Program Files\\ffmpeg\\ffprobe.exe"), Glib::FILE_TEST_EXISTS)) {
                ffprobe_exe = X_("C:\\Program Files\\ffmpeg\\ffprobe.exe");