-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathDirectory.Build.targets
86 lines (69 loc) · 3.65 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Target Name="ClearGameFolderCopyLocal" AfterTargets="ResolveAssemblyReferences">
<ItemGroup>
<ReferenceCopyLocalPaths Remove="$(GameFolder)\*"/>
</ItemGroup>
</Target>
<Target Name="ILRepack" AfterTargets="Build" Condition=" '$(UseCommons)' == 'true' ">
<ItemGroup>
<InputAssemblies Include="$(OutputPath)\Commons.dll"/>
</ItemGroup>
<ILRepack
Parallel="true"
Internalize="true"
InputAssemblies="@(InputAssemblies)"
LibraryPath="@(GameFolder)"
TargetKind="SameAsPrimaryAssembly"
TargetPlatformVersion="v4"
OutputFile="$(OutputPath)\$(AssemblyName).dll"/>
</Target>
<Target Name="CopyArtifactsToInstallFolder" AfterTargets="ILRepack" Condition=" '$(AssemblyName)' != 'Commons' ">
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<InstallFolder>$(MSBuildThisFileDirectory)\Release\$(ProjectName)</InstallFolder>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<InstallFolder>$(ModFolder)\$(ProjectName)</InstallFolder>
</PropertyGroup>
<PropertyGroup>
<TempPublishFolder>$(ProjectDir)\publish</TempPublishFolder>
<UseArchivedVersions Condition="'$(UseArchivedVersions)' == ''">false</UseArchivedVersions>
<UseArchivedVersions Condition="'$(UseArchivedVersions)' != 'true'">false</UseArchivedVersions>
<SupportedContent Condition="'$(SupportedContent)' == ''">vanilla_id</SupportedContent>
<MinimumSupportedBuild Condition="'$(MinimumSupportedBuild)' == ''">466654</MinimumSupportedBuild>
<APIVersion Condition="'$(APIVersion)' == ''">0</APIVersion>
</PropertyGroup>
<ItemGroup>
<!--
<AnimFiles Include="$(ProjectDir)\anim\**\*.*" />
<WorldGenFiles Include="$(ProjectDir)\worldgen\**\*.*" />
<YamlFiles Include="$(ProjectDir)\*.yaml" />
-->
<PreviewFiles Include="$(ProjectDir)\preview.png" />
<YamlFiles Include="$(ProjectDir)\*.yaml"/>
<PoFiles Include="$(ProjectDir)\**\*.po"/>
</ItemGroup>
<!--
<Copy SourceFiles="@(PoFiles)" DestinationFiles="@(PoFiles->'$(TempPublishFolder)\strings\%(RecursiveDir)%(Filename)%(Extension)')"/>
-->
<Copy SourceFiles="@(PreviewFiles)"
DestinationFiles="@(PreviewFiles->'$(TempPublishFolder)\%(Filename)%(Extension)')"/>
<Copy SourceFiles="@(YamlFiles)"
DestinationFiles="@(YamlFiles->'$(TempPublishFolder)\%(Filename)%(Extension)')"/>
<Copy SourceFiles="@(PoFiles)"
DestinationFiles="@(PoFiles->'$(TempPublishFolder)\strings\%(Filename)%(Extension)')"/>
<Copy SourceFiles="$(TargetPath)" DestinationFiles="$(TempPublishFolder)\$(TargetFileName)"/>
<ModInfo InputFilePath="$(TempPublishFolder)"
OutputFilePath="$(InstallFolder)"
UseArchivedVersions="$(UseArchivedVersions)"
SupportedContent="$(SupportedContent)"
MinimumSupportedBuild="$(MinimumSupportedBuild)"
APIVersion="$(APIVersion)"
Version="v$(Version)"/>
<RemoveDir Directories="$(TempPublishFolder)"/>
<ItemGroup>
<DirtyFiles Include="$(InstallFolder)\**\.DS_Store"/>
</ItemGroup>
<Delete Files="@(DirtyFiles)"/>
</Target>
</Project>