Skip to content

Commit fa19cbc

Browse files
committed
configure repacker packing process
1 parent 1bef042 commit fa19cbc

File tree

2 files changed

+26
-6
lines changed

2 files changed

+26
-6
lines changed

FEZ.HAT.mm.csproj

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
<AssemblyName>FEZ.HAT.mm</AssemblyName>
1010
<RootNamespace>HatModLoader</RootNamespace>
1111

12+
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
13+
1214
<ImplicitUsings>enable</ImplicitUsings>
1315
<Nullable>enable</Nullable>
1416

@@ -31,8 +33,8 @@
3133
<Target Name="PrepareHat" AfterTargets="Build">
3234
<ItemGroup>
3335
<SourceFiles Include="$(TargetDir)$(TargetName).dll" />
34-
<SourceFiles Include="$(TargetDir)$(TargetName).pdb" />
35-
<SourceFiles Include="$(TargetDir)FEZ.Hooks.dll" />
36+
<SourceFiles Include="$(TargetDir)Packed\FEZRepacker.Core.dll" />
37+
<SourceFiles Include="$(TargetDir)Packed\FEZ.Hooks.dll" />
3638
</ItemGroup>
3739
<Copy Condition="$(CopyOverHATToFez) == True" SourceFiles="@(SourceFiles)" DestinationFolder="$(FezDir)\" Retries="0" />
3840
</Target>

ILRepack.targets

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,45 @@
11
<?xml version="1.0" encoding="utf-8" ?>
22
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
33

4-
<Target Name="BuildHookBinaries" AfterTargets="VerifyModReferences" Condition="!Exists('$(TargetDir)FEZ.Hooks.dll')">
4+
<Target Name="BuildHookBinaries" AfterTargets="VerifyModReferences" Condition="!Exists('$(TargetDir)Packed\FEZ.Hooks.dll')">
55

6+
<MakeDir Directories="$(TargetDir)Packed\"/>
7+
68
<ItemGroup>
79
<HookBinaries Include="FEZ.exe" />
810
<HookBinaries Include="FezEngine.dll" />
911
<HookBinaries Include="FNA.dll" />
1012
</ItemGroup>
1113

12-
<Exec Command='"$(MonoModDir)\MonoMod.RuntimeDetour.HookGen.exe" "$(FezDir)\%(HookBinaries.Identity)" "$(TargetDir)MMHOOK_%(HookBinaries.Identity)"' WorkingDirectory="$(MonoModDir)" />
14+
<Exec Command='"$(MonoModDir)\MonoMod.RuntimeDetour.HookGen.exe" "$(FezDir)\%(HookBinaries.Identity)" "$(TargetDir)Packed\MMHOOK_%(HookBinaries.Identity)"' WorkingDirectory="$(MonoModDir)" />
1315

1416
<ItemGroup>
15-
<GeneratedHookBinaries Include="$(TargetDir)MMHOOK_%(HookBinaries.Identity)"/>
17+
<GeneratedHookBinaries Include="$(TargetDir)Packed\MMHOOK_%(HookBinaries.Identity)"/>
1618
</ItemGroup>
1719

1820
<ILRepack
1921
Parallel = "True"
2022
InputAssemblies = "@(GeneratedHookBinaries)"
2123
TargetKind = "Dll"
22-
OutputFile = "$(TargetDir)FEZ.Hooks.dll" />
24+
OutputFile = "$(TargetDir)Packed\FEZ.Hooks.dll" />
2325

2426
<Delete Files="@(GeneratedHookBinaries)" />
2527
</Target>
2628

29+
<!--Packing all assemblies other than HAT as Repacker, because for whatever reason the game freaks out when it's not done-->
30+
<!--Also in the future Repacker might not be the only dependency, so keep in mind this sucks and needs to be changed-->
31+
<Target Name="RepackerRepack" BeforeTargets="PrepareHat">
32+
<ItemGroup>
33+
<InputAssemblies Include="$(OutputPath)FEZRepacker.Core.dll"/>
34+
<InputAssemblies Include="$(OutputPath)*.dll" Exclude="$(OutputPath)$(TargetName)$(TargetExt);$(OutputPath)FEZRepacker.Core.dll"/>
35+
</ItemGroup>
36+
37+
<ILRepack
38+
Parallel="true"
39+
InputAssemblies="@(InputAssemblies)"
40+
TargetKind="SameAsPrimaryAssembly"
41+
OutputFile="$(TargetDir)Packed\FEZRepacker.Core.dll"
42+
/>
43+
</Target>
44+
2745
</Project>

0 commit comments

Comments
 (0)