From 994cc5f6b6bfffddd5faaaafdb4fed483c38188f Mon Sep 17 00:00:00 2001 From: Oleg Shparber Date: Sat, 15 Aug 2020 15:50:12 -0400 Subject: [PATCH] build(wix): bundle Universal C Runtime Fixes #979. --- pkg/wix/build.ps1 | 15 ++++++++++++--- pkg/wix/zeal.wxs | 17 ++++++++++++++++- 2 files changed, 28 insertions(+), 4 deletions(-) diff --git a/pkg/wix/build.ps1 b/pkg/wix/build.ps1 index 3bc3a7e..81f2fc8 100644 --- a/pkg/wix/build.ps1 +++ b/pkg/wix/build.ps1 @@ -36,16 +36,25 @@ if ($DevBuild) { $compressionLevelArg = '-dCompressionLevel="none"' } +$VCRedistPath = 'C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Redist\MSVC\v142\MergeModules' +$VCRedistFile = "Microsoft_VC142_CRT_$Arch.msm" + Write-Output "Running candle..." -& candle.exe -nologo -pedantic -wx -arch "$Arch" -dAppVersion="$Version" -dAppPackageDir="$PackagePath" $compressionLevelArg -o "$WixobjFilename" zeal.wxs +& candle.exe -nologo -pedantic -wx -arch "$Arch" ` + -dAppVersion="$Version" ` + -dAppPackageDir="$PackagePath" ` + -dVCRedistPath="$VCRedistPath" ` + -dVCRedistFile="$VCRedistFile" ` + $compressionLevelArg ` + -o "$WixobjFilename" zeal.wxs if ($LastExitCode -ne 0) { CleanUp throw "candle failed with exit code $LastExitCode." } - Write-Output "Running light..." -& light.exe -nologo -pedantic -wx -ext WixUIExtension -o "$MsiFilename" "$WixobjFilename" +# Supressing LGHT1076, see https://wixtoolset.org/documentation/manual/v3/howtos/redistributables_and_install_checks/install_vcredist.html +& light.exe -nologo -pedantic -wx -sw1076 -ext WixUIExtension -o "$MsiFilename" "$WixobjFilename" if ($LastExitCode -ne 0) { CleanUp throw "light failed with exit code $LastExitCode." diff --git a/pkg/wix/zeal.wxs b/pkg/wix/zeal.wxs index 044280c..77c5dfe 100644 --- a/pkg/wix/zeal.wxs +++ b/pkg/wix/zeal.wxs @@ -12,6 +12,14 @@ + + + + + + + + @@ -32,7 +40,8 @@ Language="1033" Codepage="1252"> + Languages="1033" Compressed="yes" SummaryCodepage="1252" + InstallerVersion="301" /> @@ -68,8 +77,14 @@ + + + + + +