Rename shared_path -> resources_path.
authorCarl Hetherington <cth@carlh.net>
Mon, 14 Sep 2020 11:09:04 +0000 (13:09 +0200)
committerCarl Hetherington <cth@carlh.net>
Mon, 14 Sep 2020 11:09:04 +0000 (13:09 +0200)
src/lib/cross.h
src/lib/cross_linux.cc
src/lib/cross_osx.cc
src/lib/cross_windows.cc
src/lib/render_text.cc
src/lib/util.cc
src/tools/dcpomatic_playlist.cc
src/tools/dcpomatic_server.cc
src/tools/swaroop_dcpomatic_playlist.cc
src/wx/html_dialog.cc
src/wx/wx_util.cc

index 0ba43cc..63ae72c 100644 (file)
@@ -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);
index 95bd975..530dda0 100644 (file)
@@ -99,7 +99,7 @@ cpu_info ()
 }
 
 boost::filesystem::path
-shared_path ()
+resources_path ()
 {
        char const * p = getenv ("DCPOMATIC_LINUX_SHARE_PREFIX");
        if (p) {
index 412259e..ef193b6 100644 (file)
@@ -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";
 }
 
 
index 272467b..4980787 100644 (file)
@@ -193,7 +193,7 @@ directory_containing_executable ()
 
 
 boost::filesystem::path
-shared_path ()
+resources_path ()
 {
        return directory_containing_executable().parent_path();
 }
index 41f3563..1e15c7a 100644 (file)
@@ -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) {
 
        }
index 84138f4..8ac395b 100644 (file)
@@ -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) {
 
index 77dd643..50fed2c 100644 (file)
@@ -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);
index 696fec0..b51f29c 100644 (file)
@@ -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
index 73fcbf8..a15a7c6 100644 (file)
@@ -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);
index 57038f7..9783301 100644 (file)
@@ -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);
index 46b122a..e90d2f8 100644 (file)
@@ -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);