summaryrefslogtreecommitdiffstats
path: root/logic
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2014-07-07 08:40:03 +0200
committerPetr Mrázek <peterix@gmail.com>2014-07-07 08:40:03 +0200
commitf72a38b06cfa1935fc33958157262df94b484d97 (patch)
tree00254dd853c4e8a91741a144dad55bbc4167ab41 /logic
parentd934e6483190d7d173051380c62bc040911b42cd (diff)
downloadMultiMC-f72a38b06cfa1935fc33958157262df94b484d97.tar
MultiMC-f72a38b06cfa1935fc33958157262df94b484d97.tar.gz
MultiMC-f72a38b06cfa1935fc33958157262df94b484d97.tar.lz
MultiMC-f72a38b06cfa1935fc33958157262df94b484d97.tar.xz
MultiMC-f72a38b06cfa1935fc33958157262df94b484d97.zip
Update the forge hacks.
Diffstat (limited to 'logic')
-rw-r--r--logic/forge/ForgeInstaller.cpp26
1 files changed, 20 insertions, 6 deletions
diff --git a/logic/forge/ForgeInstaller.cpp b/logic/forge/ForgeInstaller.cpp
index 7f952408..7ab0a09b 100644
--- a/logic/forge/ForgeInstaller.cpp
+++ b/logic/forge/ForgeInstaller.cpp
@@ -133,24 +133,38 @@ bool ForgeInstaller::add(OneSixInstance *to)
int sliding_insert_window = 0;
{
QJsonArray librariesPlus;
-
- // for each library in the version we are adding (except for the blacklisted)
+ // A blacklist - we ignore these entirely
QSet<QString> blacklist{"lwjgl", "lwjgl_util", "lwjgl-platform"};
+ //
+ QList<QString> xzlist{"org.scala-lang", "com.typesafe"};
+ // 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 rawName = lib->rawName();
+
+ // ignore blacklisted stuff
+ if (blacklist.contains(libName))
+ continue;
+
// WARNING: This could actually break.
// if this is the actual forge lib, set an absolute url for the download
if (libName.contains("minecraftforge"))
{
lib->setAbsoluteUrl(m_universal_url);
}
- else if (libName.contains("scala"))
+
+ // WARNING: This could actually break.
+ // mark bad libraries based on the xzlist above
+ for(auto entry : xzlist)
{
- lib->setHint("forge-pack-xz");
+ QLOG_DEBUG() << "Testing " << rawName << " : " << entry;
+ if(rawName.startsWith(entry))
+ {
+ lib->setHint("forge-pack-xz");
+ break;
+ }
}
- if (blacklist.contains(libName))
- continue;
QJsonObject libObj = lib->toJson();