diff options
| author | Carl Hetherington <cth@carlh.net> | 2020-09-14 13:09:04 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2020-09-14 13:09:04 +0200 |
| commit | e3c78ffdb5e562841e86e6f59a20494159c44de7 (patch) | |
| tree | 81a4384eafabbd84975ccbb733c944cb6205cb46 /src/lib | |
| parent | 4c804a0d92ebd03b70bfc7f736fcaf5f77cb3bb7 (diff) | |
Rename shared_path -> resources_path.
Diffstat (limited to 'src/lib')
| -rw-r--r-- | src/lib/cross.h | 2 | ||||
| -rw-r--r-- | src/lib/cross_linux.cc | 2 | ||||
| -rw-r--r-- | src/lib/cross_osx.cc | 4 | ||||
| -rw-r--r-- | src/lib/cross_windows.cc | 2 | ||||
| -rw-r--r-- | src/lib/render_text.cc | 2 | ||||
| -rw-r--r-- | src/lib/util.cc | 8 |
6 files changed, 10 insertions, 10 deletions
diff --git a/src/lib/cross.h b/src/lib/cross.h index 0ba43cc40..63ae72c01 100644 --- a/src/lib/cross.h +++ b/src/lib/cross.h @@ -53,7 +53,7 @@ extern boost::filesystem::path disk_writer_path (); #ifdef DCPOMATIC_WINDOWS extern void maybe_open_console (); #endif -extern boost::filesystem::path shared_path (); +extern boost::filesystem::path resources_path (); extern boost::filesystem::path xsd_path (); extern FILE * fopen_boost (boost::filesystem::path, std::string); extern int dcpomatic_fseek (FILE *, int64_t, int); diff --git a/src/lib/cross_linux.cc b/src/lib/cross_linux.cc index 95bd975f8..530dda027 100644 --- a/src/lib/cross_linux.cc +++ b/src/lib/cross_linux.cc @@ -99,7 +99,7 @@ cpu_info () } boost::filesystem::path -shared_path () +resources_path () { char const * p = getenv ("DCPOMATIC_LINUX_SHARE_PREFIX"); if (p) { diff --git a/src/lib/cross_osx.cc b/src/lib/cross_osx.cc index 412259e6a..ef193b640 100644 --- a/src/lib/cross_osx.cc +++ b/src/lib/cross_osx.cc @@ -117,7 +117,7 @@ directory_containing_executable () boost::filesystem::path -shared_path () +resources_path () { return directory_containing_executable().parent_path() / "Resources"; } @@ -126,7 +126,7 @@ shared_path () boost::filesystem::path xsd_path () { - return shared_path() / "xsd"; + return resources_path() / "xsd"; } diff --git a/src/lib/cross_windows.cc b/src/lib/cross_windows.cc index 272467bd3..498078785 100644 --- a/src/lib/cross_windows.cc +++ b/src/lib/cross_windows.cc @@ -193,7 +193,7 @@ directory_containing_executable () boost::filesystem::path -shared_path () +resources_path () { return directory_containing_executable().parent_path(); } diff --git a/src/lib/render_text.cc b/src/lib/render_text.cc index 41f3563db..1e15c7aac 100644 --- a/src/lib/render_text.cc +++ b/src/lib/render_text.cc @@ -142,7 +142,7 @@ setup_font (StringText const& subtitle, list<shared_ptr<Font> > const& fonts) optional<boost::filesystem::path> font_file; try { - font_file = shared_path () / "LiberationSans-Regular.ttf"; + font_file = resources_path() / "LiberationSans-Regular.ttf"; } catch (boost::filesystem::filesystem_error& e) { } diff --git a/src/lib/util.cc b/src/lib/util.cc index 84138f4d9..8ac395b37 100644 --- a/src/lib/util.cc +++ b/src/lib/util.cc @@ -379,12 +379,12 @@ DCPOMATIC_ENABLE_WARNINGS #ifdef DCPOMATIC_WINDOWS putenv ("PANGOCAIRO_BACKEND=fontconfig"); - putenv (String::compose("FONTCONFIG_PATH=%1", shared_path().string()).c_str()); + putenv (String::compose("FONTCONFIG_PATH=%1", resources_path().string()).c_str()); #endif #ifdef DCPOMATIC_OSX setenv ("PANGOCAIRO_BACKEND", "fontconfig", 1); - setenv ("FONTCONFIG_PATH", shared_path().string().c_str(), 1); + setenv ("FONTCONFIG_PATH", resources_path().string().c_str(), 1); #endif Pango::init (); @@ -1259,10 +1259,10 @@ default_font_file () { boost::filesystem::path liberation_normal; try { - liberation_normal = shared_path() / "LiberationSans-Regular.ttf"; + liberation_normal = resources_path() / "LiberationSans-Regular.ttf"; if (!boost::filesystem::exists (liberation_normal)) { /* Hack for unit tests */ - liberation_normal = shared_path() / "fonts" / "LiberationSans-Regular.ttf"; + liberation_normal = resources_path() / "fonts" / "LiberationSans-Regular.ttf"; } } catch (boost::filesystem::filesystem_error& e) { |
