From 7bbcb5240103b4ab19a7b35cd888dd25cf56aad1 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Wed, 9 Oct 2013 10:59:33 +0100 Subject: Try to fix openssl use on Windows. --- src/lib/cross.cc | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'src/lib/cross.cc') diff --git a/src/lib/cross.cc b/src/lib/cross.cc index 61ec8de5e..47b97baec 100644 --- a/src/lib/cross.cc +++ b/src/lib/cross.cc @@ -231,3 +231,22 @@ mount_info () return m; } + +boost::filesystem::path +openssl_path () +{ +#ifdef DCPOMATIC_WINDOWS + + wchar_t dir[512]; + GetModuleFileName (GetModuleHandle (0), dir, sizeof (dir)); + PathRemoveFileSpec (dir); + + boost::filesystem::path path = dir; + path /= "openssl.exe"; + return path +#else + /* We assume that it's on the path for Linux and OS X */ + return "openssl"; +#endif + +} -- cgit v1.2.3