Possibly fix weird relative filename problems on Windows.
[dcpomatic.git] / src / tools / dcpomatic_create.cc
index 6c479e698bff5911e29a202b1f4809de8d89a655..2911be0a70414ffac412ca2595e0dde485387629 100644 (file)
@@ -27,6 +27,7 @@
 #include "lib/dcp_content_type.h"
 #include "lib/ratio.h"
 #include "lib/image_content.h"
+#include <libxml++/libxml++.h>
 #include <boost/filesystem.hpp>
 #include <getopt.h>
 #include <string>
@@ -81,6 +82,7 @@ public:
 int
 main (int argc, char* argv[])
 {
+       dcpomatic_setup_path_encoding ();
        dcpomatic_setup ();
 
        string name;
@@ -212,7 +214,7 @@ main (int argc, char* argv[])
                film->set_signed (sign);
 
                for (int i = optind; i < argc; ++i) {
-                       shared_ptr<Content> c = content_factory (film, argv[i]);
+                       shared_ptr<Content> c = content_factory (film, boost::filesystem::canonical (argv[i]));
                        shared_ptr<VideoContent> vc = dynamic_pointer_cast<VideoContent> (c);
                        if (vc) {
                                vc->set_scale (VideoContentScale (content_ratio));