Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions .github/workflows/windows-artifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: ['windows-2022']
os: ['windows-2025']
go: ['1.24']
steps:
- name: Check out repository code
Expand All @@ -30,9 +30,8 @@ jobs:
uses: actions/setup-go@v6
with:
go-version: ${{ matrix.go }}
- name: Set path for heat.exe and light.exe
shell: bash
run: echo "$WIX\\bin" >>$GITHUB_PATH
- name: Install DotNet.SDK.10
run: winget install --id Microsoft.DotNet.SDK.10 --source winget
- name: Build Windows installer
run: make out/windows-amd64/crc-windows-installer.zip
- name: Upload windows installer artifact
Expand Down
23 changes: 6 additions & 17 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -363,32 +363,21 @@ $(BUILD_DIR)/macos-universal/crc-macos-installer.tar: packagedir
-e 's/__OPENSHIFT_VERSION__/'$(OPENSHIFT_VERSION)'/g' \
$< >$@

$(HOST_BUILD_DIR)/GenMsiWxs: packaging/windows/gen_msi_wxs.go
go build -o $@ -ldflags="-X main.crcVersion=$(CRC_VERSION)" $<

CRC_EXE=crc.exe
BUNDLE_NAME=crc_hyperv_$(OPENSHIFT_VERSION).$(BUNDLE_EXTENSION)

.PHONY: msidir
msidir: clean_windows_msi embed-download-windows $(HOST_BUILD_DIR)/GenMsiWxs windows-release-binary $(PACKAGE_DIR)/product.wxs.template
mkdir -p $(PACKAGE_DIR)/msi
cp $(EMBED_DOWNLOAD_DIR)/* $(PACKAGE_DIR)/msi
cp $(HOST_BUILD_DIR)/crc.exe $(PACKAGE_DIR)/msi/$(CRC_EXE)
$(HOST_BUILD_DIR)/GenMsiWxs
cp -r $(PACKAGE_DIR)/Resources $(PACKAGE_DIR)/msi/
cp $(PACKAGE_DIR)/*.wxs $(PACKAGE_DIR)/msi
rm $(PACKAGE_DIR)/product.wxs
msidir: clean_windows_msi embed-download-windows windows-release-binary
cp $(EMBED_DOWNLOAD_DIR)/* $(PACKAGE_DIR)/
cp $(HOST_BUILD_DIR)/crc.exe $(PACKAGE_DIR)/

$(BUILD_DIR)/windows-amd64/crc-windows-amd64.msi: msidir
candle.exe -arch x64 -ext WixUtilExtension -o $(PACKAGE_DIR)/msi/ $(PACKAGE_DIR)/msi/*.wxs
light.exe -ext WixUIExtension -ext WixUtilExtension -sacl -spdb -sice:ICE61 -sice:ICE69 -b $(PACKAGE_DIR)/msi -loc $(PACKAGE_DIR)/WixUI_en.wxl -out $@ $(PACKAGE_DIR)/msi/*.wixobj
dotnet build $(PACKAGE_DIR)/crc-installer.wixproj --property:DefineConstants="Version=$(CRC_VERSION)" --output $(HOST_BUILD_DIR)

CABS_MSI = "*.cab,crc-windows-amd64.msi"
MSI=$(HOST_BUILD_DIR)/crc-windows-amd64.msi
$(BUILD_DIR)/windows-amd64/crc-windows-installer.zip: $(BUILD_DIR)/windows-amd64/crc-windows-amd64.msi
rm -f $(HOST_BUILD_DIR)/crc.exe
rm -f $(HOST_BUILD_DIR)/crc-embedder
rm -f $(HOST_BUILD_DIR)/split
pwsh -NoProfile -Command "cd $(HOST_BUILD_DIR); Compress-Archive -Path $(CABS_MSI) -DestinationPath crc-windows-installer.zip"
pwsh -NoProfile -Command 'Compress-Archive -Path "$(MSI)" -DestinationPath $(HOST_BUILD_DIR)/crc-windows-installer.zip'
cd $(@D) && sha256sum $(@F)>$(@F).sha256sum

.PHONY: choco choco-clean
Expand Down
1 change: 0 additions & 1 deletion packaging/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
/darwin/VERSION
/darwin/*.pkg
/windows/msi/
/windows/product.wxs
/chocolatey/crc/*.nupkg
/chocolatey/crc/crc.nuspec
/chocolatey/crc/tools/*.exe
Expand Down
25 changes: 7 additions & 18 deletions packaging/windows/LicenseAgreementDlg_HK.wxs
Original file line number Diff line number Diff line change
@@ -1,30 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>

<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
<Fragment>
<UI>
<Dialog Id="LicenseAgreementDlg_HK" Width="370" Height="270" Title="!(loc.LicenseAgreementDlg_Title)">
<Control Id="LicenseAcceptedCheckBox" Type="CheckBox" X="20" Y="207" Width="330" Height="18" CheckBoxValue="1" Property="LicenseAccepted"
Text="!(loc.LicenseAgreementDlgLicenseAcceptedCheckBox)" />
<Control Id="LicenseAcceptedCheckBox" Type="CheckBox" X="20" Y="207" Width="330" Height="18" CheckBoxValue="1" Property="LicenseAccepted" Text="!(loc.LicenseAgreementDlgLicenseAcceptedCheckBox)" />
<Control Id="Back" Type="PushButton" X="180" Y="243" Width="56" Height="17" Text="!(loc.WixUIBack)" />
<Control Id="Next" Type="PushButton" X="236" Y="243" Width="56" Height="17" Default="yes" Text="!(loc.WixUINext)">
<Publish Event="SpawnWaitDialog" Value="WaitForCostingDlg">CostingComplete = 1</Publish>
<Condition Action="disable"><![CDATA[LicenseAccepted <> "1"]]></Condition>
<Condition Action="enable">LicenseAccepted = "1"</Condition>
<Control Id="Next" Type="PushButton" X="236" Y="243" Width="56" Height="17" Default="yes" Text="!(loc.WixUINext)" DisableCondition="LicenseAccepted &lt;&gt; &quot;1&quot;" EnableCondition="LicenseAccepted = &quot;1&quot;">
<Publish Event="SpawnWaitDialog" Value="WaitForCostingDlg" Condition="CostingComplete = 1" />
</Control>
<Control Id="Cancel" Type="PushButton" X="304" Y="243" Width="56" Height="17" Cancel="yes" Text="!(loc.WixUICancel)">
<Publish Event="SpawnDialog" Value="CancelDlg">1</Publish>
<Publish Event="SpawnDialog" Value="CancelDlg" />
</Control>
<Control Id="BannerBitmap" Type="Bitmap" X="0" Y="0" Width="370" Height="44" TabSkip="no" Text="!(loc.LicenseAgreementDlgBannerBitmap)" />
<Control Id="LicenseText" Type="ScrollableText" X="20" Y="60" Width="330" Height="140" Sunken="yes" TabSkip="no">


<Text SourceFile="./Resources/LICENSE.rtf" />


</Control>
<Control Id="Print" Type="PushButton" X="112" Y="243" Width="56" Height="17" Text="!(loc.WixUIPrint)">
<Publish Event="DoAction" Value="WixUIPrintEula">1</Publish>
<Text SourceFile="./Resources/LICENSE.rtf" />
</Control>
<Control Id="BannerLine" Type="Line" X="0" Y="44" Width="370" Height="0" />
<Control Id="BottomLine" Type="Line" X="0" Y="234" Width="370" Height="0" />
Expand All @@ -34,3 +22,4 @@
</UI>
</Fragment>
</Wix>

45 changes: 22 additions & 23 deletions packaging/windows/WixUI_HK.wxs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
<Fragment>

<UI Id="WixUI_HK">
Expand All @@ -12,7 +11,6 @@
<Property Id="ARPNOMODIFY" Value="1" />
<Property Id="ARPNOREPAIR" Value="1" />

<DialogRef Id="BrowseDlg" />
<DialogRef Id="DiskCostDlg" />
<DialogRef Id="ErrorDlg" />
<DialogRef Id="FatalError" />
Expand All @@ -25,48 +23,49 @@

<!-- Make sure to include custom dialogs in the installer database via a DialogRef command,
especially if they are not included explicitly in the publish chain below -->
<DialogRef Id="LicenseAgreementDlg_HK"/>
<DialogRef Id="LicenseAgreementDlg_HK" />

<!-- Custom dialog to ask for removal of old version if an upgrade is detected -->
<Dialog Id="OldVersionDlg" Width="240" Height="95" Title="[ProductName] Setup" NoMinimize="yes">
<Control Id="Text" Type="Text" X="28" Y="15" Width="194" Height="50">
<Text>A previous version of Red Hat OpenShift Local is currently installed. By continuing the installation this version will be uninstalled. Do you want to continue?</Text>
<Text Value="A previous version of Red Hat OpenShift Local is currently installed. By continuing the installation this version will be uninstalled. Do you want to continue?" />
</Control>
<Control Id="Exit" Type="PushButton" X="123" Y="67" Width="62" Height="17" Default="yes" Cancel="yes" Text="No, Exit">
<Publish Event="EndDialog" Value="Exit">1</Publish>
<Publish Event="EndDialog" Value="Exit" />
</Control>
<Control Id="Next" Type="PushButton" X="55" Y="67" Width="62" Height="17" Text="Yes, Uninstall">
<Publish Event="EndDialog" Value="Return">1</Publish>
<Publish Event="EndDialog" Value="Return" />
</Control>
</Dialog>

<Publish Dialog="ExitDialog" Control="Finish" Event="EndDialog" Value="Return" Order="999">1</Publish>
<Publish Dialog="ExitDialog" Control="Finish" Event="EndDialog" Value="Return" Order="999" />

<Publish Dialog="WelcomeDlg" Control="Next" Event="NewDialog" Value="OldVersionDlg"><![CDATA[CRCINSTALLED << "#1"]]></Publish>
<Publish Dialog="WelcomeDlg" Control="Next" Event="NewDialog" Value="LicenseAgreementDlg_HK"><![CDATA[NOT (CRCINSTALLED << "#1")]]></Publish>
<Publish Dialog="WelcomeDlg" Control="Next" Event="NewDialog" Value="OldVersionDlg" Condition="CRCINSTALLED &lt;&lt; &quot;#1&quot;" />
<Publish Dialog="WelcomeDlg" Control="Next" Event="NewDialog" Value="LicenseAgreementDlg_HK" Condition="NOT (CRCINSTALLED &lt;&lt; &quot;#1&quot;)" />

<Publish Dialog="OldVersionDlg" Control="Next" Event="NewDialog" Value="LicenseAgreementDlg_HK">1</Publish>
<Publish Dialog="OldVersionDlg" Control="Next" Event="NewDialog" Value="LicenseAgreementDlg_HK" />

<Publish Dialog="LicenseAgreementDlg_HK" Control="Back" Event="NewDialog" Value="WelcomeDlg">1</Publish>
<Publish Dialog="LicenseAgreementDlg_HK" Control="Next" Event="NewDialog" Value="VerifyReadyDlg">LicenseAccepted = "1"</Publish>
<Publish Dialog="LicenseAgreementDlg_HK" Control="Back" Event="NewDialog" Value="WelcomeDlg" />
<Publish Dialog="LicenseAgreementDlg_HK" Control="Next" Event="NewDialog" Value="VerifyReadyDlg" Condition="LicenseAccepted = &quot;1&quot;" />

<Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="LicenseAgreementDlg_HK">NOT Installed</Publish>
<Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="MaintenanceTypeDlg">Installed</Publish>
<Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="LicenseAgreementDlg_HK" Condition="NOT Installed" />
<Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="MaintenanceTypeDlg" Condition="Installed" />

<Publish Dialog="MaintenanceWelcomeDlg" Control="Next" Event="NewDialog" Value="MaintenanceTypeDlg">1</Publish>
<Publish Dialog="MaintenanceWelcomeDlg" Control="Next" Event="NewDialog" Value="MaintenanceTypeDlg" />

<Publish Dialog="MaintenanceTypeDlg" Control="RepairButton" Event="NewDialog" Value="VerifyReadyDlg">1</Publish>
<Publish Dialog="MaintenanceTypeDlg" Control="RemoveButton" Event="NewDialog" Value="VerifyReadyDlg">1</Publish>
<Publish Dialog="MaintenanceTypeDlg" Control="Back" Event="NewDialog" Value="MaintenanceWelcomeDlg">1</Publish>
<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" />
</UI>

<UIRef Id="WixUI_Common" />

<CustomAction Id="CA_Set_WIXUI_EXITDIALOGOPTIONALTEXT" Property="WIXUI_EXITDIALOGOPTIONALTEXT" Value="To finish installation of [ProductName] please restart your computer."/>
<CustomAction Id="CA_Set_WIXUI_EXITDIALOGOPTIONALTEXT_NOREBOOT" Property="WIXUI_EXITDIALOGOPTIONALTEXT" Value="Suceesfully installed [ProductName]."/>
<CustomAction Id="CA_Set_WIXUI_EXITDIALOGOPTIONALTEXT" Property="WIXUI_EXITDIALOGOPTIONALTEXT" Value="To finish installation of [ProductName] please restart your computer." />
<CustomAction Id="CA_Set_WIXUI_EXITDIALOGOPTIONALTEXT_NOREBOOT" Property="WIXUI_EXITDIALOGOPTIONALTEXT" Value="Successfully installed [ProductName]." />
<InstallUISequence>
<Custom Action="CA_Set_WIXUI_EXITDIALOGOPTIONALTEXT" After="FindRelatedProducts"><![CDATA[NOT WIX_UPGRADE_DETECTED]]></Custom>
<Custom Action="CA_Set_WIXUI_EXITDIALOGOPTIONALTEXT_NOREBOOT" After="FindRelatedProducts"><![CDATA[WIX_UPGRADE_DETECTED]]></Custom>
<Custom Action="CA_Set_WIXUI_EXITDIALOGOPTIONALTEXT" After="FindRelatedProducts" Condition="NOT WIX_UPGRADE_DETECTED" />
<Custom Action="CA_Set_WIXUI_EXITDIALOGOPTIONALTEXT_NOREBOOT" After="FindRelatedProducts" Condition="WIX_UPGRADE_DETECTED" />
</InstallUISequence>
</Fragment>
</Wix>

3 changes: 0 additions & 3 deletions packaging/windows/WixUI_en.wxl

This file was deleted.

20 changes: 20 additions & 0 deletions packaging/windows/crc-installer.wixproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<Project Sdk="WixToolset.Sdk/5.0.2">
<PropertyGroup>
<OutputType>Package</OutputType>
<OutputName>crc-windows-amd64</OutputName>
<Platform>x64</Platform>
<SuppressIces>ICE61</SuppressIces>
</PropertyGroup>

<PropertyGroup>
<AppendCultureToOutputPath>false</AppendCultureToOutputPath>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<AppendRuntimeIdentifierToOutputPath>false</AppendRuntimeIdentifierToOutputPath>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="WixToolset.Util.wixext" Version="5.0.2" />
<PackageReference Include="WixToolset.UI.wixext" Version="5.0.2" />
</ItemGroup>
</Project>

45 changes: 0 additions & 45 deletions packaging/windows/gen_msi_wxs.go

This file was deleted.

Loading
Loading