Free Motion Capture for Everyone πβ¨
TypeScript
bormp
jonmatthis6f544863f19a
diff --git a/.github/workflows/build-installers-pyinstaller.yml b/.github/workflows/build-installers-pyinstaller.ymlindex 26bb3c1e..6efb1478 100644--- a/.github/workflows/build-installers-pyinstaller.yml+++ b/.github/workflows/build-installers-pyinstaller.yml@@ -21,11 +21,13 @@ jobs:fail-fast: falsematrix:include:- # Windows/Linux x64 ship both a CUDA (GPU-accelerated) and a CPU-only+ # Windows x64 ships both a CUDA (GPU-accelerated) and a CPU-only# variant β same OS/arch, different onnxruntime backend, selected via# `uv sync --extra ${{ matrix.variant }}` and FREEMOCAP_BUILD_VARIANT.- # macOS and Linux arm64 only ever build the CPU variant: macOS has no- # CUDA path, and NVIDIA's PyPI CUDA wheels used here are x86_64-only.+ # Linux x64's CUDA variant exists but is currently disabled (see+ # below β its release assets exceed GitHub's 2GB limit). macOS and+ # Linux arm64 only ever build the CPU variant: macOS has no CUDA+ # path, and NVIDIA's PyPI CUDA wheels used here are x86_64-only.- os: windows-latestplatform: windowsarch: x64@@ -59,15 +61,19 @@ jobs:label: macos-arm64-apple-siliconserver-binary: freemocap_serverelectron-arch: arm64-- - os: ubuntu-22.04- platform: linux- arch: x64- variant: cuda- label: linux-x64-cuda- server-binary: freemocap_server- electron-arch: x64-+#+# # Linux x64's CUDA variant is disabled: its release assets (the+# # AppImage and the standalone server bundle) both run ~2.2GB, over+# # GitHub's 2GB release-asset limit. Re-enable once CUDA assets are+# # hosted externally instead of as GitHub release assets.+# - os: ubuntu-22.04+# platform: linux+# arch: x64+# variant: cuda+# label: linux-x64-cuda+# server-binary: freemocap_server+# electron-arch: x64+#- os: ubuntu-22.04platform: linuxarch: x64@@ -405,9 +411,17 @@ jobs:include-hidden-files: true# ββ Upload auto-update metadata (latest*.yml) ββ- # electron-updater supports only one update channel per platform/arch, so- # the CUDA variant is treated as the auto-update channel; CPU-variant- # users get new installers manually via the release page.+ # electron-updater supports only one update channel per platform/arch,+ # and the app can't tell CUDA and CPU builds apart at runtime (see+ # update-handler.ts) β so whichever variant we point a channel at gets+ # silently offered to installs of the OTHER variant too. Windows tracks+ # CUDA safely (both variants fit under GitHub's 2GB release-asset+ # limit). Linux tracks nothing for now: CUDA is disabled for being+ # oversized, and CPU is deliberately NOT used as a stand-in channel,+ # since that would silently swap existing CUDA installs onto a non-GPU+ # build on their next update check. Everyone on Linux gets new+ # installers manually via the release page until Linux has real+ # per-variant channels.- name: Upload auto-update metadata (Windows)if: matrix.platform == 'windows' && matrix.variant == 'cuda'uses: actions/upload-artifact@v7@@ -426,14 +440,16 @@ jobs:freemocap-ui/release/**/latest-mac.ymlinclude-hidden-files: true- - name: Upload auto-update metadata (Linux)- if: matrix.platform == 'linux' && matrix.arch == 'x64' && matrix.variant == 'cuda'- uses: actions/upload-artifact@v7- with:- name: update-metadata-${{ matrix.label }}- path: |- freemocap-ui/release/**/latest-linux.yml- include-hidden-files: true+ # Linux's channel is disabled entirely (see comment above) β neither+ # variant is safe to publish as a shared channel right now.+# - name: Upload auto-update metadata (Linux)+# if: matrix.platform == 'linux' && matrix.arch == 'x64' && matrix.variant == 'cpu'+# uses: actions/upload-artifact@v7+# with:+# name: update-metadata-${{ matrix.label }}+# path: |+# freemocap-ui/release/**/latest-linux.yml+# include-hidden-files: true# ββ macOS keychain cleanup ββ@@ -554,15 +570,16 @@ jobs:echo "Copied latest-mac.yml for macOS"fi- # Linux: latest-linux.yml (CUDA variant is the auto-update channel)- if [ -d "artifacts/update-metadata-linux-x64-cuda" ]; then- YML=$(find artifacts/update-metadata-linux-x64-cuda -name 'latest-linux.yml' | head -1)- if [ -n "$YML" ]; then- sed -i "s|[Ff]ree[Mm]o[Cc]ap_.*\.AppImage|freemocap_${VERSION}_linux-x64-cuda.AppImage|g" "$YML"- cp "$YML" "release-assets/latest-linux.yml"- echo "Copied latest-linux.yml for Linux"- fi- fi+ # Linux: no update channel published right now β see the comment+ # above the "Upload auto-update metadata" step in the build job.+# if [ -d "artifacts/update-metadata-linux-x64-cpu" ]; then+# YML=$(find artifacts/update-metadata-linux-x64-cpu -name 'latest-linux.yml' | head -1)+# if [ -n "$YML" ]; then+# sed -i "s|[Ff]ree[Mm]o[Cc]ap_.*\.AppImage|freemocap_${VERSION}_linux-x64-cpu.AppImage|g" "$YML"+# cp "$YML" "release-assets/latest-linux.yml"+# echo "Copied latest-linux.yml for Linux"+# fi+# fiecho "=== Final release assets ==="ls -lh release-assets/diff --git a/freemocap-docs/src/components/download/DownloadPage.tsx b/freemocap-docs/src/components/download/DownloadPage.tsxindex 5f58df58..555ee8e9 100644--- a/freemocap-docs/src/components/download/DownloadPage.tsx+++ b/freemocap-docs/src/components/download/DownloadPage.tsx@@ -1,5 +1,5 @@import { useState, useMemo, useEffect } from 'react';-import type { OsType, ArchType } from './downloads';+import type { OsType, ArchType, VariantType } from './downloads';import {DEFAULT_VERSION,getReleaseBaseUrl,@@ -8,6 +8,7 @@ import {enrichDownloadsWithAssets,matchesExpectedPattern,stripVersionPrefix,+ hasVariant,OS_NOTES,} from './downloads';import {@@ -15,10 +16,12 @@ import {getServerInstallInstructions,} from './installInstructions';import { useSystemDetection } from './hooks/useSystemDetection';+import { useGpuDetection } from './hooks/useGpuDetection';import { useReleaseVersions } from './hooks/useReleaseVersions';import Header from './components/Header';import SystemDetector from './components/SystemDetector';+import VariantDetector from './components/VariantDetector';import SystemHelpSection from './components/SystemHelpSection';import VersionSelector from './components/VersionSelector';import DownloadSection from './components/DownloadSection';@@ -31,6 +34,7 @@ import styles from './DownloadPage.module.css';export default function DownloadPage() {const detected = useSystemDetection();+ const detectedGpu = useGpuDetection();const { releases, isLoading: releasesLoading } = useReleaseVersions();// Selected system (seeded from detection, overridable via pills)@@ -52,6 +56,23 @@ export default function DownloadPage() {setHasManuallySelected(true);};+ // Selected GPU/CPU variant (seeded from detection, overridable via pills)+ const [selectedVariant, setSelectedVariant] = useState<VariantType>('cpu');+ const [hasManuallySelectedVariant, setHasManuallySelectedVariant] = useState(false);++ useEffect(() => {+ if (!hasManuallySelectedVariant && detectedGpu.detected) {+ setSelectedVariant(detectedGpu.variant);+ }+ }, [detectedGpu.detected, detectedGpu.variant, hasManuallySelectedVariant]);++ const handleSelectVariant = (v: VariantType) => {+ setSelectedVariant(v);+ setHasManuallySelectedVariant(true);+ };++ const showVariantPicker = selectedOs !== 'unknown' && hasVariant(selectedOs, selectedArch);+// Selected version (defaults to latest release or hardcoded)const [selectedTag, setSelectedTag] = useState<string>(`v${DEFAULT_VERSION}`);@@ -97,12 +118,15 @@ export default function DownloadPage() {// Sort into recommended / alternate / otherconst { recApp, altApp, otherApp, recServer, otherServer } = useMemo(() => {+ const matchesVariant = (d: { variant?: VariantType }) =>+ !d.variant || d.variant === selectedVariant;+const rA: typeof appDownloads = [];const aA: typeof appDownloads = [];const oA: typeof appDownloads = [];for (const d of appDownloads) {- if (d.os === selectedOs && d.arch === selectedArch) {+ if (d.os === selectedOs && d.arch === selectedArch && matchesVariant(d)) {(d.recommended ? rA : aA).push(d);} else {oA.push(d);@@ -112,7 +136,7 @@ export default function DownloadPage() {const rS: typeof serverDownloads = [];const oS: typeof serverDownloads = [];for (const d of serverDownloads) {- if (d.os === selectedOs && d.arch === selectedArch) {+ if (d.os === selectedOs && d.arch === selectedArch && matchesVariant(d)) {rS.push(d);} else {oS.push(d);@@ -120,15 +144,25 @@ export default function DownloadPage() {}return { recApp: rA, altApp: aA, otherApp: oA, recServer: rS, otherServer: oS };- }, [appDownloads, serverDownloads, selectedOs, selectedArch]);+ }, [appDownloads, serverDownloads, selectedOs, selectedArch, selectedVariant]);++ // A manually-known system (not "unknown") with nothing built for it yet β+ // e.g. macOS Intel, Linux ARM64. Install instructions and terminal one-liners+ // fabricate filenames unconditionally, so they must be suppressed here rather+ // than left to silently point at the wrong (or a nonexistent) file.+ const isUnavailablePlatform =+ selectedOs !== 'unknown' && recApp.length === 0 && altApp.length === 0 && recServer.length === 0;const osForInstructions = selectedOs === 'unknown' ? undefined : selectedOs;- const appInstructions = osForInstructions- ? getAppInstallInstructions(osForInstructions, selectedArch, version)- : [];- const serverInstructions = osForInstructions- ? getServerInstallInstructions(osForInstructions, selectedArch, version)- : [];+ const variantForInstructions = showVariantPicker ? selectedVariant : undefined;+ const appInstructions =+ osForInstructions && !isUnavailablePlatform+ ? getAppInstallInstructions(osForInstructions, selectedArch, variantForInstructions, version)+ : [];+ const serverInstructions =+ osForInstructions && !isUnavailablePlatform+ ? getServerInstallInstructions(osForInstructions, selectedArch, variantForInstructions, version)+ : [];// Filter OS notes for the selected systemconst activeNotes = OS_NOTES.filter(@@ -149,6 +183,14 @@ export default function DownloadPage() {onSelectSystem={handleSelectSystem}/>+ {showVariantPicker && (+ <VariantDetector+ variant={selectedVariant}+ detected={detectedGpu.detected}+ onSelectVariant={handleSelectVariant}+ />+ )}+<SystemHelpSection /><VersionSelector@@ -166,7 +208,7 @@ export default function DownloadPage() {) : (<><DownloadSection- icon={'\uD83D\uDC80\uD83D\uDCF8'}+ icon={'ππΈ'}title="FreeMoCap App Installer"subtitle={<>@@ -194,36 +236,43 @@ export default function DownloadPage() {notes={activeNotes}/>- <TerminalInstallSection- os={selectedOs}- arch={selectedArch}- version={version}- baseUrl={baseUrl}- />+ {!isUnavailablePlatform && (+ <TerminalInstallSection+ os={selectedOs}+ arch={selectedArch}+ variant={variantForInstructions}+ version={version}+ baseUrl={baseUrl}+ />+ )}- <hr className={styles.sectionDivider} />+ {!isUnavailablePlatform && (+ <>+ <hr className={styles.sectionDivider} />- <DownloadSection- icon={'\u26A1'}- title="FreeMoCap Backend Server"- subtitle={- <>- <strong>Advanced</strong> — headless machines, Raspberry Pi, API use- </>- }- detailsLabel="When do I need this?"- detailsContent="Just the camera backend server binary, no GUI. Useful for headless capture rigs, remote systems you connect to over a network, or building a custom client against the FreeMoCap API. <strong>You don't need this if you downloaded the App Installer above.</strong>"- recommended={recServer}- installInstructions={serverInstructions}- baseUrl={baseUrl}- variant="secondary"- showTerminalTip={osForInstructions != null && osForInstructions !== 'windows'}- terminalTipContent={- osForInstructions && osForInstructions !== 'windows' ? (- <TerminalTip os={osForInstructions} />- ) : undefined- }- />+ <DownloadSection+ icon={'β‘'}+ title="FreeMoCap Backend Server"+ subtitle={+ <>+ <strong>Advanced</strong> — headless machines, remote capture rigs, API use+ </>+ }+ detailsLabel="When do I need this?"+ detailsContent="Just the camera backend server binary, no GUI. Useful for headless capture rigs, remote systems you connect to over a network, or building a custom client against the FreeMoCap API. <strong>You don't need this if you downloaded the App Installer above.</strong>"+ recommended={recServer}+ installInstructions={serverInstructions}+ baseUrl={baseUrl}+ variant="secondary"+ showTerminalTip={osForInstructions != null && osForInstructions !== 'windows'}+ terminalTipContent={+ osForInstructions && osForInstructions !== 'windows' ? (+ <TerminalTip os={osForInstructions} />+ ) : undefined+ }+ />+ </>+ )}<AllPlatformsSectionotherApp={otherApp}diff --git a/freemocap-docs/src/components/download/components/TerminalInstallSection.tsx b/freemocap-docs/src/components/download/components/TerminalInstallSection.tsxindex d7b3a262..8de31add 100644--- a/freemocap-docs/src/components/download/components/TerminalInstallSection.tsx+++ b/freemocap-docs/src/components/download/components/TerminalInstallSection.tsx@@ -1,4 +1,4 @@-import type { OsType, ArchType } from '../downloads';+import type { OsType, ArchType, VariantType } from '../downloads';import { getTerminalInstallBlocks } from '../installInstructions';import CollapsibleSection from './CollapsibleSection';import CodeBlock from './CodeBlock';@@ -8,6 +8,7 @@ import styles from '../DownloadPage.module.css';interface TerminalInstallSectionProps {os: OsType | 'unknown';arch: ArchType;+ variant?: VariantType;version: string;baseUrl: string;}@@ -15,12 +16,13 @@ interface TerminalInstallSectionProps {export default function TerminalInstallSection({os,arch,+ variant,version,baseUrl,}: TerminalInstallSectionProps) {if (os === 'windows' || os === 'unknown') return null;- const blocks = getTerminalInstallBlocks(os, arch, version, baseUrl);+ const blocks = getTerminalInstallBlocks(os, arch, variant, version, baseUrl);if (blocks.length === 0) return null;return (diff --git a/freemocap-docs/src/components/download/components/VariantDetector.tsx b/freemocap-docs/src/components/download/components/VariantDetector.tsxnew file mode 100644index 00000000..7241b973--- /dev/null+++ b/freemocap-docs/src/components/download/components/VariantDetector.tsx@@ -0,0 +1,40 @@+import type { VariantType } from '../downloads';+import { VARIANT_PILL_OPTIONS } from '../downloads';+import styles from '../DownloadPage.module.css';++interface VariantDetectorProps {+ variant: VariantType;+ detected: boolean;+ onSelectVariant: (variant: VariantType) => void;+}++export default function VariantDetector({ variant, detected, onSelectVariant }: VariantDetectorProps) {+ return (+ <div className={styles.detectRow}>+ <div className={styles.detected}>+ <span className={styles.dot} />+ {detected ? (+ <>Detected: <strong>NVIDIA GPU</strong></>+ ) : (+ <>No GPU detected, recommending <strong>CPU-only</strong></>+ )}+ </div>+ <div className={styles.osPillsWrap}>+ <span className={styles.wrongDetect}>Not right? Select a build:</span>+ <div className={styles.osPills}>+ {VARIANT_PILL_OPTIONS.map(pill => (+ <button+ key={pill.variant}+ className={`${styles.osPill} ${+ pill.variant === variant ? styles.osPillActive : ''+ }`}+ onClick={() => onSelectVariant(pill.variant)}+ >+ {pill.label}+ </button>+ ))}+ </div>+ </div>+ </div>+ );+}diff --git a/freemocap-docs/src/components/download/downloads.ts b/freemocap-docs/src/components/download/downloads.tsindex eae83b0c..f40b0612 100644--- a/freemocap-docs/src/components/download/downloads.ts+++ b/freemocap-docs/src/components/download/downloads.ts@@ -3,10 +3,12 @@ export type { LinkedIssue };export type OsType = 'windows' | 'macos' | 'linux';export type ArchType = 'x64' | 'arm64';+export type VariantType = 'cuda' | 'cpu';export interface DownloadEntry {os: OsType;arch: ArchType;+ variant?: VariantType;fmt: string;recommended: boolean;label: string;@@ -37,34 +39,43 @@ export interface GitHubRelease {prerelease: boolean;}-export const DEFAULT_VERSION = '2.0.0-alpha.3';+export const DEFAULT_VERSION = '2.0.0-alpha.6';export const REPO = 'freemocap/freemocap';export function getReleaseBaseUrl(version: string): string {return `https://github.com/${REPO}/releases/download/v${version}`;}+// Filenames mirror the release job's naming in+// .github/workflows/build-installers-pyinstaller.yml exactly:+// freemocap_<version>_<matrix.label>.<ext>+// matrix.label is windows-x64-{cuda,cpu} | macos-arm64-apple-silicon | linux-x64-{cuda,cpu}.+// There is deliberately no macos-x64-intel or linux-arm64 entry here β CI doesn't+// build either yet (see OS_NOTES below for why, and the linked tracking issues).export function buildAppDownloads(version: string): DownloadEntry[] {return [- { os: 'windows', arch: 'x64', fmt: 'exe', recommended: true, label: 'Windows Installer', file: `freemocap_${version}_windows-x64.exe`, size: '' },- { os: 'macos', arch: 'arm64', fmt: 'dmg', recommended: true, label: 'macOS Installer (Apple Silicon)', file: `freemocap_${version}_macos-arm64-apple-silicon.dmg`, size: '' },- { os: 'macos', arch: 'x64', fmt: 'dmg', recommended: true, label: 'macOS Installer (Intel)', file: `freemocap_${version}_macos-x64-intel.dmg`, size: '' },- { os: 'macos', arch: 'arm64', fmt: 'zip', recommended: false, label: 'macOS Portable (Apple Silicon)', file: `freemocap_${version}_macos-arm64-apple-silicon.zip`, size: '' },- { os: 'macos', arch: 'x64', fmt: 'zip', recommended: false, label: 'macOS Portable (Intel)', file: `freemocap_${version}_macos-x64-intel.zip`, size: '' },- { os: 'linux', arch: 'x64', fmt: 'AppImage', recommended: true, label: 'Linux AppImage (x64)', file: `freemocap_${version}_linux-x64.AppImage`, size: '' },- { os: 'linux', arch: 'arm64', fmt: 'AppImage', recommended: true, label: 'Linux AppImage (ARM64)', file: `freemocap_${version}_linux-arm64.AppImage`, size: '' },- { os: 'linux', arch: 'x64', fmt: 'deb', recommended: false, label: 'Linux .deb (x64)', file: `freemocap_${version}_linux-x64.deb`, size: '' },- { os: 'linux', arch: 'arm64', fmt: 'deb', recommended: false, label: 'Linux .deb (ARM64)', file: `freemocap_${version}_linux-arm64.deb`, size: '' },+ { os: 'windows', arch: 'x64', variant: 'cuda', fmt: 'exe', recommended: true, label: 'Windows Installer (GPU Β· CUDA)', file: `freemocap_${version}_windows-x64-cuda.exe`, size: '' },+ { os: 'windows', arch: 'x64', variant: 'cpu', fmt: 'exe', recommended: true, label: 'Windows Installer (CPU-only)', file: `freemocap_${version}_windows-x64-cpu.exe`, size: '' },++ { os: 'macos', arch: 'arm64', fmt: 'dmg', recommended: true, label: 'macOS Installer (Apple Silicon)', file: `freemocap_${version}_macos-arm64-apple-silicon.dmg`, size: '' },+ { os: 'macos', arch: 'arm64', fmt: 'zip', recommended: false, label: 'macOS Portable (Apple Silicon)', file: `freemocap_${version}_macos-arm64-apple-silicon.zip`, size: '' },++ { os: 'linux', arch: 'x64', variant: 'cuda', fmt: 'AppImage', recommended: true, label: 'Linux AppImage (GPU Β· CUDA)', file: `freemocap_${version}_linux-x64-cuda.AppImage`, size: '' },+ { os: 'linux', arch: 'x64', variant: 'cuda', fmt: 'deb', recommended: false, label: 'Linux .deb (GPU Β· CUDA)', file: `freemocap_${version}_linux-x64-cuda.deb`, size: '' },+ { os: 'linux', arch: 'x64', variant: 'cpu', fmt: 'AppImage', recommended: true, label: 'Linux AppImage (CPU-only)', file: `freemocap_${version}_linux-x64-cpu.AppImage`, size: '' },+ { os: 'linux', arch: 'x64', variant: 'cpu', fmt: 'deb', recommended: false, label: 'Linux .deb (CPU-only)', file: `freemocap_${version}_linux-x64-cpu.deb`, size: '' },];}+// Server binaries always ship as .zip: PyInstaller's onedir output is the exe+// plus a required _internal/ support directory, so it can never be a lone file.export function buildServerDownloads(version: string): DownloadEntry[] {return [- { os: 'windows', arch: 'x64', fmt: 'exe', recommended: false, label: 'Server \u2014 Windows x64', file: `freemocap_server_${version}_windows-x64.exe`, size: '' },- { os: 'macos', arch: 'arm64', fmt: 'bin', recommended: false, label: 'Server \u2014 macOS Apple Silicon', file: `freemocap_server_${version}_macos-arm64-apple-silicon`, size: '' },- { os: 'macos', arch: 'x64', fmt: 'bin', recommended: false, label: 'Server \u2014 macOS Intel', file: `freemocap_server_${version}_macos-x64-intel`, size: '' },- { os: 'linux', arch: 'x64', fmt: 'bin', recommended: false, label: 'Server \u2014 Linux x64', file: `freemocap_server_${version}_linux-x64`, size: '' },- { os: 'linux', arch: 'arm64', fmt: 'bin', recommended: false, label: 'Server \u2014 Linux ARM64', file: `freemocap_server_${version}_linux-arm64`, size: '' },+ { os: 'windows', arch: 'x64', variant: 'cuda', fmt: 'zip', recommended: false, label: 'Server β Windows x64 (CUDA)', file: `freemocap_server_${version}_windows-x64-cuda.zip`, size: '' },+ { os: 'windows', arch: 'x64', variant: 'cpu', fmt: 'zip', recommended: false, label: 'Server β Windows x64 (CPU)', file: `freemocap_server_${version}_windows-x64-cpu.zip`, size: '' },+ { os: 'macos', arch: 'arm64', fmt: 'zip', recommended: false, label: 'Server β macOS Apple Silicon', file: `freemocap_server_${version}_macos-arm64-apple-silicon.zip`, size: '' },+ { os: 'linux', arch: 'x64', variant: 'cuda', fmt: 'zip', recommended: false, label: 'Server β Linux x64 (CUDA)', file: `freemocap_server_${version}_linux-x64-cuda.zip`, size: '' },+ { os: 'linux', arch: 'x64', variant: 'cpu', fmt: 'zip', recommended: false, label: 'Server β Linux x64 (CPU)', file: `freemocap_server_${version}_linux-x64-cpu.zip`, size: '' },];}@@ -96,16 +107,23 @@ export function matchesExpectedPattern(assets: GitHubAsset[], version: string):return matchCount >= 3;}-export function fileLabel(os: OsType, arch: ArchType): string {- if (os === 'macos') return arch === 'arm64' ? 'macos-arm64-apple-silicon' : 'macos-x64-intel';- if (os === 'linux') return arch === 'arm64' ? 'linux-arm64' : 'linux-x64';- return 'windows-x64';+/** True for the os/arch combos that ship separate GPU (CUDA) and CPU-only builds. */+export function hasVariant(os: OsType, arch: ArchType): boolean {+ return (os === 'windows' || os === 'linux') && arch === 'x64';+}++// Only ever called for buildable combos (windows-x64, macos-arm64, linux-x64) β+// callers gate unbuilt platforms (macos-x64, linux-arm64) before reaching here.+export function fileLabel(os: OsType, arch: ArchType, variant?: VariantType): string {+ if (os === 'macos') return 'macos-arm64-apple-silicon';+ const base = os === 'linux' ? 'linux-x64' : 'windows-x64';+ return variant ? `${base}-${variant}` : base;}export function formatMeta(d: DownloadEntry): string {const parts = [d.fmt.toUpperCase()];if (d.os !== 'windows') parts.push(d.arch === 'arm64' ? 'ARM64' : 'x64');- return parts.join(' \u00B7 ');+ return parts.join(' Β· ');}export const OS_LABELS: Record<string, string> = {@@ -125,12 +143,46 @@ export function stripVersionPrefix(tag: string): string {// Per-OS/arch advisories shown above the download cards for the matching system.// Add FreeMoCap-specific notes here (platform caveats, known issues, help wanted).-export const OS_NOTES: OsNoteEntry[] = [];+export const OS_NOTES: OsNoteEntry[] = [+ {+ os: 'macos',+ arch: 'x64',+ variant: 'warning',+ title: 'Intel Mac builds arenβt available yet',+ content:+ 'FreeMoCapβs pose-tracking backend (onnxruntime, via skellytracker) doesnβt currently publish a macOS x86_64 wheel, so we canβt build for Intel Macs yet. If youβre on Apple Silicon, select that option above instead.',+ issues: [+ {+ label: 'Add macOS Intel (x86_64) installer build',+ url: 'https://github.com/freemocap/freemocap/issues/823',+ },+ ],+ },+ {+ os: 'linux',+ arch: 'arm64',+ variant: 'warning',+ title: 'Linux ARM64 builds arenβt available yet',+ content:+ 'We donβt currently build a Linux ARM64 release (e.g. for Raspberry Pi). Nothing upstream is blocking it β it just hasnβt been built yet.',+ issues: [+ {+ label: 'Add Linux ARM64 installer build',+ url: 'https://github.com/freemocap/freemocap/issues/822',+ },+ ],+ },+];export const OS_PILL_OPTIONS = [{ os: 'windows' as OsType, arch: 'x64' as ArchType, label: 'Windows' },- { os: 'macos' as OsType, arch: 'arm64' as ArchType, label: 'Mac (Apple\u00A0Silicon)' },+ { os: 'macos' as OsType, arch: 'arm64' as ArchType, label: 'Mac (AppleΒ Silicon)' },{ os: 'macos' as OsType, arch: 'x64' as ArchType, label: 'Mac (Intel)' },{ os: 'linux' as OsType, arch: 'x64' as ArchType, label: 'Linux x64' },{ os: 'linux' as OsType, arch: 'arm64' as ArchType, label: 'Linux ARM64' },] as const;++export const VARIANT_PILL_OPTIONS = [+ { variant: 'cuda' as VariantType, label: 'GPU (CUDA)' },+ { variant: 'cpu' as VariantType, label: 'CPU only' },+] as const;diff --git a/freemocap-docs/src/components/download/hooks/useGpuDetection.ts b/freemocap-docs/src/components/download/hooks/useGpuDetection.tsnew file mode 100644index 00000000..bf8ef8d6--- /dev/null+++ b/freemocap-docs/src/components/download/hooks/useGpuDetection.ts@@ -0,0 +1,37 @@+import { useState, useEffect } from 'react';+import type { VariantType } from '../downloads';++export interface GpuInfo {+ variant: VariantType;+ /** True only on a positive NVIDIA match β false means "no evidence found", not "confirmed absent". */+ detected: boolean;+}++// Reuses the WebGL renderer-string trick useSystemDetection already uses to spot+// Apple Silicon: some browsers mask/restrict this (Firefox resistFingerprinting,+// Safari), and hybrid-graphics laptops may report the wrong GPU β so this is a+// best-effort hint, not a guarantee. We only ever flip to 'cuda' on a positive+// match; anything inconclusive stays on the universally-compatible CPU default.+export function useGpuDetection(): GpuInfo {+ const [gpu, setGpu] = useState<GpuInfo>({ variant: 'cpu', detected: false });++ useEffect(() => {+ try {+ const c = document.createElement('canvas');+ const gl = c.getContext('webgl') || c.getContext('experimental-webgl');+ if (gl && gl instanceof WebGLRenderingContext) {+ const debugInfo = gl.getExtension('WEBGL_debug_renderer_info');+ if (debugInfo) {+ const renderer = gl.getParameter(debugInfo.UNMASKED_RENDERER_WEBGL);+ if (typeof renderer === 'string' && /NVIDIA/i.test(renderer)) {+ setGpu({ variant: 'cuda', detected: true });+ }+ }+ }+ } catch {+ // ignore β falls back to the CPU default+ }+ }, []);++ return gpu;+}diff --git a/freemocap-docs/src/components/download/installInstructions.ts b/freemocap-docs/src/components/download/installInstructions.tsindex e6d4d5cf..95721aef 100644--- a/freemocap-docs/src/components/download/installInstructions.ts+++ b/freemocap-docs/src/components/download/installInstructions.ts@@ -1,4 +1,4 @@-import type { OsType, ArchType } from './downloads';+import type { OsType, ArchType, VariantType } from './downloads';import { fileLabel } from './downloads';export interface CodeLine {@@ -15,12 +15,13 @@ export interface InstructionBlock {export function getAppInstallInstructions(os: OsType,arch: ArchType,+ variant: VariantType | undefined,version: string,): InstructionBlock[] {if (os === 'windows') {return [{- text: 'Download and run the <code>.exe</code> installer. If Windows SmartScreen appears, click <strong>"More info"</strong> \u2192 <strong>"Run anyway"</strong>.',+ text: 'Download and run the <code>.exe</code> installer. If Windows SmartScreen appears, click <strong>"More info"</strong> β <strong>"Run anyway"</strong>.',},];}@@ -28,22 +29,22 @@ export function getAppInstallInstructions(if (os === 'macos') {return [{- text: '<strong>.dmg</strong> \u2014 Open the disk image and drag FreeMoCap into Applications. On first launch, right-click the app and select <strong>Open</strong> to bypass Gatekeeper.',+ text: '<strong>.dmg</strong> β Open the disk image and drag FreeMoCap into Applications. On first launch, right-click the app and select <strong>Open</strong> to bypass Gatekeeper.',},{- text: '<strong>.zip</strong> \u2014 Portable version. Unzip and double-click to run without installing.',+ text: '<strong>.zip</strong> β Portable version. Unzip and double-click to run without installing.',},];}if (os === 'linux') {- const label = fileLabel(os, arch);+ const label = fileLabel(os, arch, variant);const ai = `freemocap_${version}_${label}.AppImage`;const deb = `freemocap_${version}_${label}.deb`;return [{- text: '<strong>AppImage</strong> \u2014 Portable, works on any distro. Download, make executable, and run. No root needed.',+ text: '<strong>AppImage</strong> β Portable, works on any distro. Download, make executable, and run. No root needed.',},{codeLines: [@@ -52,7 +53,7 @@ export function getAppInstallInstructions(],},{- text: '<strong>.deb</strong> \u2014 For Debian, Ubuntu, Pop!_OS, and similar. Installs system-wide with desktop integration.',+ text: '<strong>.deb</strong> β For Debian, Ubuntu, Pop!_OS, and similar. Installs system-wide with desktop integration.',},{codeLines: [@@ -68,22 +69,23 @@ export function getAppInstallInstructions(export function getServerInstallInstructions(os: OsType,arch: ArchType,+ variant: VariantType | undefined,version: string,): InstructionBlock[] {- const label = fileLabel(os, arch);- const srv =- os === 'windows'- ? `freemocap_server_${version}_${label}.exe`- : `freemocap_server_${version}_${label}`;+ const label = fileLabel(os, arch, variant);+ const zip = `freemocap_server_${version}_${label}.zip`;+ const bin = os === 'windows' ? 'freemocap_server.exe' : 'freemocap_server';if (os === 'windows') {return [{- text: 'Download and run from a terminal. The server starts a local API on port <code>53117</code>.',+ text: 'Download the <code>.zip</code>, extract it, then run the server from inside the extracted folder β it needs its bundled support files alongside it. Starts a local API on port <code>53117</code>.',},{codeLines: [- { type: 'prompt', content: `.\\${srv}`, promptChar: '>' },+ { type: 'prompt', content: `Expand-Archive ${zip} -DestinationPath freemocap_server`, promptChar: '>' },+ { type: 'prompt', content: 'cd freemocap_server', promptChar: '>' },+ { type: 'prompt', content: `.\\${bin}`, promptChar: '>' },],},];@@ -91,16 +93,18 @@ export function getServerInstallInstructions(if (os === 'macos') {return [- { text: 'Download, make executable, and run from Terminal.' },+ { text: 'Download the <code>.zip</code>, extract it, then make the binary executable and run it from Terminal β it needs its bundled support files alongside it.' },{codeLines: [- { type: 'prompt', content: `chmod +x ${srv}`, promptChar: '$' },- { type: 'prompt', content: `xattr -cr ${srv}`, promptChar: '$' },- { type: 'prompt', content: `./${srv}`, promptChar: '$' },+ { type: 'prompt', content: `unzip ${zip} -d freemocap_server`, promptChar: '$' },+ { type: 'prompt', content: 'cd freemocap_server', promptChar: '$' },+ { type: 'prompt', content: `chmod +x ${bin}`, promptChar: '$' },+ { type: 'prompt', content: `xattr -cr ${bin}`, promptChar: '$' },+ { type: 'prompt', content: `./${bin}`, promptChar: '$' },],},{- text: 'The <code>xattr</code> command clears the macOS quarantine flag so Gatekeeper won\u2019t block it.',+ text: 'The <code>xattr</code> command clears the macOS quarantine flag so Gatekeeper wonβt block it.',},];}@@ -108,15 +112,17 @@ export function getServerInstallInstructions(if (os === 'linux') {return [{- text: 'Download, make executable, and run. Ideal for headless rigs, Raspberry Pis, or remote capture machines.',+ text: 'Download the <code>.zip</code>, extract it, then make the binary executable and run it β it needs its bundled support files alongside it. Ideal for headless rigs and remote capture machines.',},{codeLines: [- { type: 'prompt', content: `chmod +x ${srv}`, promptChar: '$' },- { type: 'prompt', content: `./${srv}`, promptChar: '$' },+ { type: 'prompt', content: `unzip ${zip} -d freemocap_server`, promptChar: '$' },+ { type: 'prompt', content: 'cd freemocap_server', promptChar: '$' },+ { type: 'prompt', content: `chmod +x ${bin}`, promptChar: '$' },+ { type: 'prompt', content: `./${bin}`, promptChar: '$' },{ type: 'text', content: '' },{ type: 'comment', content: '# Or run in background (survives terminal close)' },- { type: 'prompt', content: `nohup ./${srv} &`, promptChar: '$' },+ { type: 'prompt', content: `nohup ./${bin} &`, promptChar: '$' },],},];@@ -128,22 +134,23 @@ export function getServerInstallInstructions(export function getTerminalInstallBlocks(os: OsType,arch: ArchType,+ variant: VariantType | undefined,version: string,baseUrl: string,): InstructionBlock[] {if (os !== 'linux' && os !== 'macos') return [];- const label = fileLabel(os, arch);+ const label = fileLabel(os, arch, variant);+ const srvZip = `freemocap_server_${version}_${label}.zip`;const blocks: InstructionBlock[] = [];if (os === 'linux') {const ai = `freemocap_${version}_${label}.AppImage`;const deb = `freemocap_${version}_${label}.deb`;- const srv = `freemocap_server_${version}_${label}`;blocks.push({codeLines: [- { type: 'comment', content: '# App Installer \u2014 AppImage (any distro, no root)' },+ { type: 'comment', content: '# App Installer β AppImage (any distro, no root)' },{ type: 'prompt', content: `curl -fSL -o freemocap.AppImage "${baseUrl}/${ai}"`, promptChar: '$' },{ type: 'prompt', content: 'chmod +x freemocap.AppImage', promptChar: '$' },{ type: 'prompt', content: './freemocap.AppImage', promptChar: '$' },@@ -151,15 +158,16 @@ export function getTerminalInstallBlocks(});blocks.push({codeLines: [- { type: 'comment', content: '# App Installer \u2014 .deb (Debian/Ubuntu)' },+ { type: 'comment', content: '# App Installer β .deb (Debian/Ubuntu)' },{ type: 'prompt', content: `curl -fSL -o freemocap.deb "${baseUrl}/${deb}"`, promptChar: '$' },{ type: 'prompt', content: 'sudo apt install ./freemocap.deb', promptChar: '$' },],});blocks.push({codeLines: [- { type: 'comment', content: '# Backend Server (headless / Raspberry Pi)' },- { type: 'prompt', content: `curl -fSL -o freemocap_server "${baseUrl}/${srv}"`, promptChar: '$' },+ { type: 'comment', content: '# Backend Server (headless / remote capture)' },+ { type: 'prompt', content: `curl -fSL -o freemocap_server.zip "${baseUrl}/${srvZip}"`, promptChar: '$' },+ { type: 'prompt', content: 'unzip freemocap_server.zip -d freemocap_server && cd freemocap_server', promptChar: '$' },{ type: 'prompt', content: 'chmod +x freemocap_server', promptChar: '$' },{ type: 'prompt', content: './freemocap_server', promptChar: '$' },],@@ -168,7 +176,6 @@ export function getTerminalInstallBlocks(if (os === 'macos') {const dmg = `freemocap_${version}_${label}.dmg`;- const srv = `freemocap_server_${version}_${label}`;blocks.push({codeLines: [@@ -180,7 +187,8 @@ export function getTerminalInstallBlocks(blocks.push({codeLines: [{ type: 'comment', content: '# Backend Server' },- { type: 'prompt', content: `curl -fSL -o freemocap_server "${baseUrl}/${srv}"`, promptChar: '$' },+ { type: 'prompt', content: `curl -fSL -o freemocap_server.zip "${baseUrl}/${srvZip}"`, promptChar: '$' },+ { type: 'prompt', content: 'unzip freemocap_server.zip -d freemocap_server && cd freemocap_server', promptChar: '$' },{ type: 'prompt', content: 'chmod +x freemocap_server && xattr -cr freemocap_server', promptChar: '$' },{ type: 'prompt', content: './freemocap_server', promptChar: '$' },],@@ -204,7 +212,7 @@ export function getTerminalTipContent(os: OsType): {if (os === 'macos') {return {openHow:- 'Open <strong>Terminal</strong> from <strong>Applications \u2192 Utilities \u2192 Terminal</strong>, or press <code>Cmd + Space</code> and type <strong>"Terminal"</strong>.',+ 'Open <strong>Terminal</strong> from <strong>Applications β Utilities β Terminal</strong>, or press <code>Cmd + Space</code> and type <strong>"Terminal"</strong>.',promptChar: '<code>$</code>',};}