Record your screen, ship a demo. Free and open-source, GPU-accelerated, no watermarks, no subscriptions. Windows, macOS, Linux. Actively maintained.
TypeScript cross-platformelectronffmpegopen-sourceproduct-demorustscreen-capturescreen-recorderscreen-recordingscreen-studioscreencastspeech-to-texttypescriptvideo-editingvideo-editorwaylandwgpuwhisper
fix(nix): ship every public asset, cursors included, by pointing public/ at dist/
EtienneLescot77cf022bffb7
diff --git a/.github/workflows/nix-build.yml b/.github/workflows/nix-build.ymlindex e4a6a1e9e..2023dd126 100644--- a/.github/workflows/nix-build.yml+++ b/.github/workflows/nix-build.yml@@ -42,10 +42,9 @@ on:# and merged with no nix build on the PR.- electron/native/pipewire-capture/**- electron/native/whisper-stt/**- # buildPhase is `npx vite build` alone, and installPhase copies- # public/wallpapers unguarded.+ # buildPhase is `npx vite build` alone, and public/ reaches the package+ # only through the copy Vite makes of it in dist/.- vite.config.ts- - public/wallpapers/**# Including itself, or a PR that only edits this file gets no validation of# the change it is making -- the same rule nix-check.yml already follows.- .github/workflows/nix-build.yml@@ -176,6 +175,22 @@ jobs:echo "closure: $(nix path-info --closure-size --human-readable ./result | tail -1)"ls -la result/bin/+ # The renderer loads wallpapers, cursors and fonts from <app>/public/, and+ # a tree missing there degrades the editor without failing anything: the+ # cursor style picker rendered empty (#1085). Every entry of the source+ # public/ must be there.+ - name: Check the renderer's public assets+ run: |+ set -euo pipefail+ missing=0+ for entry in public/*; do+ if [ ! -e "result/lib/openscreen/$entry" ]; then+ echo "::error::$entry is missing from the package"+ missing=$((missing + 1))+ fi+ done+ [ "$missing" -eq 0 ]+# The native components are resolved at runtime behind existence checks, so# a wrapper pointing at a path that is not there degrades the app instead of# failing it -- silently, which is the failure mode this whole workflow wasdiff --git a/nix/package.nix b/nix/package.nixindex 8daaea483..8b1768ee7 100644--- a/nix/package.nix+++ b/nix/package.nix@@ -86,14 +86,12 @@ buildNpmPackage {npm prune --omit=dev --no-savecp -r node_modules "$out/lib/openscreen/"- # Asset resolution: when app.isPackaged is false, the main process resolves- # assets at <appPath>/public/. Place wallpapers at that root to match the- # packaged layout (electron-builder extraResources -> resources/wallpapers).- mkdir -p "$out/lib/openscreen/public"- cp -r public/wallpapers "$out/lib/openscreen/public/wallpapers"- # Same for the caption/annotation fonts: the renderer's picker loads them from- # there. The compositor itself finds the copy Vite put in dist/fonts.- cp -r public/fonts "$out/lib/openscreen/public/fonts"+ # Asset resolution: run as `electron <dir>`, the app resolves the renderer's+ # assets (wallpapers, cursors, fonts) at <appPath>/public/ (ASSET_BASE_DIR in+ # electron/windows.ts). Vite already copied all of public/ into dist/, so point+ # public/ at it rather than copying trees one by one: a hand-kept list missed+ # cursors (#1085). The compositor reads the same files through dist/.+ ln -s dist "$out/lib/openscreen/public"# Wrap system electron with the app directory.#