GlazeWM is a tiling window manager for macOS and Windows inspired by i3wm.
refactor: separate out ui fragment from standalone wix template
Lars Berger63843b23a509
diff --git a/.github/workflows/package.yaml b/.github/workflows/package.yamlindex f1e98726..66711b70 100644--- a/.github/workflows/package.yaml+++ b/.github/workflows/package.yaml@@ -37,25 +37,22 @@ jobs:wix extension add WixToolset.UI.wixext/5 WixToolset.Util.wixext/5 WixToolset.BootstrapperApplications.wixext/5- name: Create MSI installer (x64)- env:- VERSION_NUMBER: ${{ needs.next-version.outputs.new-release-version }}run: |wix build -arch "x64" -ext WixToolset.UI.wixext -ext WixToolset.Util.wixext \- -out "./tmp/installer-x64.msi" "./resources/wix/standalone.wxs"+ -out "./tmp/installer-x64.msi" "./resources/wix/standalone.wxs" "./resources/wix/standalone-ui.wxs"+ -d VERSION_NUMBER="${{ needs.next-version.outputs.new-release-version }}"- name: Create MSI installer (arm64)- env:- VERSION_NUMBER: ${{ needs.next-version.outputs.new-release-version }}run: |wix build -arch "arm64" -ext WixToolset.UI.wixext -ext WixToolset.Util.wixext \- -out "./tmp/installer-arm64.msi" "./resources/wix/standalone.wxs"+ -out "./tmp/installer-arm64.msi" "./resources/wix/standalone.wxs" "./resources/wix/standalone-ui.wxs"+ -d VERSION_NUMBER="${{ needs.next-version.outputs.new-release-version }}"- name: Create universal installer- env:- VERSION_NUMBER: ${{ needs.next-version.outputs.new-release-version }}run: |wix build -arch "x64" -ext WixToolset.BootstrapperApplications.wixext \-out "./tmp/installer-universal.exe" "./resources/wix/bundle.wxs"+ -d VERSION_NUMBER="${{ needs.next-version.outputs.new-release-version }}"- uses: actions/upload-artifact@v4with:diff --git a/resources/wix/bundle.wxs b/resources/wix/bundle.wxsindex 252a4147..e493b905 100644--- a/resources/wix/bundle.wxs+++ b/resources/wix/bundle.wxs@@ -2,7 +2,7 @@xmlns="http://wixtoolset.org/schemas/v4/wxs"xmlns:ui="http://wixtoolset.org/schemas/v4/wxs/ui"xmlns:bal="http://wixtoolset.org/schemas/v4/wxs/bal">- <Bundle Name="GlazeWM" Version="$(env.VERSION_NUMBER)"+ <Bundle Name="GlazeWM" Version="$(var.VERSION_NUMBER)"UpgradeCode="f57adff3-4521-4a6b-87b1-d34a7d9bae1e"Manufacturer="Glzr Software Pte. Ltd."DisableModify="yes"diff --git a/resources/wix/standalone-ui.wxs b/resources/wix/standalone-ui.wxsnew file mode 100644index 00000000..79235cb4--- /dev/null+++ b/resources/wix/standalone-ui.wxs@@ -0,0 +1,157 @@+<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:ui="http://wixtoolset.org/schemas/v4/wxs/ui">+ <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="AddToStartMenuCheckbox"+ Type="CheckBox"+ X="135"+ Y="190"+ Width="226"+ Height="18"+ CheckBoxValue="1"+ Property="ADD_START_MENU"+ Default="no"+ Text="Add shortcut to Start Menu"+ />+ <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 <> 1" />+ <Publish+ Event="SpawnDialog"+ Value="OutOfRbDiskDlg"+ Condition="OutOfDiskSpace = 1 AND OutOfNoRbDiskSpace = 0 AND (PROMPTROLLBACKCOST="P" OR NOT PROMPTROLLBACKCOST)"+ />+ <Publish+ Event="EndDialog"+ Value="Return"+ Condition="OutOfDiskSpace = 1 AND OutOfNoRbDiskSpace = 0 AND PROMPTROLLBACKCOST="D""+ />+ <Publish+ Event="EnableRollback"+ Value="False"+ Condition="OutOfDiskSpace = 1 AND OutOfNoRbDiskSpace = 0 AND PROMPTROLLBACKCOST="D""+ />+ <Publish+ Event="SpawnDialog"+ Value="OutOfDiskDlg"+ Condition="(OutOfDiskSpace = 1 AND OutOfNoRbDiskSpace = 1) OR (OutOfDiskSpace = 1 AND PROMPTROLLBACKCOST="F")"+ />+ </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>++ <UI Id="GlazeWMUI">+ <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>diff --git a/resources/wix/standalone.wxs b/resources/wix/standalone.wxsindex e72801b6..4b27987d 100644--- a/resources/wix/standalone.wxs+++ b/resources/wix/standalone.wxs@@ -1,7 +1,7 @@<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:ui="http://wixtoolset.org/schemas/v4/wxs/ui"><PackageName="GlazeWM"- Version="$(env.VERSION_NUMBER)"+ Version="$(var.VERSION_NUMBER)"UpgradeCode="ef0f849b-d90d-4647-bb26-730c6fce5f9e"Manufacturer="Glzr Software Pte. Ltd."Language="1033"@@ -24,159 +24,7 @@<!-- Enable CAB embed, otherwise, a separate .cab file is created. --><MediaTemplate EmbedCab="yes" />- <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="AddToStartMenuCheckbox"- Type="CheckBox"- X="135"- Y="190"- Width="226"- Height="18"- CheckBoxValue="1"- Property="ADD_START_MENU"- Default="no"- Text="Add shortcut to Start Menu"- />- <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 <> 1" />- <Publish- Event="SpawnDialog"- Value="OutOfRbDiskDlg"- Condition="OutOfDiskSpace = 1 AND OutOfNoRbDiskSpace = 0 AND (PROMPTROLLBACKCOST="P" OR NOT PROMPTROLLBACKCOST)"- />- <Publish- Event="EndDialog"- Value="Return"- Condition="OutOfDiskSpace = 1 AND OutOfNoRbDiskSpace = 0 AND PROMPTROLLBACKCOST="D""- />- <Publish- Event="EnableRollback"- Value="False"- Condition="OutOfDiskSpace = 1 AND OutOfNoRbDiskSpace = 0 AND PROMPTROLLBACKCOST="D""- />- <Publish- Event="SpawnDialog"- Value="OutOfDiskDlg"- Condition="(OutOfDiskSpace = 1 AND OutOfNoRbDiskSpace = 1) OR (OutOfDiskSpace = 1 AND PROMPTROLLBACKCOST="F")"- />- </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>-- <UI Id="GlazeWMUI">- <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" />+ <UIRef Id="GlazeWMUI" /><Feature Id="ProductFeature" Title="ConsoleApp" Level="1"><ComponentRef Id="INSTALLDIR_Component" />