/*
- Copyright (C) 2012-2015 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2012-2018 Carl Hetherington <cth@carlh.net>
This file is part of DCP-o-matic.
}
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
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)
#endif
}
+void
+start_batch_converter (boost::filesystem::path dcpomatic)
+{
+ start_tool (dcpomatic, "dcpomatic2_batch", "DCP-o-matic\\ 2\\ Batch\\ Converter.app");
+}
+
+void
+start_player (boost::filesystem::path dcpomatic)
+{
+ start_tool (dcpomatic, "dcpomatic2_player", "DCP-o-matic\\ 2\\ Player.app");
+}
+
uint64_t
thread_id ()
{