Skip to content

Commit

Permalink
Fixed an issue with Preload Support Module attempting to resolve its …
Browse files Browse the repository at this point in the history
…own NetStandardPatches folder during compilation
  • Loading branch information
HerpDerpinstine committed Nov 5, 2024
1 parent 9ec682e commit c31fd05
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 2 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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/
Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 2 additions & 0 deletions MelonLoader/Fixes/Il2CppICallInjector.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
using Il2CppInterop.HarmonySupport;
using HarmonyLib;

#pragma warning disable 0649

namespace MelonLoader.Fixes
{
internal static class Il2CppICallInjector
Expand Down
8 changes: 6 additions & 2 deletions MelonLoader/MelonUtils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,11 @@ public static IEnumerable<Type> GetValidTypes(this Assembly asm, LemonFunc<Type,
//MelonLogger.Error($"Failed to get all types in assembly {asm.FullName} due to: {ex.Message}", ex);
returnval = ex.Types;
}

//catch (Exception ex)
//{
//MelonLogger.Error($"Failed to get all types in assembly {asm.FullName} due to: {ex.Message}", ex);
// returnval = null;
//}
return returnval.Where(x => (x != null) && (predicate == null || predicate(x)));
}

Expand All @@ -317,7 +321,7 @@ public static Type GetValidType(this Assembly asm, string typeName, LemonFunc<Ty
{
Type x = null;
try { x = asm.GetType(typeName); }
catch (Exception ex)
catch //(Exception ex)
{
//MelonLogger.Error($"Failed to get type {typeName} from assembly {asm.FullName} due to: {ex.Message}", ex);
x = null;
Expand Down

0 comments on commit c31fd05

Please sign in to comment.