Prefer the tags directory specified in LIBDCP_RESOURCES
authorMart Jansink <mart@gofilex.nl>
Mon, 26 Apr 2021 09:50:25 +0000 (11:50 +0200)
committerCarl Hetherington <cth@carlh.net>
Fri, 30 Apr 2021 20:29:09 +0000 (22:29 +0200)
src/util.cc

index 0b011bf971408183ac227288cc6b4b1292dbb473..5133a43bac8dc83fcc76ac46313cb50a0c8b0e97 100644 (file)
@@ -453,16 +453,17 @@ boost::filesystem::path dcp::directory_containing_executable ()
 
 boost::filesystem::path dcp::resources_directory ()
 {
-#if defined(LIBDCP_OSX)
-       return directory_containing_executable().parent_path() / "Resources";
-#elif defined(LIBDCP_WINDOWS)
-       return directory_containing_executable().parent_path();
-#else
        /* We need a way to specify the tags directory for running un-installed binaries */
        char* prefix = getenv("LIBDCP_RESOURCES");
        if (prefix) {
                return prefix;
        }
+
+#if defined(LIBDCP_OSX)
+       return directory_containing_executable().parent_path() / "Resources";
+#elif defined(LIBDCP_WINDOWS)
+       return directory_containing_executable().parent_path();
+#else
        return directory_containing_executable().parent_path() / "share" / "libdcp";
 #endif
 }