From fd949b74c798d0cfc98275d58778b16155435759 Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 12 Jun 2026 07:28:04 +0000 Subject: [PATCH] refactor(installer): split installer UI into its own ui.wxs Moves the WixUI_Minimal UI and finish-screen launch checkbox out of main.wxs into a dedicated ui.wxs fragment, referenced from main.wxs via . Keeps the package/feature definition and the UI concerns in separate files. Updates the release workflow to compile both .wxs files (candle now writes per-source .wixobj into a directory) and link both objects. https://claude.ai/code/session_01DFVSKgViFaxEjZD2KsTdtt --- .github/workflows/release.yml | 17 +++++++++---- packaging/windows/main.wxs | 31 ++---------------------- packaging/windows/ui.wxs | 45 +++++++++++++++++++++++++++++++++++ 3 files changed, 59 insertions(+), 34 deletions(-) create mode 100644 packaging/windows/ui.wxs diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3b7aac55..f661ca86 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -128,17 +128,24 @@ jobs: # filename. $exePath = (Resolve-Path target\release\OpenCADStudio.exe).Path $iconPath = (Resolve-Path packaging\windows\AppIcon.ico).Path - $wxsPath = (Resolve-Path packaging\windows\main.wxs).Path - $wixObj = Join-Path $PWD "packaging\windows\main.wixobj" + # main.wxs holds the package/feature; ui.wxs holds the installer UI + # and finish-screen launch checkbox. Both compile together. + $mainWxs = (Resolve-Path packaging\windows\main.wxs).Path + $uiWxs = (Resolve-Path packaging\windows\ui.wxs).Path + # candle writes one .wixobj per source into this directory (the + # trailing slash tells it -out is a folder, not a single file). + $objDir = Join-Path $PWD "packaging\windows\" $msiPath = Join-Path $PWD "OpenCADStudio.msi" & $candle -arch x64 ` "-dVersion=$version" ` "-dSource=$exePath" ` "-dIcon=$iconPath" ` - $wxsPath ` - -out $wixObj + $mainWxs $uiWxs ` + -out $objDir if ($LASTEXITCODE -ne 0) { throw "candle failed" } - & $light $wixObj -ext WixUIExtension -out $msiPath + $mainObj = Join-Path $objDir "main.wixobj" + $uiObj = Join-Path $objDir "ui.wixobj" + & $light $mainObj $uiObj -ext WixUIExtension -out $msiPath if ($LASTEXITCODE -ne 0) { throw "light failed" } - name: Sign MSI installer (Azure Trusted Signing) diff --git a/packaging/windows/main.wxs b/packaging/windows/main.wxs index 9e4e417e..5487c2b7 100644 --- a/packaging/windows/main.wxs +++ b/packaging/windows/main.wxs @@ -122,35 +122,8 @@ - - - - - - - - - - WIXUI_EXITDIALOGOPTIONALCHECKBOX = 1 AND NOT Installed - + + diff --git a/packaging/windows/ui.wxs b/packaging/windows/ui.wxs new file mode 100644 index 00000000..de89b4bc --- /dev/null +++ b/packaging/windows/ui.wxs @@ -0,0 +1,45 @@ + + + + + + + + + + + + + + WIXUI_EXITDIALOGOPTIONALCHECKBOX = 1 AND NOT Installed + + +