From 4b23d768f672ac24f98320d85278064e983b9eda Mon Sep 17 00:00:00 2001 From: Eris Date: Tue, 21 Dec 2021 09:41:20 +0100 Subject: [PATCH 1/4] Bump MonoMod.RuntimeDetour from 21.11.1.1 to 21.12.13.1 --- IPA.Loader/IPA.Loader.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/IPA.Loader/IPA.Loader.csproj b/IPA.Loader/IPA.Loader.csproj index 99da2ecc..12983724 100644 --- a/IPA.Loader/IPA.Loader.csproj +++ b/IPA.Loader/IPA.Loader.csproj @@ -58,7 +58,7 @@ - + From 903a2ac53f927323c876a39b8cb1dc5cb70d73a2 Mon Sep 17 00:00:00 2001 From: Eris Date: Tue, 21 Dec 2021 09:41:50 +0100 Subject: [PATCH 2/4] Bump HarmonyX from 2.6.1 to 2.7.0 --- IPA.Loader/IPA.Loader.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/IPA.Loader/IPA.Loader.csproj b/IPA.Loader/IPA.Loader.csproj index 12983724..b2755ab0 100644 --- a/IPA.Loader/IPA.Loader.csproj +++ b/IPA.Loader/IPA.Loader.csproj @@ -57,7 +57,7 @@ --> - + From 8145d5342d934842843b6a5db7d55a97376aa06c Mon Sep 17 00:00:00 2001 From: Eris Date: Tue, 21 Dec 2021 09:44:49 +0100 Subject: [PATCH 3/4] Disallow legacy global UnpatchAll --- IPA.Loader/Loader/HarmonyProtector.cs | 3 ++- IPA.Loader/Loader/PluginLoader.cs | 4 ---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/IPA.Loader/Loader/HarmonyProtector.cs b/IPA.Loader/Loader/HarmonyProtector.cs index 2d49fea5..8bae68bf 100644 --- a/IPA.Loader/Loader/HarmonyProtector.cs +++ b/IPA.Loader/Loader/HarmonyProtector.cs @@ -1,5 +1,4 @@ using HarmonyLib; -using System.Collections.Generic; using System.Reflection; namespace IPA.Loader @@ -17,6 +16,8 @@ namespace IPA.Loader public static void Protect(Harmony inst = null) { + HarmonyGlobalSettings.DisallowLegacyGlobalUnpatchAll = true; + selfAssem = Assembly.GetExecutingAssembly(); harmonyAssem = typeof(Harmony).Assembly; diff --git a/IPA.Loader/Loader/PluginLoader.cs b/IPA.Loader/Loader/PluginLoader.cs index 10a5eae6..f5252eee 100644 --- a/IPA.Loader/Loader/PluginLoader.cs +++ b/IPA.Loader/Loader/PluginLoader.cs @@ -11,11 +11,7 @@ using System.IO; using System.Linq; using System.Reflection; using System.Text.RegularExpressions; -using System.Threading.Tasks; -using Version = SemVer.Version; -using SemVer; using System.Diagnostics.CodeAnalysis; -using HarmonyLib; using System.Diagnostics; using IPA.AntiMalware; using Hive.Versioning; From 5bda9e3669477cd539fad52be9663cf4ebdf64f8 Mon Sep 17 00:00:00 2001 From: Eris Date: Tue, 21 Dec 2021 10:44:53 +0100 Subject: [PATCH 4/4] Move DisallowLegacyGlobalUnpatchAll to StdoutInterceptor --- IPA.Loader/Loader/HarmonyProtector.cs | 2 -- IPA.Loader/Logging/StdoutInterceptor.cs | 3 ++- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/IPA.Loader/Loader/HarmonyProtector.cs b/IPA.Loader/Loader/HarmonyProtector.cs index 8bae68bf..30f845ba 100644 --- a/IPA.Loader/Loader/HarmonyProtector.cs +++ b/IPA.Loader/Loader/HarmonyProtector.cs @@ -16,8 +16,6 @@ namespace IPA.Loader public static void Protect(Harmony inst = null) { - HarmonyGlobalSettings.DisallowLegacyGlobalUnpatchAll = true; - selfAssem = Assembly.GetExecutingAssembly(); harmonyAssem = typeof(Harmony).Assembly; diff --git a/IPA.Loader/Logging/StdoutInterceptor.cs b/IPA.Loader/Logging/StdoutInterceptor.cs index 26d14fe9..c2bba24f 100644 --- a/IPA.Loader/Logging/StdoutInterceptor.cs +++ b/IPA.Loader/Logging/StdoutInterceptor.cs @@ -192,9 +192,10 @@ namespace IPA.Logging EnsureHarmonyLogging(); + HarmonyGlobalSettings.DisallowLegacyGlobalUnpatchAll = true; harmony ??= new Harmony("BSIPA Console Redirector Patcher"); stdoutInterceptor ??= new StdoutInterceptor(); - stderrInterceptor ??= new StdoutInterceptor() { isStdErr = true }; + stderrInterceptor ??= new StdoutInterceptor { isStdErr = true }; RedirectConsole(); ConsoleHarmonyPatches.Patch(harmony);