From 68da94c8f0efb392696752f1c91f7cabb59d5474 Mon Sep 17 00:00:00 2001 From: Marc Zinnschlag Date: Fri, 24 Feb 2012 20:19:32 +0100 Subject: [PATCH 1/3] workaround for older boost versions --- apps/openmw/main.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/apps/openmw/main.cpp b/apps/openmw/main.cpp index ec1775ac8..b8f711b21 100644 --- a/apps/openmw/main.cpp +++ b/apps/openmw/main.cpp @@ -35,6 +35,23 @@ #include "config.hpp" +#include +/** + * Workaround for problems with whitespaces in paths in older versions of Boost library + */ +#if (BOOST_VERSION <= 104600) +namespace boost +{ + +template<> +inline boost::filesystem::path lexical_cast(const std::string& arg) +{ + return boost::filesystem::path(arg); +} + +} /* namespace boost */ +#endif /* (BOOST_VERSION <= 104600) */ + using namespace std; /** From 771d50fe6959ec22a1c67c7cf83229f35fab5fff Mon Sep 17 00:00:00 2001 From: Marc Zinnschlag Date: Fri, 24 Feb 2012 20:20:32 +0100 Subject: [PATCH 2/3] removed a redundant assert and a left-over comment --- apps/openmw/engine.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/apps/openmw/engine.cpp b/apps/openmw/engine.cpp index 2e4beb65f..6535974a9 100644 --- a/apps/openmw/engine.cpp +++ b/apps/openmw/engine.cpp @@ -246,8 +246,6 @@ void OMW::Engine::enableFSStrict(bool fsStrict) void OMW::Engine::setDataDirs (const Files::PathContainer& dataDirs) { - /// \todo remove mDataDir, once resources system can handle multiple directories - assert (!dataDirs.empty()); mDataDirs = dataDirs; mFileCollections = Files::Collections (dataDirs, !mFSStrict); } From c9a1789db8b73dca2923afb31cb7c5d48b8a3585 Mon Sep 17 00:00:00 2001 From: Lukasz Gromanowski Date: Sat, 25 Feb 2012 10:20:42 +0100 Subject: [PATCH 3/3] Bug fix for processing data paths in OpenMW Launcher. Signed-off-by: Lukasz Gromanowski --- apps/launcher/datafilespage.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/apps/launcher/datafilespage.cpp b/apps/launcher/datafilespage.cpp index fb8631f73..8100631d7 100644 --- a/apps/launcher/datafilespage.cpp +++ b/apps/launcher/datafilespage.cpp @@ -188,8 +188,7 @@ void DataFilesPage::setupDataFiles() // Put the paths in a boost::filesystem vector to use with Files::Collections Files::PathContainer dataDirs(variables["data"].as()); - mCfgMgr.processPaths(dataDirs); - + std::string local(variables["data-local"].as()); if (!local.empty()) { @@ -201,6 +200,8 @@ void DataFilesPage::setupDataFiles() dataDirs.push_back(mCfgMgr.getLocalPath()); } + mCfgMgr.processPaths(dataDirs); + // Create a file collection for the dataDirs Files::Collections fileCollections(dataDirs, !variables["fs-strict"].as());