Always print openmw version in the log

openmw-35
scrawl 10 years ago
parent cbe135c60f
commit 73e57f53a8

@ -190,29 +190,23 @@ bool parseOptions (int argc, char** argv, OMW::Engine& engine, Files::Configurat
bpo::store(valid_opts, variables);
bpo::notify(variables);
bool run = true;
if (variables.count ("help"))
{
std::cout << desc << std::endl;
run = false;
return false;
}
if (variables.count ("version"))
std::cout << "OpenMW version " << OPENMW_VERSION;
std::string rev = OPENMW_VERSION_COMMITHASH;
std::string tag = OPENMW_VERSION_TAGHASH;
if (!rev.empty() && !tag.empty())
{
std::cout << "OpenMW version " << OPENMW_VERSION << std::endl;
std::string rev = OPENMW_VERSION_COMMITHASH;
std::string tag = OPENMW_VERSION_TAGHASH;
if (!rev.empty() && !tag.empty())
{
rev = rev.substr(0, 10);
std::cout << "Revision " << rev << std::endl;
}
run = false;
rev = rev.substr(0, 10);
std::cout << " (revision " << rev << ")";
}
std::cout << std::endl;
if (!run)
if (variables.count ("version"))
return false;
cfgMgr.readConfiguration(variables, desc);

Loading…
Cancel
Save