-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathVisualPinball.Engine.Mpf.csproj
76 lines (66 loc) · 3.32 KB
/
VisualPinball.Engine.Mpf.csproj
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
<!--
Run 'dotnet build -c Release' in the directory with this file to install NuGet dependencies and
recompile the Protobuf interface.
-->
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.1</TargetFramework>
<AssemblyVersion>0.1.0.0</AssemblyVersion>
<AppendRuntimeIdentifierToOutputPath>false</AppendRuntimeIdentifierToOutputPath>
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
<LangVersion>9.0</LangVersion>
</PropertyGroup>
<!-- Exclude all C# code. It should be compiled by Unity.-->
<ItemGroup>
<Compile Remove="**/*.cs" />
</ItemGroup>
<PropertyGroup>
<InstallYetAnotherHttpHandler Condition="'$(InstallYetAnotherHttpHandler)' == ''">true</InstallYetAnotherHttpHandler>
</PropertyGroup>
<!-- Specify what version (commit tag) of YetAnotherHttpHandler to install-->
<PropertyGroup Condition="'$(YetAnotherHttpHandlerVersion)' == ''">
<YetAnotherHttpHandlerVersion>1.10.0</YetAnotherHttpHandlerVersion>
</PropertyGroup>
<!-- Specify NuGet dependencies -->
<ItemGroup>
<PackageReference Include="Grpc.Tools" Version="2.69.0 ">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
<PackageReference Include="Grpc.Net.Client" Version="2.67.0" />
<PackageReference Include="Google.Protobuf" Version="3.29.3" />
<PackageReference Include="System.IO.Pipelines" Version="7.0.0" />
<PackageReference Include="System.Runtime.CompilerServices.Unsafe" Version="6.0.0" />
</ItemGroup>
<!-- Configure proto compiler -->
<ItemGroup>
<Protobuf ProtoRoot="Runtime/GrpcInterface/" Include= "Runtime/GrpcInterface/*.proto" OutputDir="Runtime\GrpcInterface\Generated" GrpcServices="Client" />
</ItemGroup>
<!-- Copy NuGet binaries to 'Plugins'-->
<Target Name="CopyNuGetDependencies" AfterTargets="AfterBuild">
<ItemGroup>
<OutputFiles Include="$(OutDir)/*.*"/>
</ItemGroup>
<Copy SourceFiles="@(OutputFiles)" DestinationFolder="./Plugins" SkipUnchangedFiles="true"/>
</Target>
<!-- Delete build artifacts-->
<Target Name="DeleteBuildArtifacts" AfterTargets="AfterBuild" DependsOnTargets="CopyNuGetDependencies">
<ItemGroup>
<BuildArtifacts Include="./obj/"/>
<BuildArtifacts Include="./bin/"/>
</ItemGroup>
<RemoveDir Directories="@(BuildArtifacts)"/>
</Target>
<!-- Download YetAnotherHttpHandler from GitHub and copy into 'YetAnotherHttpHandler'-->
<Target Name="InstallYetAnotherHttpHandler" AfterTargets="AfterBuild" Condition="'$(InstallYetAnotherHttpHandler)' == 'true'">
<RemoveDir Directories="tmp"/>
<Exec Command="git clone --no-checkout --depth=1 --filter=tree:0 --branch $(YetAnotherHttpHandlerVersion) https://github.com/Cysharp/YetAnotherHttpHandler tmp" ConsoleToMSBuild="true"/>
<Exec Command="git sparse-checkout set --no-cone /src/YetAnotherHttpHandler" ConsoleToMSBuild="true" WorkingDirectory="tmp"/>
<Exec Command="git checkout $(YetAnotherHttpHandlerVersion)" ConsoleToMSBuild="true" WorkingDirectory="tmp"/>
<ItemGroup>
<PackageFiles Include="tmp/src/YetAnotherHttpHandler/**/*.*"/>
</ItemGroup>
<Copy SourceFiles="@(PackageFiles)" DestinationFolder="YetAnotherHttpHandler/%(RecursiveDir)"/>
<RemoveDir Directories="tmp;obj"/>
</Target>
</Project>