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 <noreply@anthropic.com>
22 lines
879 B
Rust
22 lines
879 B
Rust
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()
|
|
}
|