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" />
|
|
|
|
<Import Project="wintun.vcxproj.user" Condition="exists('wintun.vcxproj.user')" />
|
2019-04-19 15:24:39 +02:00
|
|
|
|
2019-08-02 13:21:15 +02:00
|
|
|
<Target Name="Build" DependsOnTargets="Driver-x86;Driver-amd64;Driver-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\" />
|
2019-08-02 13:21:15 +02:00
|
|
|
<RemoveDir Directories="$(SDVDir)" />
|
|
|
|
<RemoveDir Directories="$(DistributionDir)" />
|
|
|
|
<Delete Files="smvbuild.log;smvstats.txt;wintun.DVL.XML" />
|
2019-04-19 15:24:39 +02:00
|
|
|
</Target>
|
2019-08-02 13:21:15 +02:00
|
|
|
<Target Name="Rebuild" DependsOnTargets="Clean;Build" />
|
2019-04-19 15:24:39 +02:00
|
|
|
|
|
|
|
<!--
|
|
|
|
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>
|
|
|
|
<DriverInputs>atomic.h;undocumented.h;wintun.c;wintun.inf;wintun.props;wintun.rc;wintun.vcxproj;$(DriverInputs)</DriverInputs>
|
|
|
|
</PropertyGroup>
|
2019-04-23 13:19:27 +02:00
|
|
|
<Target Name="Driver-x86"
|
2020-10-24 06:28:10 +02:00
|
|
|
Outputs="$(Configuration)\x86\wintun\wintun.sys;$(Configuration)\x86\wintun\wintun.inf;$(Configuration)\x86\wintun\wintun.cat"
|
2019-07-31 13:52:20 +02:00
|
|
|
Inputs="$(DriverInputs)">
|
2020-10-24 06:28:10 +02:00
|
|
|
<MSBuild Projects="wintun.vcxproj" Targets="Build" Properties="Configuration=$(Configuration);Platform=Win32" />
|
2019-04-23 13:19:27 +02:00
|
|
|
</Target>
|
|
|
|
<Target Name="Driver-amd64"
|
2020-10-24 06:28:10 +02:00
|
|
|
Outputs="$(Configuration)\amd64\wintun\wintun.sys;$(Configuration)\amd64\wintun\wintun.inf;$(Configuration)\amd64\wintun\wintun.cat"
|
2019-07-31 13:52:20 +02:00
|
|
|
Inputs="$(DriverInputs)">
|
2020-10-24 06:28:10 +02:00
|
|
|
<MSBuild Projects="wintun.vcxproj" Targets="Build" Properties="Configuration=$(Configuration);Platform=x64" />
|
2019-04-23 13:19:27 +02:00
|
|
|
</Target>
|
|
|
|
<Target Name="Driver-arm64"
|
2020-10-24 06:28:10 +02:00
|
|
|
Outputs="$(Configuration)\arm64\wintun\wintun.sys;$(Configuration)\arm64\wintun\wintun.inf;$(Configuration)\arm64\wintun\wintun.cat"
|
2019-07-31 13:52:20 +02:00
|
|
|
Inputs="$(DriverInputs)">
|
2020-10-24 06:28:10 +02:00
|
|
|
<MSBuild Projects="wintun.vcxproj" Targets="Build" Properties="Configuration=$(Configuration);Platform=ARM64" />
|
2019-04-19 15:24:39 +02:00
|
|
|
</Target>
|
|
|
|
|
|
|
|
<!--
|
|
|
|
Static Driver Verifier
|
|
|
|
-->
|
2020-10-24 06:28:10 +02:00
|
|
|
<Target Name="SDV" Outputs="$(SDVDir)SDV.DVL.xml;$(Configuration)\amd64\vc.nativecodeanalysis.all.xml">
|
|
|
|
<MSBuild Projects="wintun.vcxproj" Targets="sdv" Properties="Inputs=/check:*;Configuration=$(Configuration);Platform=x64" />
|
2019-04-19 15:24:39 +02:00
|
|
|
</Target>
|
2019-07-31 13:53:37 +02:00
|
|
|
<Target Name="SDVView">
|
2020-10-24 06:28:10 +02:00
|
|
|
<MSBuild Projects="wintun.vcxproj" Targets="sdv" Properties="Inputs=/view;Configuration=$(Configuration);Platform=x64" />
|
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"
|
2019-04-19 15:24:39 +02:00
|
|
|
Outputs="wintun.DVL.XML"
|
2020-10-24 06:28:10 +02:00
|
|
|
Inputs="$(SDVDir)SDV.DVL.xml;$(Configuration)\amd64\vc.nativecodeanalysis.all.xml">
|
|
|
|
<MSBuild Projects="wintun.vcxproj" Targets="dvl" Properties="Configuration=$(Configuration);Platform=x64" />
|
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">
|
2020-10-24 06:28:10 +02:00
|
|
|
<MSBuild Projects="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-10-24 06:28:10 +02:00
|
|
|
Outputs="$(Configuration)\amd64\wintun.dll">
|
|
|
|
<MSBuild Projects="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">
|
2020-10-24 06:28:10 +02:00
|
|
|
<MSBuild Projects="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">
|
|
|
|
<MSBuild Projects="api\api.vcxproj" Targets="Build" Properties="Configuration=$(Configuration);Platform=ARM64" />
|
2020-10-17 15:44:47 +02:00
|
|
|
</Target>
|
|
|
|
|
|
|
|
<!--
|
|
|
|
Zip Building
|
|
|
|
-->
|
|
|
|
<PropertyGroup>
|
|
|
|
<ZipTargetPath>$(DistributionDir)wintun-$(WintunVersionStr).zip</ZipTargetPath>
|
|
|
|
<ZipIntDir>$(DistributionDir).tmp\</ZipIntDir>
|
|
|
|
</PropertyGroup>
|
|
|
|
<ItemGroup>
|
2020-10-24 06:28:10 +02:00
|
|
|
<ZipFilesSrc Include="COPYING" /><ZipFilesDst Include="$(ZipIntDir)COPYING" />
|
|
|
|
<ZipFilesSrc Include="README.md" /><ZipFilesDst Include="$(ZipIntDir)README.md" />
|
|
|
|
<ZipFilesSrc Include="api\wintun.h" /><ZipFilesDst Include="$(ZipIntDir)include\wintun.h" />
|
|
|
|
<ZipFilesSrc Include="$(Configuration)\amd64\wintun.dll" /><ZipFilesDst Include="$(ZipIntDir)bin\amd64\wintun.dll" />
|
|
|
|
<ZipFilesSrc Include="$(Configuration)\arm\wintun.dll" /><ZipFilesDst Include="$(ZipIntDir)bin\arm\wintun.dll" />
|
|
|
|
<ZipFilesSrc Include="$(Configuration)\arm64\wintun.dll" /><ZipFilesDst Include="$(ZipIntDir)bin\arm64\wintun.dll" />
|
|
|
|
<ZipFilesSrc Include="$(Configuration)\x86\wintun.dll" /><ZipFilesDst Include="$(ZipIntDir)bin\x86\wintun.dll" />
|
2020-10-17 15:44:47 +02:00
|
|
|
</ItemGroup>
|
|
|
|
<Target Name="Zip"
|
|
|
|
Inputs="@(ZipFilesSrc)"
|
|
|
|
Outputs="$(ZipTargetPath)"
|
|
|
|
DependsOnTargets="Dll-x86;Dll-amd64;Dll-arm;Dll-arm64">
|
|
|
|
<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>
|