-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathILRepack.targets
More file actions
48 lines (48 loc) · 2.81 KB
/
ILRepack.targets
File metadata and controls
48 lines (48 loc) · 2.81 KB
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
46
47
48
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Target Name="RepackThunderstore" AfterTargets="Build">
<ItemGroup>
<InputAssemblies Include="$(TargetPath)" />
<InputAssemblies Include="$(OutputPath)ServerSync.dll" />
</ItemGroup>
<ILRepack Parallel="true" DebugInfo="true" Internalize="true" InputAssemblies="@(InputAssemblies)" OutputFile="$(TargetDir)thunderstore\$(TargetFileName)" TargetKind="SameAsPrimaryAssembly" LibraryPath="$(OutputPath)" />
</Target>
<Target Name="CopyDLLThunderstore" AfterTargets="RepackThunderstore">
<Copy SourceFiles="$(TargetDir)\thunderstore\$(TargetFileName)" DestinationFolder="$(ProjectDir)package\thunderstore\$(SolutionName)\" />
<Message Text="Copied to thunderstore package folder." Importance="High" />
</Target>
<Target Name="UpdateTranslations" AfterTargets="CopyDLLThunderstore">
<Exec Command="powershell -ExecutionPolicy Bypass -NoProfile -File "UpdateTranslations.ps1"" />
<Message Text="Updated embedded translations." Importance="High" />
</Target>
<Target Name="CopyLanguageFileThunderstore" AfterTargets="UpdateTranslations">
<Copy SourceFiles="$(ProjectDir)translations\English.json" DestinationFiles="$(ProjectDir)package\thunderstore\$(SolutionName)\$(SolutionName).English.json" />
<Message Text="Copied English.json to thunderstore package folder." Importance="High" />
</Target>
<Target Name="RepackNexus" AfterTargets="CopyLanguageFileThunderstore">
<ItemGroup>
<InputAssemblies Include="$(OutputPath)Newtonsoft.Json.dll" />
</ItemGroup>
<ILRepack Parallel="true" DebugInfo="true" Internalize="true" InputAssemblies="@(InputAssemblies)" OutputFile="$(TargetPath)" TargetKind="SameAsPrimaryAssembly" LibraryPath="$(OutputPath)" />
</Target>
<Target Name="CopyDLLNexus" AfterTargets="RepackNexus">
<Copy SourceFiles="$(TargetPath)" DestinationFolder="$(ProjectDir)package\nexus\$(SolutionName)\" />
<Message Text="Copied to nexus package folder." Importance="High" />
</Target>
<Target Name="ZipNexus" AfterTargets="CopyDLLNexus">
<ZipDirectory
SourceDirectory="$(ProjectDir)package\nexus\$(SolutionName)\"
DestinationFile="$(ProjectDir)package\nexus\$(SolutionName).zip"
Overwrite="true"/>
</Target>
<Target Name="ZipThunderstore" AfterTargets="CopyDLLThunderstore">
<ZipDirectory
SourceDirectory="$(ProjectDir)package\thunderstore\$(SolutionName)\"
DestinationFile="$(ProjectDir)package\thunderstore\$(SolutionName).zip"
Overwrite="true"/>
</Target>
<Target Name="CopyDLLPlugins" AfterTargets="CopyDLLThunderstore">
<Copy SourceFiles="$(TargetDir)\thunderstore\$(TargetFileName)" DestinationFolder="D:\r2modman\Valheim\profiles\beta\BepInEx\plugins\shudnal-$(SolutionName)\" />
<Message Text="Copied to r2 folder." Importance="High" />
</Target>
</Project>