api: allow Debug build packaging

The ARM64 platform has no WHQL/Attestation driver available yet and the
Release build of the wintun.dll was explicitly designed to include WHQL/
Attn signed ARM64 driver only: There are no Windows on ARM64 before
Windows 10. This prevented alpha testing of the wintun.dll on ARM64.

Debug build includes EV signed ARM64 driver.

Signed-off-by: Simon Rozman <simon@rozman.si>
This commit is contained in:
Simon Rozman 2020-10-24 06:28:10 +02:00 committed by Jason A. Donenfeld
parent 10caab8813
commit 8fd98b6ca3

View File

@ -5,6 +5,9 @@
Copyright (C) 2019 WireGuard LLC. All Rights Reserved. Copyright (C) 2019 WireGuard LLC. All Rights Reserved.
--> -->
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" DefaultTargets="Build"> <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" DefaultTargets="Build">
<PropertyGroup>
<Configuration Condition="'$(Configuration)'==''">Release</Configuration>
</PropertyGroup>
<!-- <!--
General Properties General Properties
@ -14,10 +17,10 @@
<Target Name="Build" DependsOnTargets="Driver-x86;Driver-amd64;Driver-arm64" /> <Target Name="Build" DependsOnTargets="Driver-x86;Driver-amd64;Driver-arm64" />
<Target Name="Clean"> <Target Name="Clean">
<RemoveDir Directories="Release\amd64\" /> <RemoveDir Directories="$(Configuration)\amd64\" />
<RemoveDir Directories="Release\arm\" /> <RemoveDir Directories="$(Configuration)\arm\" />
<RemoveDir Directories="Release\arm64\" /> <RemoveDir Directories="$(Configuration)\arm64\" />
<RemoveDir Directories="Release\x86\" /> <RemoveDir Directories="$(Configuration)\x86\" />
<RemoveDir Directories="$(SDVDir)" /> <RemoveDir Directories="$(SDVDir)" />
<RemoveDir Directories="$(DistributionDir)" /> <RemoveDir Directories="$(DistributionDir)" />
<Delete Files="smvbuild.log;smvstats.txt;wintun.DVL.XML" /> <Delete Files="smvbuild.log;smvstats.txt;wintun.DVL.XML" />
@ -32,29 +35,29 @@
<DriverInputs>atomic.h;undocumented.h;wintun.c;wintun.inf;wintun.props;wintun.rc;wintun.vcxproj;$(DriverInputs)</DriverInputs> <DriverInputs>atomic.h;undocumented.h;wintun.c;wintun.inf;wintun.props;wintun.rc;wintun.vcxproj;$(DriverInputs)</DriverInputs>
</PropertyGroup> </PropertyGroup>
<Target Name="Driver-x86" <Target Name="Driver-x86"
Outputs="Release\x86\wintun\wintun.sys;Release\x86\wintun\wintun.inf;Release\x86\wintun\wintun.cat" Outputs="$(Configuration)\x86\wintun\wintun.sys;$(Configuration)\x86\wintun\wintun.inf;$(Configuration)\x86\wintun\wintun.cat"
Inputs="$(DriverInputs)"> Inputs="$(DriverInputs)">
<MSBuild Projects="wintun.vcxproj" Targets="Build" Properties="Configuration=Release;Platform=Win32" /> <MSBuild Projects="wintun.vcxproj" Targets="Build" Properties="Configuration=$(Configuration);Platform=Win32" />
</Target> </Target>
<Target Name="Driver-amd64" <Target Name="Driver-amd64"
Outputs="Release\amd64\wintun\wintun.sys;Release\amd64\wintun\wintun.inf;Release\amd64\wintun\wintun.cat" Outputs="$(Configuration)\amd64\wintun\wintun.sys;$(Configuration)\amd64\wintun\wintun.inf;$(Configuration)\amd64\wintun\wintun.cat"
Inputs="$(DriverInputs)"> Inputs="$(DriverInputs)">
<MSBuild Projects="wintun.vcxproj" Targets="Build" Properties="Configuration=Release;Platform=x64" /> <MSBuild Projects="wintun.vcxproj" Targets="Build" Properties="Configuration=$(Configuration);Platform=x64" />
</Target> </Target>
<Target Name="Driver-arm64" <Target Name="Driver-arm64"
Outputs="Release\arm64\wintun\wintun.sys;Release\arm64\wintun\wintun.inf;Release\arm64\wintun\wintun.cat" Outputs="$(Configuration)\arm64\wintun\wintun.sys;$(Configuration)\arm64\wintun\wintun.inf;$(Configuration)\arm64\wintun\wintun.cat"
Inputs="$(DriverInputs)"> Inputs="$(DriverInputs)">
<MSBuild Projects="wintun.vcxproj" Targets="Build" Properties="Configuration=Release;Platform=ARM64" /> <MSBuild Projects="wintun.vcxproj" Targets="Build" Properties="Configuration=$(Configuration);Platform=ARM64" />
</Target> </Target>
<!-- <!--
Static Driver Verifier Static Driver Verifier
--> -->
<Target Name="SDV" Outputs="$(SDVDir)SDV.DVL.xml;Release\amd64\vc.nativecodeanalysis.all.xml"> <Target Name="SDV" Outputs="$(SDVDir)SDV.DVL.xml;$(Configuration)\amd64\vc.nativecodeanalysis.all.xml">
<MSBuild Projects="wintun.vcxproj" Targets="sdv" Properties="Inputs=/check:*;Configuration=Release;Platform=x64" /> <MSBuild Projects="wintun.vcxproj" Targets="sdv" Properties="Inputs=/check:*;Configuration=$(Configuration);Platform=x64" />
</Target> </Target>
<Target Name="SDVView"> <Target Name="SDVView">
<MSBuild Projects="wintun.vcxproj" Targets="sdv" Properties="Inputs=/view;Configuration=Release;Platform=x64" /> <MSBuild Projects="wintun.vcxproj" Targets="sdv" Properties="Inputs=/view;Configuration=$(Configuration);Platform=x64" />
</Target> </Target>
<!-- <!--
@ -62,30 +65,30 @@
--> -->
<Target Name="DVL" DependsOnTargets="SDV" <Target Name="DVL" DependsOnTargets="SDV"
Outputs="wintun.DVL.XML" Outputs="wintun.DVL.XML"
Inputs="$(SDVDir)SDV.DVL.xml;Release\amd64\vc.nativecodeanalysis.all.xml"> Inputs="$(SDVDir)SDV.DVL.xml;$(Configuration)\amd64\vc.nativecodeanalysis.all.xml">
<MSBuild Projects="wintun.vcxproj" Targets="dvl" Properties="Configuration=Release;Platform=x64" /> <MSBuild Projects="wintun.vcxproj" Targets="dvl" Properties="Configuration=$(Configuration);Platform=x64" />
</Target> </Target>
<!-- <!--
wintun.dll Building wintun.dll Building
--> -->
<Target Name="Dll-x86" <Target Name="Dll-x86"
Outputs="Release\x86\wintun.dll" Outputs="$(Configuration)\x86\wintun.dll"
DependsOnTargets="Dll-amd64;Dll-arm64"> DependsOnTargets="Dll-amd64;Dll-arm64">
<MSBuild Projects="api\api.vcxproj" Targets="Build" Properties="Configuration=Release;Platform=Win32" /> <MSBuild Projects="api\api.vcxproj" Targets="Build" Properties="Configuration=$(Configuration);Platform=Win32" />
</Target> </Target>
<Target Name="Dll-amd64" <Target Name="Dll-amd64"
Outputs="Release\amd64\wintun.dll"> Outputs="$(Configuration)\amd64\wintun.dll">
<MSBuild Projects="api\api.vcxproj" Targets="Build" Properties="Configuration=Release;Platform=x64" /> <MSBuild Projects="api\api.vcxproj" Targets="Build" Properties="Configuration=$(Configuration);Platform=x64" />
</Target> </Target>
<Target Name="Dll-arm" <Target Name="Dll-arm"
Outputs="Release\arm\wintun.dll" Outputs="$(Configuration)\arm\wintun.dll"
DependsOnTargets="Dll-arm64"> DependsOnTargets="Dll-arm64">
<MSBuild Projects="api\api.vcxproj" Targets="Build" Properties="Configuration=Release;Platform=ARM" /> <MSBuild Projects="api\api.vcxproj" Targets="Build" Properties="Configuration=$(Configuration);Platform=ARM" />
</Target> </Target>
<Target Name="Dll-arm64" <Target Name="Dll-arm64"
Outputs="Release\arm64\wintun.dll"> Outputs="$(Configuration)\arm64\wintun.dll">
<MSBuild Projects="api\api.vcxproj" Targets="Build" Properties="Configuration=Release;Platform=ARM64" /> <MSBuild Projects="api\api.vcxproj" Targets="Build" Properties="Configuration=$(Configuration);Platform=ARM64" />
</Target> </Target>
<!-- <!--
@ -96,13 +99,13 @@
<ZipIntDir>$(DistributionDir).tmp\</ZipIntDir> <ZipIntDir>$(DistributionDir).tmp\</ZipIntDir>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<ZipFilesSrc Include="COPYING" /><ZipFilesDst Include="$(ZipIntDir)COPYING" /> <ZipFilesSrc Include="COPYING" /><ZipFilesDst Include="$(ZipIntDir)COPYING" />
<ZipFilesSrc Include="README.md" /><ZipFilesDst Include="$(ZipIntDir)README.md" /> <ZipFilesSrc Include="README.md" /><ZipFilesDst Include="$(ZipIntDir)README.md" />
<ZipFilesSrc Include="api\wintun.h" /><ZipFilesDst Include="$(ZipIntDir)include\wintun.h" /> <ZipFilesSrc Include="api\wintun.h" /><ZipFilesDst Include="$(ZipIntDir)include\wintun.h" />
<ZipFilesSrc Include="Release\amd64\wintun.dll" /><ZipFilesDst Include="$(ZipIntDir)bin\amd64\wintun.dll" /> <ZipFilesSrc Include="$(Configuration)\amd64\wintun.dll" /><ZipFilesDst Include="$(ZipIntDir)bin\amd64\wintun.dll" />
<ZipFilesSrc Include="Release\arm\wintun.dll" /><ZipFilesDst Include="$(ZipIntDir)bin\arm\wintun.dll" /> <ZipFilesSrc Include="$(Configuration)\arm\wintun.dll" /><ZipFilesDst Include="$(ZipIntDir)bin\arm\wintun.dll" />
<ZipFilesSrc Include="Release\arm64\wintun.dll" /><ZipFilesDst Include="$(ZipIntDir)bin\arm64\wintun.dll" /> <ZipFilesSrc Include="$(Configuration)\arm64\wintun.dll" /><ZipFilesDst Include="$(ZipIntDir)bin\arm64\wintun.dll" />
<ZipFilesSrc Include="Release\x86\wintun.dll" /><ZipFilesDst Include="$(ZipIntDir)bin\x86\wintun.dll" /> <ZipFilesSrc Include="$(Configuration)\x86\wintun.dll" /><ZipFilesDst Include="$(ZipIntDir)bin\x86\wintun.dll" />
</ItemGroup> </ItemGroup>
<Target Name="Zip" <Target Name="Zip"
Inputs="@(ZipFilesSrc)" Inputs="@(ZipFilesSrc)"