From: Carl Hetherington Date: Fri, 27 Dec 2019 22:16:05 +0000 (+0100) Subject: Add --version option to main DCP-o-matic. X-Git-Tag: v2.15.40~7 X-Git-Url: https://git.carlh.net/gitweb/?p=dcpomatic.git;a=commitdiff_plain;h=b76cc13859babfd18ba528f3d61397ba284884c5 Add --version option to main DCP-o-matic. --- diff --git a/src/tools/dcpomatic.cc b/src/tools/dcpomatic.cc index a8930f81f..cce7c369b 100644 --- a/src/tools/dcpomatic.cc +++ b/src/tools/dcpomatic.cc @@ -1487,6 +1487,7 @@ static const wxCmdLineEntryDesc command_line_description[] = { { wxCMD_LINE_SWITCH, "n", "new", "create new film", wxCMD_LINE_VAL_NONE, wxCMD_LINE_PARAM_OPTIONAL }, { 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_PARAM, 0, 0, "film to load or create", wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL }, { wxCMD_LINE_NONE, "", "", "", wxCmdLineParamType (0), 0 } }; @@ -1629,6 +1630,11 @@ private: bool OnCmdLineParsed (wxCmdLineParser& parser) { + if (parser.Found (wxT("version"))) { + cout << "dcpomatic version " << dcpomatic_version << " " << dcpomatic_git_commit << "\n"; + exit (EXIT_SUCCESS); + } + if (parser.GetParamCount() > 0) { if (parser.Found (wxT ("new"))) { _film_to_create = wx_to_std (parser.GetParam (0));