diff options
| author | Carl Hetherington <cth@carlh.net> | 2015-04-30 22:20:57 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2015-04-30 22:20:57 +0100 |
| commit | a5e87b6f0f496f4ed71d9129d40a5baebb68495f (patch) | |
| tree | a9f7dcf6a2020e986e1d709f24ce46e51d238ca2 /src/lib/cross.cc | |
| parent | 895e908f7dcc8deb9e6a333d3d6b3a92aec2dc09 (diff) | |
Various bits related to subtitle font handling, particularly copying fonts to the DCP.
Diffstat (limited to 'src/lib/cross.cc')
| -rw-r--r-- | src/lib/cross.cc | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/src/lib/cross.cc b/src/lib/cross.cc index e189222fa..7f95d1f71 100644 --- a/src/lib/cross.cc +++ b/src/lib/cross.cc @@ -1,5 +1,5 @@ /* - Copyright (C) 2012-2014 Carl Hetherington <cth@carlh.net> + Copyright (C) 2012-2015 Carl Hetherington <cth@carlh.net> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -151,6 +151,23 @@ app_contents () } #endif +boost::filesystem::path +shared_path () +{ +#ifdef DCPOMATIC_LINUX + return boost::filesystem::canonical (LINUX_SHARE_PREFIX); +#endif +#ifdef DCPOMATIC_WINDOWS + wchar_t dir[512]; + GetModuleFileName (GetModuleHandle (0), dir, sizeof (dir)); + PathRemoveFileSpec (dir); + return dir.parent_path(); +#endif +#ifdef DCPOMATIC_OSX + return app_contents(); +#endif +} + void run_ffprobe (boost::filesystem::path content, boost::filesystem::path out, shared_ptr<Log> log) { |
