wintun/api/resources.rc
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

56 lines
1.5 KiB
Plaintext

/* SPDX-License-Identifier: GPL-2.0
*
* Copyright (C) 2018-2021 WireGuard LLC. All Rights Reserved.
*/
#include <windows.h>
#include <ntverp.h>
wintun.cat RCDATA "wintun\\wintun.cat"
wintun.inf RCDATA "wintun\\wintun.inf"
wintun.sys RCDATA "wintun\\wintun.sys"
#ifdef HAVE_WHQL
wintun-whql.cat RCDATA "whql\\wintun.cat"
wintun-whql.inf RCDATA "whql\\wintun.inf"
wintun-whql.sys RCDATA "whql\\wintun.sys"
#endif
#if defined(_M_IX86)
wintun-amd64.dll RCDATA "amd64\\wintun.dll"
#endif
#if defined(_M_IX86) || defined(_M_AMD64) || defined(_M_ARM)
wintun-arm64.dll RCDATA "arm64\\wintun.dll"
#endif
#define STRINGIZE(x) #x
#define EXPAND(x) STRINGIZE(x)
VS_VERSION_INFO VERSIONINFO
FILEVERSION WINTUN_VERSION_MAJ, WINTUN_VERSION_MIN, WINTUN_VERSION_REL, 0
PRODUCTVERSION WINTUN_VERSION_MAJ, WINTUN_VERSION_MIN, WINTUN_VERSION_REL, 0
FILEOS VOS_NT_WINDOWS32
FILETYPE VFT_DLL
FILESUBTYPE VFT2_UNKNOWN
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904b0"
BEGIN
VALUE "CompanyName", "WireGuard LLC"
VALUE "FileDescription", "Wintun API Library"
VALUE "FileVersion", EXPAND(WINTUN_VERSION)
VALUE "InternalName", "wintun.dll"
VALUE "LegalCopyright", "Copyright \xa9 2018-2021 WireGuard LLC. All Rights Reserved."
VALUE "OriginalFilename", "wintun.dll"
VALUE "ProductName", "Wintun Driver"
VALUE "ProductVersion", EXPAND(WINTUN_VERSION)
VALUE "Comments", "https://www.wintun.net/"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 1200
END
END