Fix Tauri build stack overflow: zip sidecar and extract on first launch
Tauri's build script overflows the stack when processing resource globs
matching thousands of files from PyInstaller's ML output (torch, pyannote).
Instead of bundling the sidecar directory directly:
- CI zips the sidecar output into a single sidecar.zip
- Tauri bundles just the one zip file (no recursion)
- On first launch, Rust extracts the zip to the app data directory
- Versioned extraction dir (sidecar-{version}) ensures updates re-extract
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -28,8 +28,11 @@ pub fn run() {
|
||||
.manage(app_state)
|
||||
.setup(|app| {
|
||||
// Tell the sidecar manager where Tauri placed bundled resources
|
||||
if let Ok(resource_dir) = app.path().resource_dir() {
|
||||
sidecar::init_resource_dir(resource_dir);
|
||||
// and where to extract the sidecar archive
|
||||
if let (Ok(resource_dir), Ok(data_dir)) =
|
||||
(app.path().resource_dir(), app.path().app_local_data_dir())
|
||||
{
|
||||
sidecar::init_dirs(resource_dir, data_dir);
|
||||
}
|
||||
|
||||
// Set the webview background to match the app's dark theme
|
||||
|
||||
Reference in New Issue
Block a user