Shell of KDM GUI tool.
[dcpomatic.git] / src / tools / dcpomatic_server_cli.cc
index 847c1fa1b4d25ff87caa74f2f9cd739b7743ea53..81c553ef7c3094aa57761f3f289ee27132bdd749 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2012 Carl Hetherington <cth@carlh.net>
+    Copyright (C) 2012-2015 Carl Hetherington <cth@carlh.net>
 
     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
 
 */
 
-#include "lib/server.h"
-#include <iostream>
-#include <stdexcept>
-#include <cstring>
-#include <vector>
-#include <unistd.h>
-#include <errno.h>
-#include <getopt.h>
-#include <boost/array.hpp>
-#include <boost/asio.hpp>
-#include <boost/algorithm/string.hpp>
-#include <boost/thread.hpp>
-#include <boost/thread/mutex.hpp>
-#include <boost/thread/condition.hpp>
 #include "lib/config.h"
 #include "lib/dcp_video.h"
 #include "lib/exceptions.h"
 #include "lib/util.h"
 #include "lib/config.h"
 #include "lib/image.h"
-#include "lib/log.h"
+#include "lib/file_log.h"
+#include "lib/null_log.h"
 #include "lib/version.h"
+#include "lib/server.h"
+#include <boost/array.hpp>
+#include <boost/asio.hpp>
+#include <boost/algorithm/string.hpp>
+#include <boost/thread.hpp>
+#include <boost/thread/mutex.hpp>
+#include <boost/thread/condition.hpp>
+#include <unistd.h>
+#include <errno.h>
+#include <getopt.h>
+#include <iostream>
+#include <stdexcept>
+#include <cstring>
+#include <vector>
 
 using std::cerr;
 using std::string;
@@ -59,6 +60,9 @@ help (string n)
 int
 main (int argc, char* argv[])
 {
+       dcpomatic_setup_path_encoding ();
+       dcpomatic_setup ();
+
        int num_threads = Config::instance()->num_local_encoding_threads ();
        bool verbose = false;
        bool write_log = false;
@@ -105,9 +109,9 @@ main (int argc, char* argv[])
        } else {
                log.reset (new NullLog);
        }
-       
+
        Server server (log, verbose);
-       
+
        try {
                server.run (num_threads);
        } catch (boost::system::system_error& e) {