wintun/wintun.props
Simon Rozman a6fa9c1b67 project: add support for intermediate versioning
While the Wintun driver is typically released only at <major>.<minor>
milestones, the wintun.dll did see some intermediate releases.

To make MSI logic correctly decide to upgrade local wintun.dll file, the
version inscribed in wintun.dll file resources should increment in those
intermediate releases. MSI ignores file timestamps. One could use
REINSTALLMODE=emus Installer property to force copying wintun.dll when
its version doesn't change. But REINSTALLMODE applies to all files in
the MSI session and would be an additional requirement when authoring
MSI packages with wintun.dll.

Bumping only the final ZIP filename version is not sufficient.

Therefore, a <major>.<minor> or <major>.<minor>.<build> versioning is
introduced. Furthermore, we no longer distinguish between WintunVersion
and WintunVersionStr. All our releases used strictly numeric
<major>.<minor> notation, making WintunVersion and WintunVersionStr
always the same.

When the driver didn't change, just bump the version in wintun.proj and
run `msbuild wintun.proj /t:Zip` to rebuild the wintun.dll and make the
new ZIP file.

Signed-off-by: Simon Rozman <simon@rozman.si>
2021-03-19 11:52:11 +01:00

50 lines
2.4 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!--
SPDX-License-Identifier: GPL-2.0
Copyright (C) 2019 WireGuard LLC. All Rights Reserved.
-->
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<WintunVersionMaj>0</WintunVersionMaj>
<WintunVersionMin>10</WintunVersionMin>
<WintunVersionRel>2</WintunVersionRel>
<!-- Used for versioning, must be n.n[.n[.n]]. -->
<WintunVersion>$(WintunVersionMaj).$(WintunVersionMin)</WintunVersion>
<WintunVersion Condition="'$(WintunVersionRel)'!='0'">$(WintunVersion).$(WintunVersionRel)</WintunVersion>
<!-- .vcxproj are using different platform names. -->
<WintunPlatform Condition="'$(Platform)'=='ARM'">arm</WintunPlatform>
<WintunPlatform Condition="'$(Platform)'=='ARM64'">arm64</WintunPlatform>
<WintunPlatform Condition="'$(Platform)'=='Win32'">x86</WintunPlatform>
<WintunPlatform Condition="'$(Platform)'=='x64'">amd64</WintunPlatform>
</PropertyGroup>
<ItemDefinitionGroup>
<ClCompile>
<PreprocessorDefinitions>WINTUN_VERSION_MAJ=$(WintunVersionMaj);WINTUN_VERSION_MIN=$(WintunVersionMin);WINTUN_VERSION_REL=$(WintunVersionRel);WINTUN_VERSION="$(WintunVersion)";%(PreprocessorDefinitions)</PreprocessorDefinitions>
<WarningLevel>Level4</WarningLevel>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>WINTUN_VERSION_MAJ=$(WintunVersionMaj);WINTUN_VERSION_MIN=$(WintunVersionMin);WINTUN_VERSION_REL=$(WintunVersionRel);WINTUN_VERSION="$(WintunVersion)";%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ResourceCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)'=='Release'">
<ClCompile>
<Optimization>MaxSpeed</Optimization>
<IntrinsicFunctions>true</IntrinsicFunctions>
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
</ClCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)'=='Debug'">
<ClCompile>
<Optimization>Disabled</Optimization>
</ClCompile>
</ItemDefinitionGroup>
<PropertyGroup>
<WindowsSdkToolchainPlatform>$(PROCESSOR_ARCHITECTURE)</WindowsSdkToolchainPlatform>
<WindowsSdkToolchainPlatform Condition="'$(PROCESSOR_ARCHITECTURE)'=='AMD64'">x64</WindowsSdkToolchainPlatform>
<SignToolPath>$(WindowsSdkDir)bin\$(TargetPlatformVersion)\$(WindowsSdkToolchainPlatform)\signtool.exe</SignToolPath>
</PropertyGroup>
</Project>