diff options
author | Petr Mrázek <peterix@gmail.com> | 2014-07-26 23:00:35 +0200 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2014-07-26 23:00:35 +0200 |
commit | 03b13b0b3f43e830ca924338b38e1947cd0cc739 (patch) | |
tree | 08941e693ab365f934beba04d69aacf481be40d1 /logic/forge | |
parent | 9b82c87c92761515a11f00540a6bf74df6c76298 (diff) | |
download | MultiMC-03b13b0b3f43e830ca924338b38e1947cd0cc739.tar MultiMC-03b13b0b3f43e830ca924338b38e1947cd0cc739.tar.gz MultiMC-03b13b0b3f43e830ca924338b38e1947cd0cc739.tar.lz MultiMC-03b13b0b3f43e830ca924338b38e1947cd0cc739.tar.xz MultiMC-03b13b0b3f43e830ca924338b38e1947cd0cc739.zip |
Rearrange RawLibrary and OneSixLibrary heavily.
Fix #396
Diffstat (limited to 'logic/forge')
-rw-r--r-- | logic/forge/ForgeInstaller.cpp | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/logic/forge/ForgeInstaller.cpp b/logic/forge/ForgeInstaller.cpp index 74db2bfc..a230b038 100644 --- a/logic/forge/ForgeInstaller.cpp +++ b/logic/forge/ForgeInstaller.cpp @@ -85,7 +85,6 @@ void ForgeInstaller::prepare(const QString &filename, const QString &universalUr // where do we put the library? decode the mojang path OneSixLibrary lib(libraryName); - lib.finalize(); auto cacheentry = MMC->metacache()->resolveEntry("libraries", lib.storagePath()); finalPath = "libraries/" + lib.storagePath(); @@ -140,11 +139,11 @@ bool ForgeInstaller::add(OneSixInstance *to) // for each library in the version we are adding (except for the blacklisted) for (auto lib : m_forge_json->libraries) { - QString libName = lib->name(); + QString libName = lib->artifactId(); QString rawName = lib->rawName(); // ignore lwjgl libraries. - if (g_VersionFilterData.lwjglWhitelist.contains(lib->fullname())) + if (g_VersionFilterData.lwjglWhitelist.contains(lib->artifactPrefix())) continue; // ignore other blacklisted (realms, authlib) if (blacklist.contains(libName)) @@ -156,8 +155,7 @@ bool ForgeInstaller::add(OneSixInstance *to) { if (libName == "forge") { - lib->m_name.setClassifier("universal"); - lib->finalize(); + lib->setClassifier("universal"); } else if (libName == "minecraftforge") { @@ -165,8 +163,7 @@ bool ForgeInstaller::add(OneSixInstance *to) // using insane form of the MC version... QString longVersion = m_forge_version->mcver + "-" + m_forge_version->jobbuildver; GradleSpecifier spec(forgeCoord.arg(longVersion)); - lib->m_name = spec; - lib->finalize(); + lib->setRawName(spec); } } else @@ -196,7 +193,7 @@ bool ForgeInstaller::add(OneSixInstance *to) // find an entry that matches this one for (auto tolib : to->getFullVersion()->vanillaLibraries) { - if (tolib->name() != libName) + if (tolib->artifactId() != libName) continue; found = true; if (tolib->toJson() == libObj) @@ -215,7 +212,7 @@ bool ForgeInstaller::add(OneSixInstance *to) { // add lib libObj.insert("insert", QString("prepend")); - if (lib->name() == "minecraftforge" || lib->name() == "forge") + if (lib->artifactId() == "minecraftforge" || lib->artifactId() == "forge") { libObj.insert("MMC-depend", QString("hard")); } |