Making gvproxy.exe optional for building Windows installer

Signed-off-by: Arthur Sengileyev <arthur.sengileyev@gmail.com>
This commit is contained in:
Arthur Sengileyev
2023-01-29 21:26:25 +02:00
committed by openshift-cherrypick-robot
parent 63f964c08b
commit 45b00b648f
3 changed files with 25 additions and 8 deletions

View File

@ -132,10 +132,15 @@ FetchPanel
.\build-hooks.bat; ExitOnError
SignItem @("artifacts/win-sshproxy.exe",
"artifacts/gvproxy.exe",
"artifacts/podman.exe",
"artifacts/podman-msihooks.dll",
"artifacts/podman-wslkerninst.exe")
$gvExists = Test-Path "artifacts/gvproxy.exe"
if ($gvExists) {
SignItem @("artifacts/gvproxy.exe")
} else {
$env:UseGVProxy = "Skip"
}
.\build-msi.bat $ENV:INSTVER; ExitOnError
SignItem @("podman.msi")

View File

@ -6,6 +6,12 @@
<?error VERSION must be defined via command line argument?>
<?endif?>
<?ifdef env.UseGVProxy?>
<?define UseGVProxy = "$(env.UseGVProxy)"?>
<?else?>
<?define UseGVProxy = ""?>
<?endif?>
<Product Name="Podman $(var.VERSION)" Id="*" UpgradeCode="696BAB5D-CA1F-4B05-B123-320F245B8D6D" Version="$(var.VERSION)" Language="1033" Manufacturer="Red Hat Inc.">
<Package Id="*" Platform="x64" Keywords="Installer" Description="Red Hat's Podman $(var.VERSION) Installer" Comments="Apache 2.0 License" Manufacturer="Red Hat Inc." InstallScope="perMachine" InstallerVersion="200" Compressed="yes"/>
@ -30,9 +36,11 @@
<Component Id="WinSshProxyExecutable" Guid="0DA730AB-2F97-40E8-A8FC-356E88EAA4D2" Win64="yes">
<File Id="WinSshProxyExecutableFile" Name="win-sshproxy.exe" Source="artifacts/win-sshproxy.exe" KeyPath="yes"/>
</Component>
<Component Id="GvProxyExecutable" Guid="1A4A2975-AD2D-44AA-974B-9B343C098333" Win64="yes">
<?if $(var.UseGVProxy) != Skip?>
<Component Id="GvProxyExecutable" Guid="1A4A2975-AD2D-44AA-974B-9B343C098333" Win64="yes">
<File Id="GvProxyExecutableFile" Name="gvproxy.exe" Source="artifacts/gvproxy.exe" KeyPath="yes"/>
</Component>
<?endif?>
<Component Id="GuideHTMLComponent" Guid="8B23C76B-F7D4-4030-8C46-1B5729E616B5" Win64="yes">
<File Id="GuideHTMLFile" Name="welcome-podman.html" Source="docs/podman-for-windows.html" KeyPath="yes"/>
</Component>
@ -63,7 +71,9 @@
<ComponentRef Id="EnvEntriesComponent"/>
<ComponentRef Id="MainExecutable"/>
<ComponentRef Id="WinSshProxyExecutable"/>
<?if $(var.UseGVProxy) != Skip?>
<ComponentRef Id="GvProxyExecutable"/>
<?endif?>
<ComponentRef Id="GuideHTMLComponent"/>
<ComponentGroupRef Id="ManFiles"/>
<ComponentGroupRef Id="WSLFeature"/>

View File

@ -123,14 +123,16 @@ try {
Remove-Item -Recurse -Force -Path expand
}
$loc = Get-ChildItem -Recurse -Path . -Name gvproxy.exe
if (!$loc) {
throw "Could not obtain gvproxy.exe"
Write-Host "Copying artifacts"
Foreach ($fileName in "win-sshproxy.exe", "podman.exe") {
Copy-Artifact($fileName)
}
Write-Host "Copying artifacts"
Foreach ($fileName in "gvproxy.exe", "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")
}
$docsloc = Get-ChildItem -Path . -Name docs -Recurse