From b0506e222092c62c63b1cb7543414b7e1c907e21 Mon Sep 17 00:00:00 2001 From: Marc Zinnschlag Date: Thu, 16 Aug 2012 12:59:28 +0200 Subject: [PATCH 1/2] re-enabling support for multiple data directories --- apps/openmw/main.cpp | 10 +--------- files/openmw.cfg | 2 ++ 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/apps/openmw/main.cpp b/apps/openmw/main.cpp index 0ca9dd6d9..5c2ba2f80 100644 --- a/apps/openmw/main.cpp +++ b/apps/openmw/main.cpp @@ -207,15 +207,7 @@ bool parseOptions (int argc, char** argv, OMW::Engine& engine, Files::Configurat std::string local(variables["data-local"].as()); if (!local.empty()) { - std::cout << "Ignoring data-local (currently not supported)" << std::endl; -// dataDirs.push_back(Files::PathContainer::value_type(local)); - } - - if (dataDirs.size()>1) - { - dataDirs.resize (1); - std::cout << "Ignoring all but the first data path (multiple data paths currently not supported)" - << std::endl; + dataDirs.push_back(Files::PathContainer::value_type(local)); } cfgMgr.processPaths(dataDirs); diff --git a/files/openmw.cfg b/files/openmw.cfg index 0af096e6a..c79369d05 100644 --- a/files/openmw.cfg +++ b/files/openmw.cfg @@ -1,2 +1,4 @@ +data="?global?"data" data="?mw?Data Files" +data-local="?local?data" resources=${MORROWIND_RESOURCE_FILES} From 2284d76307382c5088cbb3697c68cc113e474dc5 Mon Sep 17 00:00:00 2001 From: Marc Zinnschlag Date: Tue, 4 Sep 2012 11:02:18 +0200 Subject: [PATCH 2/2] re-enabled local data directory support in launcher --- apps/launcher/datafilespage.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/apps/launcher/datafilespage.cpp b/apps/launcher/datafilespage.cpp index 8545be835..64816fae5 100644 --- a/apps/launcher/datafilespage.cpp +++ b/apps/launcher/datafilespage.cpp @@ -197,7 +197,7 @@ bool DataFilesPage::setupDataFiles() desc.add_options() ("data", boost::program_options::value()->default_value(Files::PathContainer(), "data")->multitoken()) -// ("data-local", boost::program_options::value()->default_value("")) + ("data-local", boost::program_options::value()->default_value("")) ("fs-strict", boost::program_options::value()->implicit_value(true)->default_value(false)) ("encoding", boost::program_options::value()->default_value("win1252")); @@ -206,11 +206,10 @@ bool DataFilesPage::setupDataFiles() // Put the paths in a boost::filesystem vector to use with Files::Collections mDataDirs = Files::PathContainer(variables["data"].as()); -// std::string local = variables["data-local"].as(); -// if (!local.empty()) { -// mDataLocal.push_back(Files::PathContainer::value_type(local)); -// dataDirs.push_back(Files::PathContainer::value_type(local)); -// } + std::string local = variables["data-local"].as(); + if (!local.empty()) { + mDataLocal.push_back(Files::PathContainer::value_type(local)); + } if (mDataDirs.size()>1) mDataDirs.resize (1);