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
Rust agentsagiaiai-memoryaudio-recordingcomputer-visionhermeshermes-agentllmlocal-ailocal-firstmachine-learningmcpmultimodalopenclawprivacyrewindscreen-recordingspeech-to-textycombinator
42th attempt to fix windows build
Louis Beaumontd4c7f7d36b1f
diff --git a/.github/workflows/release-app.yml b/.github/workflows/release-app.ymlindex f8199cf5b..7325f0656 100644--- a/.github/workflows/release-app.yml+++ b/.github/workflows/release-app.yml@@ -26,7 +26,7 @@ jobs:api-key: ${{ secrets.CN_API_KEY }}publish-tauri:- # needs: draft+ needs: draftpermissions:contents: writestrategy:@@ -135,7 +135,6 @@ jobs:env:SKIP_SCREENPIPE_SETUP: truerun: |- sudo chmod -R 755 ./scripts/pre_build.jsbun ./scripts/pre_build.js ${{ matrix.pre-build-args }}working-directory: ./screenpipe-app-tauridiff --git a/screenpipe-app-tauri/scripts/pre_build.js b/screenpipe-app-tauri/scripts/pre_build.jsindex 225b37e55..d586d59bb 100644--- a/screenpipe-app-tauri/scripts/pre_build.js+++ b/screenpipe-app-tauri/scripts/pre_build.js@@ -149,13 +149,11 @@ async function copyDenoBinary() {await fs.access(denoSrc);// If it exists, proceed with copying- await fs.copyFile(denoSrc, denoDest1);- await fs.chmod(denoDest1, 0o755); // Ensure the binary is executable+ await copyFile(denoSrc, denoDest1);console.log(`deno binary copied successfully to ${denoDest1}`);if (platform === 'macos') {- await fs.copyFile(denoSrc, denoDest2);- await fs.chmod(denoDest2, 0o755);+ await copyFile(denoSrc, denoDest2);console.log(`deno binary also copied to ${denoDest2}`);}} catch (error) {@@ -180,12 +178,36 @@ async function copyDenoBinary() {console.error('failed to find deno in PATH:', pathError);console.log('please ensure deno is installed and accessible in your PATH');}+ } else if (error.code === 'EPERM') {+ console.error(`permission denied when copying deno binary. trying elevated copy...`);+ await elevatedCopy(denoSrc, denoDest1);+ console.log(`deno binary copied successfully to ${denoDest1} using elevated permissions`);} else {- console.error('failed to copy deno binary:', error);+ console.error(`unexpected error: ${error.message}`);+ process.exit(1);}}}+// Helper function to copy file with elevated permissions on Windows+async function elevatedCopy(src, dest) {+ if (platform === 'win32') {+ const { execSync } = require('child_process');+ const command = `powershell -Command "Start-Process cmd -Verb RunAs -ArgumentList '/c copy ${src} ${dest}' -WindowStyle Hidden -Wait"`;+ execSync(command);+ } else {+ // For non-Windows platforms, fall back to regular copy+ await fs.copyFile(src, dest);+ }+ await fs.chmod(dest, 0o755); // ensure the binary is executable+}++// Helper function to copy file and set permissions+async function copyFile(src, dest) {+ await fs.copyFile(src, dest);+ await fs.chmod(dest, 0o755); // ensure the binary is executable+}+/* ########## Linux ########## */if (platform == 'linux') {// Install APT packages