From: Carl Hetherington Date: Tue, 2 Mar 2021 11:37:26 +0000 (+0100) Subject: Use APPDIR when present to look for resources. X-Git-Tag: v2.15.133~7 X-Git-Url: https://git.carlh.net/gitweb/?a=commitdiff_plain;h=53fe2c86f3d50c07a0bbc79c71317724b425d8d7;hp=43261a371951678e0f603976e47add380c40a536;p=dcpomatic.git Use APPDIR when present to look for resources. --- 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"; }