From: Carl Hetherington Date: Sat, 9 Jun 2018 21:54:54 +0000 (+0100) Subject: Similarly for start_batch_converter. X-Git-Tag: v2.13.29~3 X-Git-Url: https://git.carlh.net/gitweb/?p=dcpomatic.git;a=commitdiff_plain;h=85fedd82ef6f1b2330534ce91ca64c46910e8e57 Similarly for start_batch_converter. --- diff --git a/src/lib/cross.cc b/src/lib/cross.cc index 7c05ba222..4991d9ae3 100644 --- a/src/lib/cross.cc +++ b/src/lib/cross.cc @@ -362,10 +362,16 @@ Waker::~Waker () } void -start_batch_converter (boost::filesystem::path dcpomatic) +start_tool (boost::filesystem::path dcpomatic, string executable, +#ifdef DCPOMATIC_OSX + string app +#else + string +#endif + ) { #if defined(DCPOMATIC_LINUX) || defined(DCPOMATIC_WINDOWS) - boost::filesystem::path batch = dcpomatic.parent_path() / "dcpomatic2_batch"; + boost::filesystem::path batch = dcpomatic.parent_path() / executable; #endif #ifdef DCPOMATIC_OSX @@ -374,10 +380,10 @@ start_batch_converter (boost::filesystem::path dcpomatic) batch = batch.parent_path (); // Contents batch = batch.parent_path (); // DCP-o-matic.app batch = batch.parent_path (); // Applications - batch /= "DCP-o-matic\\ 2\\ Batch\\ Converter.app"; + batch /= app; batch /= "Contents"; batch /= "MacOS"; - batch /= "dcpomatic2_batch"; + batch /= executable; #endif #if defined(DCPOMATIC_LINUX) || defined(DCPOMATIC_OSX) @@ -402,6 +408,12 @@ start_batch_converter (boost::filesystem::path dcpomatic) #endif } +void +start_batch_converter (boost::filesystem::path dcpomatic) +{ + start_tool (dcpomatic, "dcpomatic2_batch", "DCP-o-matic\\ 2\\ Batch\\ Converter.app"); +} + uint64_t thread_id () {