summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2020-09-27 20:05:48 +0200
committerCarl Hetherington <cth@carlh.net>2020-09-27 20:05:48 +0200
commitb5a88d757874fc7b7fecb15447c52fb40930e2ca (patch)
treee693f53a9b79b3343cd26d6895b99ac6946120c5 /src/lib
parentba7684b62d762345c337b67be48cd18e2cdc5dc5 (diff)
Revert some of the Linux stuff from a few commits ago.
This fixes startup from the source tree.
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/cross_linux.cc9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/lib/cross_linux.cc b/src/lib/cross_linux.cc
index 5c1bb7d90..0f31c108c 100644
--- a/src/lib/cross_linux.cc
+++ b/src/lib/cross_linux.cc
@@ -101,6 +101,11 @@ cpu_info ()
boost::filesystem::path
resources_path ()
{
+ char* prefix = getenv ("DCPOMATIC_SHARE_PREFIX");
+ if (prefix) {
+ return boost::filesystem::path(prefix) / "dcpomatic2";
+ }
+
return directory_containing_executable().parent_path() / "share" / "dcpomatic2";
}
@@ -108,14 +113,14 @@ resources_path ()
boost::filesystem::path
xsd_path ()
{
- return directory_containing_executable().parent_path() / "share" / "libdcp" / "xsd";
+ return boost::filesystem::canonical(LINUX_SHARE_PREFIX) / "libdcp" / "xsd";
}
boost::filesystem::path
tags_path ()
{
- return directory_containing_executable().parent_path() / "share" / "libdcp" / "tags";
+ return boost::filesystem::canonical(LINUX_SHARE_PREFIX) / "libdcp" / "tags";
}