forked from WireGuard/wireguard-nt
-
Notifications
You must be signed in to change notification settings - Fork 0
/
wireguard-nt.proj
96 lines (90 loc) · 4.96 KB
/
wireguard-nt.proj
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
<?xml version="1.0" encoding="utf-8"?>
<!--
SPDX-License-Identifier: GPL-2.0
Copyright (C) 2018-2021 WireGuard LLC. All Rights Reserved.
-->
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" DefaultTargets="Build">
<PropertyGroup>
<Configuration Condition="'$(Configuration)'==''">Release</Configuration>
</PropertyGroup>
<!--
General Properties
-->
<Import Project="wireguard-nt.props" />
<Import Project="wireguard-nt.props.user" Condition="exists('wireguard-nt.props.user')" />
<Target Name="Driver" DependsOnTargets="Driver-x86;Driver-amd64;Driver-arm64" />
<Target Name="Dll" DependsOnTargets="Dll-x86;Dll-amd64;Dll-arm64" />
<Target Name="Clean">
<RemoveDir Directories="$(Configuration)\amd64\" />
<RemoveDir Directories="$(Configuration)\arm\" />
<RemoveDir Directories="$(Configuration)\arm64\" />
<RemoveDir Directories="$(Configuration)\x86\" />
<RemoveDir Directories="dist\" />
</Target>
<Target Name="Driver-x86"
Outputs="$(Configuration)\x86\driver\wireguard.sys;$(Configuration)\x86\driver\wireguard.inf;$(Configuration)\x86\driver\wireguard.cat">
<MSBuild Projects="driver\driver.vcxproj" Targets="Build" Properties="Configuration=$(Configuration);Platform=Win32" />
</Target>
<Target Name="Driver-amd64"
Outputs="$(Configuration)\amd64\driver\wireguard.sys;$(Configuration)\amd64\driver\wireguard.inf;$(Configuration)\amd64\driver\wireguard.cat">
<MSBuild Projects="driver\driver.vcxproj" Targets="Build" Properties="Configuration=$(Configuration);Platform=x64" />
</Target>
<Target Name="Driver-arm"
Outputs="$(Configuration)\arm\driver\wireguard.sys;$(Configuration)\arm\driver\wireguard.inf;$(Configuration)\arm\driver\wireguard.cat">
<MSBuild Projects="driver\driver.vcxproj" Targets="Build" Properties="Configuration=$(Configuration);Platform=ARM" />
</Target>
<Target Name="Driver-arm64"
Outputs="$(Configuration)\arm64\driver\wireguard.sys;$(Configuration)\arm64\driver\wireguard.inf;$(Configuration)\arm64\driver\wireguard.cat">
<MSBuild Projects="driver\driver.vcxproj" Targets="Build" Properties="Configuration=$(Configuration);Platform=ARM64" />
</Target>
<!--
wireguard.dll Building
-->
<Target Name="Dll-x86"
Outputs="$(Configuration)\x86\wireguard.dll"
DependsOnTargets="Dll-amd64;Dll-arm64">
<MSBuild Projects="setupapihost\setupapihost.vcxproj;api\api.vcxproj" Targets="Build" Properties="Configuration=$(Configuration);Platform=Win32" />
</Target>
<Target Name="Dll-amd64"
Outputs="$(Configuration)\amd64\wireguard.dll"
DependsOnTargets="Dll-arm64">
<MSBuild Projects="setupapihost\setupapihost.vcxproj;api\api.vcxproj" Targets="Build" Properties="Configuration=$(Configuration);Platform=x64" />
</Target>
<Target Name="Dll-arm"
Outputs="$(Configuration)\arm\wireguard.dll"
DependsOnTargets="Dll-arm64">
<MSBuild Projects="setupapihost\setupapihost.vcxproj;api\api.vcxproj" Targets="Build" Properties="Configuration=$(Configuration);Platform=ARM" />
</Target>
<Target Name="Dll-arm64"
Outputs="$(Configuration)\arm64\wireguard.dll">
<MSBuild Projects="setupapihost\setupapihost.vcxproj;api\api.vcxproj" Targets="Build" Properties="Configuration=$(Configuration);Platform=ARM64" />
</Target>
<!--
Zip Building
-->
<PropertyGroup>
<ZipTargetPath>dist\wireguard-nt-$(WireGuardVersion).zip</ZipTargetPath>
<ZipIntDir>dist\zip-intermediate\</ZipIntDir>
</PropertyGroup>
<ItemGroup>
<ZipFilesSrc Include="prebuilt-binaries-license.txt" /><ZipFilesDst Include="$(ZipIntDir)wireguard-nt\LICENSE.txt" />
<ZipFilesSrc Include="README.md" /><ZipFilesDst Include="$(ZipIntDir)wireguard-nt\README.md" />
<ZipFilesSrc Include="api\wireguard.h" /><ZipFilesDst Include="$(ZipIntDir)wireguard-nt\include\wireguard.h" />
<ZipFilesSrc Include="$(Configuration)\amd64\wireguard.dll" /><ZipFilesDst Include="$(ZipIntDir)wireguard-nt\bin\amd64\wireguard.dll" />
<ZipFilesSrc Include="$(Configuration)\arm64\wireguard.dll" /><ZipFilesDst Include="$(ZipIntDir)wireguard-nt\bin\arm64\wireguard.dll" />
<ZipFilesSrc Include="$(Configuration)\x86\wireguard.dll" /><ZipFilesDst Include="$(ZipIntDir)wireguard-nt\bin\x86\wireguard.dll" />
</ItemGroup>
<Target Name="Zip"
Inputs="@(ZipFilesSrc)"
Outputs="$(ZipTargetPath)"
DependsOnTargets="Dll">
<RemoveDir Directories="$(ZipIntDir)" />
<Copy SourceFiles="@(ZipFilesSrc)" DestinationFiles="@(ZipFilesDst)" />
<ZipDirectory DestinationFile="$(ZipTargetPath)" Overwrite="true" SourceDirectory="$(ZipIntDir)" />
<RemoveDir Directories="$(ZipIntDir)" />
<GetFileHash Files="$(ZipTargetPath)" Algorithm="SHA256" HashEncoding="hex">
<Output TaskParameter="Items" ItemName="InstallerLibraryHash" />
</GetFileHash>
<Message Text="SHA256("$(ZipTargetPath)") = @(InstallerLibraryHash->Metadata('FileHash')->ToLower())"/>
</Target>
</Project>