kdm_cli (int argc, char* argv[], std::function<void (string)> out)
try
{
- ArgFixer fixer(argc, argv);
-
boost::filesystem::path output = dcp::filesystem::current_path();
auto container_name_format = Config::instance()->kdm_container_name_format();
auto filename_format = Config::instance()->kdm_filename_format();
{ 0, 0, 0, 0 }
};
- int c = getopt_long(fixer.argc(), fixer.argv(), "ho:K:Z:f:t:d:F:pae::zvc:S:C:T:BDE:G", long_options, &option_index);
+ int c = getopt_long(argc, argv, "ho:K:Z:f:t:d:F:pae::zvc:S:C:T:BDE:G", long_options, &option_index);
if (c == -1) {
break;
throw KDMCLIError ("you must specify --valid-from");
}
- if (optind >= fixer.argc()) {
+ if (optind >= argc) {
throw KDMCLIError ("no film, CPL ID or DKDM specified");
}
int
main (int argc, char* argv[])
{
+ ArgFixer fixer(argc, argv);
+
dcpomatic_setup_path_encoding ();
dcpomatic_setup ();
- auto error = kdm_cli(argc, argv, [](std::string s) { std::cout << s << "\n"; });
+ auto error = kdm_cli(fixer.argc(), fixer.argv(), [](std::string s) { std::cout << s << "\n"; });
if (error) {
std::cerr << *error << "\n";
exit (EXIT_FAILURE);