Skip to content

Add package:win script that builds the Windows installer from WSL - #2

Merged
Murbal merged 1 commit into
mainfrom
feature/package-win-wsl
Nov 26, 2026
Merged

Murbal merged 1 commit into
mainfrom
feature/package-win-wsl

Conversation

@Murbal

@Murbal Murbal commented Nov 26, 2026

Copy link
Copy Markdown
Owner

Summary

  • Rename the package script to package:win, to match package:linux and package:mac.
  • Add scripts/package-win.mjs. Under WSL it copies the built app to the Windows host's temp directory and runs electron-builder there with the host's Node. Building the NSIS installer on Linux needs Wine, which WSL doesn't have.
  • The script copies the installer and its .blockmap back into release/<version>/. It also removes the broken stub and .7z left by earlier Linux attempts.
  • Outside WSL (native Windows, Linux, macOS) the script runs electron-builder --win --x64 as before.
  • Add scripts/**/*.mjs to the Node globals in the ESLint config, and update the README command list.
  • The Windows host needs Node with internet access. The first run downloads electron-builder and the NSIS tools.

Testing

  • Ran npm run package:win from WSL twice. Both runs produced PhotoEarth Setup 0.1.0.exe and its .blockmap.
  • npm run typecheck, npm run lint, and npm test pass (464 tests).
  • Installer not run on a Windows machine: Not run.
  • Native Windows, Linux, and macOS paths of the script: Not run.

- Replace the `package` script with `package:win`, which runs scripts/package-win.mjs
- Under WSL, stage the built app in the Windows temp dir and run electron-builder on the host, since Wine is needed for the NSIS uninstaller on Linux
- Copy the resulting installer back into release/<version>/
- Lint config covers scripts/**/*.mjs; README documents the new command
@Murbal
Murbal merged commit 64142f6 into main Nov 26, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant