From efa414c442a77735a5f972b7103e8ce866a6bdd1 Mon Sep 17 00:00:00 2001 From: Sefa Eyeoglu Date: Thu, 20 Jan 2022 20:40:56 +0100 Subject: refactor: initial migration to QuaZip 1.2 Let's move off our custom QuaZip. In the olden times we needed the custom version of QuaZip, as it was basically unmaintained and on SourceForge (eww). But nowadays it's maintained and on GitHub. See new GitHub page: https://github.com/stachenov/quazip --- launcher/minecraft/launch/ExtractNatives.cpp | 4 ++-- launcher/minecraft/launch/ModMinecraftJar.cpp | 8 +++++--- 2 files changed, 7 insertions(+), 5 deletions(-) (limited to 'launcher/minecraft/launch') diff --git a/launcher/minecraft/launch/ExtractNatives.cpp b/launcher/minecraft/launch/ExtractNatives.cpp index 8cd439b1..744e7ac6 100644 --- a/launcher/minecraft/launch/ExtractNatives.cpp +++ b/launcher/minecraft/launch/ExtractNatives.cpp @@ -17,8 +17,8 @@ #include #include -#include -#include +#include +#include #include "MMCZip.h" #include "FileSystem.h" #include diff --git a/launcher/minecraft/launch/ModMinecraftJar.cpp b/launcher/minecraft/launch/ModMinecraftJar.cpp index 93de9d59..c8796f01 100644 --- a/launcher/minecraft/launch/ModMinecraftJar.cpp +++ b/launcher/minecraft/launch/ModMinecraftJar.cpp @@ -42,6 +42,7 @@ void ModMinecraftJar::executeTask() emitFailed(tr("Couldn't remove stale jar file: %1").arg(finalJarPath)); } + /* // create temporary modded jar, if needed auto components = m_inst->getPackProfile(); auto profile = components->getProfile(); @@ -53,12 +54,13 @@ void ModMinecraftJar::executeTask() mainJar->getApplicableFiles(currentSystem, jars, temp1, temp2, temp3, m_inst->getLocalLibraryPath()); auto sourceJarPath = jars[0]; if(!MMCZip::createModdedJar(sourceJarPath, finalJarPath, jarMods)) - { + { */ + // TODO: add back support for modded jar emitFailed(tr("Failed to create the custom Minecraft jar file.")); return; - } + /*} } - emitSucceeded(); + emitSucceeded();*/ } void ModMinecraftJar::finalize() -- cgit From 3aa809b8c0de48ca241ec567acda31ed1a728540 Mon Sep 17 00:00:00 2001 From: Sefa Eyeoglu Date: Mon, 24 Jan 2022 22:55:57 +0100 Subject: refactor: add in-tree QuaZip --- launcher/minecraft/launch/ExtractNatives.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'launcher/minecraft/launch') diff --git a/launcher/minecraft/launch/ExtractNatives.cpp b/launcher/minecraft/launch/ExtractNatives.cpp index 744e7ac6..5f13f730 100644 --- a/launcher/minecraft/launch/ExtractNatives.cpp +++ b/launcher/minecraft/launch/ExtractNatives.cpp @@ -17,8 +17,14 @@ #include #include +#ifdef QUAZIP_USE_SUBMODULE +#include +#include +#else #include #include +#endif + #include "MMCZip.h" #include "FileSystem.h" #include -- cgit From 81c72c2038f35e744e038923105d91add5a0732c Mon Sep 17 00:00:00 2001 From: Sefa Eyeoglu Date: Mon, 24 Jan 2022 23:02:06 +0100 Subject: refactor: bring back methods that need to be reimplemented --- launcher/minecraft/launch/ModMinecraftJar.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'launcher/minecraft/launch') diff --git a/launcher/minecraft/launch/ModMinecraftJar.cpp b/launcher/minecraft/launch/ModMinecraftJar.cpp index c8796f01..93de9d59 100644 --- a/launcher/minecraft/launch/ModMinecraftJar.cpp +++ b/launcher/minecraft/launch/ModMinecraftJar.cpp @@ -42,7 +42,6 @@ void ModMinecraftJar::executeTask() emitFailed(tr("Couldn't remove stale jar file: %1").arg(finalJarPath)); } - /* // create temporary modded jar, if needed auto components = m_inst->getPackProfile(); auto profile = components->getProfile(); @@ -54,13 +53,12 @@ void ModMinecraftJar::executeTask() mainJar->getApplicableFiles(currentSystem, jars, temp1, temp2, temp3, m_inst->getLocalLibraryPath()); auto sourceJarPath = jars[0]; if(!MMCZip::createModdedJar(sourceJarPath, finalJarPath, jarMods)) - { */ - // TODO: add back support for modded jar + { emitFailed(tr("Failed to create the custom Minecraft jar file.")); return; - /*} + } } - emitSucceeded();*/ + emitSucceeded(); } void ModMinecraftJar::finalize() -- cgit From 0442b80a2c0a7d99fa8b7df5d64c1ddfc676f251 Mon Sep 17 00:00:00 2001 From: Sefa Eyeoglu Date: Tue, 25 Jan 2022 12:53:33 +0100 Subject: refactor: simpler includes for quazip --- launcher/minecraft/launch/ExtractNatives.cpp | 6 ------ 1 file changed, 6 deletions(-) (limited to 'launcher/minecraft/launch') diff --git a/launcher/minecraft/launch/ExtractNatives.cpp b/launcher/minecraft/launch/ExtractNatives.cpp index 5f13f730..7d5f4179 100644 --- a/launcher/minecraft/launch/ExtractNatives.cpp +++ b/launcher/minecraft/launch/ExtractNatives.cpp @@ -17,14 +17,8 @@ #include #include -#ifdef QUAZIP_USE_SUBMODULE #include #include -#else -#include -#include -#endif - #include "MMCZip.h" #include "FileSystem.h" #include -- cgit