Fix sidecar not found on Windows/macOS/Linux: switch from externalBin to resources
Some checks failed
Build macOS / Build (macOS) (push) Failing after 2m53s
Build Linux / Build (Linux) (push) Failing after 6m30s
Build Windows / Build (Windows) (push) Failing after 8m15s

Tauri's externalBin only bundled the single sidecar executable, but
PyInstaller's onedir output requires companion DLLs and _internal/.
The binary was also renamed with a target triple suffix that
resolve_sidecar_path() didn't look for, causing it to fall back to
dev mode which used a compile-time CI path (CARGO_MANIFEST_DIR).

- Switch from externalBin to bundle.resources to include all sidecar files
- Pass Tauri resource_dir to sidecar manager for platform-aware path resolution
- Remove rename_binary() since externalBin target triple naming is no longer needed
- Remove broken production-to-dev fallback that could never work on user machines

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Claude
2026-03-21 06:55:44 -07:00
parent bf6fb471d9
commit 12869e3757
6 changed files with 65 additions and 38 deletions

View File

@@ -41,9 +41,8 @@ jobs:
- name: Place sidecar for Tauri
run: |
mkdir -p src-tauri/binaries
cp -r python/dist/voice-to-notes-sidecar/* src-tauri/binaries/
chmod +x src-tauri/binaries/voice-to-notes-sidecar-${{ env.TARGET }}
cp -r python/dist/voice-to-notes-sidecar src-tauri/sidecar
chmod +x src-tauri/sidecar/voice-to-notes-sidecar
# ── Tauri app ──
- name: Set up Node.js
@@ -66,7 +65,7 @@ jobs:
- name: Build Tauri app
run: npm run tauri build
env:
TAURI_CONFIG: '{"bundle":{"externalBin":["binaries/voice-to-notes-sidecar"]}}'
TAURI_CONFIG: '{"bundle":{"resources":["sidecar/**"]}}'
# ── Release ──
- name: Upload to release

View File

@@ -41,9 +41,8 @@ jobs:
- name: Place sidecar for Tauri
run: |
mkdir -p src-tauri/binaries
cp -r python/dist/voice-to-notes-sidecar/* src-tauri/binaries/
chmod +x src-tauri/binaries/voice-to-notes-sidecar-${{ env.TARGET }}
cp -r python/dist/voice-to-notes-sidecar src-tauri/sidecar
chmod +x src-tauri/sidecar/voice-to-notes-sidecar
# ── Tauri app ──
- name: Set up Node.js
@@ -65,7 +64,7 @@ jobs:
- name: Build Tauri app
run: npm run tauri build
env:
TAURI_CONFIG: '{"bundle":{"externalBin":["binaries/voice-to-notes-sidecar"]}}'
TAURI_CONFIG: '{"bundle":{"resources":["sidecar/**"]}}'
# ── Release ──
- name: Upload to release

View File

@@ -46,8 +46,7 @@ jobs:
- name: Place sidecar for Tauri
shell: powershell
run: |
New-Item -ItemType Directory -Force -Path src-tauri\binaries
Copy-Item -Path python\dist\voice-to-notes-sidecar\* -Destination src-tauri\binaries\ -Recurse -Force
Copy-Item -Path python\dist\voice-to-notes-sidecar -Destination src-tauri\sidecar -Recurse -Force
# ── Tauri app ──
- name: Set up Node.js
@@ -74,7 +73,7 @@ jobs:
shell: powershell
run: npm run tauri build
env:
TAURI_CONFIG: '{"bundle":{"externalBin":["binaries/voice-to-notes-sidecar"]}}'
TAURI_CONFIG: '{"bundle":{"resources":["sidecar/**"]}}'
# ── Release ──
- name: Upload to release