Fix sidecar not found on Windows/macOS/Linux: switch from externalBin to resources
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:
@@ -236,10 +236,9 @@ def main() -> None:
|
||||
python = create_venv_and_install(cpu_only)
|
||||
output_dir = run_pyinstaller(python)
|
||||
download_ffmpeg(output_dir)
|
||||
rename_binary(output_dir, target_triple)
|
||||
|
||||
print(f"\n[build] Done! Sidecar built at: {output_dir}")
|
||||
print(f"[build] Copy contents to src-tauri/binaries/ for Tauri bundling")
|
||||
print(f"[build] Copy directory to src-tauri/sidecar/ for Tauri resource bundling")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
Reference in New Issue
Block a user