From e397ef0693ee8cb63c41062e72ce0b913663b51f Mon Sep 17 00:00:00 2001 From: "Guido \"Harb" Date: Sun, 23 May 2021 20:13:06 +0200 Subject: [PATCH] Sinai dev/master (#6) * Target .NET 3.5 * Include libs, and use v5.2 UnityEngine.dll * Use .NET 3.5 MonoMod references, and v10.4 Cecil .. and use new lib folder for UnityEngine and BepInEx reference * Use GetFiles instead of EnumerateFiles * Revert lib folder changes * Remove UnityEngine Dependency * Migrate to packagereference * codemaid cleanup * Update pacakge version Co-authored-by: Sinai --- BepInEx.MonoMod.HookGenPatcher.csproj | 59 ++++----------------------- HookGenPatcher.cs | 2 +- InformAboutRightFolder.cs | 13 ------ Properties/AssemblyInfo.cs | 11 +++-- packages.config | 8 ---- 5 files changed, 13 insertions(+), 80 deletions(-) delete mode 100644 InformAboutRightFolder.cs delete mode 100644 packages.config diff --git a/BepInEx.MonoMod.HookGenPatcher.csproj b/BepInEx.MonoMod.HookGenPatcher.csproj index 3ef9d6b..acab6e4 100644 --- a/BepInEx.MonoMod.HookGenPatcher.csproj +++ b/BepInEx.MonoMod.HookGenPatcher.csproj @@ -9,7 +9,7 @@ Properties BepInEx.MonoMod.HookGenPatcher BepInEx.MonoMod.HookGenPatcher - v4.7.2 + v3.5 512 true @@ -34,64 +34,19 @@ false - - ..\libs\BepInEx.dll - False - - - ..\libs\BepInEx.Preloader.dll - False - - - - packages\Mono.Cecil.0.11.2\lib\net40\Mono.Cecil.dll - False - - - packages\Mono.Cecil.0.11.2\lib\net40\Mono.Cecil.Mdb.dll - False - - - packages\Mono.Cecil.0.11.2\lib\net40\Mono.Cecil.Pdb.dll - False - - - packages\Mono.Cecil.0.11.2\lib\net40\Mono.Cecil.Rocks.dll - False - - - packages\MonoMod.20.5.21.5\lib\net40\MonoMod.exe - True - - - packages\MonoMod.RuntimeDetour.20.5.21.5\lib\net40\MonoMod.RuntimeDetour.dll - False - - - packages\MonoMod.RuntimeDetour.HookGen.20.5.21.5\lib\net40\MonoMod.RuntimeDetour.HookGen.exe - True - - - packages\MonoMod.Utils.20.5.21.5\lib\net40\MonoMod.Utils.dll - False - - - ..\libs\UnityEngine.dll - False - - - ..\libs\UnityEngine.CoreModule.dll - False - - - + + 5.4.8 + + + 20.5.21.5 + \ No newline at end of file diff --git a/HookGenPatcher.cs b/HookGenPatcher.cs index 5b2cdc0..4736dbf 100644 --- a/HookGenPatcher.cs +++ b/HookGenPatcher.cs @@ -45,7 +45,7 @@ public static void Initialize() string pathOut = Path.Combine(mmhookFolder, mmhookFileName); bool shouldCreateDirectory = true; - foreach (string mmhookFile in Directory.EnumerateFiles(Paths.PluginPath, mmhookFileName, SearchOption.AllDirectories)) + foreach (string mmhookFile in Directory.GetFiles(Paths.PluginPath, mmhookFileName, SearchOption.AllDirectories)) { if (Path.GetFileName(mmhookFile).Equals(mmhookFileName)) { diff --git a/InformAboutRightFolder.cs b/InformAboutRightFolder.cs deleted file mode 100644 index da80979..0000000 --- a/InformAboutRightFolder.cs +++ /dev/null @@ -1,13 +0,0 @@ -using BepInEx; - -namespace BepInEx.MonoMod.HookGenPatcher -{ - [BepInPlugin("me.harbingerofme.HookGenPatcher", "HookGenPatcher", "0.0.1")] - class InformUserAboutWrongLocation : BaseUnityPlugin - { - public void Awake() - { - Logger.LogError("This .dll should be in your patchers folder. Read the installation instructions and try again!"); - } - } -} diff --git a/Properties/AssemblyInfo.cs b/Properties/AssemblyInfo.cs index b6748fd..4abfc4d 100644 --- a/Properties/AssemblyInfo.cs +++ b/Properties/AssemblyInfo.cs @@ -1,6 +1,5 @@ -using System.Resources; -using System.Reflection; -using System.Runtime.CompilerServices; +using System.Reflection; +using System.Resources; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following @@ -33,6 +32,6 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.1.0.0")] -[assembly: AssemblyFileVersion("1.1.0.0")] -[assembly: NeutralResourcesLanguage("")] +[assembly: AssemblyVersion("1.2.0.0")] +[assembly: AssemblyFileVersion("1.2.0.0")] +[assembly: NeutralResourcesLanguage("")] \ No newline at end of file diff --git a/packages.config b/packages.config deleted file mode 100644 index 0468f46..0000000 --- a/packages.config +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file