Try to fix ffprobing.
authorCarl Hetherington <cth@carlh.net>
Mon, 24 Jun 2013 10:43:31 +0000 (11:43 +0100)
committerCarl Hetherington <cth@carlh.net>
Mon, 24 Jun 2013 10:43:31 +0000 (11:43 +0100)
src/lib/film.cc
src/lib/wscript
wscript

index 041bbc22503c624c447a0ed4e5eca3ecad16849c..cb66e278382c72c510b51c3f8fdf072088c2b70c 100644 (file)
 #include <sstream>
 #include <iomanip>
 #include <unistd.h>
+#ifdef DVDOMATIC_WINDOWS
+#undef DATADIR
+#include <shlwapi.h>
+#endif
 #include <boost/filesystem.hpp>
 #include <boost/algorithm/string.hpp>
 #include <boost/lexical_cast.hpp>
@@ -1002,10 +1006,9 @@ Film::set_content (string c)
 #ifdef DVDOMATIC_WINDOWS
        wchar_t dir[512];
        GetModuleFileName (GetModuleHandle (0), dir, sizeof (dir));
-       boost::filesystem::path path_dir (dir);
-       path_dir = path_dir.parent_path ();
-       path_dir /= "ffprobe.exe";
-       string ffprobe = "\"" + path_dir.string () + "\" ";
+       PathRemoveFileSpec (dir);
+       SetCurrentDirectory (dir);
+       string ffprobe = "ffprobe.exe ";
 #else
        string ffprobe = "ffprobe ";
 #endif
index 66207b1e4468f700729e69b412fecb28650483a9..7c7a64d580bd63c002b03ba0f06469710af655c2 100644 (file)
@@ -69,7 +69,7 @@ def build(bld):
     obj.source = sources + ' version.cc'
 
     if bld.env.TARGET_WINDOWS:
-        obj.uselib += ' WINSOCK2 BFD DBGHELP IBERTY'
+        obj.uselib += ' WINSOCK2 BFD DBGHELP IBERTY SHLWAPI'
         obj.source += ' stack.cpp'
 
     obj.target = 'dvdomatic'
diff --git a/wscript b/wscript
index bc12a0809d7cf32d38bb678b2e196ac759e51598..8088f45322441d38e7e7fe89b6d7303f2737e018 100644 (file)
--- a/wscript
+++ b/wscript
@@ -42,6 +42,7 @@ def configure(conf):
         conf.check(lib = 'bfd', uselib_store = 'BFD', msg = "Checking for library bfd")
         conf.check(lib = 'dbghelp', uselib_store = 'DBGHELP', msg = "Checking for library dbghelp")
         conf.check(lib = 'iberty', uselib_store = 'IBERTY', msg = "Checking for library iberty")
+        conf.check(lib = 'shlwapi', uselib_store = 'SHLWAPI', msg = "Checking for library shlwapi")
         boost_lib_suffix = '-mt'
         boost_thread = 'boost_thread_win32-mt'
     else: