From 52d7d06d84e321d3d08efe190202bae3e892b1dd Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 21 Mar 2026 07:33:02 -0700 Subject: [PATCH] Fix sidecar.zip not bundled: move resources config into tauri.conf.json The TAURI_CONFIG env var approach for resources wasn't being applied by the NSIS bundler, so sidecar.zip was never included in the installer. - Add resources: ["sidecar.zip"] directly to tauri.conf.json - build.rs creates a minimal placeholder zip for dev builds so compilation succeeds even without the real sidecar - Remove TAURI_CONFIG env var from all CI workflows (no longer needed) - Add sidecar.zip to .gitignore (generated by CI, not tracked) Co-Authored-By: Claude Opus 4.6 --- .gitea/workflows/build-linux.yml | 2 -- .gitea/workflows/build-macos.yml | 2 -- .gitea/workflows/build-windows.yml | 2 -- .gitignore | 1 + src-tauri/build.rs | 18 ++++++++++++++++++ src-tauri/tauri.conf.json | 1 + 6 files changed, 20 insertions(+), 6 deletions(-) diff --git a/.gitea/workflows/build-linux.yml b/.gitea/workflows/build-linux.yml index d80225f..0d30060 100644 --- a/.gitea/workflows/build-linux.yml +++ b/.gitea/workflows/build-linux.yml @@ -63,8 +63,6 @@ jobs: - name: Build Tauri app run: npm run tauri build - env: - TAURI_CONFIG: '{"bundle":{"resources":["sidecar.zip"]}}' # ── Release ── - name: Upload to release diff --git a/.gitea/workflows/build-macos.yml b/.gitea/workflows/build-macos.yml index 40ea942..7447a3f 100644 --- a/.gitea/workflows/build-macos.yml +++ b/.gitea/workflows/build-macos.yml @@ -62,8 +62,6 @@ jobs: - name: Build Tauri app run: npm run tauri build - env: - TAURI_CONFIG: '{"bundle":{"resources":["sidecar.zip"]}}' # ── Release ── - name: Upload to release diff --git a/.gitea/workflows/build-windows.yml b/.gitea/workflows/build-windows.yml index 608470a..aa0fca0 100644 --- a/.gitea/workflows/build-windows.yml +++ b/.gitea/workflows/build-windows.yml @@ -72,8 +72,6 @@ jobs: - name: Build Tauri app shell: powershell run: npm run tauri build - env: - TAURI_CONFIG: '{"bundle":{"resources":["sidecar.zip"]}}' # ── Release ── - name: Upload to release diff --git a/.gitignore b/.gitignore index 59a5935..62734c7 100644 --- a/.gitignore +++ b/.gitignore @@ -50,5 +50,6 @@ Thumbs.db # Sidecar build artifacts src-tauri/binaries/* !src-tauri/binaries/.gitkeep +src-tauri/sidecar.zip python/dist/ python/build/ diff --git a/src-tauri/build.rs b/src-tauri/build.rs index d860e1e..e8cbebf 100644 --- a/src-tauri/build.rs +++ b/src-tauri/build.rs @@ -1,3 +1,21 @@ fn main() { + // Ensure sidecar.zip exists so tauri-build doesn't fail. + // CI replaces this placeholder with the real PyInstaller sidecar archive. + let zip_path = std::path::Path::new("sidecar.zip"); + if !zip_path.exists() { + // Minimal valid zip (empty archive): end-of-central-directory record + let empty_zip: [u8; 22] = [ + 0x50, 0x4b, 0x05, 0x06, // EOCD signature + 0x00, 0x00, // disk number + 0x00, 0x00, // disk with central dir + 0x00, 0x00, // entries on this disk + 0x00, 0x00, // total entries + 0x00, 0x00, 0x00, 0x00, // central dir size + 0x00, 0x00, 0x00, 0x00, // central dir offset + 0x00, 0x00, // comment length + ]; + std::fs::write(zip_path, empty_zip).expect("Failed to create placeholder sidecar.zip"); + } + tauri_build::build() } diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json index be4cb48..ecb89fb 100644 --- a/src-tauri/tauri.conf.json +++ b/src-tauri/tauri.conf.json @@ -42,6 +42,7 @@ "category": "Utility", "shortDescription": "Transcribe audio/video with speaker identification", "longDescription": "Voice to Notes is a desktop application that transcribes audio and video recordings with speaker identification, synchronized playback, and AI-powered analysis. Export to SRT, WebVTT, ASS captions, or plain text.", + "resources": ["sidecar.zip"], "copyright": "Voice to Notes Contributors", "license": "MIT", "linux": {