Files
BizGaze_Remote/desktop/PACKAGING.md
T
Sravan 1500d42cd2 feat(desktop): packaging + self-hosted auto-update (electron-builder/updater)
- package.json build config: NSIS installer, app icon, generic publish provider →
  https://remote.bizgaze.com/downloads/ (self-hosted update feed).
- main.js: electron-updater checks the feed on launch + every 6h, downloads in the
  background, installs on restart. Active only in packaged builds.
- build/icon.ico app icon; PACKAGING.md documents build/release/signing.
- Key design: web/UI changes reach installed apps instantly (they load the live server);
  only native shell changes need an auto-updated build.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-01 17:03:18 +05:30

2.6 KiB

Biz Connect Desktop — packaging & updates

How updates reach installed apps (two kinds)

  1. Web / UI / feature / bug-fix changes → instant, no app update. The app loads the live UI from https://remote.bizgaze.com. Deploy the server (./deploy.sh) and every installed desktop app has it on next open/reload. This is ~95% of all changes.
  2. Native shell changes (main.js / preload.js) → auto-update. Baked into the .exe. Shipped via electron-updater against a self-hosted feed on https://remote.bizgaze.com/downloads/. On launch (and every 6h) the app checks latest.yml, downloads a newer version in the background, and installs on next restart.

Build an installer

cd desktop
npm install
npm run dist          # electron-builder → dist/  (Win: NSIS .exe + latest.yml + .blockmap)

Output in desktop/dist/:

  • Biz Connect Setup <version>.exe — the installer
  • latest.yml — the update manifest electron-updater reads
  • *.blockmap — enables delta downloads

The release build points at production (SERVER_URL defaults to https://remote.bizgaze.com in main.js).

Publish a release (self-hosted feed)

  1. Bump version in desktop/package.json (semver — electron-updater compares this).
  2. npm run dist.
  3. Upload all of dist/ (the .exe, latest.yml, .blockmap) to whatever the server serves at https://remote.bizgaze.com/downloads/.
    • Behind Nginx Proxy Manager: point /downloads/ at a static folder, or add a static route in the app. The files are large binaries — host them on disk/volume, not git.
  4. Installed apps pick it up within 6h (or on next launch).

First release: users install the .exe manually (download link on your site). Every release after that updates automatically.

Code signing (add when the cert is ready)

Unsigned installers work but trip Windows SmartScreen ("More info → Run anyway"). To sign:

  • Azure Trusted Signing (recommended): set win.azureSignOptions (or use the @electron/windows-sign path) with the Trusted Signing account/endpoint. Cloud, no token.
  • EV/OV cert (.pfx or token): set env CSC_LINK (path to .pfx) + CSC_KEY_PASSWORD, or configure a hardware-token signing tool. electron-builder signs automatically. Once signing is on, auto-updates are silent (no SmartScreen).

App identity

appId = com.bizgaze.connect.desktop; the NSIS installer registers this as the AppUserModelID and creates a Start-menu shortcut — which is also the prerequisite for the Phase D inline-reply Windows Toast notifications (see ../CLIENTS.md).