Port Kaleido Desktop to macOS

macOS (Apple silicon) now plays, browses and updates like Windows:

- Video: libmpv's render API draws into a CAOpenGLLayer beneath the
  WKWebView, with the miniplayer rectangle, HDR passthrough through
  extended dynamic range (PQ/BT.2020) and display-sleep prevention.
- Window: native traffic lights on the top bar's centre line, hidden
  with the player's controls; the page's caption buttons are Windows-only.
- Interface: macOS shortcut labels (⌘K, ⌘[, ⌃⌘F), Plex identifies the
  player as a Mac, and header values are kept ASCII (Mac computer names
  usually contain a curly apostrophe).
- The window appears without waiting for an animation frame, which
  WKWebView doesn't run in a hidden window.
- Credentials: release builds use the Keychain and are signed with a
  lasting self-signed certificate so access survives updates; debug
  builds keep tokens in a private file to avoid prompts on every rebuild.
- Bundling: scripts/fetch-libmpv.sh makes Homebrew's libmpv and its
  libraries self-contained; scripts/build.sh builds the .app, .dmg and
  signed update archive.

Releases now carry both platforms: publish-release.mjs uploads each
machine's build into one release, and update-manifest.mjs writes the
feed from that release's assets, refusing while a platform is missing.

The updater uses a new signing key (public key in tauri.conf.json), so
existing installs must be reinstalled once.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Elijah Kuntz 2026-11-02 15:14:40 -07:00
parent a3c05e9062
commit 7d0803481b
39 changed files with 1191 additions and 230 deletions

View file

@ -5,7 +5,7 @@ import { useSections, useServerQuery } from '../../app/queries';
import * as api from '../../plex/api';
import { art } from '../../app/format';
import { useDownloads } from '../../downloads/store';
import { appInfo, isNative, openExternal, pickFolder, revealPath, type AppInfo } from '../../platform/native';
import { appInfo, fullscreenShortcut, isMac, isNative, openExternal, pickFolder, revealPath, shortcut, type AppInfo } from '../../platform/native';
import { checkForUpdate, installUpdate, useUpdater } from '../../app/updater';
import { Button, Segmented, Select, Switch } from '../../ui/primitives';
import { confirmDialog } from '../../ui/overlays';
@ -42,14 +42,16 @@ const skipOptions: { value: SkipMode; label: string }[] = [
{ value: 'off', label: 'Off' },
];
const OS_NAMES: Record<string, string> = { windows: 'Windows', macos: 'macOS', linux: 'Linux' };
const SHORTCUTS: [string, string][][] = [
[
['Ctrl + K', 'Search'],
['Alt + ← / Mouse back', 'Go back'],
['Alt + → / Mouse forward', 'Go forward'],
[shortcut('K'), 'Search'],
[isMac ? '⌘[ / Mouse back' : 'Alt + ← / Mouse back', 'Go back'],
[isMac ? '⌘] / Mouse forward' : 'Alt + → / Mouse forward', 'Go forward'],
['Esc', 'Go back or close a dialog'],
['F11', 'Full screen'],
['Ctrl + ,', 'Settings'],
[fullscreenShortcut, 'Full screen'],
[shortcut(','), 'Settings'],
['Right-click a title', 'Title actions'],
],
[
@ -182,7 +184,7 @@ export function AppSettings({ tab }: { tab: string }) {
<Pref label="Hardware decoding" description="Uses your graphics card to decode video. Turn off only if you see artifacts. Applies after restarting Kaleido.">
<Switch checked={s.hwdec} onChange={(v) => set('hwdec', v)} />
</Pref>
<Pref label="HDR passthrough" description="Sends HDR video to HDR-capable displays when Windows HDR is on. Applies after restarting Kaleido.">
<Pref label="HDR passthrough" description={`Sends HDR video to HDR-capable displays${isMac ? '' : ' when Windows HDR is on'}. Applies after restarting Kaleido.`}>
<Switch checked={s.hdrPassthrough} onChange={(v) => set('hdrPassthrough', v)} />
</Pref>
</SettingsSection>
@ -374,7 +376,7 @@ export function AppSettings({ tab }: { tab: string }) {
<div>
<h2>Kaleido</h2>
<p className="muted">
Version {info?.version ?? '—'} · {info?.platform === 'windows' ? 'Windows' : info?.platform}
Version {info?.version ?? '—'} · {OS_NAMES[info?.platform ?? ''] ?? info?.platform}
</p>
</div>
</div>