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
|
|
|
|
2021-08-02 03:36:50 +02:00
|
|
|
Copyright (C) 2018-2021 WireGuard LLC. All Rights Reserved.
|
2019-04-19 15:24:39 +02:00
|
|
|
-->
|
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\" />
|
2021-10-11 13:26:09 +02:00
|
|
|
<RemoveDir Directories="dist\" />
|
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>
|
|
|
|
|
|
|
|
<!--
|
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-10-13 19:33:06 +02:00
|
|
|
<MSBuild Projects="setupapihost\setupapihost.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-10-13 19:33:06 +02:00
|
|
|
<MSBuild Projects="setupapihost\setupapihost.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-10-13 19:33:06 +02:00
|
|
|
<MSBuild Projects="setupapihost\setupapihost.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-10-13 19:33:06 +02:00
|
|
|
<MSBuild Projects="setupapihost\setupapihost.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>
|