From 8c9194e9cf773af29aee3e5ad327478de62dac7e Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Fri, 27 Dec 2019 23:40:18 +0100 Subject: [PATCH] Add --config option to dcpomatic2 (#1703). --- src/tools/dcpomatic.cc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/tools/dcpomatic.cc b/src/tools/dcpomatic.cc index 01a600282..4edfe4cd1 100644 --- a/src/tools/dcpomatic.cc +++ b/src/tools/dcpomatic.cc @@ -1445,6 +1445,7 @@ static const wxCmdLineEntryDesc command_line_description[] = { { wxCMD_LINE_OPTION, "c", "content", "add content file / directory", wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL }, { wxCMD_LINE_OPTION, "d", "dcp", "add content DCP", wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL }, { wxCMD_LINE_SWITCH, "v", "version", "show DCP-o-matic version", wxCMD_LINE_VAL_NONE, wxCMD_LINE_PARAM_OPTIONAL }, + { wxCMD_LINE_OPTION, "", "config", "directory containing config.xml and cinemas.xml", wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL }, { wxCMD_LINE_PARAM, 0, 0, "film to load or create", wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL }, { wxCMD_LINE_NONE, "", "", "", wxCmdLineParamType (0), 0 } }; @@ -1601,6 +1602,11 @@ private: _dcp_to_add = wx_to_std (dcp); } + wxString config; + if (parser.Found (wxT("config"), &config)) { + State::override_path = wx_to_std (config); + } + return true; } -- 2.30.2