mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-19 22:53:53 +00:00
--data switch accepts multiple directories now
This commit is contained in:
parent
6e880cffb2
commit
e60f0e3b38
1 changed files with 8 additions and 5 deletions
|
@ -42,8 +42,10 @@ bool parseOptions (int argc, char**argv, OMW::Engine& engine)
|
|||
|
||||
desc.add_options()
|
||||
("help", "print help message")
|
||||
("data", bpo::value<std::string>()->default_value ("data"),
|
||||
"set data directory")
|
||||
("data", bpo::value<std::vector<std::string> >()
|
||||
->default_value (std::vector<std::string>(), "data")
|
||||
->multitoken(),
|
||||
"set data directories (later directories have higher priority)")
|
||||
("resources", bpo::value<std::string>()->default_value ("resources"),
|
||||
"set resources directory")
|
||||
("start", bpo::value<std::string>()->default_value ("Beshara"),
|
||||
|
@ -105,9 +107,10 @@ bool parseOptions (int argc, char**argv, OMW::Engine& engine)
|
|||
}
|
||||
|
||||
// directory settings
|
||||
std::vector<boost::filesystem::path> dataDirs;
|
||||
dataDirs.push_back (variables["data"].as<std::string>());
|
||||
engine.setDataDirs (dataDirs);
|
||||
std::vector<std::string> dataDirs = variables["data"].as<std::vector<std::string> >();
|
||||
std::vector<boost::filesystem::path> dataDirs2 (dataDirs.begin(), dataDirs.end());
|
||||
engine.setDataDirs (dataDirs2);
|
||||
|
||||
engine.setResourceDir (variables["resources"].as<std::string>());
|
||||
|
||||
// master and plugin
|
||||
|
|
Loading…
Reference in a new issue