summaryrefslogtreecommitdiffstats
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-08 01:00:52 +0200
commit842328df8e26106471ce3e5e9d37bc3df7be34cd (patch)
treeef7218e7ef95e721265035a39108c6c68bec3e1d
parent7f4073840a9732d03c9f71f9baa08502f0bf2d94 (diff)
downloadMultiMC-842328df8e26106471ce3e5e9d37bc3df7be34cd.tar
MultiMC-842328df8e26106471ce3e5e9d37bc3df7be34cd.tar.gz
MultiMC-842328df8e26106471ce3e5e9d37bc3df7be34cd.tar.lz
MultiMC-842328df8e26106471ce3e5e9d37bc3df7be34cd.tar.xz
MultiMC-842328df8e26106471ce3e5e9d37bc3df7be34cd.zip
Update the forge hacks.
Conflicts: logic/ForgeInstaller.cpp
-rw-r--r--logic/ForgeInstaller.cpp25
1 files changed, 19 insertions, 6 deletions
diff --git a/logic/ForgeInstaller.cpp b/logic/ForgeInstaller.cpp
index 94b3f319..5b3e8029 100644
--- a/logic/ForgeInstaller.cpp
+++ b/logic/ForgeInstaller.cpp
@@ -133,24 +133,37 @@ 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_version->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();