mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-11-17 21:11:39 +00:00
Changed: Add more checks for data
--HG-- branch : develop
This commit is contained in:
parent
db11469631
commit
579e9eecc3
1 changed files with 19 additions and 8 deletions
|
@ -410,11 +410,20 @@ bool CConfigFile::areRyzomDataInstalledIn(const QString &directory) const
|
||||||
// directory doesn't exist
|
// directory doesn't exist
|
||||||
if (!dir.exists()) return false;
|
if (!dir.exists()) return false;
|
||||||
|
|
||||||
if (!dir.cd("data") && dir.exists()) return false;
|
if (!dir.cd("data") || !dir.exists()) return false;
|
||||||
|
|
||||||
// at least 200 BNP in data directory
|
// at least 200 BNP in data directory
|
||||||
if (dir.entryList(QStringList() << "*.bnp", QDir::Files).size() < 200) return false;
|
if (dir.entryList(QStringList() << "*.bnp", QDir::Files).size() < 200) return false;
|
||||||
|
|
||||||
|
// fonts.bnp is required
|
||||||
|
if (!dir.exists("fonts.bnp")) return false;
|
||||||
|
|
||||||
|
// gamedev.bnp is required
|
||||||
|
if (!dir.exists("gamedev.bnp")) return false;
|
||||||
|
|
||||||
|
// interfaces.bnp is required
|
||||||
|
if (!dir.exists("interfaces.bnp")) return false;
|
||||||
|
|
||||||
// TODO: more checks
|
// TODO: more checks
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
@ -550,17 +559,19 @@ CConfigFile::InstallationStep CConfigFile::getNextStep() const
|
||||||
{
|
{
|
||||||
// user decided to copy files
|
// user decided to copy files
|
||||||
|
|
||||||
// selected directory contains Ryzom files (shouldn't fail)
|
|
||||||
if (!areRyzomDataInstalledIn(getSrcServerDirectory()))
|
|
||||||
{
|
|
||||||
return ShowWizard;
|
|
||||||
}
|
|
||||||
|
|
||||||
// data are not copied
|
// data are not copied
|
||||||
if (!areRyzomDataInstalledIn(serverDirectory))
|
if (!areRyzomDataInstalledIn(serverDirectory))
|
||||||
|
{
|
||||||
|
// selected directory contains Ryzom files (shouldn't fail)
|
||||||
|
if (areRyzomDataInstalledIn(getSrcServerDirectory()))
|
||||||
{
|
{
|
||||||
return CopyServerFiles;
|
return CopyServerFiles;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return ShowWizard;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// client is not extracted from BNP
|
// client is not extracted from BNP
|
||||||
if (!isRyzomClientInstalledIn(serverDirectory))
|
if (!isRyzomClientInstalledIn(serverDirectory))
|
||||||
|
|
Loading…
Reference in a new issue