summaryrefslogtreecommitdiff
path: root/src/tools
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:16:05 +0100
commitb76cc13859babfd18ba528f3d61397ba284884c5 (patch)
tree064126e57dbc375ceb7da9865a77a1cd878abb23 /src/tools
parent0de70cc4c83ebc5e4a8eb620b5d46a2aad2046b7 (diff)
Add --version option to main DCP-o-matic.
Diffstat (limited to 'src/tools')
-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 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));