projects
/
dcpomatic.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
BOOST_FOREACH.
[dcpomatic.git]
/
src
/
lib
/
cross_windows.cc
diff --git
a/src/lib/cross_windows.cc
b/src/lib/cross_windows.cc
index 498078785972b945d3de755393250e2c132aa3d1..0ab56bb6b24f9e4ca24a069402d9d06b475bb943 100644
(file)
--- a/
src/lib/cross_windows.cc
+++ b/
src/lib/cross_windows.cc
@@
-31,7
+31,6
@@
extern "C" {
#include <libavformat/avio.h>
}
#include <boost/algorithm/string.hpp>
#include <libavformat/avio.h>
}
#include <boost/algorithm/string.hpp>
-#include <boost/foreach.hpp>
#include <boost/dll/runtime_symbol_info.hpp>
#include <windows.h>
#include <winternl.h>
#include <boost/dll/runtime_symbol_info.hpp>
#include <windows.h>
#include <winternl.h>
@@
-59,7
+58,7
@@
using std::cerr;
using std::cout;
using std::runtime_error;
using std::map;
using std::cout;
using std::runtime_error;
using std::map;
-using
boost
::shared_ptr;
+using
std
::shared_ptr;
using boost::optional;
static std::vector<pair<HANDLE, string> > locked_volumes;
using boost::optional;
static std::vector<pair<HANDLE, string> > locked_volumes;
@@
-128,7
+127,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));
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));
STARTUPINFO startup_info;
ZeroMemory (&startup_info, sizeof (startup_info));
@@
-147,7
+145,7
@@
run_ffprobe (boost::filesystem::path content, boost::filesystem::path out)
PROCESS_INFORMATION process_info;
ZeroMemory (&process_info, sizeof (process_info));
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;
}
LOG_ERROR_NC (N_("ffprobe call failed (could not CreateProcess)"));
return;
}
@@
-206,6
+204,13
@@
xsd_path ()
}
}
+boost::filesystem::path
+tags_path ()
+{
+ return directory_containing_executable().parent_path() / "tags";
+}
+
+
boost::filesystem::path
openssl_path ()
{
boost::filesystem::path
openssl_path ()
{
@@
-339,12
+344,6
@@
home_directory ()
return boost::filesystem::path(getenv("HOMEDRIVE")) / boost::filesystem::path(getenv("HOMEPATH"));
}
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 ()
/** @return true if this process is a 32-bit one running on a 64-bit-capable OS */
bool
running_32_on_64 ()
@@
-629,3
+628,9
@@
disk_write_finished ()
}
}
+string
+dcpomatic::get_process_id ()
+{
+ return dcp::raw_convert<string>(GetCurrentProcessId());
+}
+