feat: add NSIS and MSI installer support for Windows#336
Open
Dyn4sty wants to merge 10 commits intoblackboardsh:mainfrom
Open
feat: add NSIS and MSI installer support for Windows#336Dyn4sty wants to merge 10 commits intoblackboardsh:mainfrom
Dyn4sty wants to merge 10 commits intoblackboardsh:mainfrom
Conversation
added 10 commits
April 6, 2026 03:50
Windows tar (Git Bash) interprets absolute paths like "C:\..." as remote URLs. Use path.basename() so extraction runs correctly.
- Auto-detect Visual Studio version for CMake generator selection - Convert tar -C paths to Unix-style on Windows (bsdtar compat) - Skip extractor build on Windows (uses NSIS/WiX pipeline instead) - Guard extractor copy in copyToDist for Windows/debug builds
- Add nsis and msi configuration interfaces to ElectrobunConfig - Add getNsisSetupFileName() and getMsiFileName() to shared naming
Automatically download and cache NSIS and WiX v3 binaries when they are not found on PATH, enabling CI/dev builds without pre-installed installer toolchains.
Generate .exe installers using NSIS with support for per-user and per-machine installs, desktop/Start Menu shortcuts, uninstaller registration, and optional app data cleanup.
Generate .msi packages for enterprise deployment (GPO/SCCM/Intune) with deterministic UpgradeCode, major upgrade support, desktop and Start Menu shortcuts, and customizable UI assets.
- Add rcedit helper for embedding Windows icons at runtime - Add PNG-to-ICO conversion for installer icons - Switch createTar to spawnSync to avoid shell escaping issues - Escape single quotes in PowerShell command paths - Wire up NSIS and MSI generation during non-dev Windows builds - Scope macOS self-extracting bundle logic to macOS only
- Derive app path from process.execPath instead of fixed appData/app - Add canWriteToDir() probe to detect install location permissions - User-writable installs use update.bat + Task Scheduler as before - Elevated installs (e.g. Program Files) download and run the NSIS installer with /UPDATE /P /R for UAC-elevated file replacement
Add nsis and msi configuration blocks to the kitchen sink example and update lockfiles for new dependencies.
Run `ie4uinit.exe -show` to flush the Windows Icon Cache Database so that newly embedded or shortcut-referenced icons display immediately instead of showing stale/generic icons. - CLI dev build: call via Bun.spawnSync after rcedit icon embedding - NSIS installer: nsExec after shortcut creation and deletion - WiX/MSI installer: CustomAction scheduled after InstallFinalize All calls are best-effort and non-fatal. Made-with: Cursor
67f0bdf to
133305b
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
.exeinstaller: per-user/per-machine installs, desktop & Start Menu shortcuts, uninstaller with optional app-data cleanup, auto-download of NSIS toolchain when not on PATH.msiinstaller: enterprise-ready MSI packages for GPO/SCCM/Intune deployment, deterministic UpgradeCode, major upgrade support, customizable UI assets, auto-download of WiX v3 toolchainupdate.bat+ Task Scheduler, elevated (e.g. Program Files) downloads and runs the NSIS installer with/UPDATE /P /Rfor UAC-elevated replacementnsisandmsiconfiguration blocks added toElectrobunConfigwith full JSDoc documentationTest plan
electrobun buildon Windows produces.exe(NSIS) and.msi(WiX) installers alongside the existing.tar.zstnsis.enabled: falseormsi.enabled: falseskips the respective installer