Skip to content

YC (S26) | Open Computer History | Continuously record your company computer work, map your workflows, help you find work worth automating, and power your agents' context

fix: separate ORT link dir from Tauri resources to prevent Windows file lock

Louis Beaumont262145fef00b
diff --git a/.github/workflows/release-app.yml b/.github/workflows/release-app.yml
index 52728e6c3..a55b6ab0f 100644
--- a/.github/workflows/release-app.yml
+++ b/.github/workflows/release-app.yml
@@ -700,22 +700,32 @@ jobs:
if: matrix.os_type == 'windows'
shell: pwsh
run: |
- # Pre-download CPU onnxruntime so ort crate finds it via ORT_LIB_LOCATION
+ # Pre-download CPU onnxruntime for both Tauri resources and ort linking.
+ # Extract to TWO separate directories to avoid file locking:
+ # - onnxruntime-win-x64-1.19.2/ → Tauri resources (tauri_build reads these)
+ # - ort-system-lib/ → ORT_LIB_LOCATION (ort-sys copy-dylibs reads these)
+ # These build scripts run concurrently (different dependency chains), so they
+ # MUST NOT share files or Windows will return os error 32 (file locked).
$url = "https://github.com/microsoft/onnxruntime/releases/download/v1.19.2/onnxruntime-win-x64-1.19.2.zip"
$zipFile = "onnxruntime-win-x64-1.19.2.zip"
- $extractDir = "apps/screenpipe-app-tauri/src-tauri/onnxruntime-win-x64-1.19.2"
+ $tauriDir = "apps/screenpipe-app-tauri/src-tauri/onnxruntime-win-x64-1.19.2"
+ $ortDir = "ort-system-lib"
Invoke-WebRequest -Uri $url -OutFile $zipFile
- if (Test-Path $extractDir) { Remove-Item $extractDir -Recurse -Force }
+ if (Test-Path $tauriDir) { Remove-Item $tauriDir -Recurse -Force }
7z x $zipFile -o"apps/screenpipe-app-tauri/src-tauri/" -y
- Write-Host "ONNX Runtime extracted to $extractDir"
- Get-ChildItem "$extractDir/lib" | ForEach-Object { Write-Host $_.Name }
+ Write-Host "ONNX Runtime extracted to $tauriDir (for Tauri resources)"
+ # Create separate copy for ort-sys linking
+ if (Test-Path $ortDir) { Remove-Item $ortDir -Recurse -Force }
+ Copy-Item -Path $tauriDir -Destination $ortDir -Recurse -Force
+ Write-Host "ONNX Runtime copied to $ortDir (for ORT_LIB_LOCATION)"
+ Get-ChildItem "$ortDir/lib" | ForEach-Object { Write-Host $_.Name }
- name: Set ORT env vars for Windows
if: matrix.os_type == 'windows'
shell: bash
run: |
echo "ORT_STRATEGY=system" >> $GITHUB_ENV
- echo "ORT_LIB_LOCATION=${{ github.workspace }}/apps/screenpipe-app-tauri/src-tauri/onnxruntime-win-x64-1.19.2" >> $GITHUB_ENV
+ echo "ORT_LIB_LOCATION=${{ github.workspace }}/ort-system-lib" >> $GITHUB_ENV
- name: Use production config for release
shell: bash
diff --git a/apps/screenpipe-app-tauri/src-tauri/Cargo.toml b/apps/screenpipe-app-tauri/src-tauri/Cargo.toml
index 141412282..c2b81ccc3 100644
--- a/apps/screenpipe-app-tauri/src-tauri/Cargo.toml
+++ b/apps/screenpipe-app-tauri/src-tauri/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "screenpipe-app"
-version = "2.0.453"
+version = "2.0.454"
description = "24/7 memory for your desktop. 100% local."
authors = ["you"]
license = ""
diff --git a/apps/screenpipe-app-tauri/src-tauri/tauri.windows.conf.json b/apps/screenpipe-app-tauri/src-tauri/tauri.windows.conf.json
index 51d3a428c..f2e2eee58 100644
--- a/apps/screenpipe-app-tauri/src-tauri/tauri.windows.conf.json
+++ b/apps/screenpipe-app-tauri/src-tauri/tauri.windows.conf.json
@@ -20,7 +20,6 @@
"ffmpeg\\bin\\*.dll": "./",
"ffmpeg\\lib\\*": "./",
"onnxruntime*\\lib\\onnxruntime.dll": "./",
- "onnxruntime*\\lib\\onnxruntime_providers_cuda.dll": "./",
"onnxruntime*\\lib\\onnxruntime_providers_shared.dll": "./",
"mkl\\*.dll": "./",
"vcredist\\*.dll": "./",