X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fcross_windows.cc;h=ad5a886643211b251174318a7f9d721711c903c1;hb=152197adf5b060602ecdd99e6f272c4e8b2b410e;hp=337750dcbfd4525520c82ddc13990f44cb95f55c;hpb=64b72fe3872c7e7b778db6a6de24e6bf657817ab;p=dcpomatic.git diff --git a/src/lib/cross_windows.cc b/src/lib/cross_windows.cc index 337750dcb..ad5a88664 100644 --- a/src/lib/cross_windows.cc +++ b/src/lib/cross_windows.cc @@ -128,7 +128,6 @@ run_ffprobe (boost::filesystem::path content, boost::filesystem::path out) wchar_t dir[512]; MultiByteToWideChar (CP_UTF8, 0, directory_containing_executable().string().c_str(), -1, dir, sizeof(dir)); - SetCurrentDirectory (dir); STARTUPINFO startup_info; ZeroMemory (&startup_info, sizeof (startup_info)); @@ -147,7 +146,7 @@ run_ffprobe (boost::filesystem::path content, boost::filesystem::path out) PROCESS_INFORMATION process_info; ZeroMemory (&process_info, sizeof (process_info)); - if (!CreateProcess (0, command, 0, 0, TRUE, CREATE_NO_WINDOW, 0, 0, &startup_info, &process_info)) { + if (!CreateProcess (0, command, 0, 0, TRUE, CREATE_NO_WINDOW, 0, dir, &startup_info, &process_info)) { LOG_ERROR_NC (N_("ffprobe call failed (could not CreateProcess)")); return; } @@ -193,12 +192,26 @@ directory_containing_executable () boost::filesystem::path -shared_path () +resources_path () { return directory_containing_executable().parent_path(); } +boost::filesystem::path +xsd_path () +{ + return directory_containing_executable().parent_path() / "xsd"; +} + + +boost::filesystem::path +tags_path () +{ + return directory_containing_executable().parent_path() / "tags"; +} + + boost::filesystem::path openssl_path () { @@ -332,12 +345,6 @@ home_directory () return boost::filesystem::path(getenv("HOMEDRIVE")) / boost::filesystem::path(getenv("HOMEPATH")); } -string -command_and_read (string) -{ - return ""; -} - /** @return true if this process is a 32-bit one running on a 64-bit-capable OS */ bool running_32_on_64 () @@ -622,3 +629,9 @@ disk_write_finished () } +string +dcpomatic::get_process_id () +{ + return dcp::raw_convert(GetCurrentProcessId()); +} +