forked from mirror/openmw-tes3mp
--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()
|
desc.add_options()
|
||||||
("help", "print help message")
|
("help", "print help message")
|
||||||
("data", bpo::value<std::string>()->default_value ("data"),
|
("data", bpo::value<std::vector<std::string> >()
|
||||||
"set data directory")
|
->default_value (std::vector<std::string>(), "data")
|
||||||
|
->multitoken(),
|
||||||
|
"set data directories (later directories have higher priority)")
|
||||||
("resources", bpo::value<std::string>()->default_value ("resources"),
|
("resources", bpo::value<std::string>()->default_value ("resources"),
|
||||||
"set resources directory")
|
"set resources directory")
|
||||||
("start", bpo::value<std::string>()->default_value ("Beshara"),
|
("start", bpo::value<std::string>()->default_value ("Beshara"),
|
||||||
|
@ -105,9 +107,10 @@ bool parseOptions (int argc, char**argv, OMW::Engine& engine)
|
||||||
}
|
}
|
||||||
|
|
||||||
// directory settings
|
// directory settings
|
||||||
std::vector<boost::filesystem::path> dataDirs;
|
std::vector<std::string> dataDirs = variables["data"].as<std::vector<std::string> >();
|
||||||
dataDirs.push_back (variables["data"].as<std::string>());
|
std::vector<boost::filesystem::path> dataDirs2 (dataDirs.begin(), dataDirs.end());
|
||||||
engine.setDataDirs (dataDirs);
|
engine.setDataDirs (dataDirs2);
|
||||||
|
|
||||||
engine.setResourceDir (variables["resources"].as<std::string>());
|
engine.setResourceDir (variables["resources"].as<std::string>());
|
||||||
|
|
||||||
// master and plugin
|
// master and plugin
|
||||||
|
|
Loading…
Reference in a new issue