diff options
| author | Carl Hetherington <cth@carlh.net> | 2020-09-14 13:04:16 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2020-09-14 13:04:16 +0200 |
| commit | 4c804a0d92ebd03b70bfc7f736fcaf5f77cb3bb7 (patch) | |
| tree | ed4d7080771f529980f1dafe48347ee4e2795c37 /src | |
| parent | ff623a7f045575169820b28a9e1d4ee10ec2fb69 (diff) | |
Add xsd_path() and use it to fix access to .xsd files on Linux (#1830).
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib/cross.h | 1 | ||||
| -rw-r--r-- | src/lib/cross_linux.cc | 16 | ||||
| -rw-r--r-- | src/lib/cross_osx.cc | 7 | ||||
| -rw-r--r-- | src/lib/cross_windows.cc | 7 | ||||
| -rw-r--r-- | src/lib/verify_dcp_job.cc | 2 |
5 files changed, 30 insertions, 3 deletions
diff --git a/src/lib/cross.h b/src/lib/cross.h index 64cb2e6b8..0ba43cc40 100644 --- a/src/lib/cross.h +++ b/src/lib/cross.h @@ -54,6 +54,7 @@ extern boost::filesystem::path disk_writer_path (); extern void maybe_open_console (); #endif extern boost::filesystem::path shared_path (); +extern boost::filesystem::path xsd_path (); extern FILE * fopen_boost (boost::filesystem::path, std::string); extern int dcpomatic_fseek (FILE *, int64_t, int); extern void start_batch_converter (); diff --git a/src/lib/cross_linux.cc b/src/lib/cross_linux.cc index e17f188b9..95bd975f8 100644 --- a/src/lib/cross_linux.cc +++ b/src/lib/cross_linux.cc @@ -103,11 +103,23 @@ shared_path () { char const * p = getenv ("DCPOMATIC_LINUX_SHARE_PREFIX"); if (p) { - return p; + return boost::filesystem::path(p) / "dcpomatic2"; + } + return boost::filesystem::canonical(LINUX_SHARE_PREFIX) / "dcpomatic2"; +} + + +boost::filesystem::path +xsd_path () +{ + char const * p = getenv ("DCPOMATIC_LINUX_SHARE_PREFIX"); + if (p) { + return boost::filesystem::path(p) / "libdcp" / "xsd"; } - return boost::filesystem::canonical (LINUX_SHARE_PREFIX); + return boost::filesystem::canonical(LINUX_SHARE_PREFIX) / "libdcp" / "xsd"; } + void run_ffprobe (boost::filesystem::path content, boost::filesystem::path out) { diff --git a/src/lib/cross_osx.cc b/src/lib/cross_osx.cc index e91d3df16..412259e6a 100644 --- a/src/lib/cross_osx.cc +++ b/src/lib/cross_osx.cc @@ -123,6 +123,13 @@ shared_path () } +boost::filesystem::path +xsd_path () +{ + return shared_path() / "xsd"; +} + + void run_ffprobe (boost::filesystem::path content, boost::filesystem::path out) { diff --git a/src/lib/cross_windows.cc b/src/lib/cross_windows.cc index 337750dcb..272467bd3 100644 --- a/src/lib/cross_windows.cc +++ b/src/lib/cross_windows.cc @@ -200,6 +200,13 @@ shared_path () boost::filesystem::path +xsd_path () +{ + return directory_containing_executable().parent_path() / "xsd"; +} + + +boost::filesystem::path openssl_path () { return directory_containing_executable() / "openssl.exe"; diff --git a/src/lib/verify_dcp_job.cc b/src/lib/verify_dcp_job.cc index 3d28fe759..f6dc10063 100644 --- a/src/lib/verify_dcp_job.cc +++ b/src/lib/verify_dcp_job.cc @@ -68,7 +68,7 @@ VerifyDCPJob::update_stage (string s, optional<boost::filesystem::path> path) void VerifyDCPJob::run () { - _notes = dcp::verify (_directories, bind (&VerifyDCPJob::update_stage, this, _1, _2), bind (&VerifyDCPJob::set_progress, this, _1, false), shared_path() / "xsd"); + _notes = dcp::verify (_directories, bind (&VerifyDCPJob::update_stage, this, _1, _2), bind (&VerifyDCPJob::set_progress, this, _1, false), xsd_path()); bool failed = false; BOOST_FOREACH (dcp::VerificationNote i, _notes) { |
