From c31fd05f84b1434a283c231d74fee71a2c02d682 Mon Sep 17 00:00:00 2001 From: Herp Derpinstine Date: Tue, 5 Nov 2024 11:31:04 -0600 Subject: [PATCH] Fixed an issue with Preload Support Module attempting to resolve its own NetStandardPatches folder during compilation --- .github/workflows/build.yml | 12 ++++++++++++ .../NetStandardPatches/System.Core.dll | Bin .../NetStandardPatches/System.Drawing.dll | Bin .../NetStandardPatches/System.dll | Bin MelonLoader/Fixes/Il2CppICallInjector.cs | 2 ++ MelonLoader/MelonUtils.cs | 8 ++++++-- 6 files changed, 20 insertions(+), 2 deletions(-) rename {Dependencies/SupportModules/Preload => BaseLibs}/NetStandardPatches/System.Core.dll (100%) rename {Dependencies/SupportModules/Preload => BaseLibs}/NetStandardPatches/System.Drawing.dll (100%) rename {Dependencies/SupportModules/Preload => BaseLibs}/NetStandardPatches/System.dll (100%) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e42c83593..937ad2aea 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -194,6 +194,8 @@ jobs: cp -r BaseLibs/Mono Output/Debug/x64/MelonLoader/Dependencies/ cp -r BaseLibs/net35 Output/Debug/x64/MelonLoader/ cp -r BaseLibs/net6 Output/Debug/x64/MelonLoader/ + mkdir -p Output/Debug/x64/MelonLoader/Dependencies/SupportModules/NetStandardPatches + cp -r BaseLibs/NetStandardPatches Output/Debug/x64/MelonLoader/Dependencies/SupportModules/NetStandardPatches echo echo Copying Dobby x64... cp BaseLibs/dobby_x64.dll Output/Debug/x64/MelonLoader/Dependencies/dobby.dll @@ -234,6 +236,8 @@ jobs: cp -r BaseLibs/Mono Output/Release/x64/MelonLoader/Dependencies/ cp -r BaseLibs/net35 Output/Release/x64/MelonLoader/ cp -r BaseLibs/net6 Output/Release/x64/MelonLoader/ + mkdir -p Output/Release/x64/MelonLoader/Dependencies/SupportModules/NetStandardPatches + cp -r BaseLibs/NetStandardPatches Output/Release/x64/MelonLoader/Dependencies/SupportModules/NetStandardPatches echo echo Copying Dobby x64... cp BaseLibs/dobby_x64.dll Output/Release/x64/MelonLoader/Dependencies/dobby.dll @@ -269,6 +273,8 @@ jobs: cp -r BaseLibs/Mono Output/Debug/x86/MelonLoader/Dependencies/ cp -r BaseLibs/net35 Output/Debug/x86/MelonLoader/ cp -r BaseLibs/net6 Output/Debug/x86/MelonLoader/ + mkdir -p Output/Debug/x86/MelonLoader/Dependencies/SupportModules/NetStandardPatches + cp -r BaseLibs/NetStandardPatches Output/Debug/x86/MelonLoader/Dependencies/SupportModules/NetStandardPatches echo echo Copying Dobby x86... cp BaseLibs/dobby_x86.dll Output/Debug/x86/MelonLoader/Dependencies/dobby.dll @@ -304,6 +310,8 @@ jobs: cp -r BaseLibs/Mono Output/Release/x86/MelonLoader/Dependencies/ cp -r BaseLibs/net35 Output/Release/x86/MelonLoader/ cp -r BaseLibs/net6 Output/Release/x86/MelonLoader/ + mkdir -p Output/Release/x86/MelonLoader/Dependencies/SupportModules/NetStandardPatches + cp -r BaseLibs/NetStandardPatches Output/Release/x86/MelonLoader/Dependencies/SupportModules/NetStandardPatches echo echo Copying Dobby x86... cp BaseLibs/dobby_x86.dll Output/Release/x86/MelonLoader/Dependencies/dobby.dll @@ -349,6 +357,8 @@ jobs: cp -r BaseLibs/Mono Output/Debug/x64/MelonLoader/Dependencies/ cp -r BaseLibs/net35 Output/Debug/x64/MelonLoader/ cp -r BaseLibs/net6 Output/Debug/x64/MelonLoader/ + mkdir -p Output/Debug/x64/MelonLoader/Dependencies/SupportModules/NetStandardPatches + cp -r BaseLibs/NetStandardPatches Output/Debug/x64/MelonLoader/Dependencies/SupportModules/NetStandardPatches echo echo Copying documentation files... cp NOTICE.txt Output/Debug/x64 @@ -384,6 +394,8 @@ jobs: cp -r BaseLibs/Mono Output/Release/x64/MelonLoader/Dependencies/ cp -r BaseLibs/net35 Output/Release/x64/MelonLoader/ cp -r BaseLibs/net6 Output/Release/x64/MelonLoader/ + mkdir -p Output/Release/x64/MelonLoader/Dependencies/SupportModules/NetStandardPatches + cp -r BaseLibs/NetStandardPatches Output/Release/x64/MelonLoader/Dependencies/SupportModules/NetStandardPatches echo echo Copying documentation files... cp NOTICE.txt Output/Release/x64/ diff --git a/Dependencies/SupportModules/Preload/NetStandardPatches/System.Core.dll b/BaseLibs/NetStandardPatches/System.Core.dll similarity index 100% rename from Dependencies/SupportModules/Preload/NetStandardPatches/System.Core.dll rename to BaseLibs/NetStandardPatches/System.Core.dll diff --git a/Dependencies/SupportModules/Preload/NetStandardPatches/System.Drawing.dll b/BaseLibs/NetStandardPatches/System.Drawing.dll similarity index 100% rename from Dependencies/SupportModules/Preload/NetStandardPatches/System.Drawing.dll rename to BaseLibs/NetStandardPatches/System.Drawing.dll diff --git a/Dependencies/SupportModules/Preload/NetStandardPatches/System.dll b/BaseLibs/NetStandardPatches/System.dll similarity index 100% rename from Dependencies/SupportModules/Preload/NetStandardPatches/System.dll rename to BaseLibs/NetStandardPatches/System.dll diff --git a/MelonLoader/Fixes/Il2CppICallInjector.cs b/MelonLoader/Fixes/Il2CppICallInjector.cs index d05ed6118..7c4e00a4f 100644 --- a/MelonLoader/Fixes/Il2CppICallInjector.cs +++ b/MelonLoader/Fixes/Il2CppICallInjector.cs @@ -10,6 +10,8 @@ using Il2CppInterop.HarmonySupport; using HarmonyLib; +#pragma warning disable 0649 + namespace MelonLoader.Fixes { internal static class Il2CppICallInjector diff --git a/MelonLoader/MelonUtils.cs b/MelonLoader/MelonUtils.cs index 69cad4296..281a33ce8 100644 --- a/MelonLoader/MelonUtils.cs +++ b/MelonLoader/MelonUtils.cs @@ -306,7 +306,11 @@ public static IEnumerable GetValidTypes(this Assembly asm, LemonFunc (x != null) && (predicate == null || predicate(x))); } @@ -317,7 +321,7 @@ public static Type GetValidType(this Assembly asm, string typeName, LemonFunc