2019-07-31 13:52:20 +02:00
|
|
|
<?xml version="1.0" encoding="utf-8"?>
|
2019-04-19 15:24:39 +02:00
|
|
|
<!--
|
2019-07-22 09:36:21 +02:00
|
|
|
SPDX-License-Identifier: GPL-2.0
|
2019-04-19 15:24:39 +02:00
|
|
|
|
|
|
|
Copyright (C) 2019 WireGuard LLC. All Rights Reserved.
|
|
|
|
-->
|
2019-04-23 13:28:03 +02:00
|
|
|
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" DefaultTargets="Build">
|
2020-10-24 06:28:10 +02:00
|
|
|
<PropertyGroup>
|
|
|
|
<Configuration Condition="'$(Configuration)'==''">Release</Configuration>
|
|
|
|
</PropertyGroup>
|
2019-04-19 15:24:39 +02:00
|
|
|
|
|
|
|
<!--
|
|
|
|
General Properties
|
|
|
|
-->
|
2019-08-02 13:21:15 +02:00
|
|
|
<Import Project="wintun.props" />
|
2021-07-28 13:50:40 +02:00
|
|
|
<Import Project="wintun.props.user" Condition="exists('wintun.props.user')" />
|
2019-04-19 15:24:39 +02:00
|
|
|
|
2021-07-28 13:50:40 +02:00
|
|
|
<Target Name="Driver" DependsOnTargets="Driver-x86;Driver-amd64;Driver-arm;Driver-arm64" />
|
|
|
|
<Target Name="Dll" DependsOnTargets="Dll-x86;Dll-amd64;Dll-arm;Dll-arm64" />
|
2019-04-19 15:24:39 +02:00
|
|
|
<Target Name="Clean">
|
2020-10-24 06:28:10 +02:00
|
|
|
<RemoveDir Directories="$(Configuration)\amd64\" />
|
|
|
|
<RemoveDir Directories="$(Configuration)\arm\" />
|
|
|
|
<RemoveDir Directories="$(Configuration)\arm64\" />
|
|
|
|
<RemoveDir Directories="$(Configuration)\x86\" />
|
2020-11-06 07:29:25 +01:00
|
|
|
<RemoveDir Directories="driver\sdv\;dist\" />
|
|
|
|
<Delete Files="driver\smvbuild.log;driver\smvstats.txt;driver\wintun.DVL.XML" />
|
2019-04-19 15:24:39 +02:00
|
|
|
</Target>
|
|
|
|
|
|
|
|
<!--
|
|
|
|
Driver Building
|
|
|
|
Note: Use explicit Inputs/Outputs as WindowsDriver.Common.targets triggers driver re-packaging and signing on every invocation.
|
|
|
|
-->
|
2019-07-31 13:52:20 +02:00
|
|
|
<PropertyGroup>
|
2020-11-06 07:29:25 +01:00
|
|
|
<DriverInputs>driver\undocumented.h;driver\wintun.c;driver\wintun.inf;wintun.props;driver\wintun.rc;driver\driver.vcxproj;$(DriverInputs)</DriverInputs>
|
2019-07-31 13:52:20 +02:00
|
|
|
</PropertyGroup>
|
2019-04-23 13:19:27 +02:00
|
|
|
<Target Name="Driver-x86"
|
2021-07-28 13:50:40 +02:00
|
|
|
Outputs="$(Configuration)\x86\driver\wintun.sys;$(Configuration)\x86\driver\wintun.inf;$(Configuration)\x86\driver\wintun.cat"
|
2019-07-31 13:52:20 +02:00
|
|
|
Inputs="$(DriverInputs)">
|
2020-11-06 07:29:25 +01:00
|
|
|
<MSBuild Projects="driver\driver.vcxproj" Targets="Build" Properties="Configuration=$(Configuration);Platform=Win32" />
|
2019-04-23 13:19:27 +02:00
|
|
|
</Target>
|
|
|
|
<Target Name="Driver-amd64"
|
2021-07-28 13:50:40 +02:00
|
|
|
Outputs="$(Configuration)\amd64\driver\wintun.sys;$(Configuration)\amd64\driver\wintun.inf;$(Configuration)\amd64\driver\wintun.cat"
|
2019-07-31 13:52:20 +02:00
|
|
|
Inputs="$(DriverInputs)">
|
2020-11-06 07:29:25 +01:00
|
|
|
<MSBuild Projects="driver\driver.vcxproj" Targets="Build" Properties="Configuration=$(Configuration);Platform=x64" />
|
2019-04-23 13:19:27 +02:00
|
|
|
</Target>
|
2020-10-30 08:07:46 +01:00
|
|
|
<Target Name="Driver-arm"
|
2021-07-28 13:50:40 +02:00
|
|
|
Outputs="$(Configuration)\arm\driver\wintun.sys;$(Configuration)\arm\driver\wintun.inf;$(Configuration)\arm\driver\wintun.cat"
|
2020-10-30 08:07:46 +01:00
|
|
|
Inputs="$(DriverInputs)">
|
2020-11-06 07:29:25 +01:00
|
|
|
<MSBuild Projects="driver\driver.vcxproj" Targets="Build" Properties="Configuration=$(Configuration);Platform=ARM" />
|
2020-10-30 08:07:46 +01:00
|
|
|
</Target>
|
2019-04-23 13:19:27 +02:00
|
|
|
<Target Name="Driver-arm64"
|
2021-07-28 13:50:40 +02:00
|
|
|
Outputs="$(Configuration)\arm64\driver\wintun.sys;$(Configuration)\arm64\driver\wintun.inf;$(Configuration)\arm64\driver\wintun.cat"
|
2019-07-31 13:52:20 +02:00
|
|
|
Inputs="$(DriverInputs)">
|
2020-11-06 07:29:25 +01:00
|
|
|
<MSBuild Projects="driver\driver.vcxproj" Targets="Build" Properties="Configuration=$(Configuration);Platform=ARM64" />
|
2019-04-19 15:24:39 +02:00
|
|
|
</Target>
|
|
|
|
|
|
|
|
<!--
|
|
|
|
Static Driver Verifier
|
|
|
|
-->
|
2021-07-12 18:44:32 +02:00
|
|
|
<Target Name="SDV" Outputs="driver\sdv\SDV.DVL.xml">
|
2020-11-06 07:29:25 +01:00
|
|
|
<Exec WorkingDirectory="driver" Command="msbuild.exe driver.vcxproj /t:sdv /p:Inputs=/check:*;Configuration=$(Configuration);Platform=x64 /nologo" />
|
2019-04-19 15:24:39 +02:00
|
|
|
</Target>
|
2019-07-31 13:53:37 +02:00
|
|
|
<Target Name="SDVView">
|
2020-11-06 07:29:25 +01:00
|
|
|
<Exec WorkingDirectory="driver" Command="msbuild.exe driver.vcxproj /t:sdv /p:Inputs=/view;Configuration=$(Configuration);Platform=x64 /nologo" />
|
2019-07-31 13:53:37 +02:00
|
|
|
</Target>
|
2019-07-31 13:51:35 +02:00
|
|
|
|
2019-04-19 15:24:39 +02:00
|
|
|
<!--
|
|
|
|
Driver Verification Log
|
|
|
|
-->
|
2019-04-23 13:28:03 +02:00
|
|
|
<Target Name="DVL" DependsOnTargets="SDV"
|
2020-11-06 07:29:25 +01:00
|
|
|
Outputs="driver\wintun.DVL.XML"
|
2021-07-12 18:44:32 +02:00
|
|
|
Inputs="driver\sdv\SDV.DVL.xml">
|
|
|
|
<MSBuild Projects="driver\driver.vcxproj" Targets="Build" Properties="Configuration=$(Configuration);Platform=x64;RunCodeAnalysis=true" />
|
2020-11-06 07:29:25 +01:00
|
|
|
<Exec WorkingDirectory="driver" Command="msbuild.exe driver.vcxproj /t:dvl /p:Configuration=$(Configuration);Platform=x64 /nologo" />
|
2019-04-19 15:24:39 +02:00
|
|
|
</Target>
|
|
|
|
|
|
|
|
<!--
|
2020-10-17 15:44:47 +02:00
|
|
|
wintun.dll Building
|
2019-04-19 15:24:39 +02:00
|
|
|
-->
|
2020-10-17 15:44:47 +02:00
|
|
|
<Target Name="Dll-x86"
|
2020-10-24 06:28:10 +02:00
|
|
|
Outputs="$(Configuration)\x86\wintun.dll"
|
2020-10-17 15:44:47 +02:00
|
|
|
DependsOnTargets="Dll-amd64;Dll-arm64">
|
2021-08-02 01:05:02 +02:00
|
|
|
<MSBuild Projects="downlevelshim\downlevelshim.vcxproj;api\api.vcxproj" Targets="Build" Properties="Configuration=$(Configuration);Platform=Win32" />
|
2019-04-23 13:19:27 +02:00
|
|
|
</Target>
|
2020-10-17 15:44:47 +02:00
|
|
|
<Target Name="Dll-amd64"
|
2020-11-05 16:34:00 +01:00
|
|
|
Outputs="$(Configuration)\amd64\wintun.dll"
|
|
|
|
DependsOnTargets="Dll-arm64">
|
2021-08-02 01:05:02 +02:00
|
|
|
<MSBuild Projects="downlevelshim\downlevelshim.vcxproj;api\api.vcxproj" Targets="Build" Properties="Configuration=$(Configuration);Platform=x64" />
|
2019-08-05 13:32:03 +02:00
|
|
|
</Target>
|
2020-10-17 15:44:47 +02:00
|
|
|
<Target Name="Dll-arm"
|
2020-10-24 06:28:10 +02:00
|
|
|
Outputs="$(Configuration)\arm\wintun.dll"
|
2020-10-17 15:44:47 +02:00
|
|
|
DependsOnTargets="Dll-arm64">
|
2021-08-02 01:05:02 +02:00
|
|
|
<MSBuild Projects="downlevelshim\downlevelshim.vcxproj;api\api.vcxproj" Targets="Build" Properties="Configuration=$(Configuration);Platform=ARM" />
|
2020-10-17 15:44:47 +02:00
|
|
|
</Target>
|
|
|
|
<Target Name="Dll-arm64"
|
2020-10-24 06:28:10 +02:00
|
|
|
Outputs="$(Configuration)\arm64\wintun.dll">
|
2021-08-02 01:05:02 +02:00
|
|
|
<MSBuild Projects="downlevelshim\downlevelshim.vcxproj;api\api.vcxproj" Targets="Build" Properties="Configuration=$(Configuration);Platform=ARM64" />
|
2020-10-17 15:44:47 +02:00
|
|
|
</Target>
|
|
|
|
|
|
|
|
<!--
|
|
|
|
Zip Building
|
|
|
|
-->
|
|
|
|
<PropertyGroup>
|
2021-03-19 11:52:11 +01:00
|
|
|
<ZipTargetPath>dist\wintun-$(WintunVersion).zip</ZipTargetPath>
|
2021-07-28 13:50:40 +02:00
|
|
|
<ZipIntDir>dist\zip-intermediate\</ZipIntDir>
|
2020-10-17 15:44:47 +02:00
|
|
|
</PropertyGroup>
|
|
|
|
<ItemGroup>
|
2020-12-16 13:14:05 +01:00
|
|
|
<ZipFilesSrc Include="prebuilt-binaries-license.txt" /><ZipFilesDst Include="$(ZipIntDir)wintun\LICENSE.txt" />
|
2020-10-25 20:46:45 +01:00
|
|
|
<ZipFilesSrc Include="README.md" /><ZipFilesDst Include="$(ZipIntDir)wintun\README.md" />
|
|
|
|
<ZipFilesSrc Include="api\wintun.h" /><ZipFilesDst Include="$(ZipIntDir)wintun\include\wintun.h" />
|
|
|
|
<ZipFilesSrc Include="$(Configuration)\amd64\wintun.dll" /><ZipFilesDst Include="$(ZipIntDir)wintun\bin\amd64\wintun.dll" />
|
|
|
|
<ZipFilesSrc Include="$(Configuration)\arm\wintun.dll" /><ZipFilesDst Include="$(ZipIntDir)wintun\bin\arm\wintun.dll" />
|
|
|
|
<ZipFilesSrc Include="$(Configuration)\arm64\wintun.dll" /><ZipFilesDst Include="$(ZipIntDir)wintun\bin\arm64\wintun.dll" />
|
|
|
|
<ZipFilesSrc Include="$(Configuration)\x86\wintun.dll" /><ZipFilesDst Include="$(ZipIntDir)wintun\bin\x86\wintun.dll" />
|
2020-10-17 15:44:47 +02:00
|
|
|
</ItemGroup>
|
|
|
|
<Target Name="Zip"
|
|
|
|
Inputs="@(ZipFilesSrc)"
|
|
|
|
Outputs="$(ZipTargetPath)"
|
2021-07-28 13:50:40 +02:00
|
|
|
DependsOnTargets="Dll">
|
2020-10-17 15:44:47 +02:00
|
|
|
<RemoveDir Directories="$(ZipIntDir)" />
|
|
|
|
<Copy SourceFiles="@(ZipFilesSrc)" DestinationFiles="@(ZipFilesDst)" />
|
|
|
|
<ZipDirectory DestinationFile="$(ZipTargetPath)" Overwrite="true" SourceDirectory="$(ZipIntDir)" />
|
|
|
|
<RemoveDir Directories="$(ZipIntDir)" />
|
2020-10-23 22:12:18 +02:00
|
|
|
<GetFileHash Files="$(ZipTargetPath)" Algorithm="SHA256" HashEncoding="hex">
|
|
|
|
<Output TaskParameter="Items" ItemName="InstallerLibraryHash" />
|
|
|
|
</GetFileHash>
|
|
|
|
<Message Text="SHA256("$(ZipTargetPath)") = @(InstallerLibraryHash->Metadata('FileHash')->ToLower())"/>
|
2019-04-19 15:24:39 +02:00
|
|
|
</Target>
|
|
|
|
</Project>
|