Kaleido-Desktop/docs/development.md
Elijah 835cdad98b
Some checks failed
Validate and publish Kaleido Desktop / validate (push) Successful in 1m30s
Validate and publish Kaleido Desktop / build (windows, windows-latest) (push) Has been cancelled
Publish the 0.1.0-beta.1 update feed and release script
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 16:39:12 -07:00

2.4 KiB

Development

Setup (Windows)

  1. Node 22+, Rust stable (MSVC), Visual Studio C++ build tools, 7-Zip.
  2. npm ci
  3. .\scripts\fetch-libmpv.ps1 downloads the shinchiro mpv-dev-x86_64 build (the Windows libmpv builds linked from mpv.io) into vendor/mpv/windows.
  4. Put a .env in the repository root for the development sign-in: PLEX_SERVER_URL=... and PLEX_TOKEN=.... It is ignored by git and only read by debug builds and the Vite dev server. Never commit or print it.
  5. npm run tauri dev

The interface alone runs in a browser with npm run dev (port 1420), which is handy for layout work; playback, downloads and native dialogs need the desktop app. In development builds the stores are available as window.__kaleido for debugging.

To drive the desktop app from scripts, start it with WEBVIEW2_ADDITIONAL_BROWSER_ARGUMENTS=--remote-debugging-port=9333 and attach over the Chrome DevTools Protocol.

Checks

npm run typecheck
npm test
cargo check --manifest-path src-tauri/Cargo.toml

Playback tests change real Plex progress; resume an in-progress title near its saved position, or restore it afterwards. Selecting audio or subtitle tracks is saved to Plex for that file.

Releases

  1. Bump the version in package.json, src-tauri/Cargo.toml and src-tauri/tauri.conf.json.
  2. .\scripts\build.ps1 builds the NSIS installer and its signed updater artifact. The updater key is read from .tools/updater.key (ignored; keep it safe — replacing it breaks in-app updates for existing installs) or from TAURI_SIGNING_PRIVATE_KEY.
  3. Commit, tag vX.Y.Z and push, then node scripts/publish-release.mjs X.Y.Z [--prerelease] creates the Forgejo release with the installer and its .sig (notes come from CHANGELOG.md). It reads FORGEJO_TOKEN (repository read/write) from the environment or the ignored .env.
  4. node scripts/update-manifest.mjs X.Y.Z https://git.elijahkuntz.com/Elijah/Kaleido-Desktop/releases/download/vX.Y.Z notes.md and commit updates/latest.json. Installed copies offer the update on their next start.

For macOS and Linux, build on those systems (scripts/fetch-libmpv.sh, then npx tauri build) and merge their bundles into the same feed with KALEIDO_BUNDLES. CI (.forgejo/workflows/release.yml) validates every push and builds installers for tags on runners for each enabled platform.