Add option to override config location in player. v2.13.86
authorCarl Hetherington <cth@carlh.net>
Fri, 14 Dec 2018 21:13:23 +0000 (21:13 +0000)
committerCarl Hetherington <cth@carlh.net>
Fri, 14 Dec 2018 21:13:23 +0000 (21:13 +0000)
src/tools/dcpomatic_player.cc

index d61c8a5e07ca62248ac8097e8c636a5b3c026f1e..11c152849f97cb77221c94187b823fac94cb4363 100644 (file)
@@ -1000,6 +1000,7 @@ private:
 
 static const wxCmdLineEntryDesc command_line_description[] = {
        { wxCMD_LINE_PARAM, 0, 0, "DCP to load or create", wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL },
+       { wxCMD_LINE_OPTION, "c", "config", "Directory containing config.xml", wxCMD_LINE_VAL_STRING, wxCMD_LINE_OPTION_MANDATORY },
        { wxCMD_LINE_NONE, "", "", "", wxCmdLineParamType (0), 0 }
 };
 
@@ -1135,6 +1136,11 @@ private:
                        _dcp_to_load = wx_to_std (parser.GetParam (0));
                }
 
+               wxString config;
+               if (parser.Found("c", &config)) {
+                       Config::override_path = wx_to_std (config);
+               }
+
                return true;
        }