Still trying to fix FTB
This commit is contained in:
parent
15920aa9d0
commit
e1f542b5b0
@ -398,6 +398,10 @@ void MultiMC::initGlobalSettings()
|
|||||||
#endif
|
#endif
|
||||||
m_settings->registerSetting("FTBLauncherDataRoot", ftbDataDefault);
|
m_settings->registerSetting("FTBLauncherDataRoot", ftbDataDefault);
|
||||||
m_settings->registerSetting("FTBLauncherRoot", ftbDefault);
|
m_settings->registerSetting("FTBLauncherRoot", ftbDefault);
|
||||||
|
QLOG_INFO() << "FTB Launcher paths:"
|
||||||
|
<< m_settings->get("FTBLauncherDataRoot").toString()
|
||||||
|
<< "and"
|
||||||
|
<< m_settings->get("FTBLauncherRoot").toString();
|
||||||
|
|
||||||
m_settings->registerSetting("FTBRoot");
|
m_settings->registerSetting("FTBRoot");
|
||||||
if (m_settings->get("FTBRoot").isNull())
|
if (m_settings->get("FTBRoot").isNull())
|
||||||
|
@ -296,19 +296,18 @@ void InstanceList::loadGroupList(QMap<QString, QString> &groupMap)
|
|||||||
QList<FTBRecord> InstanceList::discoverFTBInstances()
|
QList<FTBRecord> InstanceList::discoverFTBInstances()
|
||||||
{
|
{
|
||||||
QList<FTBRecord> records;
|
QList<FTBRecord> records;
|
||||||
QDir dir = QDir(MMC->settings()->get("FTBLauncherRoot").toString());
|
QDir dir = QDir(MMC->settings()->get("FTBLauncherDataRoot").toString());
|
||||||
QDir dataDir = QDir(MMC->settings()->get("FTBRoot").toString());
|
QDir dataDir = QDir(MMC->settings()->get("FTBRoot").toString());
|
||||||
if (!dir.exists())
|
if (!dataDir.exists())
|
||||||
{
|
|
||||||
QLOG_INFO() << "The FTB launcher directory specified does not exist. Please check your "
|
|
||||||
"settings.";
|
|
||||||
return records;
|
|
||||||
}
|
|
||||||
else if (!dataDir.exists())
|
|
||||||
{
|
{
|
||||||
QLOG_INFO() << "The FTB directory specified does not exist. Please check your settings";
|
QLOG_INFO() << "The FTB directory specified does not exist. Please check your settings";
|
||||||
return records;
|
return records;
|
||||||
}
|
}
|
||||||
|
else if (!dir.exists())
|
||||||
|
{
|
||||||
|
QLOG_INFO() << "The FTB launcher data directory specified does not exist. Please check your settings";
|
||||||
|
return records;
|
||||||
|
}
|
||||||
dir.cd("ModPacks");
|
dir.cd("ModPacks");
|
||||||
auto allFiles = dir.entryList(QDir::Readable | QDir::Files, QDir::Name);
|
auto allFiles = dir.entryList(QDir::Readable | QDir::Files, QDir::Name);
|
||||||
for (auto filename : allFiles)
|
for (auto filename : allFiles)
|
||||||
@ -337,6 +336,7 @@ QList<FTBRecord> InstanceList::discoverFTBInstances()
|
|||||||
record.instanceDir = dataDir.absoluteFilePath(record.dirName);
|
record.instanceDir = dataDir.absoluteFilePath(record.dirName);
|
||||||
record.templateDir = dir.absoluteFilePath(record.dirName);
|
record.templateDir = dir.absoluteFilePath(record.dirName);
|
||||||
QDir test(record.instanceDir);
|
QDir test(record.instanceDir);
|
||||||
|
QLOG_DEBUG() << dataDir.absolutePath() << record.instanceDir << record.dirName;
|
||||||
if (!test.exists())
|
if (!test.exists())
|
||||||
continue;
|
continue;
|
||||||
record.name = attrs.value("name").toString();
|
record.name = attrs.value("name").toString();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user