Skip to content

Desktop Build

aidamir edited this page May 13, 2026 · 2 revisions

Build the Cultiva Electron app from source on Windows and produce installers under release/.


Prerequisites

  • Node.js LTS (matching what you use for other Electron projects).
  • npm (comes with Node).
  • Windows 10/11 x64 for Windows targets.

Scripts (from repo root)

Command Purpose
npm install Install dependencies + electron-builder app deps (postinstall)
npm run dev Vite dev server (browser-only UI)
npm run build Production bundle to dist/
npm run electron:dev Build + launch Electron against Vite build
npm run electron:build build + clean release/ + Windows NSIS + portable

China-friendly mirror (optional):

npm run electron:build:cn

Windows icon (portable)

The portable target requires a 256×256 layer inside build/icon.ico. The repo’s prebuild runs scripts/sync-build-icon.mjs, which rebuilds a multi-size ICO from src/images/favicon.ico (decode → upscale → to-ico).

If portable still fails, confirm npm run build ran (prebuild executed) and that src/images/favicon.ico exists.


Output artifacts

After a successful npm run electron:build:

File Description
release/Cultiva-Setup.exe NSIS installer
release/Cultiva-Portable.exe Portable executable
release/win-unpacked/ Unpacked app for debugging

Code signing

Community builds may ship unsigned. SmartScreen warnings are expected until a certificate is configured in your own pipeline (CSC_IDENTITY_AUTO_DISCOVERY, etc.) — not covered in depth here.


Related

Clone this wiki locally