Skip to content

fix: Windows Electron desktop build compatibility#579

Open
prasairaul-del wants to merge 1 commit into
outsourc-e:mainfrom
prasairaul-del:fix/windows-desktop
Open

fix: Windows Electron desktop build compatibility#579
prasairaul-del wants to merge 1 commit into
outsourc-e:mainfrom
prasairaul-del:fix/windows-desktop

Conversation

@prasairaul-del
Copy link
Copy Markdown

Summary

Fixes Windows compatibility for the Electron desktop app (5 files changed, +361/-33).

Changes

electron/main.cjs — 6 Windows fixes

  • fs import: full module import (not just { existsSync }) for fs.openSync/closeSync
  • isHermesInstalled(): uses 'where hermes' on Windows, 'which hermes' on macOS/Linux
  • getTempDir(): returns %TEMP% on Windows, /tmp on macOS/Linux
  • spawnDetached(): uses cmd /c + windowsHide on Windows, bash -lc + nohup on macOS/Linux
  • installHermesInBackground(): uses pip install on Windows (not curl|bash)
  • desktop:open-logs: opens %TEMP% (not /tmp)

electron-builder.config.cjs

  • Added executableName and artifactName for correct output files
  • Added portable target alongside NSIS

package.json

  • Removed NODE_OPTIONS prefix from build/dev/electron:dev scripts (breaks Windows cmd)

src/server/swarm-lifecycle.ts

  • Added 'export' to sendToWorker function (fixes broken import in swarm-notifications.ts)

AGENTS.md

  • Updated Windows setup notes with 3-service architecture and spawn fixes

Verified

  • electron:dev boots successfully on Windows (enhanced status, all capabilities)
  • electron:build:win produces working 204.7 MB installer
  • App installs and runs from desktop shortcut
  • PWA fallback at http://127.0.0.1:3000 remains functional

- electron/main.cjs: 6 Windows fixes
  - fs imported as full module (not just existsSync)
  - isHermesInstalled() uses 'where hermes' on Windows
  - getTempDir() helper: %TEMP% on Windows, /tmp on macOS/Linux
  - spawnDetached() uses cmd /c + windowsHide on Windows
  - installHermesInBackground() uses pip install (not curl|bash)
  - desktop:open-logs opens %TEMP% (not /tmp)
- electron-builder.config.cjs: added executableName, artifactName, portable target
- package.json: removed NODE_OPTIONS prefix (breaks Windows cmd)
- src/server/swarm-lifecycle.ts: export sendToWorker (fixes broken import)
- AGENTS.md: updated Windows setup notes
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