From 84304ec1595b24d47aec0609f715e8de3b321283 Mon Sep 17 00:00:00 2001 From: Lokesh Mandvekar Date: Mon, 1 Jul 2024 14:49:09 -0400 Subject: [PATCH] Windows: install dotnet and latest wix wix3 is EOL and choco doesn't support installing wix > 3.14. So, this commit installs the `dotnet` runtime and uses dotnet to install the latest wix in the windows image. Also remove pasta package timebomb from debian packaging. Resolves: RUN-2055 Signed-off-by: Lokesh Mandvekar --- IMG_SFX | 2 +- win_images/win_packaging.ps1 | 18 ++++++++++-------- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/IMG_SFX b/IMG_SFX index e952fcce..1f81ca0b 100644 --- a/IMG_SFX +++ b/IMG_SFX @@ -1 +1 @@ -20240701t155130z-f40f39d13 +20240702t180702z-f40f39d13 diff --git a/win_images/win_packaging.ps1 b/win_images/win_packaging.ps1 index 16a0ee66..b810e4bf 100644 --- a/win_images/win_packaging.ps1 +++ b/win_images/win_packaging.ps1 @@ -14,14 +14,16 @@ retryInstall git archiver psexec golang mingw StrawberryPerl; Check-Exit # Update service is required for dotnet Set-Service -Name wuauserv -StartupType "Manual"; Check-Exit -# dotnet is required for wixtoolset -# Allowing chocolaty to install dotnet breaks in an entirely -# non-debuggable way. Workaround this by installing it as -# a server-feature first. -Install-WindowsFeature -Name Net-Framework-Core; Check-Exit - -# Install wixtoolset for installer build & test. -retryInstall wixtoolset; Check-Exit +# Install dotnet as that's the best way to install WiX 4+ +# Choco does not support installing anything over WiX 3.14 +Invoke-WebRequest -Uri https://dotnet.microsoft.com/download/dotnet/scripts/v1/dotnet-install.ps1 -OutFile dotnet-install.ps1 +.\dotnet-install.ps1 -InstallDir 'C:\Program Files\dotnet' + +# Configure NuGet sources for dotnet to fetch wix (and other packages) from +& 'C:\Program Files\dotnet\dotnet.exe' nuget add source https://api.nuget.org/v3/index.json -n nuget.org + +# Install wix +& 'C:\Program Files\dotnet\dotnet.exe' tool install --global wix # Install Hyper-V Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V -All -NoRestart