podman/contrib/win-installer
Mario Loriedo 3aa09dd521 Avoid upgrading from v5.3.1 on Windows
Added a condition in the Windows WiX bundle that
prevents upgrades from v5.3.1 and recommend the
user to upgrade to v5.3.2 first.

That's needed because version 5.3.1 of the installer
had a bug that got patched in v5.3.2 only.

c.f. https://github.com/containers/podman/issues/24735

Signed-off-by: Mario Loriedo <mario.loriedo@gmail.com>
2025-01-27 15:52:18 +01:00
..
podman-msihooks Add Hyper-V option in windows installer 2024-05-29 12:09:37 +02:00
resources Windows Installer: switch to wix5 2024-07-05 15:28:19 -04:00
README.md Add win installer patch 2024-12-12 15:56:28 +01:00
build-hooks.ps1 Use latest version of VS BuildTools 2024-12-09 12:18:06 +01:00
build.ps1 Stop creating a patch for v5.3.1 upgrades on windows 2025-01-20 11:56:18 +01:00
burn.wxs Avoid upgrading from v5.3.1 on Windows 2025-01-27 15:52:18 +01:00
check.ps1 Add new windows installer and build 2022-09-06 16:12:09 -05:00
podman-setup.wixproj Bump WiX toolset version to 5.0.2 2024-12-12 15:56:28 +01:00
podman-theme.wxl Add radio buttons to select WSL or Hyper-V in windows setup.exe 2024-09-11 17:36:00 +02:00
podman-theme.xml Add radio buttons to select WSL or Hyper-V in windows setup.exe 2024-09-11 17:36:00 +02:00
podman-ui.wxs Windows Installer: switch to wix5 2024-07-05 15:28:19 -04:00
podman.sln Windows Installer: switch to wix5 2024-07-05 15:28:19 -04:00
podman.wixproj Bump WiX toolset version to 5.0.2 2024-12-12 15:56:28 +01:00
podman.wxs Avoid upgrading from v5.3.1 on Windows 2025-01-27 15:52:18 +01:00
process-release.ps1 Windows Installer: switch to wix5 2024-07-05 15:28:19 -04:00
test-installer.ps1 Avoid upgrading from v5.3.1 on Windows 2025-01-27 15:52:18 +01:00
utils.ps1 Add win installer patch 2024-12-12 15:56:28 +01:00
welcome-install-dlg.wxs Fix inconsistent line ending in win-installer project 2024-11-04 16:56:20 +02:00

README.md

Windows Installer Build

Instructions [have moved here](Build and test the Podman Windows installer](#build-and-test-the-podman-windows-installer)).

How to run a full tests scenarios

Manual tests to validate changes the wxs files or a WiX upgrade.

Preparation

  • checkout previous release tag (e.g. 5.3.0) git fetch --all --tags --prune && git tag --list v5.* && git checkout tags/v5.3.0
  • make the installer ./winmake podman && ./winmake docs && ./winmake win-gvproxy && ./winmake installer
  • checkout tag v5.3.1 make the installer ./winmake podman && ./winmake docs && ./winmake win-gvproxy && ./winmake installer
  • get the v5.3.1 msi product id (with superorca)
  • checkout the main branch and change the product id on podman.wxs to match v5.3.1 product id
  • set $env:V531_SETUP_EXE_PATH and make current and next installer $env:V531_SETUP_EXE_PATH=<path> && ./winmake podman && ./winmake docs && ./winmake win-gvproxy && ./winmake installer && ./winmake installer 9.9.9
  • patch installertest to make sure it doesn't download the setup.exe from internet but uses the one just built

Run the tests

  1. Uninstall the virtualization providers (WSL and Hyper-V) using the "Windows Features" app
  2. Run installtest for both wsl and hyperv (as an admin)
.\contrib\win-installer\test-installer.ps1 `
    -scenario all `
    -setupExePath ".\contrib\win-installer\podman-5.4.0-dev-setup.exe" `
    -previousSetupExePath ".\contrib\win-installer\podman-5.3.0-dev-setup.exe" `
    -nextSetupExePath ".\contrib\win-installer\podman-9.9.9-dev-setup.exe" `
    -v531SetupExePath ".\contrib\win-installer\podman-5.3.1-dev-setup.exe" `
    -provider hyperv
  1. Manually test the upgrade "from v5.3.1 to current to next"
contrib\win-installer\podman-5.3.1-dev-setup.exe /install /log contrib\win-installer\podman-setup-531.log
contrib\win-installer\podman-5.4.0-dev-setup.exe /install /log contrib\win-installer\podman-setup-540.log
contrib\win-installer\podman-9.9.9-dev-setup.exe /install /log contrib\win-installer\podman-setup-999.log
contrib\win-installer\podman-9.9.9-dev-setup.exe /x /log contrib\win-installer\podman-uninstall-999.log
  1. manually run the current installer with the option to install wsl and confirm it reboots and install both podman and wsl
  2. manually run the current installer with the option to install hyperv and confirm it reboots and install both podman and wsl
  3. run installtest for both wsl and hyperv
  4. manually run the current installer with the option to install wsl and confirm it doesn't reboot
  5. manually run the current installer with the option to install hyperv and confirm it doesn't reboot

retrieve installed podman msi package information

$Installer = New-Object -ComObject WindowsInstaller.Installer;
$InstallerProducts = $Installer.ProductsEx("", "", 7);
$InstalledProducts = ForEach($Product in $InstallerProducts){
    [PSCustomObject]@{ProductCode = $Product.ProductCode();
                      LocalPackage = $Product.InstallProperty("LocalPackage");
                      VersionString = $Product.InstallProperty("VersionString");
                      ProductName = $Product.InstallProperty("ProductName")
                      }
};
$InstalledProducts | Where-Object {$_.ProductName -match "podman"}

and uninstall it with msiexec /x "{<product-code>}"