summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2019-12-27 23:16:05 +0100
committerCarl Hetherington <cth@carlh.net>2019-12-27 23:17:23 +0100
commit1b2708e35873a8f952710348bc94d94e56feb447 (patch)
tree005a7ddd2f7442d039c5623d05ea1d21b3086a8f
parent715d87a4cf9e4697a2f67881776c19c4ce8af581 (diff)
Add --version option to main DCP-o-matic.
-rw-r--r--src/tools/dcpomatic.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/tools/dcpomatic.cc b/src/tools/dcpomatic.cc
index 26b4946b5..01a600282 100644
--- a/src/tools/dcpomatic.cc
+++ b/src/tools/dcpomatic.cc
@@ -1444,6 +1444,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 }
};
@@ -1577,6 +1578,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));