Add xsd_path() and use it to fix access to .xsd files on Linux (#1830).
[dcpomatic.git] / src / lib / cross_linux.cc
index e17f188b9f8aacece46cfa29eb7cd884ab3d9797..95bd975f8bdad0063f43c2d508271c93f231a741 100644 (file)
@@ -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)
 {