Use get_pixel_size rather than get_size which is slightly nicer as we then don't...
[dcpomatic.git] / src / lib / cross.cc
index 7cb5b3e8eed1bbaf7af853f7e1f792e60bccd8cb..7abe01cc9019683a7afb92b3096ceeb922ade3eb 100644 (file)
@@ -367,7 +367,7 @@ start_batch_converter (boost::filesystem::path dcpomatic)
        batch = batch.parent_path (); // Contents
        batch = batch.parent_path (); // DCP-o-matic.app
        batch = batch.parent_path (); // Applications
-       batch /= "DCP-o-matic 2 Batch Converter.app";
+       batch /= "DCP-o-matic\\ 2\\ Batch\\ Converter.app";
        batch /= "Contents";
        batch /= "MacOS";
        batch /= "dcpomatic2_batch";
@@ -376,6 +376,7 @@ start_batch_converter (boost::filesystem::path dcpomatic)
 #if defined(DCPOMATIC_LINUX) || defined(DCPOMATIC_OSX)
        pid_t pid = fork ();
        if (pid == 0) {
+               std::cout << "start " << batch << "\n";
                int const r = system (batch.string().c_str());
                exit (WEXITSTATUS (r));
        }
@@ -388,6 +389,9 @@ start_batch_converter (boost::filesystem::path dcpomatic)
 
        PROCESS_INFORMATION process_info;
        ZeroMemory (&process_info, sizeof (process_info));
-       CreateProcess (0, batch.string().c_str(), 0, 0, FALSE, 0, 0, 0, &startup_info, &process_info);
+
+       wchar_t cmd[512];
+       MultiByteToWideChar (CP_UTF8, 0, batch.string().c_str(), -1, cmd, sizeof(cmd));
+       CreateProcess (0, cmd, 0, 0, FALSE, 0, 0, 0, &startup_info, &process_info);
 #endif
 }