#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>
#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
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'
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: