From d36bc44cad4b384992b07469a3b2d9658fcb2272 Mon Sep 17 00:00:00 2001 From: ColdCalzone Date: Fri, 10 Jun 2022 15:02:40 -0400 Subject: [PATCH 1/2] Linux Fixes:tm: --- Quintessential.csproj | 1 + Quintessential/QuintessentialLoader.cs | 9 ++++++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/Quintessential.csproj b/Quintessential.csproj index 1c67f0e..76c7432 100644 --- a/Quintessential.csproj +++ b/Quintessential.csproj @@ -16,6 +16,7 @@ + diff --git a/Quintessential/QuintessentialLoader.cs b/Quintessential/QuintessentialLoader.cs index 28e8a39..c9e8615 100644 --- a/Quintessential/QuintessentialLoader.cs +++ b/Quintessential/QuintessentialLoader.cs @@ -7,7 +7,7 @@ using System.Reflection; using System.Resources; -using Ionic.Zip; +using ICSharpCode.SharpZipLib.Zip; using MonoMod.Utils; @@ -46,6 +46,8 @@ public class QuintessentialLoader { private static readonly string zipExtractSuffix = "__quintessential_from_zip"; private static readonly string quintAssetFolder = "__quintessential_assets"; + private static FastZip zipExtractor = new FastZip(); + public static void PreInit() { try { PathLightning = Path.GetDirectoryName(typeof(GameLogic).Assembly.Location); @@ -93,6 +95,8 @@ public static void PreInit() { var set = manager.GetResourceSet(CultureInfo.InvariantCulture, true, true); foreach(object item in set){ if(item is DictionaryEntry de){ + foreach(object item in set) { + if(item is DictionaryEntry de) { string name = (string)de.Key; using var toStream = File.OpenWrite(Path.Combine(outDir, name)); byte[] content = (byte[])de.Value; @@ -323,8 +327,7 @@ protected static void FindZipMod(string zip) { return; var dest = zip.Substring(0, zip.Length - ".zip".Length) + zipExtractSuffix; - using(ZipFile file = new(zip)) - file.ExtractAll(dest); + zipExtractor.ExtractZip(zip, dest, ""); FindFolderMod(dest, zip); } From cadeb673de9422c1829596cd97bd5883f74ed6b2 Mon Sep 17 00:00:00 2001 From: ColdCalzone Date: Fri, 10 Jun 2022 15:04:59 -0400 Subject: [PATCH 2/2] Fuck Ionic all my homies hate Ionic --- Quintessential.csproj | 4 ---- 1 file changed, 4 deletions(-) diff --git a/Quintessential.csproj b/Quintessential.csproj index 76c7432..0d63224 100644 --- a/Quintessential.csproj +++ b/Quintessential.csproj @@ -20,10 +20,6 @@ - - ..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\Opus Magnum\Ionic.Zip.Reduced.dll - False - ..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\Opus Magnum\IntermediaryLightning.exe false