Skip to content

Commit

Permalink
Sinai dev/master (#6)
Browse files Browse the repository at this point in the history
* 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 <outlander.sinai@gmail.com>
  • Loading branch information
harbingerofme and sinai-dev committed May 23, 2021
1 parent e488c5b commit e397ef0
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 80 deletions.
59 changes: 7 additions & 52 deletions BepInEx.MonoMod.HookGenPatcher.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>BepInEx.MonoMod.HookGenPatcher</RootNamespace>
<AssemblyName>BepInEx.MonoMod.HookGenPatcher</AssemblyName>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<Deterministic>true</Deterministic>
<TargetFrameworkProfile />
Expand All @@ -34,64 +34,19 @@
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<Reference Include="BepInEx">
<HintPath>..\libs\BepInEx.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="BepInEx.Preloader">
<HintPath>..\libs\BepInEx.Preloader.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Microsoft.CSharp" />
<Reference Include="Mono.Cecil, Version=0.11.2.0, Culture=neutral, PublicKeyToken=50cebf1cceb9d05e, processorArchitecture=MSIL">
<HintPath>packages\Mono.Cecil.0.11.2\lib\net40\Mono.Cecil.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Mono.Cecil.Mdb, Version=0.11.2.0, Culture=neutral, PublicKeyToken=50cebf1cceb9d05e, processorArchitecture=MSIL">
<HintPath>packages\Mono.Cecil.0.11.2\lib\net40\Mono.Cecil.Mdb.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Mono.Cecil.Pdb, Version=0.11.2.0, Culture=neutral, PublicKeyToken=50cebf1cceb9d05e, processorArchitecture=MSIL">
<HintPath>packages\Mono.Cecil.0.11.2\lib\net40\Mono.Cecil.Pdb.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Mono.Cecil.Rocks, Version=0.11.2.0, Culture=neutral, PublicKeyToken=50cebf1cceb9d05e, processorArchitecture=MSIL">
<HintPath>packages\Mono.Cecil.0.11.2\lib\net40\Mono.Cecil.Rocks.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="MonoMod, Version=20.5.21.5, Culture=neutral, processorArchitecture=MSIL">
<HintPath>packages\MonoMod.20.5.21.5\lib\net40\MonoMod.exe</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="MonoMod.RuntimeDetour, Version=20.5.21.5, Culture=neutral, processorArchitecture=MSIL">
<HintPath>packages\MonoMod.RuntimeDetour.20.5.21.5\lib\net40\MonoMod.RuntimeDetour.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="MonoMod.RuntimeDetour.HookGen, Version=20.5.21.5, Culture=neutral, processorArchitecture=MSIL">
<HintPath>packages\MonoMod.RuntimeDetour.HookGen.20.5.21.5\lib\net40\MonoMod.RuntimeDetour.HookGen.exe</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="MonoMod.Utils, Version=20.5.21.5, Culture=neutral, processorArchitecture=MSIL">
<HintPath>packages\MonoMod.Utils.20.5.21.5\lib\net40\MonoMod.Utils.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="System" />
<Reference Include="UnityEngine">
<HintPath>..\libs\UnityEngine.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="UnityEngine.CoreModule">
<HintPath>..\libs\UnityEngine.CoreModule.dll</HintPath>
<Private>False</Private>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="HookGenPatcher.cs" />
<Compile Include="InformAboutRightFolder.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
<PackageReference Include="BepInEx.Core">
<Version>5.4.8</Version>
</PackageReference>
<PackageReference Include="MonoMod.RuntimeDetour.HookGen">
<Version>20.5.21.5</Version>
</PackageReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
2 changes: 1 addition & 1 deletion HookGenPatcher.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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))
{
Expand Down
13 changes: 0 additions & 13 deletions InformAboutRightFolder.cs

This file was deleted.

11 changes: 5 additions & 6 deletions Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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("")]
8 changes: 0 additions & 8 deletions packages.config

This file was deleted.

0 comments on commit e397ef0

Please sign in to comment.