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 0ba43cc4058c615fe426e23babdc1239cae1dfb9..63ae72c018dd57ddcf766b1327ee4ecce40b0e43 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 95bd975f8bdad0063f43c2d508271c93f231a741..530dda027c854562932ce8492082c9da9e8983b5 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 412259e6a0e687ef62a23a1c899040c2b6c61c09..ef193b640aa202a0288c7e5ea800934bf50228c1 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 272467bd3aee35af4b7293b00f3c73d87b86e05f..498078785972b945d3de755393250e2c132aa3d1 100644 (file)
@@ -193,7 +193,7 @@ directory_containing_executable ()
 
 
 boost::filesystem::path
-shared_path ()
+resources_path ()
 {
        return directory_containing_executable().parent_path();
 }
index 41f3563db117b861698e50f62d7ef584f817a5a2..1e15c7aaca0446286ddff2bd870d40da4e7e4f7c 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 84138f4d94aa7194f2f1f9ce82edad04fa970174..8ac395b37f07a7b8df30937e1396238615337eea 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 77dd643d72a80acd9731781583105b19fe14e772..50fed2c9402dd758aeffffc3e9540feffb51d654 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 696fec09ae1b37c73071b9707e204ac0f3a55f79..b51f29c15cd1fc6d31b2155f044499142e9b1ae5 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 73fcbf8021357a68f0480e0f74b6d53273e65514..a15a7c6bdeb85ec4b7c0d225fbd91712114a99a2 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 57038f77f6d533301bd77450c4b157b141cb40a6..978330187f13fe4c40c6d64a5aaf938a2149167d 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 46b122a8a6c82dca3231e2740553f8ce8c7ed6c7..e90d2f8481d49b3f731a05af42a7e021bebf0ff1 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);