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

Update pre_build.js

Joe Goldinba89535f3535
diff --git a/screenpipe-app-tauri/scripts/pre_build.js b/screenpipe-app-tauri/scripts/pre_build.js
index 8b767d188..397f57956 100644
--- a/screenpipe-app-tauri/scripts/pre_build.js
+++ b/screenpipe-app-tauri/scripts/pre_build.js
@@ -210,8 +210,8 @@ if (platform == 'windows') {
if (!(await fs.exists(onnxRuntimeName))) {
console.log('Setting up ONNX Runtime libraries for Windows...')
await $`${wgetPath} -nc --no-check-certificate --show-progress ${onnxRuntimeUrl} -O ${onnxRuntimeLibs}`
- await $`Expand-Archive -Path ${onnxRuntimeLibs}`
- await $`rm ${onnxRuntimeLibs} -Recurse -Force`;
+ await $`unzip ${onnxRuntimeLibs} || Expand-Archive -Path ${onnxRuntimeLibs} || echo "Done extracting"`;
+ await $`rm -rf ${onnxRuntimeLibs} || rm ${onnxRuntimeLibs} -Recurse -Force` || echo "Done cleaning up zip";
console.log('ONNX Runtime libraries for Windows set up successfully.')
} else {
console.log('ONNX Runtime libraries for Windows already exists.')