summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2021-03-02 12:37:26 +0100
committerCarl Hetherington <cth@carlh.net>2021-03-02 12:37:26 +0100
commit53fe2c86f3d50c07a0bbc79c71317724b425d8d7 (patch)
treeef3e022a37e768c695bd413a3e2a8559391d45f1
parent43261a371951678e0f603976e47add380c40a536 (diff)
Use APPDIR when present to look for resources.
-rw-r--r--src/lib/cross_linux.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/lib/cross_linux.cc b/src/lib/cross_linux.cc
index c001cbf35..7e026b9a6 100644
--- a/src/lib/cross_linux.cc
+++ b/src/lib/cross_linux.cc
@@ -107,6 +107,9 @@ resources_path ()
boost::filesystem::path
xsd_path ()
{
+ if (auto appdir = getenv("APPDIR")) {
+ return boost::filesystem::path(appdir) / "usr" / "share" / "libdcp" / "xsd";
+ }
return boost::filesystem::canonical(LINUX_SHARE_PREFIX) / "libdcp" / "xsd";
}
@@ -114,6 +117,9 @@ xsd_path ()
boost::filesystem::path
tags_path ()
{
+ if (auto appdir = getenv("APPDIR")) {
+ return boost::filesystem::path(appdir) / "usr" / "share" / "libdcp" / "tags";
+ }
return boost::filesystem::canonical(LINUX_SHARE_PREFIX) / "libdcp" / "tags";
}