Merge branch 'fix_6589' into 'master'

Add default value for `user-data` in openmw.cfg

Closes #6589

See merge request OpenMW/openmw!1632
pull/3226/head
AnyOldName3 3 years ago
commit 696be1cc39

@ -27,7 +27,7 @@ namespace OpenMW
("data", bpo::value<Files::MaybeQuotedPathContainer>()->default_value(Files::MaybeQuotedPathContainer(), "data")
->multitoken()->composing(), "set data directories (later directories have higher priority)")
("data-local", bpo::value<Files::MaybeQuotedPathContainer::value_type>()->default_value(Files::MaybeQuotedPathContainer::value_type(), ""),
("data-local", bpo::value<Files::MaybeQuotedPath>()->default_value(Files::MaybeQuotedPath(), ""),
"set local data directory (highest priority)")
("fallback-archive", bpo::value<StringsVector>()->default_value(StringsVector(), "fallback-archive")

@ -168,9 +168,13 @@ void ConfigurationManager::addExtraConfigDirs(std::stack<boost::filesystem::path
void ConfigurationManager::addCommonOptions(boost::program_options::options_description& description)
{
Files::MaybeQuotedPath defaultUserData;
static_cast<boost::filesystem::path&>(defaultUserData) = boost::filesystem::path("?userdata?");
description.add_options()
("config", bpo::value<Files::MaybeQuotedPathContainer>()->multitoken()->composing(), "additional config directories")
("user-data", bpo::value<Files::MaybeQuotedPath>(),
("config", bpo::value<Files::MaybeQuotedPathContainer>()->default_value(Files::MaybeQuotedPathContainer(), "")
->multitoken()->composing(), "additional config directories")
("user-data", bpo::value<Files::MaybeQuotedPath>()->default_value(defaultUserData, ""),
"set user data directory (used for saves, screenshots, etc)");
}

Loading…
Cancel
Save