summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2020-09-14 13:09:04 +0200
committerCarl Hetherington <cth@carlh.net>2020-09-14 13:09:04 +0200
commite3c78ffdb5e562841e86e6f59a20494159c44de7 (patch)
tree81a4384eafabbd84975ccbb733c944cb6205cb46
parent4c804a0d92ebd03b70bfc7f736fcaf5f77cb3bb7 (diff)
Rename shared_path -> resources_path.
-rw-r--r--src/lib/cross.h2
-rw-r--r--src/lib/cross_linux.cc2
-rw-r--r--src/lib/cross_osx.cc4
-rw-r--r--src/lib/cross_windows.cc2
-rw-r--r--src/lib/render_text.cc2
-rw-r--r--src/lib/util.cc8
-rw-r--r--src/tools/dcpomatic_playlist.cc4
-rw-r--r--src/tools/dcpomatic_server.cc2
-rw-r--r--src/tools/swaroop_dcpomatic_playlist.cc4
-rw-r--r--src/wx/html_dialog.cc2
-rw-r--r--src/wx/wx_util.cc6
11 files changed, 19 insertions, 19 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) {
diff --git a/src/tools/dcpomatic_playlist.cc b/src/tools/dcpomatic_playlist.cc
index 77dd643d7..50fed2c94 100644
--- a/src/tools/dcpomatic_playlist.cc
+++ b/src/tools/dcpomatic_playlist.cc
@@ -277,9 +277,9 @@ public:
tick_icon.LoadFile ("tick.png", wxBITMAP_TYPE_PNG_RESOURCE);
no_tick_icon.LoadFile ("no_tick.png", wxBITMAP_TYPE_PNG_RESOURCE);
#else
- boost::filesystem::path tick_path = shared_path() / "tick.png";
+ boost::filesystem::path tick_path = resources_path() / "tick.png";
tick_icon.LoadFile (std_to_wx(tick_path.string()), wxBITMAP_TYPE_PNG);
- boost::filesystem::path no_tick_path = shared_path() / "no_tick.png";
+ boost::filesystem::path no_tick_path = resources_path() / "no_tick.png";
no_tick_icon.LoadFile (std_to_wx(no_tick_path.string()), wxBITMAP_TYPE_PNG);
#endif
images->Add (tick_icon);
diff --git a/src/tools/dcpomatic_server.cc b/src/tools/dcpomatic_server.cc
index 696fec09a..b51f29c15 100644
--- a/src/tools/dcpomatic_server.cc
+++ b/src/tools/dcpomatic_server.cc
@@ -218,7 +218,7 @@ public:
#ifdef DCPOMATIC_WINDOWS
wxIcon icon (std_to_wx ("id"));
#else
- wxBitmap bitmap (wxString::Format (wxT ("%s/dcpomatic_small.png"), std_to_wx (shared_path().string())), wxBITMAP_TYPE_PNG);
+ wxBitmap bitmap (wxString::Format(wxT("%s/dcpomatic_small.png"), std_to_wx(resources_path().string())), wxBITMAP_TYPE_PNG);
wxIcon icon;
icon.CopyFromBitmap (bitmap);
#endif
diff --git a/src/tools/swaroop_dcpomatic_playlist.cc b/src/tools/swaroop_dcpomatic_playlist.cc
index 73fcbf802..a15a7c6bd 100644
--- a/src/tools/swaroop_dcpomatic_playlist.cc
+++ b/src/tools/swaroop_dcpomatic_playlist.cc
@@ -115,9 +115,9 @@ public:
tick_icon.LoadFile ("tick.png", wxBITMAP_TYPE_PNG_RESOURCE);
no_tick_icon.LoadFile ("no_tick.png", wxBITMAP_TYPE_PNG_RESOURCE);
#else
- boost::filesystem::path tick_path = shared_path() / "tick.png";
+ boost::filesystem::path tick_path = resources_path() / "tick.png";
tick_icon.LoadFile (std_to_wx(tick_path.string()));
- boost::filesystem::path no_tick_path = shared_path() / "no_tick.png";
+ boost::filesystem::path no_tick_path = resources_path() / "no_tick.png";
no_tick_icon.LoadFile (std_to_wx(no_tick_path.string()));
#endif
images->Add (tick_icon);
diff --git a/src/wx/html_dialog.cc b/src/wx/html_dialog.cc
index 57038f77f..978330187 100644
--- a/src/wx/html_dialog.cc
+++ b/src/wx/html_dialog.cc
@@ -43,7 +43,7 @@ HTMLDialog::HTMLDialog (wxWindow* parent, wxString title, wxString html)
/* Add some resources that are used by HTML passed into this dialog */
wxMemoryFSHandler::AddFile(
"me.jpg",
- wxBitmap(std_to_wx(boost::filesystem::path(shared_path() / "me.jpg").string()), wxBITMAP_TYPE_JPEG), wxBITMAP_TYPE_JPEG
+ wxBitmap(std_to_wx(boost::filesystem::path(resources_path() / "me.jpg").string()), wxBITMAP_TYPE_JPEG), wxBITMAP_TYPE_JPEG
);
wxHtmlWindow* h = new wxHtmlWindow (this);
diff --git a/src/wx/wx_util.cc b/src/wx/wx_util.cc
index 46b122a8a..e90d2f848 100644
--- a/src/wx/wx_util.cc
+++ b/src/wx/wx_util.cc
@@ -473,7 +473,7 @@ maybe_show_splash ()
wxSplashScreen* splash = 0;
try {
wxBitmap bitmap;
- boost::filesystem::path p = shared_path () / "splash.png";
+ boost::filesystem::path p = resources_path() / "splash.png";
if (bitmap.LoadFile (std_to_wx (p.string ()), wxBITMAP_TYPE_PNG)) {
splash = new wxSplashScreen (bitmap, wxSPLASH_CENTRE_ON_SCREEN | wxSPLASH_NO_TIMEOUT, 0, 0, -1);
wxYield ();
@@ -583,10 +583,10 @@ bitmap_path (string name)
if (path) {
base = path;
} else {
- base = shared_path();
+ base = resources_path();
}
#else
- base = shared_path();
+ base = resources_path();
#endif
boost::filesystem::path p = base / String::compose("%1.png", name);