-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathDirectory.Build.props
More file actions
98 lines (85 loc) · 4.1 KB
/
Directory.Build.props
File metadata and controls
98 lines (85 loc) · 4.1 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
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
87
88
89
90
91
92
93
94
95
96
97
98
<Project>
<PropertyGroup>
<!-- This is the master version, only change this one -->
<Version>3.4</Version>
<!-- Sets the 'Company' field on the dll file -->
<Authors>https://github.com/ManlyMarco/QuickAccessBox</Authors>
<!-- Sets the 'Copyright' field on the dll file -->
<Copyright>Copyright GPL-3.0 © 2019</Copyright>
<!-- Sets the 'Product name' field on the dll file -->
<Product>QuickAccessBox</Product>
<!-- Sets the 'File description' field on the dll file -->
<AssemblyTitle>Plugin for quickly searching through studio items in games by Illusion</AssemblyTitle>
<RootNamespace>KK_QuickAccessBox</RootNamespace>
<OutputPath>..\bin\$(MSBuildProjectName)\</OutputPath>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<OutputType>Library</OutputType>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<Deterministic>true</Deterministic>
<DebugSymbols>true</DebugSymbols>
<DebugType>embedded</DebugType>
<FileAlignment>512</FileAlignment>
<!-- NuGet packaging properties -->
<PackageId>$(AssemblyName)</PackageId>
<PackageVersion>$(Version)</PackageVersion>
<PackageDescription>$(AssemblyTitle)</PackageDescription>
<PackageProjectUrl>https://github.com/ManlyMarco/QuickAccessBox</PackageProjectUrl>
<PackageLicenseExpression>GPL-3.0-only</PackageLicenseExpression>
<PackageCopyright>$(Copyright)</PackageCopyright>
<Company>$(Authors)</Company>
<RepositoryUrl>https://github.com/ManlyMarco/QuickAccessBox</RepositoryUrl>
<RepositoryType>git</RepositoryType>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<Optimize>true</Optimize>
<GenerateDocumentationFile>True</GenerateDocumentationFile>
</PropertyGroup>
<ItemGroup>
<!-- Have to do this because you can't add a link in a shared project (it won't work even through props despite appearing in solution explorer) -->
<EmbeddedResource Include="..\Unity_project\Assets\Assetbundles\quick_access_box_interface" Link="UI\quick_access_box_interface" />
</ItemGroup>
<Target Name="PostBuild" AfterTargets="PostBuildEvent">
<Delete Files="$(OutputPath)\$(MSBuildProjectName).deps.json" />
</Target>
<Target Name="SkipAllRefs" AfterTargets="ResolveReferences">
<ItemGroup>
<ReferenceCopyLocalPaths Remove="@(ReferenceCopyLocalPaths)" />
</ItemGroup>
</Target>
<!-- 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)\*"/>
</ItemGroup>
<RemoveDir Directories="$(CopyDir)" />
<Copy DestinationFolder="$(CopyDir)\BepInEx\plugins" 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>