#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);
}
boost::filesystem::path
-shared_path ()
+resources_path ()
{
char const * p = getenv ("DCPOMATIC_LINUX_SHARE_PREFIX");
if (p) {
boost::filesystem::path
-shared_path ()
+resources_path ()
{
return directory_containing_executable().parent_path() / "Resources";
}
boost::filesystem::path
xsd_path ()
{
- return shared_path() / "xsd";
+ return resources_path() / "xsd";
}
boost::filesystem::path
-shared_path ()
+resources_path ()
{
return directory_containing_executable().parent_path();
}
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) {
}
#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 ();
{
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) {
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);
#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
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);
/* 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);
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 ();
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);