Skip to content

Commit 7dfd787

Browse files
author
Kresna
committed
feat(desktop): bundle ffmpeg as a sidecar (externalBin)
Re-enable externalBin "bin/ffmpeg" so recordings/conversions use a bundled ffmpeg instead of a system install. The compile-time sidecar validation that broke desktop-check before is handled: desktop-check stubs an empty sidecar (cargo check never runs it), release.yml downloads the real per-target binary, and beforeDev/BuildCommand auto-fetch it locally. ffmpeg_path() already prefers the bundled binary next to the exe.
1 parent dff57be commit 7dfd787

2 files changed

Lines changed: 13 additions & 1 deletion

File tree

.github/workflows/desktop-check.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,16 @@ jobs:
6969
mkdir -p dist
7070
echo '<!doctype html><title>stub</title>' > dist/index.html
7171
72+
# externalBin ("bin/ffmpeg") is validated at compile time by tauri-build;
73+
# an empty file is enough for `cargo check` — we never execute it here.
74+
- name: Stub ffmpeg sidecar
75+
shell: bash
76+
run: |
77+
mkdir -p src-tauri/bin
78+
TRIPLE=$(rustc -vV | sed -n 's/host: //p')
79+
EXT=""; [ "${{ runner.os }}" = "Windows" ] && EXT=".exe"
80+
: > "src-tauri/bin/ffmpeg-${TRIPLE}${EXT}"
81+
7282
- name: cargo check (all targets)
7383
working-directory: src-tauri
7484
run: cargo check --all-targets

src-tauri/tauri.conf.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
"version": "1.0.0-beta.2",
55
"identifier": "com.goodwebtools.app",
66
"build": {
7-
"beforeBuildCommand": "npm run build",
7+
"beforeDevCommand": "npm run download:ffmpeg",
8+
"beforeBuildCommand": "npm run download:ffmpeg && npm run build",
89
"frontendDist": "../dist",
910
"devUrl": "http://localhost:4321"
1011
},
@@ -78,6 +79,7 @@
7879
"bundle": {
7980
"active": true,
8081
"createUpdaterArtifacts": true,
82+
"externalBin": ["bin/ffmpeg"],
8183
"targets": ["nsis", "app", "dmg", "deb"],
8284
"resources": [],
8385
"category": "Utility",

0 commit comments

Comments
 (0)