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": {