-
Notifications
You must be signed in to change notification settings - Fork 4
/
Hi3Helper.EncTool.csproj
74 lines (63 loc) · 3.78 KB
/
Hi3Helper.EncTool.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
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net8.0</TargetFrameworks>
<Platforms>x64</Platforms>
<Configurations>Debug;Release</Configurations>
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
<IsTrimmable>true</IsTrimmable>
<DebugType>portable</DebugType>
<!-- Assembly Info Properties -->
<AssemblyName>Hi3Helper.EncTool</AssemblyName>
<ProductName>Hi3Helper.EncTool</ProductName>
<Product>Hi3Helper.EncTool</Product>
<Description>Data parsing tools used in Collapse project</Description>
<Company>Collapse Launcher Team</Company>
<Authors>$(Company). neon-nyan, Cry0, bagusnl, shatyuka, gablm.</Authors>
<Copyright>Copyright 2022-2024 $(Company)</Copyright>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Optimize>False</Optimize>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Optimize>True</Optimize>
<DebugType>none</DebugType>
</PropertyGroup>
<ItemGroup>
<None Remove="UABT\.git" />
<None Remove="UABT\.gitattributes" />
<None Remove="UABT\.gitignore" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Google.Protobuf" Version="3.28.1" />
<PackageReference Include="Google.Protobuf.Tools" Version="3.28.1">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="System.IO.Hashing" Version="8.0.0" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Hi3Helper.Http\Hi3Helper.Http.csproj" />
</ItemGroup>
<!--
Generate C# code from proto when it changed
https://stackoverflow.com/questions/58385978/invoking-tool-in-a-nuget-package-with-generator-getting-unexpected-was-not-f
-->
<Target Name="GenerateProto-Genshin-Gateway" Inputs="$(ProjectDir)Parser\Proto\GenshinGateway.proto" Outputs="$(ProjectDir)Parser\Proto\src\GenshinGateway.cs" BeforeTargets="BeforeBuild">
<Message Text="Generating Genshin gateway proto code..." Importance="high" />
<Exec Command=""$(NugetPackageRoot)\google.protobuf.tools\3.28.1\tools\windows_x64\protoc.exe" --proto_path="$(ProjectDir)Parser\Proto" --csharp_out="$(ProjectDir)Parser\Proto\src" "$(ProjectDir)Parser\Proto\GenshinGateway.proto"" />
</Target>
<Target Name="GenerateProto-StarRail-Gateway" Inputs="$(ProjectDir)Parser\Proto\StarRailGateway.proto" Outputs="$(ProjectDir)Parser\Proto\src\StarRailGateway.cs" BeforeTargets="BeforeBuild">
<Message Text="Generating StarRail gateway proto code..." Importance="high" />
<Exec Command=""$(NugetPackageRoot)\google.protobuf.tools\3.28.1\tools\windows_x64\protoc.exe" --proto_path="$(ProjectDir)Parser\Proto" --csharp_out="$(ProjectDir)Parser\Proto\src" "$(ProjectDir)Parser\Proto\StarRailGateway.proto"" />
</Target>
<Target Name="GenerateProto-StarRail-Dispatch" Inputs="$(ProjectDir)Parser\Proto\StarRailDispatch.proto" Outputs="$(ProjectDir)Parser\Proto\src\StarRailDispatch.cs" BeforeTargets="BeforeBuild">
<Message Text="Generating StarRail dispatch proto code..." Importance="high" />
<Exec Command=""$(NugetPackageRoot)\google.protobuf.tools\3.28.1\tools\windows_x64\protoc.exe" --proto_path="$(ProjectDir)Parser\Proto" --csharp_out="$(ProjectDir)Parser\Proto\src" "$(ProjectDir)Parser\Proto\StarRailDispatch.proto"" />
</Target>
<Target Name="PreCompile" BeforeTargets="Compile">
<CallTarget Targets="GenerateProto-Genshin-Gateway" />
<CallTarget Targets="GenerateProto-StarRail-Gateway" />
<CallTarget Targets="GenerateProto-StarRail-Dispatch" />
<Message Text="PreCompile target has finished running." Importance="high" />
</Target>
</Project>