diff options
| author | Carl Hetherington <cth@carlh.net> | 2025-05-18 22:20:02 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2025-05-19 21:25:35 +0200 |
| commit | 8d18da108282203a90f4b5ae0123700b827e3eb7 (patch) | |
| tree | 627bf6dad0c0cf0c7bff5ca4f147f0baa5c683a3 /src/lib/cross_linux.cc | |
| parent | 0866fe0a549a489a140fd4670a5245ba231fc8ec (diff) | |
Tidy up finding required files during tests.
In particular, prefer not to use lots of fallback attempts. It seems
that something funny is going on with how we find Liberation Sans on
Linux, meaning that we were sometimes using the OS copy of the font when
we didn't mean to.
Diffstat (limited to 'src/lib/cross_linux.cc')
| -rw-r--r-- | src/lib/cross_linux.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/lib/cross_linux.cc b/src/lib/cross_linux.cc index be3233b32..ccd78a3b1 100644 --- a/src/lib/cross_linux.cc +++ b/src/lib/cross_linux.cc @@ -26,6 +26,7 @@ #include "dcpomatic_log.h" #include "exceptions.h" #include "log.h" +#include "util.h" #include <dcp/filesystem.h> #include <dcp/raw_convert.h> #include <dcp/warnings.h> @@ -90,6 +91,7 @@ resources_path () return installed; } + /* Fallback for running from the source tree */ return directory_containing_executable().parent_path().parent_path().parent_path(); } @@ -97,6 +99,10 @@ resources_path () boost::filesystem::path libdcp_resources_path () { + if (running_tests) { + return directory_containing_executable(); + } + if (auto appdir = getenv("APPDIR")) { return boost::filesystem::path(appdir) / "usr" / "share" / "libdcp"; } |
