Skip to content

Installer Improvements - #678

Open
dpaulat wants to merge 7 commits into
developfrom
build/installer-improvements
Open

Installer Improvements#678
dpaulat wants to merge 7 commits into
developfrom
build/installer-improvements

Conversation

@dpaulat

@dpaulat dpaulat commented Jul 22, 2026

Copy link
Copy Markdown
Owner

Add NSIS bootstrapper that installs both the Visual C++ Redistributable and .msi.

Additional improvements:

  • Update should not remove shortcut, potentially breaking pins

Subsequent updates will migrate the auto-updater to use the NSIS bootstrapper instead of the .msi. The .msi will be retained for compatibility for the foreseeable future.

@dpaulat dpaulat added the coderabbit CodeRabbit should review this pull request label Jul 22, 2026
@dpaulat dpaulat mentioned this pull request Jul 22, 2026
@coderabbitai

coderabbitai Bot commented Jul 22, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The Windows packaging flow now builds an NSIS bootstrapper around the MSI, installs the VC++ redistributable separately, adjusts MSI upgrade behavior, and uploads both unsigned and signed bootstrap executables through CI signing workflows.

Changes

Windows packaging and installer delivery

Layer / File(s) Summary
Package composition and upgrade configuration
data, scwx-qt/scwx-qt.cmake, scwx-qt/wix.template.in
Windows deployment omits the compiler runtime, WiX upgrades overwrite required files and preserve shortcuts, and the referenced data subproject is updated.
Bootstrapper definition and build tooling
scwx-qt/nsis/supercell-wx.nsi, tools/build-windows-nsis-bootstrapper.ps1
The NSIS bootstrapper stages and installs the VC++ redistributable and MSI, handles architecture and reboot states, and launches the installed application unelevated.
CI build, signing, and artifact delivery
.github/workflows/ci.yml, .github/workflows/sign-windows-packages.yml
CI installs NSIS, builds the bootstrapper, submits it for signing, and uploads MSI, unsigned EXE, and signed EXE artifacts.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Sequence Diagram(s)

sequenceDiagram
  participant CI
  participant CPack
  participant BootstrapBuild as Bootstrapper build script
  participant SignPath
  participant ArtifactStore as Artifact storage
  CI->>CPack: Build Windows MSI
  CI->>BootstrapBuild: Build NSIS bootstrapper
  BootstrapBuild-->>CI: Produce unsigned EXE
  CI->>ArtifactStore: Upload unsigned EXE
  CI->>SignPath: Submit EXE for signing
  SignPath-->>CI: Return signed EXE
  CI->>ArtifactStore: Upload signed EXE
Loading

Possibly related PRs

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Title check ❓ Inconclusive The title is too generic and does not convey the specific installer changes in the PR. Rename it to describe the main change, such as adding an NSIS bootstrapper or installer workflow updates.
✅ Passed checks (4 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description check ✅ Passed The description is clearly about the NSIS bootstrapper and related installer behavior changes.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch build/installer-improvements

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@scwx-qt/nsis/supercell-wx.nsi`:
- Around line 114-120: Update Bootstrapper_StripTrailingSlash to preserve
drive-root paths: when $INSTDIR matches a drive root such as C:\, normalize it
to an equivalent absolute form like C:\. instead of removing the trailing
backslash. Continue stripping trailing backslashes for non-root install paths
before constructing the msiexec command.

In `@scwx-qt/wix.template.in`:
- Around line 49-53: Update the installer upgrade handling around
RemoveShortcuts and RemoveExistingProducts so upgrades from existing releases do
not remove the prior shortcut component; use a migration strategy that preserves
the old shortcuts, or explicitly document and mitigate the unavoidable one-time
pin break during the first bootstrapper migration.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 5927b1a9-857a-42be-976f-93b5badec89d

📥 Commits

Reviewing files that changed from the base of the PR and between efb4e3a and 90da609.

⛔ Files ignored due to path filters (2)
  • scwx-qt/nsis/scwx-header.bmp is excluded by !**/*.bmp
  • scwx-qt/nsis/scwx-welcome.bmp is excluded by !**/*.bmp
📒 Files selected for processing (7)
  • .github/workflows/ci.yml
  • .github/workflows/sign-windows-packages.yml
  • data
  • scwx-qt/nsis/supercell-wx.nsi
  • scwx-qt/scwx-qt.cmake
  • scwx-qt/wix.template.in
  • tools/build-windows-nsis-bootstrapper.ps1

Comment on lines +114 to +120
Function Bootstrapper_StripTrailingSlash
; Ensures INSTALL_ROOT="..." is not broken by a trailing backslash escape.
StrCpy $R8 $INSTDIR 1 -1
${If} $R8 == "\"
StrCpy $INSTDIR $INSTDIR -1
${EndIf}
FunctionEnd

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Preserve drive-root install paths.

Selecting C:\ changes $INSTDIR to C:, so INSTALL_ROOT becomes drive-relative and can install into an unintended directory. Handle drive roots separately—for example, normalize C:\ to C:\. before constructing the msiexec command.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@scwx-qt/nsis/supercell-wx.nsi` around lines 114 - 120, Update
Bootstrapper_StripTrailingSlash to preserve drive-root paths: when $INSTDIR
matches a drive root such as C:\, normalize it to an equivalent absolute form
like C:\. instead of removing the trailing backslash. Continue stripping
trailing backslashes for non-root install paths before constructing the msiexec
command.

Comment thread scwx-qt/wix.template.in
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

coderabbit CodeRabbit should review this pull request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant