Use FTB's libraries/ and versions/ folders for non-copied instances
This commit is contained in:
parent
5cf599673d
commit
43881b9cdb
@ -95,6 +95,15 @@ QString OneSixFTBInstance::id() const
|
||||
return "FTB/" + BaseInstance::id();
|
||||
}
|
||||
|
||||
QDir OneSixFTBInstance::librariesPath() const
|
||||
{
|
||||
return QDir(MMC->settings()->get("FTBRoot").toString() + "/libraries");
|
||||
}
|
||||
QDir OneSixFTBInstance::versionsPath() const
|
||||
{
|
||||
return QDir(MMC->settings()->get("FTBRoot").toString() + "/versions");
|
||||
}
|
||||
|
||||
QString OneSixFTBInstance::getStatusbarDescription()
|
||||
{
|
||||
return "OneSix FTB: " + intendedVersionId();
|
||||
|
@ -17,6 +17,9 @@ public:
|
||||
|
||||
virtual QString id() const;
|
||||
|
||||
virtual QDir librariesPath() const override;
|
||||
virtual QDir versionsPath() const override;
|
||||
|
||||
private:
|
||||
std::shared_ptr<OneSixLibrary> m_forge;
|
||||
};
|
||||
|
@ -192,12 +192,10 @@ MinecraftProcess *OneSixInstance::prepareForLaunch(AuthSessionPtr session)
|
||||
auto libs = version->getActiveNormalLibs();
|
||||
for (auto lib : libs)
|
||||
{
|
||||
QFileInfo fi(QString("libraries/") + lib->storagePath());
|
||||
launchScript += "cp " + fi.absoluteFilePath() + "\n";
|
||||
launchScript += "cp " + librariesPath().absoluteFilePath(lib->storagePath()) + "\n";
|
||||
}
|
||||
QString targetstr = "versions/" + version->id + "/" + version->id + ".jar";
|
||||
QFileInfo fi(targetstr);
|
||||
launchScript += "cp " + fi.absoluteFilePath() + "\n";
|
||||
QString targetstr = version->id + "/" + version->id + ".jar";
|
||||
launchScript += "cp " + versionsPath().absoluteFilePath(targetstr) + "\n";
|
||||
}
|
||||
launchScript += "mainClass " + version->mainClass + "\n";
|
||||
|
||||
@ -374,6 +372,15 @@ QString OneSixInstance::getStatusbarDescription()
|
||||
return descr;
|
||||
}
|
||||
|
||||
QDir OneSixInstance::librariesPath() const
|
||||
{
|
||||
return QDir::current().absoluteFilePath("libraries");
|
||||
}
|
||||
QDir OneSixInstance::versionsPath() const
|
||||
{
|
||||
return QDir::current().absoluteFilePath("versions");
|
||||
}
|
||||
|
||||
QString OneSixInstance::loaderModsDir() const
|
||||
{
|
||||
return PathCombine(minecraftRoot(), "mods");
|
||||
|
@ -68,6 +68,9 @@ public:
|
||||
virtual bool menuActionEnabled(QString action_name) const override;
|
||||
virtual QString getStatusbarDescription() override;
|
||||
|
||||
virtual QDir librariesPath() const;
|
||||
virtual QDir versionsPath() const;
|
||||
|
||||
signals:
|
||||
void versionReloaded();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user