-
Notifications
You must be signed in to change notification settings - Fork 102
/
Copy pathDirectory.Build.props
68 lines (62 loc) · 2.87 KB
/
Directory.Build.props
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
<Project>
<PropertyGroup>
<!-- This is the master version, only change this one -->
<Version>6.0</Version>
<!-- Sets the 'Company' field on the dll file -->
<Authors>https://github.com/ManlyMarco/RuntimeUnityEditor</Authors>
<!-- Sets the 'Copyright' field on the dll file -->
<Copyright>Copyright GPL-3 © 2018</Copyright>
<!-- Sets the 'Product name' field on the dll file -->
<Product>RuntimeUnityEditor</Product>
<!-- Sets the 'File description' field on the dll file -->
<AssemblyTitle>In-game inspector and debugging tools for applications made with Unity3D game engine</AssemblyTitle>
<Deterministic>true</Deterministic>
<DebugSymbols>true</DebugSymbols>
<DebugType>embedded</DebugType>
<FileAlignment>512</FileAlignment>
</PropertyGroup>
<ItemGroup>
<None Include="..\LICENSE" Link="LICENSE" Visible="false">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="..\README.md" Link="README.md" Visible="false">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
<!-- Create a release zip file (after successful Release build) -->
<Target Name="CreateReleaseZip" AfterTargets="Build" Condition="'$(Configuration)' == 'Release'">
<PropertyGroup>
<CopyDir>$(OutputPath)\..\TEMP_COPY_$(AssemblyName)</CopyDir>
</PropertyGroup>
<ItemGroup>
<BuildFiles Include="$(OutputPath)\**\*" Exclude="**\*.tmp"/>
</ItemGroup>
<RemoveDir Directories="$(CopyDir)" />
<Copy DestinationFolder="$(CopyDir)\$(PluginSubDir)\%(RecursiveDir)" SourceFiles="@(BuildFiles)" />
<!-- https://learn.microsoft.com/en-us/visualstudio/msbuild/zipdirectory-task?view=vs-2022 -->
<ZipDirectory SourceDirectory="$(CopyDir)" DestinationFile="$(OutputPath)\..\$(AssemblyName)_v$(Version).zip" Overwrite="true" />
<RemoveDir Directories="$(CopyDir)" />
</Target>
<!-- Allow using of the csproj properties defined above in the code itself -->
<Target Name="AddGeneratedConstantsFile" BeforeTargets="BeforeCompile;CoreCompile" Inputs="$(MSBuildAllProjects)" Outputs="$(IntermediateOutputPath)GeneratedConstantsFile.cs">
<PropertyGroup>
<GeneratedText>
<![CDATA[namespace $(RootNamespace) {
internal static class Constants {
public const string Version = "$(Version)"%3B
public const string Name = "$(Product)"%3B
public const string Description = "$(AssemblyTitle)"%3B
public const string Website = "$(Authors)"%3B
public const string Copyright = "$(Copyright)"%3B
}
}]]>
</GeneratedText>
<GeneratedFilePath>$(IntermediateOutputPath)GeneratedConstantsFile.cs</GeneratedFilePath>
</PropertyGroup>
<ItemGroup>
<Compile Include="$(GeneratedFilePath)" />
<FileWrites Include="$(GeneratedFilePath)" />
</ItemGroup>
<WriteLinesToFile Lines="$(GeneratedText)" File="$(GeneratedFilePath)" WriteOnlyWhenDifferent="true" Overwrite="true" />
</Target>
</Project>