-
Notifications
You must be signed in to change notification settings - Fork 7
/
Directory.Build.targets
45 lines (39 loc) · 1.87 KB
/
Directory.Build.targets
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<?xml version="1.0" encoding="utf-8"?>
<Project>
<PropertyGroup Condition="$(UseCaiLib) == 'true'">
<RepackAll>true</RepackAll>
</PropertyGroup>
<Target Name="ILRepack" AfterTargets="Build" Condition=" '$(RepackAll)' == 'true'">
<ItemGroup>
<InputAssemblies Include="$(TargetDir)/*.dll" Exclude="**/0Harmony.dll; **/System.*; **/Microsoft.*" />
</ItemGroup>
<ILRepack
OutputType="SameAsPrimaryAssembly"
MainAssembly="$(TargetPath)"
OutputAssembly="$(TargetPath)"
InputAssemblies="@(InputAssemblies)"
WilcardInputAssemblies="true"
WorkingDirectory="$(LibFolder)"
/>
</Target>
<ItemGroup>
<_Anim Include="$(ProjectDir)anim/**"/>
<_Archived Include="$(ProjectDir)archived_versions/**"/>
</ItemGroup>
<Target Name="CopyOutput" AfterTargets="ILRepack" Condition="$(AssemblyName) != 'SquareLib'">
<Copy SourceFiles="$(TargetDir)$(TargetName).dll" DestinationFolder="$(SolutionDir)/Mods/$(ProjectName)"/>
<Copy SourceFiles="$(ProjectDir)mod_info.yaml" DestinationFolder="$(SolutionDir)/Mods/$(ProjectName)"/>
<Copy SourceFiles="@(_Anim)" DestinationFolder="$(SolutionDir)/Mods/$(ProjectName)/anim/%(RecursiveDir)"/>
<Copy SourceFiles="@(_Archived)" DestinationFolder="$(SolutionDir)/Mods/$(ProjectName)/archived_versions/%(RecursiveDir)"/>
<Copy SourceFiles="@(CopyFolder)" DestinationFolder="$(SolutionDir)/Mods/$(ProjectName)/%(CopyFolder.DestName)/%(RecursiveDir)"/>
</Target>
<Target Name="CopyNew" AfterTargets="CopyOutput" Condition="$(AssemblyName) != 'SquareLib'">
<Copy SourceFiles="$(ProjectDir)mod.yaml" DestinationFolder="$(SolutionDir)/Mods/$(ProjectName)"/>
</Target>
<ItemGroup>
<_FinalMod Include="$(SolutionDir)/Mods/$(ProjectName)/**"/>
</ItemGroup>
<Target Name="CopyToGame" AfterTargets="CopyNew">
<Copy SourceFiles="@(_FinalMod)" DestinationFolder="$(GameSaveFolder)/mods/Dev/$(ProjectName)/%(RecursiveDir)"/>
</Target>
</Project>