Skip to content
This repository was archived by the owner on Jun 8, 2026. It is now read-only.

FEA-1462: Add Windows distribution to electron-app - #267

Closed
mikeangstadt wants to merge 2 commits into
mainfrom
feat/windows-installer-targets
Closed

mikeangstadt wants to merge 2 commits into
mainfrom
feat/windows-installer-targets

Conversation

@mikeangstadt

Copy link
Copy Markdown
Contributor

Summary

  • add Windows NSIS packaging targets for x64 and arm64
  • add dist:mac, dist:win, and dist:all desktop scripts
  • make the electron-builder wrapper honor explicit platform flags instead of always forcing --mac
  • add a Windows .ico asset and bump Desktop to 0.15.105

Testing

  • node --check apps/desktop/scripts/run-electron-builder.mjs
  • git diff --check

Risks

  • Windows packaging is config-only here and was not exercised on a Windows host in this environment
  • Packaging output still uses the existing dist-dmg directory name, which is mac-centric but functionally harmless

- add Windows NSIS x64/arm64 packaging config and installer options to electron-builder\n- allow the electron-builder wrapper to honor explicit platform flags and add dist:mac/dist:win/dist:all scripts\n- add a generated Windows .ico asset and bump the desktop version to 0.15.105\n\nTesting:\n- node --check apps/desktop/scripts/run-electron-builder.mjs\n- git diff --check\n\nRisks:\n- Windows packaging is config-only here and has not been exercised on a Windows host in this environment\n- dist output still shares the existing dist-dmg directory naming, which is harmless but mac-centric
@mikeangstadt
mikeangstadt requested a review from a team June 2, 2026 17:38

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f9a690e52a

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread apps/desktop/scripts/run-electron-builder.mjs
Comment thread apps/desktop/package.json

@thadeusb thadeusb left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Config's clean and it's correctly scoped to config-only like you said. Codex already nailed the real gap (release never builds win). One heads-up from me on actually building the target, inline.

- split desktop release workflow into shared prepare, macOS publish, Windows publish, and finalization jobs so Windows artifacts are actually attached to releases on a Windows runner\n- document that Windows packaging requires a Windows host or wine-capable cross-build environment\n\nTesting:\n- git diff --check\n\nRisks:\n- Windows release path now depends on the windows-latest runner environment and has not been exercised in this local sandbox
@wongk

wongk commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

I believe it goes without saying, but I'll say it anyway - all the interaction that this app does with the local filesystem, not to mention many different CLI apps, is unlikely to work on Windows. We could support UI-only flows, but the app is not designed to work that way. I am doubtful anyone could even onboard on a Windows machine.

pnpm -C apps/desktop clean:package
pnpm -C apps/desktop build
pnpm -C apps/desktop stage:package
node apps/desktop/scripts/run-electron-builder.mjs --win --publish always

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This runs the wrapper with plain node from the repo root, but the wrapper spawns electron-builder by bare command name. electron-builder is only a desktop devDependency, so the package bin is available through the apps/desktop pnpm script/exec PATH, not guaranteed on the root Actions PATH. On windows-latest this can fail before any Windows installer is published. Please invoke it through pnpm -C apps/desktop exec node scripts/run-electron-builder.mjs --win --publish always or a dedicated desktop package script so the desktop bins are on PATH.

pnpm -C apps/desktop clean:package
pnpm -C apps/desktop build
pnpm -C apps/desktop stage:package
node apps/desktop/scripts/run-electron-builder.mjs --win --publish always

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This adds a second --publish always publisher while the macOS job also publishes the same version in parallel. For a new version, both jobs can pass prepare_release's no-release check and then race to create/upload v<version>; one job can fail or leave a partial draft that reruns then skip as already released. Please create the draft release once before the platform jobs, serialize the publishing step, or have platform jobs upload artifacts and publish everything from a single final job.

entitlementsInherit: build/entitlements.mac.plist
notarize: true

win:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This adds a Windows target that CI publishes, but there is no Windows signing configuration or fail-closed signing guard, and the Windows job only supplies GITHUB_TOKEN. electron-builder skips signing when signing material is absent, so the released NSIS installer/update can be unsigned. Since packaged builds already auto-download and install release updates, please either configure and verify Windows signing with forceCodeSigning before publishing, or gate Windows publishing until that is ready.

arch:
- x64
- arm64
artifactName: ${productName}-Setup-${version}-${arch}.${ext}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

With x64 and arm64 configured, NSIS keeps buildUniversalInstaller enabled by default; because this artifact name includes ${arch}, electron-builder builds the universal installer plus per-arch installers. That makes the Windows release contract more than the advertised x64/arm64 assets and leaves the intended updater/download target ambiguous. Please choose one contract explicitly, e.g. set buildUniversalInstaller: false for separate x64/arm64 installers or publish a single universal installer and update the naming/artifact patterns accordingly.

notarize: true

win:
icon: build/icon.ico

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

build/icon.ico is now a packaging input, but the icon source-of-truth flow still only documents/regenerates the PNG/ICNS and tray assets from app-icon.svg. Future icon regeneration will leave the Windows installer icon stale unless this path is reproducible. Please add .ico generation to the icon script or document the exact generation step alongside the existing icon workflow.

@shafty023

Copy link
Copy Markdown
Contributor

PR traceability issue: I fetched ClosedLoop FEA-1462 because the PR title references it, but that artifact is titled Deploy "success" must verify real prod health on no-op path and has no content or acceptance criteria; its parent PRD-329 is also deploy-pipeline focused and empty. That does not match this Windows Desktop packaging change. Please link this PR to the correct Windows packaging artifact/plan or update the ClosedLoop artifact before treating the PR as requirement-covered.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants