Skip to content

Self-contained desktop installers with first-run model setup - #9

Merged
JeremySNR merged 3 commits into
ccr-72c986a6-jv6spofrom
desktop/self-contained
Oct 13, 2026
Merged

JeremySNR merged 3 commits into
ccr-72c986a6-jv6spofrom
desktop/self-contained

Conversation

@JeremySNR

Copy link
Copy Markdown
Owner

Summary

Makes the desktop installers work for non-technical people: download the .exe / .dmg / AppImage, install, open, and it works. Stacked on #8 — merge that first, and retarget this PR to the default branch before deleting #8's branch (deleting a base branch closes stacked PRs).

  • Bundled runtime: each installer carries a relocatable CPython 3.11 (python-build-standalone via uv) with the core and its analysis dependencies, static FFmpeg/ffprobe (ffmpeg-static builds, licence and README alongside) and the built web app. desktop/scripts/bundle.mjs builds it for the host platform.
  • First run: the app downloads the analysis models (~1.7 GB, once) with a progress screen, then opens the library. Failures show a plain-English message and Try again; finished downloads are kept.
  • Core: python -m metachlorian; models fetch --json progress events; Core ML made opt-in (METACHLORIAN_COREML=1) because it fails on SigLIP's vision head on Apple Silicon, breaking embeddings.
  • Checks: desktop/scripts/check-package.mjs verifies a packaged app on its own (FFmpeg, native imports, a real clip analysed into shots, the core serving the web app, the Electron app starting its bundled core). CI runs it on macOS/Windows/Linux for PRs; the release workflow runs it before uploading installers.
  • README, CHANGELOG and licence notes updated.

Testing (macOS arm64, locally)

  • npm run bundle: 522 MB Python + 87 MB FFmpeg + 8 MB web app; packaged app 917 MB; ad-hoc signature verifies (codesign --verify --deep --strict).
  • check-package.mjs: all checks pass; screenshot shows the full library UI served by the bundled core.
  • Full first launch on an empty library: all 10 models downloaded with the progress screen, library opened — 2 min 23 s.
  • Download failure (unreachable mirror): friendly error screen with Try again.

Windows and Linux are verified by this PR's desktop app CI jobs.

Still needed for a friction-free install

Installers are unsigned (OPEN_QUESTIONS Q3). macOS users must use Privacy & Security → Open Anyway once; Windows shows SmartScreen's More info → Run anyway. Removing those needs an Apple Developer ID (notarisation) and a Windows code-signing certificate; the workflow already reads the secrets.

🤖 Generated with Claude Code

JeremySNR and others added 3 commits October 13, 2026 13:28
Installers now carry a relocatable CPython 3.11 (python-build-standalone via
uv) with the core and its analysis dependencies installed, static FFmpeg and
ffprobe (ffmpeg-static builds, licence alongside) and the built web app, so a
downloaded .exe/.dmg/AppImage works with nothing else installed.

- desktop/scripts/bundle.mjs builds desktop/bundle/ for the host platform.
- The app runs the bundled core with `python -m metachlorian`, pointing it
  at the bundled FFmpeg and web app.
- First launch runs `models fetch --json` and shows a progress screen;
  failures offer Try again and keep finished downloads.
- desktop/scripts/check-package.mjs checks a packaged app on its own: FFmpeg,
  native imports, a real clip analysed into shots, the core serving the web
  app, and the Electron app starting its bundled core. CI runs it on macOS,
  Windows and Linux for pull requests; the release workflow runs it before
  uploading installers.
- Core ML is now opt-in (METACHLORIAN_COREML=1): it failed at inference on
  SigLIP's vision head on Apple Silicon, breaking embeddings.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
compileall exits non-zero when any file fails to compile, which some
standard-library and dependency test files do on Windows. Precompiling only
speeds up start-up, so list them instead.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…edger

llm.py imported fcntl at module level, so the core failed to import on
Windows (found by the packaged-app check). Lock with msvcrt there.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@JeremySNR
JeremySNR changed the base branch from release/cutawan-process to ccr-72c986a6-jv6spo October 13, 2026 12:55
@JeremySNR
JeremySNR merged commit 01294cd into ccr-72c986a6-jv6spo Oct 13, 2026
15 checks passed
@JeremySNR
JeremySNR deleted the desktop/self-contained branch October 13, 2026 12:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant