X-Git-Url: https://main.carlh.net/gitweb/?p=dcpomatic.git;a=blobdiff_plain;f=src%2Flib%2Fcross.cc;h=7f95d1f71885fd07f172d53ddc3c1e928335005e;hp=d84c17c55b25318ef5b32a0a06eda8ee23ac1d16;hb=a5e87b6f0f496f4ed71d9129d40a5baebb68495f;hpb=f4030653da8f5a0b3daebe640f485b3daf9ef091 diff --git a/src/lib/cross.cc b/src/lib/cross.cc index d84c17c55..7f95d1f71 100644 --- a/src/lib/cross.cc +++ b/src/lib/cross.cc @@ -1,5 +1,5 @@ /* - Copyright (C) 2012-2014 Carl Hetherington + Copyright (C) 2012-2015 Carl Hetherington 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 @@ -17,11 +17,11 @@ */ -#include -#include #include "cross.h" #include "compose.hpp" #include "log.h" +#include "exceptions.h" +#include #ifdef DCPOMATIC_LINUX #include #include @@ -42,7 +42,7 @@ #include #include #endif -#include "exceptions.h" +#include #include "i18n.h" @@ -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) {