Use APPDIR when present to look for resources.
[dcpomatic.git] / src / lib / cross_linux.cc
index c001cbf353fab9129ba9d5b9bf79b0f5d155c196..7e026b9a67032971daf0299890c458ebe8c54794 100644 (file)
@@ -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";
 }