Marginally improve OneSix offline mode launch

While reconstructing assets, skip files that don't exist.
Report missing OneSix native libraries.
This commit is contained in:
Petr Mrázek 2014-01-18 22:11:33 +01:00
parent 8650aa81f0
commit 3fabb11f4c
9 changed files with 95 additions and 47 deletions

View file

@ -136,6 +136,34 @@ QString OneSixLibrary::hint()
return m_hint;
}
bool OneSixLibrary::filesExist()
{
QString storage = storagePath();
if (storage.contains("${arch}"))
{
QString cooked_storage = storage;
cooked_storage.replace("${arch}", "32");
if (!QFileInfo::exists(PathCombine("libraries", cooked_storage)))
{
return false;
}
cooked_storage = storage;
cooked_storage.replace("${arch}", "64");
if (!QFileInfo::exists(PathCombine("libraries", cooked_storage)))
{
return false;
}
}
else
{
if (!QFileInfo::exists(PathCombine("libraries", storage)))
{
return false;
}
}
return true;
}
bool OneSixLibrary::extractTo(QString target_dir)
{
QString storage = storagePath();