Add basic stuff to build RPMs for Centos.
[dcpomatic.git] / src / tools / dcpomatic_cli.cc
index 51248fde7f613c543db955ca60ca30eb75dbb4fa..c40ea6662b8f0c7b0b1b476933cb770a03406fcd 100644 (file)
@@ -32,6 +32,7 @@
 #include "lib/config.h"
 #include "lib/log.h"
 #include "lib/ui_signaller.h"
+#include "lib/server_finder.h"
 
 using std::string;
 using std::cerr;
@@ -46,9 +47,9 @@ help (string n)
 {
        cerr << "Syntax: " << n << " [OPTION] <FILM>\n"
             << "  -v, --version      show DCP-o-matic version\n"
-            << "  -h, --help         show this help\n"
-            << "  -d, --deps         list DCP-o-matic dependency details and quit\n"
-            << "  -f, --flags        show flags passed to C++ compiler on build\n"
+            << "  -h, --help         show this help\n"
+            << "  -d, --deps         list DCP-o-matic dependency details and quit\n"
+            << "  -f, --flags        show flags passed to C++ compiler on build\n"
             << "  -n, --no-progress  do not print progress to stdout\n"
             << "  -r, --no-remote    do not use any remote servers\n"
             << "\n"
@@ -118,7 +119,7 @@ main (int argc, char* argv[])
        ui_signaller = new UISignaller ();
 
        if (no_remote) {
-               Config::instance()->set_servers (vector<ServerDescription> ());
+               ServerFinder::instance()->disable ();
        }
 
        cout << "DCP-o-matic " << dcpomatic_version << " git " << dcpomatic_git_commit;
@@ -200,6 +201,11 @@ main (int argc, char* argv[])
                }
        }
 
+       /* This is just to stop valgrind reporting leaks due to JobManager
+          indirectly holding onto codecs.
+       */
+       JobManager::drop ();
+       
        return error ? EXIT_FAILURE : EXIT_SUCCESS;
 }