Remove legacy win installer files

The old setup bundle was still built and released to avoid breaking
downstream projects. This commit removes it and, starting from Podman
v6, only the installer that doesn't require elevated privileges will be
released.

This is a subtask of issue #27624.

Signed-off-by: Mario Loriedo <mario.loriedo@gmail.com>
This commit is contained in:
Mario Loriedo
2026-01-05 11:06:26 +01:00
parent d9975a5390
commit 74043cf726
24 changed files with 8 additions and 1538 deletions

View File

@@ -46,28 +46,3 @@ $command += "-msiPath `"${installer_folder}\podman-$ENV:WIN_INST_VER.msi`" "
$command += "-nextMsiPath `"${installer_folder}\podman-$NEXT_WIN_INST_VER.msi`" "
$command += "-previousSetupExePath `"$env:PREV_SETUP_EXE_PATH`""
Run-Command "${command}"
#########################################################
# Build and test the legacy windows installer setup bundle
#########################################################
$installer_folder = Resolve-Path -Path "$WIN_INST_FOLDER-legacy"
Push-Location "${installer_folder}"
# Note: consumes podman-remote-release-windows_amd64.zip from repo.tar.zst
Run-Command ".\build.ps1 $Env:WIN_INST_VER dev `"$RELEASE_DIR`""
# Build a v9.9.10 installer to test an update from current to next version
Run-Command ".\build.ps1 `"$NEXT_WIN_INST_VER`" dev `"$RELEASE_DIR`""
Pop-Location
# Run the installer silently and WSL/HyperV install options disabled (prevent reboots)
$command = "${installer_folder}\test-installer.ps1 "
$command += "-scenario all "
$command += "-provider $ENV:CONTAINERS_MACHINE_PROVIDER "
$command += "-setupExePath `"${installer_folder}\podman-$ENV:WIN_INST_VER-dev-setup.exe`" "
$command += "-previousSetupExePath `"$env:PREV_SETUP_EXE_PATH`" "
$command += "-nextSetupExePath `"${installer_folder}\podman-$NEXT_WIN_INST_VER-dev-setup.exe`" "
Run-Command "${command}"

View File

@@ -1,13 +0,0 @@
artifacts/
current/
docs/
en-US/
fetch/
podman-*setup.exe
engine.exe
obj/
shasums
*.wixobj
*.wixpdb
*.log
*.msi

View File

@@ -1,77 +0,0 @@
# 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**)
```pwsh
.\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
```
3. Manually test the upgrade "from v5.3.1 to current to next"
```pwsh
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
```
4. manually run the current installer with the option to install wsl and confirm it reboots and install both podman and wsl
5. manually run the current installer with the option to install hyperv and confirm it reboots and install both podman and wsl
6. run installtest for both wsl and hyperv
7. manually run the current installer with the option to install wsl and confirm it doesn't reboot
8. manually run the current installer with the option to install hyperv and confirm it doesn't reboot
## retrieve installed podman msi package information
```pwsh
$Installer = New-Object -ComObject WindowsInstaller.Installer
$InstallerProducts = $Installer.ProductsEx("", "", 7)
$InstalledProducts = ForEach($Product in $InstallerProducts){
try {
$ProductCode = $Product.ProductCode()
$LocalPackage = try { $Product.InstallProperty("LocalPackage") } catch { "Unknown" }
$VersionString = try { $Product.InstallProperty("VersionString") } catch { "Unknown" }
$ProductName = $Product.InstallProperty("ProductName")
[PSCustomObject]@{
ProductCode = $ProductCode
LocalPackage = $LocalPackage
VersionString = $VersionString
ProductName = $ProductName
}
}
catch {
Write-Warning "Failed to process product: $($_.Exception.Message)"
# Skip this product and continue
continue
}
}
$InstalledProducts | Where-Object {$_.ProductName -match "podman"}
```
and uninstall it with `msiexec /x "{<product-code>}"`

View File

@@ -1,156 +0,0 @@
function ExitOnError() {
if ($LASTEXITCODE -ne 0) {
Exit 1
}
}
function SignItem() {
param(
[Parameter(Mandatory)]
[string[]]$fileNames
)
foreach ($val in $ENV:APP_ID, $ENV:TENANT_ID, $ENV:CLIENT_SECRET, $ENV:CERT_NAME) {
if (!$val) {
Write-Host "Skipping signing (no config)"
Return
}
}
CheckCommand AzureSignTool.exe "AzureSignTool"
AzureSignTool.exe sign -du "https://github.com/containers/podman" `
-kvu "https://$ENV:VAULT_ID.vault.azure.net" `
-kvi $ENV:APP_ID `
-kvt $ENV:TENANT_ID `
-kvs $ENV:CLIENT_SECRET `
-kvc $ENV:CERT_NAME `
-tr http://timestamp.digicert.com $fileNames
ExitOnError
}
function CheckCommand() {
param(
[Parameter(Mandatory)]
[string] $cmd,
[Parameter(Mandatory)]
[string] $description
)
if (! (Get-Command $cmd -errorAction SilentlyContinue)) {
Write-Host "Required dep `"$description`" is not installed"
Exit 1
}
}
function CheckRequirements() {
CheckCommand "wix" "WiX Toolset"
CheckCommand "go" "Golang"
}
if ($args.Count -lt 1 -or $args[0].Length -lt 1) {
Write-Host "Usage: " $MyInvocation.MyCommand.Name "<version> [dev|prod] [release_dir]"
Write-Host
Write-Host 'Uses Env Vars: '
Write-Host ' $ENV:FETCH_BASE_URL - GitHub Repo Address to locate release on'
Write-Host ' $ENV:V531_SETUP_EXE_PATH - Path to v5.3.1 setup.exe used to build the patch'
Write-Host ' $ENV:PODMAN_ARCH - Installer target platform (x64 or arm64)'
Write-Host 'Env Settings for signing (optional)'
Write-Host ' $ENV:VAULT_ID'
Write-Host ' $ENV:APP_ID'
Write-Host ' $ENV:TENANT_ID'
Write-Host ' $ENV:CLIENT_SECRET'
Write-Host ' $ENV:CERT_NAME'
Write-Host
Write-Host "Example: Download and build from the official Github release (dev output): "
Write-Host " .\build.ps1 4.2.0"
Write-Host
Write-Host "Example: Build a dev build from a pre-download release "
Write-Host " .\build.ps1 4.2.0 dev fetchdir"
Write-Host
Exit 1
}
# Pre-set to standard locations in-case build env does not refresh paths
$Env:Path="$Env:Path;C:\Users\micro\mingw64\bin;C:\ProgramData\chocolatey\lib\mingw\tools\install\mingw64\bin;;C:\Program Files\Go\bin;C:\Program Files\dotnet"
CheckRequirements
$version = $args[0]
if ($version[0] -eq "v") {
$version = $version.Substring(1)
}
$suffix = "-dev"
if ($args.Count -gt 1 -and $args[1] -eq "prod") {
$suffix = ""
}
$releaseDir = ""
if ($args.Count -gt 2) {
$releaseDir = $args[2]
}
Push-Location $PSScriptRoot
.\process-release.ps1 $version $releaseDir
if ($LASTEXITCODE -eq 2) {
Write-Host "Skip signaled, relaying skip"
Exit 2
}
if ($ENV:INSTVER -eq "") {
Write-Host "process-release did not define an install version!"
Exit 1
}
$installerPlatform = ""
if ($null -eq $ENV:PODMAN_ARCH -or "" -eq $ENV:PODMAN_ARCH -or "amd64" -eq $ENV:PODMAN_ARCH) {
$installerPlatform = "x64"
} elseif ($ENV:PODMAN_ARCH -eq "arm64") {
$installerPlatform = "arm64"
} else {
Write-Host "Unknown architecture $ENV:PODMAN_ARCH. Valid options are amd64 or arm64."
Exit 1
}
SignItem @("artifacts/win-sshproxy.exe",
"artifacts/podman.exe")
$gvExists = Test-Path "artifacts/gvproxy.exe"
if ($gvExists) {
SignItem @("artifacts/gvproxy.exe")
Remove-Item Env:\UseGVProxy -ErrorAction SilentlyContinue
} else {
$env:UseGVProxy = "Skip"
}
# Retaining for possible future additions
# $pExists = Test-Path "artifacts/policy.json"
# if ($pExists) {
# Remove-Item Env:\IncludePolicyJSON -ErrorAction SilentlyContinue
# } else {
# $env:IncludePolicyJSON = "Skip"
# }
if (Test-Path ./obj) {
Remove-Item ./obj -Recurse -Force -Confirm:$false
}
dotnet build podman.wixproj /property:DefineConstants="VERSION=$ENV:INSTVER" /property:InstallerPlatform="$installerPlatform" -o .; ExitOnError
SignItem @("en-US\podman.msi")
dotnet build podman-setup.wixproj /property:DefineConstants="VERSION=$ENV:INSTVER" /property:InstallerPlatform="$installerPlatform" -o .; ExitOnError
wix burn detach podman-setup.exe -engine engine.exe; ExitOnError
SignItem @("engine.exe")
$file = "podman-$version$suffix-setup.exe"
wix burn reattach -engine engine.exe podman-setup.exe -o $file; ExitOnError
SignItem @("$file")
if (Test-Path -Path shasums) {
$hash = (Get-FileHash -Algorithm SHA256 $file).Hash.ToLower()
Write-Output "$hash $file" | Out-File -Append -FilePath shasums
}
Write-Host "Complete"
Get-ChildItem "podman-$version$suffix-setup.exe"
Pop-Location

View File

@@ -1,37 +0,0 @@
<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:bal="http://wixtoolset.org/schemas/v4/wxs/bal" xmlns:util="http://wixtoolset.org/schemas/v4/wxs/util">
<?ifndef var.VERSION?>
<?error VERSION must be defined via command line argument?>
<?endif?>
<Bundle Name="Podman" Version="$(var.VERSION)" Manufacturer="Red Hat" UpgradeCode="f3e1f40a-a791-49b7-9bc6-050975293353" IconSourceFile="resources\podman-logo.ico" Compressed="yes">
<BootstrapperApplication>
<bal:WixStandardBootstrapperApplication LicenseUrl="" Theme="hyperlinkSidebarLicense" ThemeFile="podman-theme.xml" LocalizationFile="podman-theme.wxl" LogoFile="resources\podman-banner2.png" LogoSideFile="resources\podman-sidebar.png" SuppressOptionsUI="yes" ShowVersion="yes" />
</BootstrapperApplication>
<Variable Name="InstallFolder" Type="formatted" Value="[ProgramFiles64Folder]RedHat\Podman" bal:Overridable="yes" />
<Variable Name="VERSION" Value="$(var.VERSION)" />
<Variable Name="MachineProvider" Type="string" Value="wsl" bal:Overridable="yes" />
<Variable Name="AllowOldWin" Type="numeric" Value="0" bal:Overridable="yes" />
<Variable Name="LaunchTarget" Value="explorer.exe" />
<Variable Name="LaunchArguments" Value="&quot;[InstallFolder]\podman-for-windows.html&quot;" />
<Variable Name="SkipConfigFileCreation" Value="0" bal:Overridable="yes" />
<util:RegistrySearch Id="PreviousVersionSearch" Variable="PreviousVersion" Result="value" Root="HKLM" Key="SOFTWARE\[WixBundleManufacturer]\Updates\[WixBundleName]" Value="PackageVersion" />
<util:RegistrySearch Id="PreviousInstallFolderSearch" Root="HKLM" Key="SOFTWARE\[WixBundleManufacturer]\[WixBundleName]" Value="InstallDir" Variable="PreviousInstallFolder" Bitness="always64" />
<util:DirectorySearch Path="[PreviousInstallFolder]" Variable="InstallFolder" After="PreviousInstallFolderSearch" Condition="PreviousInstallFolder" />
<util:RegistrySearch Id="CurrentBuild" Variable="CBNumber" Result="value" Root="HKLM" Key="SOFTWARE\Microsoft\Windows NT\CurrentVersion" Value="CurrentBuildNumber" />
<bal:Condition Message="Windows 10 (19041) or later is required to run this application." Condition="VersionNT &gt;= v10.0 AND (CBNumber &gt;= 19041 OR AllowOldWin = 1)" />
<bal:Condition Message="You have an installed development, pre-release version, or alternative build identifying as the same version of this installer. You must uninstall the existing version of Podman first, before proceeding." Condition="WixBundleInstalled OR WixBundleForcedRestartPackage OR PreviousVersion &lt;&gt; VERSION" />
<!-- Next condition blocks upgrades from v5.3.1. That's because that version
of the installer has a bug (that got patched in v5.3.2) and upgrading
from v5.3.1 requires upgrading to v5.3.2 first.
c.f. https://github.com/containers/podman/issues/24735 -->
<bal:Condition Message="You have v5.3.1 of Podman installed and upgrading to this version is not allowed. You must upgrade to v5.3.2 first." Condition="PreviousVersion &lt;&gt; v5.3.1" />
<Chain>
<MsiPackage Id="Setup" SourceFile="en-US\podman.msi" Vital="yes">
<MsiProperty Name="INSTALLDIR" Value="[InstallFolder]" />
<MsiProperty Name="MACHINE_PROVIDER" Value="[MachineProvider]" />
<MsiProperty Name="SKIP_CONFIG_FILE_CREATION" Value="[SkipConfigFileCreation]" />
</MsiPackage>
</Chain>
<OptionalUpdateRegistration />
</Bundle>
</Wix>

View File

@@ -1,63 +0,0 @@
function SkipExists {
param(
[Parameter(Mandatory)]
[string]$url,
[Parameter(Mandatory)]
[string]$desc
)
try {
Invoke-WebRequest -Method HEAD -UseBasicParsing -ErrorAction Stop -Uri $url
Write-Host "$desc already uploaded, skipping..."
Exit 2
} Catch {
if ($_.Exception.Response.StatusCode -eq 404) {
Write-Host "$desc does not exist, continuing..."
Return
}
throw $_.Exception
}
}
function SkipNotExists {
param(
[Parameter(Mandatory)]
[string]$url,
[Parameter(Mandatory)]
[string]$desc
)
$ret = ""
try {
Invoke-WebRequest -Method HEAD -UseBasicParsing -ErrorAction Stop -Uri $url
Write-Host "$desc exists, continuing..."
} Catch {
if ($_.Exception.Response.StatusCode -eq 404) {
Write-Host "$desc does not exist, skipping ..."
Exit 2
}
throw $_.Exception
}
}
if ($args.Count -lt 1 -or $args[0].Length -lt 2) {
Write-Host "Usage: " $MyInvocation.MyCommand.Name "<version>"
Exit 1
}
$release = $args[0]
$version = $release
if ($release[0] -eq "v") {
$version = $release.Substring(1)
} else {
$release = "v$release"
}
$base_url = "$ENV:FETCH_BASE_URL"
if ($base_url.Length -le 0) {
$base_url = "https://github.com/containers/podman"
}
$ENV:UPLOAD_ASSET_NAME = "podman-$version-setup.exe"
SkipExists "$base_url/releases/download/$release/podman-$version-setup.exe" "Installer"
SkipNotExists "$base_url/releases/download/$release/podman-remote-release-windows_amd64.zip" "Windows client zip"

View File

@@ -1,11 +0,0 @@
<Project Sdk="WixToolset.Sdk/5.0.2">
<PropertyGroup>
<EnableDefaultCompileItems>false</EnableDefaultCompileItems>
<OutputType>Bundle</OutputType>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="WixToolset.BootstrapperApplications.wixext" Version="5.0.2" />
<PackageReference Include="WixToolset.Util.wixext" Version="5.0.2" />
<Compile Include="burn.wxs" />
</ItemGroup>
</Project>

View File

@@ -1,68 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. -->
<WixLocalization Culture="en-us" Language="1033" xmlns="http://wixtoolset.org/schemas/v4/wxl">
<String Id="Caption" Value="[WixBundleName] [VERSION] Setup" />
<String Id="Title" Value="[WixBundleName] [VERSION]" />
<String Id="InstallHeader" Value="Welcome to [WixBundleName] Setup" />
<String Id="InstallMessage" Value="Welcome to the [WixBundleName] [VERSION] setup wizard. This will install [WixBundleName] on your computer." />
<String Id="ProvidersMessage" Value="Additionally, you have the option to select the virtualization provider required by Podman: WSLv2 or Hyper-V.
If it's not already installed, you will have to install the virtualization provider manually.
Finally, click install to continue, or Close to abort the installation." />
<String Id="InstallVersion" Value="Version [WixBundleVersion]" />
<String Id="ConfirmCancelMessage" Value="Are you sure you want to cancel?" />
<String Id="ExecuteUpgradeRelatedBundleMessage" Value="Previous version" />
<String Id="HelpHeader" Value="Setup Help" />
<String Id="HelpText" Value="/install | /repair | /uninstall | /layout [directory] - installs, repairs, uninstalls or
creates a complete local copy of the bundle in directory. Install is the default.
/passive | /quiet - displays minimal UI with no prompts or displays no UI and
no prompts. By default UI and all prompts are displayed.
/norestart - suppress any attempts to restart. By default UI will prompt before restart.
/log log.txt - logs to a specific file. By default a log file is created in %TEMP%." />
<String Id="HelpCloseButton" Value="&amp;Close" />
<String Id="InstallLicenseLinkText" Value='[WixBundleName] &lt;a href="#"&gt;license terms&lt;/a&gt;.' />
<String Id="InstallAcceptCheckbox" Value="I &amp;agree to the license terms and conditions" />
<String Id="InstallInstallButton" Value="&amp;Install" />
<String Id="InstallCancelButton" Value="&amp;Close" />
<String Id="OptionsHeader" Value="Setup Options" />
<String Id="OptionsLocationLabel" Value="Install location:" />
<String Id="OptionsBrowseButton" Value="&amp;Browse" />
<String Id="OptionsOkButton" Value="&amp;OK" />
<String Id="OptionsCancelButton" Value="&amp;Cancel" />
<String Id="ProgressHeader" Value="Setup Progress" />
<String Id="ProgressLabel" Value="Processing:" />
<String Id="OverallProgressPackageText" Value="Initializing..." />
<String Id="ProgressCancelButton" Value="&amp;Cancel" />
<String Id="ModifyHeader" Value="Modify Setup" />
<String Id="ModifyRepairButton" Value="&amp;Repair" />
<String Id="ModifyUninstallButton" Value="&amp;Uninstall" />
<String Id="ModifyCancelButton" Value="&amp;Close" />
<String Id="SuccessRepairHeader" Value="Repair Successfully Completed" />
<String Id="SuccessUninstallHeader" Value="Uninstall Successfully Completed" />
<String Id="SuccessInstallHeader" Value="Installation Successfully Completed" />
<String Id="SuccessHeader" Value="Setup Successful" />
<String Id="SuccessLaunchButton" Value="&amp;Open Guide &amp;&amp; Close" />
<String Id="SuccessRestartText" Value="You must restart your computer before you can use the software." />
<String Id="SuccessRestartButton" Value="&amp;Restart" />
<String Id="SuccessCloseButton" Value="&amp;Close" />
<String Id="FailureHeader" Value="Setup Failed" />
<String Id="FailureInstallHeader" Value="Setup Failed" />
<String Id="FailureUninstallHeader" Value="Uninstall Failed" />
<String Id="FailureRepairHeader" Value="Repair Failed" />
<String Id="FailureHyperlinkLogText" Value='One or more issues caused the setup to fail. Please fix the issues and then retry setup. For more information see the &lt;a href="#"&gt;log file&lt;/a&gt;.' />
<String Id="FailureRestartText" Value="You must restart your computer to complete the rollback of the software." />
<String Id="FailureRestartButton" Value="&amp;Restart" />
<String Id="FailureCloseButton" Value="&amp;Close" />
<String Id="FilesInUseHeader" Value="Files In Use" />
<String Id="FilesInUseLabel" Value="The following applications are using files that need to be updated:" />
<String Id="FilesInUseCloseRadioButton" Value="Close the &amp;applications and attempt to restart them." />
<String Id="FilesInUseDontCloseRadioButton" Value="&amp;Do not close applications. A reboot will be required." />
<String Id="FilesInUseOkButton" Value="&amp;OK" />
<String Id="FilesInUseCancelButton" Value="&amp;Cancel" />
<String Id="ErrorFailNoActionReboot" Value="No action was taken as a system reboot is required." />
</WixLocalization>

View File

@@ -1,127 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
<!--
This is a customization of WiX v5 `HyperlinkSidebarTheme.xml`:
https://github.com/wixtoolset/wix/blob/v5.0.0/src/ext/Bal/stdbas/Resources/HyperlinkSidebarTheme.xml
-->
<Theme xmlns="http://wixtoolset.org/schemas/v4/thmutil">
<Font Id="0" Height="-12" Weight="500" Foreground="windowtext" Background="window">Segoe UI</Font>
<Font Id="1" Height="-24" Weight="500" Foreground="windowtext">Segoe UI</Font>
<Font Id="2" Height="-22" Weight="500" Foreground="graytext">Segoe UI</Font>
<Font Id="3" Height="-12" Weight="500" Foreground="windowtext" Background="window">Segoe UI</Font>
<Font Id="4" Height="-12" Weight="500" Foreground="ff0000" Background="window" Underline="yes">Segoe UI</Font>
<Font Id="5" Height="-28" Weight="500" Foreground="graytext">Segoe UI</Font>
<Font Id="6" Height="-12" Weight="600" Foreground="windowtext" Background="window">Segoe UI</Font>
<!-- Divider -->
<Font Id="7" Height="-24" Weight="500" Foreground="windowtext" Background="E0E0E0">Segoe UI</Font>
<Window Width="600" Height="450" HexStyle="100a0000" FontId="0" Caption="#(loc.Caption)">
<Label X="11" Y="-45" Width="-11" Height="2" FontId="7" Visible="yes"></Label>
<Page Name="Help">
<Label X="80" Y="11" Width="-11" Height="32" FontId="1" DisablePrefix="yes">#(loc.Title)</Label>
<ImageControl X="11" Y="11" Width="206" Height="64" ImageFile="logo.png" />
<Label X="11" Y="80" Width="-11" Height="32" FontId="2" DisablePrefix="yes">#(loc.HelpHeader)</Label>
<Label X="11" Y="121" Width="-11" Height="-35" FontId="3" DisablePrefix="yes">#(loc.HelpText)</Label>
<Button Name="HelpCloseButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">
<Text>#(loc.HelpCloseButton)</Text>
<CloseWindowAction />
</Button>
</Page>
<Page Name="Install">
<ImageControl X="11" Y="11" Width="165" Height="400" ImageFile="logoside.png"/>
<Label X="185" Y="11" Width="-11" Height="40" FontId="5" DisablePrefix="yes">#(loc.InstallHeader)</Label>
<Label X="185" Y="82" Width="-11" Height="40" FontId="3" DisablePrefix="yes">#(loc.InstallMessage)</Label>
<Label X="185" Y="127" Width="-11" Height="120" VisibleCondition="NOT PreviousInstallFolder" FontId="3" DisablePrefix="yes">#(loc.ProvidersMessage)</Label>
<RadioButtons Name="MachineProvider">
<RadioButton Name="WSLRadioButton" Value="wsl" VisibleCondition="NOT PreviousInstallFolder" X="185" Y="260" Width="-11" Height="17" TabStop="yes" FontId="3" HideWhenDisabled="yes" EnableCondition="" >Windows Linux Subsystem (WSLv2)</RadioButton>
<RadioButton Name="HyperVRadioButton" Value="hyperv" VisibleCondition="NOT PreviousInstallFolder" X="185" Y="285" Width="-11" Height="17" TabStop="yes" FontId="3" HideWhenDisabled="yes">Windows Hyper-V</RadioButton>
</RadioButtons>
<Hypertext Name="EulaHyperlink" X="185" Y="-111" Width="-11" Height="17" TabStop="yes" FontId="3" HideWhenDisabled="yes">#(loc.InstallLicenseLinkText)</Hypertext>
<Label Name="InstallVersion" X="510" Y="-50" Width="-11" Height="17" FontId="3" DisablePrefix="yes" VisibleCondition="WixStdBAShowVersion">#(loc.InstallVersion)</Label>
<Button Name="OptionsButton" X="-171" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0" VisibleCondition="NOT WixStdBASuppressOptionsUI">
<Text>#(loc.InstallOptionsButton)</Text>
<ChangePageAction Page="Options" />
</Button>
<Button Name="InstallButton" X="-91" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">#(loc.InstallInstallButton)</Button>
<Button Name="InstallCancelButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">
<Text>#(loc.InstallCancelButton)</Text>
<CloseWindowAction />
</Button>
</Page>
<Page Name="Options">
<ImageControl X="11" Y="11" Width="206" Height="64" ImageFile="logo.png"/>
<Label X="11" Y="80" Width="-11" Height="30" FontId="2" DisablePrefix="yes">#(loc.OptionsHeader)</Label>
<Label X="11" Y="121" Width="-11" Height="17" FontId="3">#(loc.OptionsLocationLabel)</Label>
<Editbox Name="InstallFolder" X="11" Y="143" Width="-91" Height="21" TabStop="yes" FontId="3" FileSystemAutoComplete="yes" />
<Button Name="BrowseButton" X="-11" Y="142" Width="75" Height="23" TabStop="yes" FontId="3">
<Text>#(loc.OptionsBrowseButton)</Text>
<BrowseDirectoryAction VariableName="InstallFolder" />
</Button>
<Button Name="OptionsOkButton" X="-91" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">
<Text>#(loc.OptionsOkButton)</Text>
<ChangePageAction Page="Install" />
</Button>
<Button Name="OptionsCancelButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">
<Text>#(loc.OptionsCancelButton)</Text>
<ChangePageAction Page="Install" Cancel="yes" />
</Button>
</Page>
<Page Name="Progress">
<ImageControl X="11" Y="11" Width="206" Height="64" ImageFile="logo.png" />
<Label X="11" Y="80" Width="-11" Height="30" FontId="2" DisablePrefix="yes">#(loc.ProgressHeader)</Label>
<Label X="11" Y="141" Width="70" Height="17" FontId="3" DisablePrefix="yes">#(loc.ProgressLabel)</Label>
<Label Name="OverallProgressPackageText" X="85" Y="141" Width="-11" Height="17" FontId="3" DisablePrefix="yes">#(loc.OverallProgressPackageText)</Label>
<Progressbar Name="OverallCalculatedProgressbar" X="11" Y="163" Width="-11" Height="20" />
<Button Name="ProgressCancelButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">#(loc.ProgressCancelButton)</Button>
</Page>
<Page Name="Modify">
<Label X="185" Y="11" Width="-11" Height="32" FontId="1" DisablePrefix="yes">#(loc.Title)</Label>
<ImageControl X="11" Y="11" Width="165" Height="400" ImageFile="logoside.png"/>
<Label X="185" Y="50" Width="-11" Height="30" FontId="2" DisablePrefix="yes">#(loc.ModifyHeader)</Label>
<Button Name="RepairButton" X="-171" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0" HideWhenDisabled="yes">#(loc.ModifyRepairButton)</Button>
<Button Name="UninstallButton" X="-91" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">#(loc.ModifyUninstallButton)</Button>
<Button Name="ModifyCancelButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">
<Text>#(loc.ModifyCancelButton)</Text>
<CloseWindowAction />
</Button>
</Page>
<Page Name="Success">
<Label X="185" Y="11" Width="-11" Height="32" FontId="1" DisablePrefix="yes">#(loc.Title)</Label>
<ImageControl X="11" Y="11" Width="165" Height="400" ImageFile="logoside.png"/>
<Label X="185" Y="50" Width="-11" Height="30" FontId="2" DisablePrefix="yes">
<Text>#(loc.SuccessHeader)</Text>
<Text Condition="WixBundleAction = 4">#(loc.SuccessUninstallHeader)</Text>
<Text Condition="WixBundleAction = 6">#(loc.SuccessInstallHeader)</Text>
<Text Condition="WixBundleAction = 8">#(loc.SuccessRepairHeader)</Text>
</Label>
<Button Name="LaunchButton" X="-91" Y="-11" Width="125" Height="23" TabStop="yes" FontId="0" HideWhenDisabled="yes">#(loc.SuccessLaunchButton)</Button>
<Label X="185" Y="-51" Width="400" Height="34" FontId="3" DisablePrefix="yes" VisibleCondition="WixStdBARestartRequired">
<Text>#(loc.SuccessRestartText)</Text>
<Text Condition="WixBundleAction = 3">#(loc.SuccessUninstallRestartText)</Text>
</Label>
<Button Name="SuccessRestartButton" X="-91" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0" HideWhenDisabled="yes">#(loc.SuccessRestartButton)</Button>
<Button Name="SuccessCloseButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">
<Text>#(loc.SuccessCloseButton)</Text>
<CloseWindowAction />
</Button>
</Page>
<Page Name="Failure">
<ImageControl X="11" Y="11" Width="165" Height="400" ImageFile="logoside.png"/>
<Label X="185" Y="50" Width="-11" Height="30" FontId="2" DisablePrefix="yes">
<Text>#(loc.FailureHeader)</Text>
<Text Condition="WixBundleAction = 4">#(loc.FailureUninstallHeader)</Text>
<Text Condition="WixBundleAction = 6">#(loc.FailureInstallHeader)</Text>
<Text Condition="WixBundleAction = 8">#(loc.FailureRepairHeader)</Text>
</Label>
<Hypertext Name="FailureLogFileLink" X="185" Y="121" Width="-11" Height="68" FontId="3" TabStop="yes" HideWhenDisabled="yes">#(loc.FailureHyperlinkLogText)</Hypertext>
<Hypertext Name="FailureMessageText" X="185" Y="-115" Width="-11" Height="80" FontId="3" TabStop="yes" HideWhenDisabled="yes" />
<Label X="185" Y="-57" Width="-11" Height="80" FontId="3" DisablePrefix="yes" VisibleCondition="WixStdBARestartRequired">#(loc.FailureRestartText)</Label>
<Button Name="FailureRestartButton" X="-91" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0" HideWhenDisabled="yes">#(loc.FailureRestartButton)</Button>
<Button Name="FailureCloseButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">
<Text>#(loc.FailureCloseButton)</Text>
<CloseWindowAction />
</Button>
</Page>
</Window>
</Theme>

View File

@@ -1,48 +0,0 @@
<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. -->
<!--
First-time install dialog sequence:
- WixUI_WelcomeEulaDlg
Maintenance dialog sequence:
WixUI_MaintenanceWelcomeDlg
- WixUI_MaintenanceTypeDlg
- WixUI_VerifyReadyDlg
Patch dialog sequence:
- WixUI_WelcomeDlg
- WixUI_VerifyReadyDlg
-->
<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
<Fragment>
<UI Id="PodmanUI">
<TextStyle Id="WixUI_Font_Normal" FaceName="Tahoma" Size="8" />
<TextStyle Id="WixUI_Font_Bigger" FaceName="Tahoma" Size="12" />
<TextStyle Id="WixUI_Font_Title" FaceName="Tahoma" Size="9" Bold="yes" />
<Property Id="DefaultUIFont" Value="WixUI_Font_Normal" />
<Property Id="WixUI_Mode" Value="Minimal" />
<DialogRef Id="ErrorDlg" />
<DialogRef Id="FatalError" />
<DialogRef Id="FilesInUse" />
<DialogRef Id="MsiRMFilesInUse" />
<DialogRef Id="PrepareDlg" />
<DialogRef Id="ProgressDlg" />
<DialogRef Id="ResumeDlg" />
<DialogRef Id="UserExit" />
<DialogRef Id="WelcomeInstallDlg" />
<Publish Dialog="ExitDialog" Control="Finish" Event="EndDialog" Value="Return" Order="999" />
<Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="MaintenanceTypeDlg" />
<Publish Dialog="MaintenanceWelcomeDlg" Control="Next" Event="NewDialog" Value="MaintenanceTypeDlg" />
<Publish Dialog="MaintenanceTypeDlg" Control="RepairButton" Event="NewDialog" Value="VerifyReadyDlg" />
<Publish Dialog="MaintenanceTypeDlg" Control="RemoveButton" Event="NewDialog" Value="VerifyReadyDlg" />
<Publish Dialog="MaintenanceTypeDlg" Control="Back" Event="NewDialog" Value="MaintenanceWelcomeDlg" />
<Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="WelcomeInstallDlg" Order="2" Condition="Installed AND PATCH" />
<InstallUISequence>
<Show Dialog="WelcomeInstallDlg" Before="ProgressDlg" Condition="(NOT Installed) AND NOT AFTERREBOOT" />
</InstallUISequence>
<Property Id="ARPNOMODIFY" Value="1" />
</UI>
<UIRef Id="WixUI_Common" />
</Fragment>
</Wix>

View File

@@ -1,37 +0,0 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.10.35004.147
MinimumVisualStudioVersion = 10.0.40219.1
Project("{B7DD6F7E-DEF8-4E67-B5B7-07EF123DB6F0}") = "podman", "podman.wixproj", "{3EBBAB4A-A15D-4986-98FF-FEC3892997DB}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|ARM64 = Debug|ARM64
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|ARM64 = Release|ARM64
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{3EBBAB4A-A15D-4986-98FF-FEC3892997DB}.Debug|ARM64.ActiveCfg = Debug|ARM64
{3EBBAB4A-A15D-4986-98FF-FEC3892997DB}.Debug|ARM64.Build.0 = Debug|ARM64
{3EBBAB4A-A15D-4986-98FF-FEC3892997DB}.Debug|x64.ActiveCfg = Debug|x64
{3EBBAB4A-A15D-4986-98FF-FEC3892997DB}.Debug|x64.Build.0 = Debug|x64
{3EBBAB4A-A15D-4986-98FF-FEC3892997DB}.Debug|x86.ActiveCfg = Debug|x86
{3EBBAB4A-A15D-4986-98FF-FEC3892997DB}.Debug|x86.Build.0 = Debug|x86
{3EBBAB4A-A15D-4986-98FF-FEC3892997DB}.Release|ARM64.ActiveCfg = Release|ARM64
{3EBBAB4A-A15D-4986-98FF-FEC3892997DB}.Release|ARM64.Build.0 = Release|ARM64
{3EBBAB4A-A15D-4986-98FF-FEC3892997DB}.Release|x64.ActiveCfg = Release|x64
{3EBBAB4A-A15D-4986-98FF-FEC3892997DB}.Release|x64.Build.0 = Release|x64
{3EBBAB4A-A15D-4986-98FF-FEC3892997DB}.Release|x86.ActiveCfg = Release|x86
{3EBBAB4A-A15D-4986-98FF-FEC3892997DB}.Release|x86.Build.0 = Release|x86
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {0F83E058-C6D8-49C2-95BD-645730145A9D}
EndGlobalSection
EndGlobal

View File

@@ -1,20 +0,0 @@
<Project Sdk="WixToolset.Sdk/5.0.2">
<PropertyGroup>
<EnableDefaultCompileItems>false</EnableDefaultCompileItems>
</PropertyGroup>
<ItemGroup>
<HarvestDirectory Include="docs">
<ComponentGroupName>ManFiles</ComponentGroupName>
<DirectoryRefId>INSTALLDIR</DirectoryRefId>
<SuppressRootDirectory>true</SuppressRootDirectory>
</HarvestDirectory>
<BindPath Include="docs" />
<Compile Include="podman.wxs;podman-ui.wxs;welcome-install-dlg.wxs" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="PanelSwWixExtension4" Version="5.4.5.422" />
<PackageReference Include="WixToolset.Heat" Version="5.0.2" />
<PackageReference Include="WixToolset.UI.wixext" Version="5.0.2" />
<PackageReference Include="WixToolset.Util.wixext" Version="5.0.2" />
</ItemGroup>
</Project>

View File

@@ -1,131 +0,0 @@
<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:PanelSW="http://schemas.panel-sw.co.il/wix/WixExtension" xmlns:util="http://wixtoolset.org/schemas/v4/wxs/util">
<?ifndef VERSION?>
<?error VERSION must be defined via command line argument?>
<?endif?>
<?ifdef env.UseGVProxy?>
<?define UseGVProxy = "$(env.UseGVProxy)"?>
<?else?>
<?define UseGVProxy = ""?>
<?endif?>
<Package Name="podman" Manufacturer="Red Hat Inc." Version="$(VERSION)" UpgradeCode="a6a9dd9c-0732-44ba-9279-ffe22ea50671">
<Media Id="1" Cabinet="Podman.cab" EmbedCab="yes" />
<MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." RemoveFeatures="Complete" Schedule="afterInstallExecute" />
<Property Id="DiskPrompt" Value="Red Hat's Podman $(VERSION) Installation" />
<Property Id="MACHINE_PROVIDER" Value="wsl" />
<Property Id="MACHINE_PROVIDER_CONFIG_FILE_PATH">
<DirectorySearch Id="CommonAppDataFolderSearch" Path="[CommonAppDataFolder]">
<DirectorySearch Id="ContainersFolderSearch" Path="containers">
<DirectorySearch Id="ContainersConfDFolderSearch" Path="containers.conf.d">
<FileSearch Name="99-podman-machine-provider.conf" />
</DirectorySearch>
</DirectorySearch>
</DirectorySearch>
</Property>
<Property Id="MAIN_EXECUTABLE_FILE_PATH">
<DirectorySearch Id="ProgramFiles64FolderSearch" Path="[ProgramFiles64Folder]">
<DirectorySearch Id="RedHatFolderSearch" Path="RedHat">
<DirectorySearch Id="PodmanFolderSearch" Path="Podman">
<FileSearch Name="podman.exe" />
</DirectorySearch>
</DirectorySearch>
</DirectorySearch>
</Property>
<!--
Property CREATE_MACHINE_PROVIDER_CONFIG_FILE is set at runtime and used as the condition to run the `MachineProviderConfigFile` Component:
The machine provider config file is created (or is not deleted if it already exist) if these conditions are met:
- The user hasn't set property `SKIP_CONFIG_FILE_CREATION` to 1
- The main executable file ($PROGRAMDATA/RedHat/Podman/podman.exe) doesn't exist or, if it exists, the machine provider config file exists
-->
<SetProperty Id="CREATE_MACHINE_PROVIDER_CONFIG_FILE" After="AppSearch" Value="1" Sequence="first" Condition="(NOT (SKIP_CONFIG_FILE_CREATION = 1)) AND ((NOT MAIN_EXECUTABLE_FILE_PATH) OR (MACHINE_PROVIDER_CONFIG_FILE_PATH))" />
<!--
Property HIDE_PROVIDER_CHOICE is set at runtime and used as the condition to hide the Machine Provider
choice from the MSI GUI (the Radio Button Group and other related controls):
The machine provider choice isn't shown to the user if one of these conditions are met:
- The user has set the property `SKIP_CONFIG_FILE_CREATION` to 1
- The machine provider config file ($PROGRAMDATA/containers/containers.conf.d/99-podman-machine-provider.conf) exists
- The main executable file ($PROGRAMDATA/RedHat/Podman/podman.exe) exists
-->
<SetProperty Id="HIDE_PROVIDER_CHOICE" After="AppSearch" Value="1" Sequence="first" Condition="(SKIP_CONFIG_FILE_CREATION = 1) OR (MACHINE_PROVIDER_CONFIG_FILE_PATH) OR (MAIN_EXECUTABLE_FILE_PATH)" />
<CustomAction Id="OpenGuide" DllEntry="WixShellExec" Impersonate="yes" BinaryRef="Wix4UtilCA_$(sys.BUILDARCHSHORT)" />
<util:BroadcastEnvironmentChange />
<Feature Id="Complete" Level="1">
<ComponentRef Id="INSTALLDIR_Component" />
<ComponentRef Id="EnvEntriesComponent" />
<ComponentRef Id="MainExecutable" />
<ComponentRef Id="WinSshProxyExecutable" />
<?if $(var.UseGVProxy) != Skip?>
<ComponentRef Id="GvProxyExecutable" />
<?endif?>
<ComponentRef Id="GuideHTMLComponent" />
<ComponentGroupRef Id="ManFiles" />
</Feature>
<Feature Id="MachineProviderConfig" Level="1">
<ComponentRef Id="MachineProviderConfigFile" />
</Feature>
<Icon Id="podman.ico" SourceFile="resources/podman-logo.ico" />
<Property Id="ARPPRODUCTICON" Value="podman.ico" />
<Property Id="WixShellExecTarget" Value="[#GuideHTMLFile]" />
<Property Id="WIXUI_EXITDIALOGOPTIONALCHECKBOXTEXT" Value="Show Getting Started Guide" />
<Property Id="WIXUI_EXITDIALOGOPTIONALCHECKBOX" Value="1" />
<WixVariable Id="WixUIBannerBmp" Value="resources\podman-banner.png" />
<WixVariable Id="WixUIDialogBmp" Value="resources\podman-dialog.png" />
<UIRef Id="PodmanUI" />
<UI>
<Publish Dialog="ExitDialog" Control="Finish" Event="DoAction" Value="OpenGuide" Condition="(WIXUI_EXITDIALOGOPTIONALCHECKBOX = 1) AND (NOT Installed) AND (NOT UpdateStarted)" />
</UI>
<StandardDirectory Id="ProgramFiles6432Folder">
<Directory Id="RedHatPFiles" Name="RedHat">
<Directory Id="INSTALLDIR" Name="Podman">
<Component Id="INSTALLDIR_Component" Guid="14B310C4-9B5D-4DA5-ADF9-B9D008E4CD82" Bitness="always64">
<CreateFolder />
<RegistryKey Root="HKLM" Key="SOFTWARE\Red Hat\Podman">
<RegistryValue Name="InstallDir" Value="[INSTALLDIR]" Type="string" />
</RegistryKey>
</Component>
<Component Id="MainExecutable" Guid="73752F94-6589-4C7B-ABED-39D655A19714" Bitness="always64">
<File Id="MainExecutableFile" Name="podman.exe" Source="artifacts/podman.exe" KeyPath="yes" />
</Component>
<Component Id="WinSshProxyExecutable" Guid="0DA730AB-2F97-40E8-A8FC-356E88EAA4D2" Bitness="always64">
<File Id="WinSshProxyExecutableFile" Name="win-sshproxy.exe" Source="artifacts/win-sshproxy.exe" KeyPath="yes" />
</Component>
<?if $(var.UseGVProxy) != Skip?>
<Component Id="GvProxyExecutable" Guid="1A4A2975-AD2D-44AA-974B-9B343C098333" Bitness="always64">
<File Id="GvProxyExecutableFile" Name="gvproxy.exe" Source="artifacts/gvproxy.exe" KeyPath="yes" />
</Component>
<?endif?>
<Component Id="GuideHTMLComponent" Guid="8B23C76B-F7D4-4030-8C46-1B5729E616B5" Bitness="always64">
<File Id="GuideHTMLFile" Name="welcome-podman.html" Source="docs/podman-for-windows.html" KeyPath="yes" />
</Component>
</Directory>
</Directory>
</StandardDirectory>
<!--
The following code creates the `containers/containers.conf.d` folder under the system wide
`$CommonAppDataFolder`. That's preferred to the user specific `$AppDataFolder` to avoid the
Windows Installer ICE91 warning https://learn.microsoft.com/en-us/windows/win32/msi/ice91.
-->
<StandardDirectory Id="CommonAppDataFolder">
<Directory Id="CONFIGDIR" Name="containers">
<Directory Id="ContainersConfigSubDir" Name="containers.conf.d">
<Component Id="MachineProviderConfigFile" Guid="C32C0040-D9AF-4155-AC7E-465B63B6BE3B" Condition="CREATE_MACHINE_PROVIDER_CONFIG_FILE" Transitive="true">
<CreateFolder />
<IniFile Id="MachineProviderConfigFile" Action="createLine" Directory="ContainersConfigSubDir" Section="machine" Name="99-podman-machine-provider.conf" Key="provider" Value="&quot;[MACHINE_PROVIDER]&quot;" />
</Component>
</Directory>
</Directory>
</StandardDirectory>
<Directory Id="EnvEntries">
<Component Id="EnvEntriesComponent" Guid="b662ec43-0e0e-4018-8bf3-061904bb8f5b" Bitness="always64">
<CreateFolder />
<Environment Id="UpdatePath" Name="PATH" Action="set" Permanent="no" System="yes" Part="last" Value="[INSTALLDIR]" />
</Component>
</Directory>
</Package>
</Wix>

View File

@@ -1,177 +0,0 @@
function Copy-Artifact {
param(
[Parameter(Mandatory)]
[string]$fileName
)
$file = Get-ChildItem -Recurse -Path . -Name $fileName
if (!$file) {
throw "Could not find $filename"
}
Write-Host "file:" $file
Copy-Item -Path $file -Destination "..\artifacts\$filename" -ErrorAction Stop
}
function DownloadOrSkip {
param(
[Parameter(Mandatory)]
[string]$url,
[Parameter(Mandatory)]
[string]$file
)
$ProgressPreference = 'SilentlyContinue';
try {
Invoke-WebRequest -UseBasicParsing -ErrorAction Stop -Uri $url -OutFile $file
} Catch {
if ($_.Exception.Response.StatusCode -eq 404) {
Write-Host "URL not available, signaling skip:"
Write-Host "URL: $url"
Exit 2
}
throw $_.Exception
}
}
function DownloadOptional {
param(
[Parameter(Mandatory)]
[string]$url,
[Parameter(Mandatory)]
[string]$file
)
$ProgressPreference = 'SilentlyContinue';
try {
Invoke-WebRequest -UseBasicParsing -ErrorAction Stop -Uri $url -OutFile $file
} Catch {
}
Return
}
if ($args.Count -lt 1) {
Write-Host "Usage: " $MyInvocation.MyCommand.Name "<version> [release_dir]"
Exit 1
}
$releaseDir = ""
if ($args.Count -gt 1 -and $args[1].Length -gt 0) {
$path = $args[1]
$releaseDir = (Resolve-Path -Path "$path" -ErrorAction Stop).Path
}
$base_url = "$ENV:FETCH_BASE_URL"
if ($base_url.Length -le 0) {
$base_url = "https://github.com/containers/podman"
}
$version = $args[0]
if ($version -notmatch '^v?([0-9]+\.[0-9]+\.[0-9]+)(-.*)?$') {
Write-Host "Invalid version"
Exit 1
}
# WiX burn requires a QWORD version only, numeric only
$Env:INSTVER=$Matches[1]
if ($version[0] -ne 'v') {
$version = 'v' + $version
}
$restore = 0
$exitCode = 0
try {
Write-Host "Cleaning up old artifacts"
Remove-Item -Force -Recurse -Path .\docs -ErrorAction SilentlyContinue | Out-Null
Remove-Item -Force -Recurse -Path .\artifacts -ErrorAction SilentlyContinue | Out-Null
Remove-Item -Force -Recurse -Path .\fetch -ErrorAction SilentlyContinue | Out-Null
New-Item fetch -ItemType Directory | Out-Null
New-Item artifacts -ItemType Directory | Out-Null
Write-Host "Fetching zip release"
Push-Location fetch -ErrorAction Stop
$restore = 1
$ProgressPreference = 'SilentlyContinue';
if ($null -eq $ENV:PODMAN_ARCH -or "" -eq $ENV:PODMAN_ARCH ) {
Write-Warning "PODMAN_ARCH not set, defaulting to amd64"
$ENV:PODMAN_ARCH = "amd64"
}
if ($releaseDir.Length -gt 0) {
Copy-Item -Path "$releaseDir/podman-remote-release-windows_${ENV:PODMAN_ARCH}.zip" "release.zip"
} else {
DownloadOrSkip "$base_url/releases/download/$version/podman-remote-release-windows_${ENV:PODMAN_ARCH}.zip" "release.zip"
DownloadOptional "$base_url/releases/download/$version/shasums" ..\shasums
}
Expand-Archive -Path release.zip
$loc = Get-ChildItem -Recurse -Path . -Name win-sshproxy.exe
if (!$loc) {
if ($releaseDir.Length -gt 0) {
throw "Release dir only supports zip which includes win-sshproxy.exe"
}
Write-Host "Old release, zip does not include win-sshproxy.exe, fetching via msi"
DownloadOrSkip "$base_url/releases/download/$version/podman-$version.msi" "podman.msi"
wix msi decompile -x expand ./podman.msi
if (!$?) {
throw "wix msi decompile command failed"
}
$loc = Get-ChildItem -Recurse -Path expand -Name WinSshProxyExecutableFile
if (!$loc) {
throw "Could not obtain win-sshproxy.exe"
}
Copy-Item -Path "expand\$loc" -Destination "win-sshproxy.exe" -ErrorAction Stop
Remove-Item -Recurse -Force -Path expand
}
Write-Host "Copying artifacts"
Foreach ($fileName in "win-sshproxy.exe", "podman.exe") {
Copy-Artifact($fileName)
}
$loc = Get-ChildItem -Recurse -Path . -Name gvproxy.exe
if (!$loc) {
Write-Host "Skipping gvproxy.exe artifact"
} else {
Copy-Artifact("gvproxy.exe")
}
# Retaining for future additions
# $loc = Get-ChildItem -Recurse -Path . -Name policy.json
# if (!$loc) {
# Write-Host "Skipping policy.json artifact"
# } else {
# Copy-Artifact("policy.json")
# }
$docsloc = Get-ChildItem -Path . -Name docs -Recurse
$loc = Get-ChildItem -Recurse -Path . -Name podman-for-windows.html
if (!$loc) {
Write-Host "Old release did not include welcome page, using podman-machine instead"
$loc = Get-ChildItem -Recurse -Path . -Name podman-machine.html
Copy-Item -Path $loc -Destination "$docsloc\podman-for-windows.html"
}
Write-Host "Copying docs"
Copy-Item -Recurse -Path $docsloc -Destination ..\docs -ErrorAction Stop
Write-Host "Done!"
if (!$loc) {
throw "Could not find docs"
}
}
catch {
Write-Host $_
$exitCode = 1
}
finally {
if ($restore) {
Pop-Location
}
}
exit $exitCode

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.0 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.0 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

View File

@@ -1,436 +0,0 @@
#!/usr/bin/env pwsh
# Usage example:
#
# rm .\contrib\win-installer\*.log &&
# rm .\contrib\win-installer\*.exe &&
# rm .\contrib\win-installer\*.wixpdb &&
# .\winmake.ps1 installer &&
# .\winmake.ps1 installer 9.9.9 &&
# .\contrib\win-installer\test-installer.ps1 `
# -scenario all `
# -setupExePath ".\contrib\win-installer\podman-5.4.0-dev-setup.exe" `
# -nextSetupExePath ".\contrib\win-installer\podman-9.9.9-dev-setup.exe" `
# -provider hyperv
#
# The Param statement must be the first statement, except for comments and any #Require statements.
param (
[Parameter(Mandatory)]
[ValidateSet("test-objects-exist", "test-objects-exist-not", "installation-green-field", "installation-skip-config-creation-flag", "installation-with-pre-existing-podman-exe",
"update-without-user-changes", "update-with-user-changed-config-file", "update-with-user-removed-config-file",
"update-without-user-changes-to-next", "update-with-user-changed-config-file-to-next", "update-with-user-removed-config-file-to-next",
"update-without-user-changes-from-531",
"all")]
[string]$scenario,
[ValidateScript({Test-Path $_ -PathType Leaf})]
[string]$setupExePath,
[ValidateScript({Test-Path $_ -PathType Leaf})]
[string]$previousSetupExePath,
[ValidateScript({Test-Path $_ -PathType Leaf})]
[string]$nextSetupExePath,
[ValidateSet("wsl", "hyperv")]
[string]$provider="wsl",
[switch]$skipWinVersionCheck=$false,
[switch]$skipConfigFileCreation=$false
)
. $PSScriptRoot\..\win-installer\utils.ps1
$MachineConfPath = "$env:ProgramData\containers\containers.conf.d\99-podman-machine-provider.conf"
$PodmanFolderPath = "$env:ProgramFiles\RedHat\Podman"
$PodmanExePath = "$PodmanFolderPath\podman.exe"
$WindowsPathsToTest = @($PodmanExePath,
"$PodmanFolderPath\win-sshproxy.exe",
"HKLM:\SOFTWARE\Red Hat\Podman")
function Install-Podman {
param (
[Parameter(Mandatory)]
[ValidateScript({Test-Path $_ -PathType Leaf})]
[string]$setupExePath
)
if ($skipWinVersionCheck) {$allowOldWinVar = "1"} else {$allowOldWinVar = "0"}
if ($skipConfigFileCreation) {$skipConfigFileCreationVar = "1"} else {$skipConfigFileCreationVar = "0"}
Write-Host "Running the installer ($setupExePath)..."
Write-Host "(provider=`"$provider`", AllowOldWin=`"$allowOldWinVar`", SkipConfigFileCreation=`"$skipConfigFileCreationVar`")"
$ret = Start-Process -Wait `
-PassThru "$setupExePath" `
-ArgumentList "/install /quiet `
MachineProvider=${provider} `
AllowOldWin=${allowOldWinVar} `
SkipConfigFileCreation=${skipConfigFileCreationVar} `
/log $PSScriptRoot\podman-setup.log"
if ($ret.ExitCode -ne 0) {
Write-Host "Install failed, dumping log"
Get-Content $PSScriptRoot\podman-setup.log
throw "Exit code is $($ret.ExitCode)"
}
Write-Host "Installation completed successfully!`n"
}
# Install-Podman-With-Defaults is used to test updates. That's because when
# using the installer GUI the user can't change the default values.
function Install-Podman-With-Defaults {
param (
[Parameter(Mandatory)]
[ValidateScript({Test-Path $_ -PathType Leaf})]
[string]$setupExePath
)
Write-Host "Running the installer using defaults ($setupExePath)..."
$ret = Start-Process -Wait `
-PassThru "$setupExePath" `
-ArgumentList "/install /quiet `
/log $PSScriptRoot\podman-setup-default.log"
if ($ret.ExitCode -ne 0) {
Write-Host "Install failed, dumping log"
Get-Content $PSScriptRoot\podman-setup-default.log
throw "Exit code is $($ret.ExitCode)"
}
Write-Host "Installation completed successfully!`n"
}
function Install-Podman-With-Defaults-Expected-Fail {
param (
[Parameter(Mandatory)]
[ValidateScript({Test-Path $_ -PathType Leaf})]
[string]$setupExePath
)
Write-Host "Running the installer using defaults ($setupExePath)..."
$ret = Start-Process -Wait `
-PassThru "$setupExePath" `
-ArgumentList "/install /quiet `
/log $PSScriptRoot\podman-setup-default.log"
if ($ret.ExitCode -eq 0) {
Write-Host "Install completed successfully but a failure was expected, dumping log"
Get-Content $PSScriptRoot\podman-setup-default.log
throw "Exit code is $($ret.ExitCode)"
}
Write-Host "Installation has failed as expected!`n"
}
function Install-Current-Podman {
Install-Podman -setupExePath $setupExePath
}
function Test-Podman-Objects-Exist {
Write-Host "Verifying that podman files, folders and registry entries exist..."
$WindowsPathsToTest | ForEach-Object {
if (! (Test-Path -Path $_) ) {
throw "Expected $_ but doesn't exist"
}
}
Write-Host "Verification was successful!`n"
}
function Test-Podman-Machine-Conf-Exist {
Write-Host "Verifying that $MachineConfPath exist..."
if (! (Test-Path -Path $MachineConfPath) ) {
throw "Expected $MachineConfPath but doesn't exist"
}
Write-Host "Verification was successful!`n"
}
function Test-Podman-Machine-Conf-Content {
param (
[ValidateSet("wsl", "hyperv")]
[string]$expected=$provider
)
Write-Host "Verifying that the machine provider configuration is correct..."
$machineProvider = Get-Content $MachineConfPath | Select-Object -Skip 1 | ConvertFrom-StringData | ForEach-Object { $_.provider }
if ( $machineProvider -ne "`"$expected`"" ) {
throw "Expected `"$expected`" as default machine provider but got $machineProvider"
}
Write-Host "Verification was successful!`n"
}
function Uninstall-Podman {
param (
# [Parameter(Mandatory)]
[ValidateScript({Test-Path $_ -PathType Leaf})]
[string]$setupExePath
)
Write-Host "Running the uninstaller ($setupExePath)..."
$ret = Start-Process -Wait `
-PassThru "$setupExePath" `
-ArgumentList "/uninstall `
/quiet /log $PSScriptRoot\podman-setup-uninstall.log"
if ($ret.ExitCode -ne 0) {
Write-Host "Uninstall failed, dumping log"
Get-Content $PSScriptRoot\podman-setup-uninstall.log
throw "Exit code is $($ret.ExitCode)"
}
Write-Host "The uninstallation completed successfully!`n"
}
function Uninstall-Current-Podman {
Uninstall-Podman -setupExePath $setupExePath
}
function Test-Podman-Objects-Exist-Not {
Write-Host "Verifying that podman files, folders and registry entries don't exist..."
$WindowsPathsToTest | ForEach-Object {
if ( Test-Path -Path $_ ) {
throw "Path $_ is present"
}
}
Write-Host "Verification was successful!`n"
}
function Test-Podman-Machine-Conf-Exist-Not {
Write-Host "Verifying that $MachineConfPath doesn't exist..."
if ( Test-Path -Path $MachineConfPath ) {
throw "Path $MachineConfPath is present"
}
Write-Host "Verification was successful!`n"
}
function New-Fake-Podman-Exe {
Write-Host "Creating a fake $PodmanExePath..."
New-Item -ItemType Directory -Path $PodmanFolderPath -Force -ErrorAction Stop | out-null
New-Item -ItemType File -Path $PodmanExePath -ErrorAction Stop | out-null
Write-Host "Creation successful!`n"
}
function Switch-Podman-Machine-Conf-Content {
$currentProvider = $provider
if ( $currentProvider -eq "wsl" ) { $newProvider = "hyperv" } else { $newProvider = "wsl" }
Write-Host "Editing $MachineConfPath content (was $currentProvider, will be $newProvider)..."
"[machine]`nprovider=`"$newProvider`"" | Out-File -FilePath $MachineConfPath -ErrorAction Stop
Write-Host "Edit successful!`n"
return $newProvider
}
function Remove-Podman-Machine-Conf {
Write-Host "Deleting $MachineConfPath..."
Remove-Item -Path $MachineConfPath -ErrorAction Stop | out-null
Write-Host "Deletion successful!`n"
}
function Test-Installation {
param (
[ValidateSet("wsl", "hyperv")]
[string]$expectedConf
)
Test-Podman-Objects-Exist
Test-Podman-Machine-Conf-Exist
if ($expectedConf) {
Test-Podman-Machine-Conf-Content -expected $expectedConf
} else {
Test-Podman-Machine-Conf-Content
}
}
function Test-Installation-No-Config {
Test-Podman-Objects-Exist
Test-Podman-Machine-Conf-Exist-Not
}
function Test-Uninstallation {
Test-Podman-Objects-Exist-Not
Test-Podman-Machine-Conf-Exist-Not
}
# SCENARIOS
function Start-Scenario-Installation-Green-Field {
Write-Host "`n==========================================="
Write-Host " Running scenario: Installation-Green-Field"
Write-Host "==========================================="
Install-Current-Podman
Test-Installation
Uninstall-Current-Podman
Test-Uninstallation
}
function Start-Scenario-Installation-Skip-Config-Creation-Flag {
Write-Host "`n========================================================="
Write-Host " Running scenario: Installation-Skip-Config-Creation-Flag"
Write-Host "========================================================="
$skipConfigFileCreation = $true
Install-Current-Podman
Test-Installation-No-Config
Uninstall-Current-Podman
Test-Uninstallation
}
function Start-Scenario-Installation-With-Pre-Existing-Podman-Exe {
Write-Host "`n============================================================"
Write-Host " Running scenario: Installation-With-Pre-Existing-Podman-Exe"
Write-Host "============================================================"
New-Fake-Podman-Exe
Install-Current-Podman
Test-Installation-No-Config
Uninstall-Current-Podman
Test-Uninstallation
}
function Start-Scenario-Update-Without-User-Changes {
param (
[ValidateSet("From-Previous", "To-Next", "From-v531")]
[string]$mode="From-Previous"
)
Write-Host "`n======================================================"
Write-Host " Running scenario: Update-Without-User-Changes-$mode"
Write-Host "======================================================"
switch ($mode) {
'From-Previous' {$i = $previousSetupExePath; $u = $setupExePath}
'To-Next' {$i = $setupExePath; $u = $nextSetupExePath}
'From-v531' {$i = $v531SetupExePath; $u = $setupExePath}
}
Install-Podman -setupExePath $i
Test-Installation
# Updates are expected to succeed except when updating from v5.3.1
# The v5.3.1 installer has a bug that is patched in v5.3.2
# Upgrading from v5.3.1 requires upgrading to v5.3.2 first
if ($mode -eq "From-Previous" -or $mode -eq "To-Next") {
Install-Podman-With-Defaults -setupExePath $u
Test-Installation
Uninstall-Podman -setupExePath $u
} else { # From-v531 is expected to fail
Install-Podman-With-Defaults-Expected-Fail -setupExePath $u
Uninstall-Podman -setupExePath $i
}
Test-Uninstallation
}
function Start-Scenario-Update-Without-User-Changes-To-Next {
Start-Scenario-Update-Without-User-Changes -mode "To-Next"
}
function Start-Scenario-Update-Without-User-Changes-From-v531 {
Start-Scenario-Update-Without-User-Changes -mode "From-v531"
}
function Start-Scenario-Update-With-User-Changed-Config-File {
param (
[ValidateSet("From-Previous", "To-Next")]
[string]$mode="From-Previous"
)
Write-Host "`n=============================================================="
Write-Host " Running scenario: Update-With-User-Changed-Config-File-$mode"
Write-Host "=============================================================="
switch ($mode) {
'From-Previous' {$i = $previousSetupExePath; $u = $setupExePath}
'To-Next' {$i = $setupExePath; $u = $nextSetupExePath}
}
Install-Podman -setupExePath $i
Test-Installation
$newProvider = Switch-Podman-Machine-Conf-Content
Install-Podman-With-Defaults -setupExePath $u
Test-Installation -expectedConf $newProvider
Uninstall-Podman -setupExePath $u
Test-Uninstallation
}
function Start-Scenario-Update-With-User-Changed-Config-File-To-Next {
Start-Scenario-Update-With-User-Changed-Config-File -mode "To-Next"
}
function Start-Scenario-Update-With-User-Removed-Config-File {
param (
[ValidateSet("From-Previous", "To-Next")]
[string]$mode="From-Previous"
)
Write-Host "`n=============================================================="
Write-Host " Running scenario: Update-With-User-Removed-Config-File-$mode"
Write-Host "=============================================================="
switch ($mode) {
'From-Previous' {$i = $previousSetupExePath; $u = $setupExePath}
'To-Next' {$i = $setupExePath; $u = $nextSetupExePath}
}
Install-Podman -setupExePath $i
Test-Installation
Remove-Podman-Machine-Conf
Install-Podman-With-Defaults -setupExePath $u
Test-Installation-No-Config
Uninstall-Podman -setupExePath $u
Test-Uninstallation
}
function Start-Scenario-Update-With-User-Removed-Config-File-To-Next {
Start-Scenario-Update-With-User-Removed-Config-File -mode "To-Next"
}
switch ($scenario) {
'test-objects-exist' {
Test-Podman-Objects-Exist
}
'test-objects-exist-not' {
Test-Podman-Objects-Exist-Not
}
'installation-green-field' {
Start-Scenario-Installation-Green-Field
}
'installation-skip-config-creation-flag' {
Start-Scenario-Installation-Skip-Config-Creation-Flag
}
'installation-with-pre-existing-podman-exe' {
Start-Scenario-Installation-With-Pre-Existing-Podman-Exe
}
'update-without-user-changes' {
if (!$previousSetupExePath) {
$previousSetupExePath = Get-Latest-Podman-Setup-From-GitHub
}
Start-Scenario-Update-Without-User-Changes
}
'update-without-user-changes-to-next' {
if (!$nextSetupExePath) {
throw "Next version installer path is not defined. Use '-nextSetupExePath <setup-exe-path>' to define it."
}
Start-Scenario-Update-Without-User-Changes-To-Next
}
'update-without-user-changes-from-531' {
if (!$v531SetupExePath) {
$v531SetupExePath = Get-Podman-Setup-From-GitHub -version "tags/v5.3.1"
}
Start-Scenario-Update-Without-User-Changes-From-v531
}
'update-with-user-changed-config-file' {
if (!$previousSetupExePath) {
$previousSetupExePath = Get-Latest-Podman-Setup-From-GitHub
}
Start-Scenario-Update-With-User-Changed-Config-File
}
'update-with-user-changed-config-file-to-next' {
if (!$nextSetupExePath) {
throw "Next version installer path is not defined. Use '-nextSetupExePath <setup-exe-path>' to define it."
}
Start-Scenario-Update-With-User-Changed-Config-File-To-Next
}
'update-with-user-removed-config-file' {
if (!$previousSetupExePath) {
$previousSetupExePath = Get-Latest-Podman-Setup-From-GitHub
}
Start-Scenario-Update-With-User-Removed-Config-File
}
'update-with-user-removed-config-file-to-next' {
if (!$nextSetupExePath) {
throw "Next version installer path is not defined. Use '-nextSetupExePath <setup-exe-path>' to define it."
}
Start-Scenario-Update-With-User-Removed-Config-File-To-Next
}
'all' {
if (!$nextSetupExePath) {
throw "Next version installer path is not defined. Use '-nextSetupExePath <setup-exe-path>' to define it."
}
if (!$previousSetupExePath) {
$previousSetupExePath = Get-Latest-Podman-Setup-From-GitHub
}
if (!$v531SetupExePath) {
$v531SetupExePath = Get-Podman-Setup-From-GitHub -version "tags/v5.3.1"
}
Start-Scenario-Installation-Green-Field
Start-Scenario-Installation-Skip-Config-Creation-Flag
Start-Scenario-Installation-With-Pre-Existing-Podman-Exe
Start-Scenario-Update-Without-User-Changes
Start-Scenario-Update-Without-User-Changes-To-Next
Start-Scenario-Update-With-User-Changed-Config-File
Start-Scenario-Update-With-User-Changed-Config-File-To-Next
Start-Scenario-Update-With-User-Removed-Config-File
Start-Scenario-Update-With-User-Removed-Config-File-To-Next
Start-Scenario-Update-Without-User-Changes-From-v531
}
}

View File

@@ -1,32 +0,0 @@
<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
<Fragment>
<UI>
<Dialog Id="WelcomeInstallDlg" Width="370" Height="270" Title="!(loc.WelcomeDlg_Title)">
<Control Id="Bitmap" Type="Bitmap" X="0" Y="0" Width="370" Height="234" TabSkip="no" Text="!(loc.WelcomeDlgBitmap)" />
<Control Id="Title" Type="Text" X="135" Y="20" Width="220" Height="60" Transparent="yes" NoPrefix="yes" Text="!(loc.WelcomeDlgTitle)" />
<Control Id="BottomLine" Type="Line" X="0" Y="234" Width="370" Height="0" />
<Control Id="Description" Type="Text" X="135" Y="50" Width="220" Height="60" Transparent="yes" NoPrefix="yes" Text="!(loc.WelcomeDlgDescription)" />
<Control Id="ProviderChoice" Type="Text" X="135" Y="115" Width="220" Height="18" Transparent="yes" NoPrefix="yes" Text="Select the Virtualization Provider for the Podman machine:" HideCondition="HIDE_PROVIDER_CHOICE" />
<Control Type="RadioButtonGroup" Property="MACHINE_PROVIDER" Id="MachineProviderRadioButtonGroup" Width="226" Height="30" X="135" Y="135" HideCondition="HIDE_PROVIDER_CHOICE">
<RadioButtonGroup Property="MACHINE_PROVIDER">
<RadioButton Text="Windows Linux Subsystem (WSLv2)" Height="15" Value="wsl" Width="226" X="10" Y="0" />
<RadioButton Text="Windows Hyper-V" Height="15" Value="hyperv" Width="226" X="10" Y="15" />
</RadioButtonGroup>
</Control>
<Control Id="Back" Type="PushButton" X="156" Y="243" Width="56" Height="17" Disabled="yes" Text="!(loc.WixUIBack)" />
<Control Id="Install" Type="PushButton" ElevationShield="yes" X="212" Y="243" Width="80" Height="17" Default="yes" Text="!(loc.WelcomeEulaDlgInstall)">
<Publish Event="SpawnWaitDialog" Value="WaitForCostingDlg" Condition="!(wix.WixUICostingPopupOptOut) OR CostingComplete = 1" />
<Publish Event="EndDialog" Value="Return" Condition="OutOfDiskSpace &lt;&gt; 1" />
<Publish Event="SpawnDialog" Value="OutOfRbDiskDlg" Condition="OutOfDiskSpace = 1 AND OutOfNoRbDiskSpace = 0 AND (PROMPTROLLBACKCOST=&quot;P&quot; OR NOT PROMPTROLLBACKCOST)" />
<Publish Event="EndDialog" Value="Return" Condition="OutOfDiskSpace = 1 AND OutOfNoRbDiskSpace = 0 AND PROMPTROLLBACKCOST=&quot;D&quot;" />
<Publish Event="EnableRollback" Value="False" Condition="OutOfDiskSpace = 1 AND OutOfNoRbDiskSpace = 0 AND PROMPTROLLBACKCOST=&quot;D&quot;" />
<Publish Event="SpawnDialog" Value="OutOfDiskDlg" Condition="(OutOfDiskSpace = 1 AND OutOfNoRbDiskSpace = 1) OR (OutOfDiskSpace = 1 AND PROMPTROLLBACKCOST=&quot;F&quot;)" />
</Control>
<Control Id="Cancel" Type="PushButton" X="304" Y="243" Width="56" Height="17" Cancel="yes" Text="!(loc.WixUICancel)">
<Publish Event="SpawnDialog" Value="CancelDlg" />
</Control>
</Dialog>
</UI>
</Fragment>
</Wix>

View File

@@ -117,6 +117,9 @@ $WindowsPathsToTestPerUser = @($PodmanExePathPerUser,
"$PodmanFolderPathPerUser\win-sshproxy.exe",
'HKCU:\SOFTWARE\Podman')
# Install-Podman-Bundle installs the legacy Podman installer that is no longer
# released but we want to keep it to test the update from a version of Podman
# installed with it.
function Install-Podman-Bundle {
param (
[ValidateScript({ Test-Path $_ -PathType Leaf })]

View File

@@ -19,7 +19,7 @@ param (
[parameter(ValueFromRemainingArguments)][object[]]$params = @()
)
. ./contrib/cirrus/win-lib.ps1
. $PSScriptRoot\contrib\cirrus\win-lib.ps1
# Targets
function Podman-Remote {
@@ -49,16 +49,6 @@ function Make-Clean {
"$PSScriptRoot\contrib\win-installer\*.msi"
"$PSScriptRoot\contrib\win-installer\*.wixpdb"
"$PSScriptRoot\contrib\win-installer\shasums"
# Files generated by the `installer-legacy` target
"$PSScriptRoot\contrib\win-installer-legacy\artifacts"
"$PSScriptRoot\contrib\win-installer-legacy\current"
"$PSScriptRoot\contrib\win-installer-legacy\docs"
"$PSScriptRoot\contrib\win-installer-legacy\en-us"
"$PSScriptRoot\contrib\win-installer-legacy\fetch"
"$PSScriptRoot\contrib\win-installer-legacy\obj"
"$PSScriptRoot\contrib\win-installer-legacy\*.log"
"$PSScriptRoot\contrib\win-installer-legacy\*.exe"
"$PSScriptRoot\contrib\win-installer-legacy\*.wixpdb"
# Files generated by the Documentation target
"$PSScriptRoot\docs\build\remote\podman-*.html"
"$PSScriptRoot\docs\build\remote\podman-for-windows.html"
@@ -161,13 +151,7 @@ function Installer {
}
# Run build.ps1
if ($installerPath -eq "$PSScriptRoot\contrib\win-installer-legacy") {
$ENV:PODMAN_ARCH = $architecture # This is used by the "build.ps1" script
Run-Command "$installerPath\build.ps1 $version $suffix `"$zipFileDest`""
}
else {
Run-Command "$installerPath\build.ps1 -Version $version -Architecture $architecture -LocalReleaseDirPath `"$zipFileDest`""
}
Run-Command "$installerPath\build.ps1 -Version $version -Architecture $architecture -LocalReleaseDirPath `"$zipFileDest`""
}
function Test-Installer {
@@ -207,52 +191,6 @@ function Test-Installer {
Run-Command "${command}"
}
function Test-Installer-Legacy {
param (
[string]$version,
[ValidateSet('dev', 'prod')]
[string]$flavor = 'dev',
[ValidateSet('wsl', 'hyperv')]
[string]$provider = 'wsl'
);
if (-Not $version) {
# Get Podman version from local source code
$version = Get-Podman-Version
}
if ($flavor -eq 'prod') {
$suffix = ''
}
else {
$suffix = '-dev'
}
$setupExePath = "$PSScriptRoot\contrib\win-installer-legacy\podman-${version}${suffix}-setup.exe"
if (!(Test-Path -Path $setupExePath -PathType Leaf)) {
Write-Host "Setup executable not found in path $setupExePath."
Write-Host "Make 'installer' before making the installer test:"
Write-Host ' .\winmake.ps1 installer-legacy'
Exit 1
}
$nextSetupExePath = "$PSScriptRoot\contrib\win-installer-legacy\podman-9.9.9-dev-setup.exe"
if (!(Test-Path -Path $nextSetupExePath -PathType Leaf)) {
Write-Host 'The automated tests include testing the upgrade from current version to a future version.'
Write-Host 'That requires a version 9.9.9 of the installer:'
Write-Host ' .\winmake.ps1 installer-legacy 9.9.9'
Write-Host 'Build it and retry running installertest.'
Exit 1
}
$command = "$PSScriptRoot\contrib\win-installer-legacy\test-installer.ps1"
$command += ' -scenario all'
$command += " -provider $provider"
$command += " -setupExePath $setupExePath"
$command += " -nextSetupExePath $nextSetupExePath"
Run-Command "${command}"
}
function Documentation {
Write-Host 'Generating the documentation artifacts'
# Check that pandoc is installed
@@ -429,6 +367,9 @@ switch ($target) {
{ $_ -in '', 'podman-remote', 'podman' } {
Podman-Remote
}
'whoami' {
Write-Host "Current user: $(whoami)"
}
'localunit' {
Local-Unit
}
@@ -463,22 +404,6 @@ switch ($target) {
Test-Installer
}
}
'installer-legacy' {
if ($params.Count -gt 1) {
Installer -version $params[1] -installerPath $PSScriptRoot\contrib\win-installer-legacy
}
else {
Installer -installerPath $PSScriptRoot\contrib\win-installer-legacy
}
}
'installertest-legacy' {
if ($params.Count -gt 1) {
Test-Installer-Legacy -provider $params[1]
}
else {
Test-Installer-Legacy
}
}
'docs' {
Documentation
}