Fix confusing error in windows where it would complain about : in full pathnames...
[dcpomatic.git] / src / tools / dcpomatic_create.cc
index 9331602d588e54b9129ca9d593a3cb95edb78a8a..f1df658c3626b6cf4406b755a5786dafc4a5572b 100644 (file)
@@ -34,6 +34,7 @@
 #include "lib/dcp_content.h"
 #include "lib/create_cli.h"
 #include "lib/version.h"
+#include "lib/dcpomatic_log.h"
 #include <dcp/exceptions.h>
 #include <libxml++/libxml++.h>
 #include <boost/filesystem.hpp>
@@ -76,11 +77,11 @@ main (int argc, char* argv[])
 
        if (cc.version) {
                cerr << "dcpomatic version " << dcpomatic_version << " " << dcpomatic_git_commit << "\n";
-               exit (1);
+               exit (EXIT_SUCCESS);
        }
 
        if (cc.config_dir) {
-               Config::override_path = *cc.config_dir;
+               State::override_path = *cc.config_dir;
        }
 
        signal_manager = new SimpleSignalManager ();
@@ -88,6 +89,8 @@ main (int argc, char* argv[])
 
        try {
                shared_ptr<Film> film (new Film(cc.output_dir));
+               dcpomatic_log = film->log ();
+               dcpomatic_log->set_types (Config::instance()->log_types());
                if (cc.template_name) {
                        film->use_template (cc.template_name.get());
                }
@@ -99,6 +102,11 @@ main (int argc, char* argv[])
                film->set_use_isdcf_name (!cc.no_use_isdcf_name);
                film->set_signed (!cc.no_sign);
                film->set_encrypted (cc.encrypt);
+               film->set_three_d (cc.threed);
+               film->set_resolution (cc.fourk ? RESOLUTION_4K : RESOLUTION_2K);
+               if (cc.j2k_bandwidth) {
+                       film->set_j2k_bandwidth (*cc.j2k_bandwidth);
+               }
 
                BOOST_FOREACH (CreateCLI::Content i, cc.content) {
                        boost::filesystem::path const can = boost::filesystem::canonical (i.path);