From bfa3b3f6cc113724744bcf198665d2585a8ee254 Mon Sep 17 00:00:00 2001 From: Simon Rozman Date: Wed, 17 Apr 2019 13:25:55 +0200 Subject: [PATCH] MSM: Explicitly version driver files wintun.inf and wintun.cat have no version resource. WiX linker cannot determine their versions and the MSM will use file sizes and hashes for update logic. By setting explicit file version and language, the version will always be used to determine which version is newer on updates. Signed-off-by: Simon Rozman --- Makefile | 10 +++------- wintun.wxs | 23 +++++++++++++++++++---- 2 files changed, 22 insertions(+), 11 deletions(-) diff --git a/Makefile b/Makefile index 3551153..9d8afc9 100644 --- a/Makefile +++ b/Makefile @@ -8,7 +8,7 @@ WINTUN_VERSION_MAJ=0 WINTUN_VERSION_MIN=0 WINTUN_VERSION_REV=2019 -WINTUN_VERSION_BUILD=0128 +WINTUN_VERSION_BUILD=128 !IFNDEF CFG CFG=Release @@ -33,12 +33,8 @@ PLAT_WIX=arm64 # TODO: Follow WiX ARM64 support. !ENDIF OUTPUT_DIR=$(PLAT)\$(CFG) MSBUILD_FLAGS=/p:Configuration="$(CFG)" /p:Platform="$(PLAT_MSBUILD)" /m /v:minimal /nologo -WIX_CANDLE_FLAGS=-nologo -ext WixDifxAppExtension -ext WixIIsExtension -arch "$(PLAT_WIX)" \ - -dWINTUN_VERSION_MAJ="$(WINTUN_VERSION_MAJ)" \ - -dWINTUN_VERSION_MIN="$(WINTUN_VERSION_MIN)" \ - -dWINTUN_VERSION_REV="$(WINTUN_VERSION_REV)" \ - -dWINTUN_VERSION_BUILD="$(WINTUN_VERSION_BUILD)" -WIX_LIGHT_FLAGS=-nologo -ext WixDifxAppExtension -ext WixIIsExtension -b output_dir="$(OUTPUT_DIR)" +WIX_CANDLE_FLAGS=-nologo -ext WixDifxAppExtension -ext WixIIsExtension -arch "$(PLAT_WIX)" -dWINTUN_VERSION="$(WINTUN_VERSION_MAJ).$(WINTUN_VERSION_MIN).$(WINTUN_VERSION_REV).$(WINTUN_VERSION_BUILD)" +WIX_LIGHT_FLAGS=-nologo -ext WixDifxAppExtension -ext WixIIsExtension -b output_dir="$(OUTPUT_DIR)" -sw1103 build :: msbuild.exe "wintun.vcxproj" /t:Build $(MSBUILD_FLAGS) diff --git a/wintun.wxs b/wintun.wxs index 5c15ea1..b403c9c 100644 --- a/wintun.wxs +++ b/wintun.wxs @@ -8,7 +8,7 @@ xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:diffx="http://schemas.microsoft.com/wix/DifxAppExtension" xmlns:iis="http://schemas.microsoft.com/wix/IIsExtension"> - + - + - + - +