Skip to content

Windows installer for Cortex Desktop - #35

Merged
A21-devs merged 2 commits into
mainfrom
feat/desktop-installer
Nov 24, 2026
Merged

A21-devs merged 2 commits into
mainfrom
feat/desktop-installer

Conversation

@A21-devs

Copy link
Copy Markdown
Owner

Closes #34

What

  • electron-builder 26.18.0 (exact pin, like the other dev dependencies) and electron-builder.yml: NSIS, x64, per-user, folder choice, Start menu + desktop shortcuts, Cortex icon for the installer and uninstaller, deleteAppDataOnUninstall: false
  • npm run desktop:installer: runs desktop:package, then electron-builder --prepackaged release/Cortex-win32-x64, so the app folder is exactly what the zip ships (unpacked, no asar, the runner starts from it)
  • Release workflow: builds the installer after desktop:package and attaches Cortex-Setup-<tag>.exe next to the zips. Release notes list it first
  • README: the installer first, the zip as the no-install option

Testing

  • npm run check: 2801 passed, 1 skipped, build ok
  • npm run desktop:installer locally: release/Cortex-Setup-0.1.0.exe, 116 MB
  • Listed the installer with 7za: Cortex.exe, resources\app\main.js, resources\app\cortex-runner.js and the rest of the packaged folder are inside (87 files)
  • Didn't run the installer on this machine, it would add Start menu entries and an uninstall key

npm run desktop:installer wraps release/Cortex-win32-x64 (from
desktop:package) with electron-builder --prepackaged into
release/Cortex-Setup-<version>.exe. Per-user NSIS, choose the folder,
Start menu and desktop shortcuts, app data kept on uninstall.
@A21-devs A21-devs added the enhancement New feature or request label Nov 24, 2026

@A21-devs A21-devs left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Built it from this branch and listed the payload: the packaged folder goes in as-is, runner included. Two things the build log points at.

Comment thread electron-builder.yml
# Wraps the folder from `npm run desktop:package` (release/Cortex-win32-x64) in a Windows installer:
# release/Cortex-Setup-<version>.exe. Used by `npm run desktop:installer`, which passes --prepackaged,
# so electron-builder doesn't repackage the app itself. Not signed yet.
appId: io.github.a21devs.cortex

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

electron-builder logs author is missed in the package.json. NSIS uses that as the publisher, so Settings > Apps shows Cortex with a blank Publisher, which looks a lot like malware next to a SmartScreen warning. Add "author": "A21-devs" to package.json (it doesn't affect the plugin build, manifest.json is separate).

Comment thread package.json
"desktop:build": "node scripts/build-desktop.mjs",
"desktop:shot": "node scripts/desktop-shot.mjs",
"desktop:package": "node scripts/package-desktop.mjs",
"desktop:installer": "node scripts/package-desktop.mjs && electron-builder --win nsis --prepackaged release/Cortex-win32-x64 --publish never",

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

desktop:package already runs buildDesktop(), so this is a full rebuild every time, fine. But electron-builder resolves the version from package.json (0.1.0) while the packaged app reports 0.1.0+<build stamp>. Not wrong, just worth knowing the installer name and the About box differ by the stamp on local builds. No change needed.

@A21-devs

Copy link
Copy Markdown
Owner Author

Added "author": "A21-devs" to package.json. Rebuilt the installer: the author is missed warning is gone, so Installed apps gets a publisher. Left the version stamp as is, as noted.

@A21-devs A21-devs left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Second pass: author is set and a rebuild with electron-builder no longer warns about it. The second note needed no change. Fixed.

@A21-devs
A21-devs merged commit e2851b4 into main Nov 24, 2026
1 check passed
@A21-devs
A21-devs deleted the feat/desktop-installer branch November 24, 2026 17:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Windows installer (.exe) for Cortex Desktop

1 participant