jaraco / jaraco/pluslife-analyzer

Windows build support

Open
#1 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
1
Forks
0
PR merge metrics
No merged PRs in 30d

Description

Provide a Windows build of the app, plus documented build instructions.

Electron itself is cross-platform, but a few pieces are currently macOS-only and need attention:

### Keep-awake
`src/main.js` spawns `/usr/bin/caffeinate` (macOS-only) as the primary sleep-blocker, with Electron's cross-platform `powerSaveBlocker` as a fallback. On Windows there is no `caffeinate`; make the mechanism platform-aware:
- macOS: keep `caffeinate -i -w `.
- Windows/Linux: rely on `powerSaveBlocker.start('prevent-app-suspension')` (maps to `SetThreadExecutionState` on Windows). Consider also `'prevent-display-sleep'`.

### Dev launch / TCC
The `open`-based launch and `scripts/patch-dev-plist.sh` (re-sign + `NSBluetoothAlwaysUsageDescription`) exist purely to work around the macOS TCC responsible-process crash. Windows has no equivalent — a plain `electron .` dev run works there. Make `npm start`/`npm run debug` pick the right path per-OS (or add `start:win`).

### Packaging
- Add a `win` target to electron-builder `build` config (nsis installer and/or portable zip), plus an app icon.
- Web Bluetooth is supported in Chromium/Electron on Windows, so the connection path should work unchanged.

### Building Windows artifacts
- Document building on a Windows machine (`npm run dist -- --win`).
- Note that cross-building Windows installers from macOS needs wine (nsis); a portable/zip target is simpler. Recommend a GitHub Actions `windows-latest` job as the reliable path, and document it.

### Acceptance
- `README` has a "Build for Windows" section.
- Keep-awake verified working on Windows.
- A downloadable Windows artifact is produced (locally or via CI).

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with src/main.js, the electron-builder build configuration, scripts/patch-dev-plist.sh, and the npm start/debug/dist scripts. Compare the existing macOS keep-awake and launch paths, then review README and any GitHub Actions workflows. Done means Windows keep-awake works, a Windows artifact is produced locally or in CI, and README documents the build path.

Written by the indexing model from the issue text.

Assessment

Tech stack
electron, github-actions, javascript
Domain
build-system, desktop, devops, documentation, operating-systems
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.