projects
/
dcpomatic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
cc3d1bd
)
Specify full path to dcpomatic2_dist_writer and tidy a few things up.
author
Carl Hetherington
<cth@carlh.net>
Thu, 26 Mar 2020 19:42:09 +0000
(20:42 +0100)
committer
Carl Hetherington
<cth@carlh.net>
Sat, 28 Mar 2020 18:47:28 +0000
(19:47 +0100)
src/lib/cross.h
patch
|
blob
|
history
src/lib/cross_linux.cc
patch
|
blob
|
history
src/lib/cross_osx.cc
patch
|
blob
|
history
src/lib/cross_windows.cc
patch
|
blob
|
history
src/tools/dcpomatic_dist.cc
patch
|
blob
|
history
diff --git
a/src/lib/cross.h
b/src/lib/cross.h
index 06b5417bf463d3c48057a79905bcdcca1a8dd79c..63e542dc9074d0973c9405562ff6258c22d934c0 100644
(file)
--- a/
src/lib/cross.h
+++ b/
src/lib/cross.h
@@
-45,6
+45,7
@@
extern std::string cpu_info ();
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 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
#ifdef DCPOMATIC_OSX
extern boost::filesystem::path app_contents ();
#endif
diff --git
a/src/lib/cross_linux.cc
b/src/lib/cross_linux.cc
index a609e19f0d096c406954b3a4e8cf708e47db2a73..5073abe08e9813bbc9e9a80dfaebab8ca7a5ac6f 100644
(file)
--- a/
src/lib/cross_linux.cc
+++ b/
src/lib/cross_linux.cc
@@
-139,6
+139,12
@@
openssl_path ()
return "dcpomatic2_openssl";
}
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.
/* 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.
diff --git
a/src/lib/cross_osx.cc
b/src/lib/cross_osx.cc
index 2f6066285ae0381582e4809635ac5a76b922265a..52d3d647b1b568070955eadcc9a780de64424fcc 100644
(file)
--- a/
src/lib/cross_osx.cc
+++ b/
src/lib/cross_osx.cc
@@
-136,6
+136,15
@@
openssl_path ()
return path;
}
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.
/* 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.
diff --git
a/src/lib/cross_windows.cc
b/src/lib/cross_windows.cc
index b97e2bbd0a0656394c3519a26fdf453d3e2e3efe..8d3ddbb8fd30c1f3468bf71ffbac3186022df999 100644
(file)
--- a/
src/lib/cross_windows.cc
+++ b/
src/lib/cross_windows.cc
@@
-105,16
+105,6
@@
cpu_info ()
return info;
}
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)
{
void
run_ffprobe (boost::filesystem::path content, boost::filesystem::path out)
{
@@
-189,17
+179,31
@@
mount_info ()
return m;
}
return m;
}
-boost::filesystem::path
-
openssl
_path ()
+
static
boost::filesystem::path
+
executable
_path ()
{
wchar_t dir[512];
{
wchar_t dir[512];
- GetModuleFileName (GetModuleHandle
(0), dir, sizeof
(dir));
+ GetModuleFileName (GetModuleHandle
(0), dir, sizeof
(dir));
PathRemoveFileSpec (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
}
/* Apparently there is no way to create an ofstream using a UTF-8
diff --git
a/src/tools/dcpomatic_dist.cc
b/src/tools/dcpomatic_dist.cc
index a9d8f9bdaeaf1ab8b203481924003b234f49d4eb..5f1778b6bd937fb551c74cd316a5c89c7e6f99de 100644
(file)
--- a/
src/tools/dcpomatic_dist.cc
+++ b/
src/tools/dcpomatic_dist.cc
@@
-113,7
+113,7
@@
public:
Bind (wxEVT_SIZE, boost::bind (&DOMFrame::sized, this, _1));
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:
}
private: