Give more feedback for DF detection failures with mismatched XML versions

This may help address issues where people forget to read the documentation,
don't run "git submodule update", and end up with a df-structures version
that's too old (which is somewhat common, it turns out).
develop
lethosor 2016-06-30 20:42:27 -04:00
parent cfaba3ec71
commit 163207e362
1 changed files with 28 additions and 1 deletions

@ -1485,7 +1485,34 @@ bool Core::Init()
if(!vinfo || !p->isIdentified())
{
fatal("Not a known DF version.\n");
if (!Version::git_xml_match())
{
const char *msg = (
"*******************************************************\n"
"* BIG, UGLY ERROR MESSAGE *\n"
"*******************************************************\n"
"\n"
"This DF version is missing from hack/symbols.xml, and\n"
"you have compiled DFHack with a df-structures (xml)\n"
"version that does *not* match the version tracked in git.\n"
"\n"
"If you are not actively working on df-structures and you\n"
"expected DFHack to work, you probably forgot to run\n"
"\n"
" git submodule update\n"
"\n"
"If this does not sound familiar, read Compile.rst and \n"
"recompile.\n"
"More details can be found in stderr.log in this folder.\n"
);
cout << msg << endl;
cerr << msg << endl;
fatal("Not a known DF version - XML version mismatch (see console or stderr.log)");
}
else
{
fatal("Not a known DF version.\n");
}
errorstate = true;
delete p;
p = NULL;