extern void run_ffprobe (boost::filesystem::path, boost::filesystem::path);
extern std::list<std::pair<std::string, std::string> > mount_info ();
extern boost::filesystem::path openssl_path ();
+extern boost::filesystem::path dist_writer_path ();
#ifdef DCPOMATIC_OSX
extern boost::filesystem::path app_contents ();
#endif
return "dcpomatic2_openssl";
}
+boost::filesystem::path
+dist_writer_path ()
+{
+ return "dcpomatic2_dist_writer";
+}
+
/* Apparently there is no way to create an ofstream using a UTF-8
filename under Windows. We are hence reduced to using fopen
with this wrapper.
return path;
}
+boost::filesystem::path
+dist_writer_path ()
+{
+ boost::filesystem::path path = app_contents();
+ path /= "MacOS";
+ path /= "dcpomatic2_dist_writer";
+ return path;
+}
+
/* Apparently there is no way to create an ofstream using a UTF-8
filename under Windows. We are hence reduced to using fopen
with this wrapper.
return info;
}
-boost::filesystem::path
-shared_path ()
-{
- wchar_t dir[512];
- GetModuleFileName (GetModuleHandle (0), dir, sizeof (dir));
- PathRemoveFileSpec (dir);
- boost::filesystem::path path = dir;
- return path.parent_path();
-}
-
void
run_ffprobe (boost::filesystem::path content, boost::filesystem::path out)
{
return m;
}
-boost::filesystem::path
-openssl_path ()
+static boost::filesystem::path
+executable_path ()
{
wchar_t dir[512];
- GetModuleFileName (GetModuleHandle (0), dir, sizeof (dir));
+ GetModuleFileName (GetModuleHandle(0), dir, sizeof(dir));
PathRemoveFileSpec (dir);
+ return dir;
+}
- boost::filesystem::path path = dir;
- path /= "openssl.exe";
- return path;
+boost::filesystem::path
+shared_path ()
+{
+ return executable_path().parent_path();
+}
+boost::filesystem::path
+openssl_path ()
+{
+ return executable_path() / "openssl.exe";
+}
+
+boost::filesystem::path
+dist_writer_path ()
+{
+ return executable_path() / "dcpomatic2_dist_writer.exe";
}
/* Apparently there is no way to create an ofstream using a UTF-8
Bind (wxEVT_SIZE, boost::bind (&DOMFrame::sized, this, _1));
- _writer = new boost::process::child ("dcpomatic2_dist_writer");
+ _writer = new boost::process::child (dist_writer_path());
}
private: