GlazeWM is a tiling window manager for macOS and Windows inspired by i3wm.
feat: move console + noconsole builds in standalone wix template
Lars Berger63df6a80365c
diff --git a/resources/scripts/package.ps1 b/resources/scripts/package.ps1index 51ab2a26..76574675 100644--- a/resources/scripts/package.ps1+++ b/resources/scripts/package.ps1@@ -17,6 +17,9 @@ $latestInstallers | % { Invoke-WebRequest $_.browser_download_url -OutFile (Join# Rust targets to build for (x64 and arm64).$rustTargets = @("x86_64-pc-windows-msvc", "aarch64-pc-windows-msvc")+# Set the version number as an environment variable for `cargo build`.+$env:VERSION_NUMBER = $VERSION_NUMBER+foreach ($target in $rustTargets) {$outDir = if ($target -eq "x86_64-pc-windows-msvc") { "out/x64" } else { "out/arm64" }$sourceDir = "target/$target/release"@@ -40,7 +43,8 @@ foreach ($arch in $wixArchs) {Write-Output "Creating MSI installer ($arch)"wix build -arch $arch -ext WixToolset.UI.wixext -ext WixToolset.Util.wixext `-out "./out/installer-$arch.msi" "./resources/wix/standalone.wxs" "./resources/wix/standalone-ui.wxs" `- -d VERSION_NUMBER="$VERSION_NUMBER"+ -d VERSION_NUMBER="$VERSION_NUMBER" `+ -d EXE_DIR="out/$arch"}Write-Output "Creating universal installer"diff --git a/resources/wix/standalone-ui.wxs b/resources/wix/standalone-ui.wxsindex 17f2dfd1..8a73c1e3 100644--- a/resources/wix/standalone-ui.wxs+++ b/resources/wix/standalone-ui.wxs@@ -43,7 +43,7 @@Width="226"Height="18"CheckBoxValue="1"- Property="Custom_AddDesktopShortcut"+ Property="Custom_AddStartMenuShortcut"Default="no"Text="Add shortcut to Start Menu"/>diff --git a/resources/wix/standalone.wxs b/resources/wix/standalone.wxsindex 64dc416b..f4420d23 100644--- a/resources/wix/standalone.wxs+++ b/resources/wix/standalone.wxs@@ -26,43 +26,52 @@<UIRef Id="Custom_UI" /><!-- User input variable for whether to install Start Menu shortcut. -->- <Property Id="Custom_AddDesktopShortcut" Value="1" />+ <Property Id="Custom_AddStartMenuShortcut" Value="1" /><Feature Id="Custom_ProductFeature">- <ComponentRef Id="Custom_InstallDir" />- <ComponentRef Id="Custom_MainExe" />+ <ComponentRef Id="Custom_CreateInstallDir" />+ <ComponentRef Id="Custom_InstallRootFiles" />+ <ComponentRef Id="Custom_InstallCliFiles" /><!-- <ComponentRef Id="GlazeWMShortcut" /> --><ComponentRef Id="Custom_AddPathEnv" /></Feature><StandardDirectory Id="ProgramFiles6432Folder"><Directory Id="Custom_OrgProgramFiles" Name="glzr.io">- <Directory Id="INSTALLDIR" Name="GlazeWM">- <Component Id="Custom_InstallDir" Guid="14B310C4-9B5D-4DA5-ADF9-B9D008E4CD82" Bitness="always64">+ <Directory Id="INSTALLFOLDER" Name="GlazeWM">+ <Component Id="Custom_CreateInstallDir" Guid="14B310C4-9B5D-4DA5-ADF9-B9D008E4CD82" ><CreateFolder />- <RegistryKey Root="HKLM" Key="SOFTWARE/glzr.io/GlazeWM">- <RegistryValue Name="InstallDir" Value="[INSTALLDIR]" Type="string" />+ <RegistryKey Root="HKLM" Key="SOFTWARE\glzr.io\GlazeWM">+ <RegistryValue Name="InstallDir" Value="[INSTALLFOLDER]" Type="string" /></RegistryKey></Component>- <Component Id="Custom_MainExe" Guid="73752F94-6589-4C7B-ABED-39D655A19714" Bitness="always64">- <File Id="GlazeWMExeFile" Name="GlazeWM.exe" Source="target/release/wm.exe" KeyPath="yes" />+ <Component Id="Custom_InstallRootFiles" Guid="73752F94-6589-4C7B-ABED-39D655A19714" >+ <File Id="Custom_RootExe" Source="$(var.EXE_DIR)/noconsole/glazewm.exe" KeyPath="yes" />+ <File Id="Custom_RootWatcherExe" Source="$(var.EXE_DIR)/noconsole/glazewm-watcher.exe" /></Component>- </Directory>- <!-- Add CLI to PATH. -->- <Component Id="Custom_AddPathEnv" Guid="66a4be46-19ae-4ed4-944f-b01673887f64" KeyPath="yes">- <Environment- Id="Custom_PathEnv"- Value="[INSTALLDIR]/cli"- Name="PATH"- Permanent="no"- Part="first"- Action="set"- System="yes"- />- </Component>+ <Directory Id="Custom_CliDir" Name="cli">+ <Component Id="Custom_InstallCliFiles" Guid="916284d8-100c-4f37-8d8c-2722b01cb3dd" >+ <File Id="Custom_CliExe" Source="$(var.EXE_DIR)/console/glazewm.exe" />+ <File Id="Custom_CliWatcherExe" Source="$(var.EXE_DIR)/console/glazewm-watcher.exe" />+ </Component>+ </Directory>+ </Directory></Directory></StandardDirectory>++ <!-- Add CLI directory to PATH. -->+ <Component Id="Custom_AddPathEnv" Guid="66a4be46-19ae-4ed4-944f-b01673887f64" KeyPath="yes">+ <Environment+ Id="Custom_PathEnv"+ Value="[INSTALLFOLDER]/cli"+ Name="PATH"+ Permanent="no"+ Part="first"+ Action="set"+ System="yes"+ />+ </Component></Package></Wix>