-
Notifications
You must be signed in to change notification settings - Fork 19
Expand file tree
/
Copy pathcommon-contentpatcher.targets
More file actions
34 lines (28 loc) · 1.54 KB
/
common-contentpatcher.targets
File metadata and controls
34 lines (28 loc) · 1.54 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
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<GameModsPath>$(GamePath)\Mods\$(AssemblyName)</GameModsPath>
<EnableModZip>false</EnableModZip>
</PropertyGroup>
<Target Name="DeployPack" AfterTargets="Build">
<Message Text="Running DeployPack target..." />
<ItemGroup>
<_ContentPatcherFiles Include="$(ProjectDir)ContentPatcher/**/*" />
</ItemGroup>
<Copy SourceFiles="@(_ContentPatcherFiles)" DestinationFiles="@(_ContentPatcherFiles->'$(GameModsPath)/$(AssemblyName) [CP]/%(RecursiveDir)%(Filename)%(Extension)')" />
</Target>
<Target Name="ZipPack" AfterTargets="DeployPack">
<Message Text="Running ZipPack target..." />
<ItemGroup>
<_ModFiles Include="$(GameModsPath)/**/*" />
<_FilesToDelete Include="$(GamePath)temp/$(AssemblyName)/$(AssemblyName)/$(AssemblyName)/config.json" />
</ItemGroup>
<Copy SourceFiles="@(_ModFiles)" DestinationFiles="@(_ModFiles->'$(GamePath)temp/$(AssemblyName)/$(AssemblyName)/%(RecursiveDir)%(Filename)%(Extension)')" />
<Delete Files="@(_FilesToDelete)" />
<!-- Use ZipDirectory after build. -->
<ZipDirectory DestinationFile="$(ModZipPath)/$(AssemblyName) $(Version).zip" SourceDirectory="$(GamePath)temp/$(AssemblyName)" Overwrite="True" />
<RemoveDir Directories="$(GamePath)temp" />
</Target>
<ItemGroup>
<SMAPIDependency Include="Pathoschild.ContentPatcher" Required="true" />
</ItemGroup>
</Project>