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
fix: build
Louis Beaumont8f7c8842a6ff
diff --git a/screenpipe-app-tauri/scripts/pre_build.js b/screenpipe-app-tauri/scripts/pre_build.jsindex d1b220d5a..5e911319a 100644--- a/screenpipe-app-tauri/scripts/pre_build.js+++ b/screenpipe-app-tauri/scripts/pre_build.js@@ -308,6 +308,66 @@ async function getMostRecentBinaryPath(targetArch, paths) {}/* ########## macOS ########## */if (platform == 'macos') {+ const architectures = ['arm64', 'x86_64'];+ for (const arch of architectures) {+ if (process.env['SKIP_SCREENPIPE_SETUP']) {+ break;+ }+ console.log(`Setting up screenpipe bin for ${arch}...`);+ if (arch === 'arm64') {+ const paths = [+ "../../target/aarch64-apple-darwin/release/screenpipe",+ "../../target/release/screenpipe"+ ];+ const mostRecentPath = await getMostRecentBinaryPath('arm64', paths);+ if (mostRecentPath) {+ await $`cp ${mostRecentPath} screenpipe-aarch64-apple-darwin`;+ console.log(`Copied most recent arm64 screenpipe binary from ${mostRecentPath}`);+ } else {+ console.error("No suitable arm64 screenpipe binary found");+ }+ try {+ // if the binary exists, hard code the fucking dylib+ if (await fs.exists('screenpipe-aarch64-apple-darwin') && !isDevMode) {+ await $`install_name_tool -change screenpipe-vision/lib/libscreenpipe_arm64.dylib @rpath/../Frameworks/libscreenpipe_arm64.dylib ./screenpipe-aarch64-apple-darwin`+ await $`install_name_tool -change screenpipe-vision/lib/libscreenpipe.dylib @rpath/../Frameworks/libscreenpipe.dylib ./screenpipe-aarch64-apple-darwin`+ console.log(`hard coded the dylib`);+ } else if (await fs.exists('screenpipe-aarch64-apple-darwin') && isDevMode) {+ await $`install_name_tool -change screenpipe-vision/lib/libscreenpipe_arm64.dylib @executable_path/../Frameworks/libscreenpipe_arm64.dylib ./screenpipe-aarch64-apple-darwin`+ await $`install_name_tool -change screenpipe-vision/lib/libscreenpipe.dylib @executable_path/../Frameworks/libscreenpipe.dylib ./screenpipe-aarch64-apple-darwin`+ await $`install_name_tool -add_rpath @executable_path/../Frameworks ./screenpipe-aarch64-apple-darwin`+ console.log(`Updated dylib paths for arm64 in dev mode`);+ }+ } catch (error) {+ console.error('Error updating dylib paths:', error);+ }+ } else if (arch === 'x86_64') {+ // copy screenpipe binary (more recent one)+ const paths = [+ "../../target/x86_64-apple-darwin/release/screenpipe",+ "../../target/release/screenpipe"+ ];+ const mostRecentPath = await getMostRecentBinaryPath('x86_64', paths);+ if (mostRecentPath) {+ await $`cp ${mostRecentPath} screenpipe-x86_64-apple-darwin`;+ console.log(`Copied most recent x86_64 screenpipe binary from ${mostRecentPath}`);+ } else {+ console.error("No suitable x86_64 screenpipe binary found");+ }+ try {+ // hard code the dylib+ if (await fs.exists('screenpipe-x86_64-apple-darwin') && !isDevMode) {+ await $`install_name_tool -change screenpipe-vision/lib/libscreenpipe_x86_64.dylib @rpath/../Frameworks/libscreenpipe_x86_64.dylib ./screenpipe-x86_64-apple-darwin`+ await $`install_name_tool -change screenpipe-vision/lib/libscreenpipe.dylib @rpath/../Frameworks/libscreenpipe.dylib ./screenpipe-x86_64-apple-darwin`+ console.log(`hard coded the dylib`);+ }+ } catch (error) {+ console.error('Error updating dylib paths:', error);+ }+ }+ console.log(`screenpipe for ${arch} set up successfully.`);+ }+// Setup FFMPEGif (!(await fs.exists(config.ffmpegRealname))) {await $`wget --no-config -nc ${config.macos.ffmpegUrl} -O ${config.macos.ffmpegName}.tar.xz`diff --git a/screenpipe-app-tauri/src-tauri/build.rs b/screenpipe-app-tauri/src-tauri/build.rsindex efd3a7b7e..dc98403fd 100644--- a/screenpipe-app-tauri/src-tauri/build.rs+++ b/screenpipe-app-tauri/src-tauri/build.rs@@ -2,75 +2,75 @@use std::{env, fs, process::Command};fn main() {- #[cfg(target_arch = "x86_64")]- {- let primary_path = "../../target/x86_64-apple-darwin/release/screenpipe";- let fallback_path = "../../target/release/screenpipe";+ // #[cfg(target_arch = "x86_64")]+ // {+ // let primary_path = "../../target/x86_64-apple-darwin/release/screenpipe";+ // let fallback_path = "../../target/release/screenpipe";- let source_path = if fs::metadata(primary_path).is_ok() {- primary_path- } else {- fallback_path- };+ // let source_path = if fs::metadata(primary_path).is_ok() {+ // primary_path+ // } else {+ // fallback_path+ // };- fs::copy(source_path, "screenpipe-x86_64-apple-darwin")- .expect("failed to copy screenpipe binary");+ // fs::copy(source_path, "screenpipe-x86_64-apple-darwin")+ // .expect("failed to copy screenpipe binary");- if env::var("PROFILE").unwrap() != "debug" {- Command::new("install_name_tool")- .args([- "-change",- "../../screenpipe-vision/lib/libscreenpipe_x86_64.dylib",- "@executable_path/../Frameworks/libscreenpipe_x86_64.dylib",- "./screenpipe-x86_64-apple-darwin",- ])- .status()- .expect("failed to execute process");- Command::new("install_name_tool")- .args([- "-change",- "../../screenpipe-vision/lib/libscreenpipe.dylib",- "@executable_path/../Frameworks/libscreenpipe.dylib",- "./screenpipe-x86_64-apple-darwin",- ])- .status()- .expect("failed to execute process");- }- }- #[cfg(target_arch = "aarch64")]- if env::var("TARGET").unwrap() == "aarch64-apple-darwin" {- let primary_path = "../../target/aarch64-apple-darwin/release/screenpipe";- let fallback_path = "../../target/release/screenpipe";+ // if env::var("PROFILE").unwrap() != "debug" {+ // Command::new("install_name_tool")+ // .args([+ // "-change",+ // "../../screenpipe-vision/lib/libscreenpipe_x86_64.dylib",+ // "@executable_path/../Frameworks/libscreenpipe_x86_64.dylib",+ // "./screenpipe-x86_64-apple-darwin",+ // ])+ // .status()+ // .expect("failed to execute process");+ // Command::new("install_name_tool")+ // .args([+ // "-change",+ // "../../screenpipe-vision/lib/libscreenpipe.dylib",+ // "@executable_path/../Frameworks/libscreenpipe.dylib",+ // "./screenpipe-x86_64-apple-darwin",+ // ])+ // .status()+ // .expect("failed to execute process");+ // }+ // }+ // #[cfg(target_arch = "aarch64")]+ // if env::var("TARGET").unwrap() == "aarch64-apple-darwin" {+ // let primary_path = "../../target/aarch64-apple-darwin/release/screenpipe";+ // let fallback_path = "../../target/release/screenpipe";- let source_path = if fs::metadata(primary_path).is_ok() {- primary_path- } else {- fallback_path- };+ // let source_path = if fs::metadata(primary_path).is_ok() {+ // primary_path+ // } else {+ // fallback_path+ // };- fs::copy(source_path, "screenpipe-aarch64-apple-darwin")- .expect("failed to copy screenpipe binary");+ // fs::copy(source_path, "screenpipe-aarch64-apple-darwin")+ // .expect("failed to copy screenpipe binary");- if env::var("PROFILE").unwrap() != "debug" {- Command::new("install_name_tool")- .args([- "-change",- "../../screenpipe-vision/lib/libscreenpipe_arm64.dylib",- "@executable_path/../Frameworks/libscreenpipe_arm64.dylib",- "./screenpipe-aarch64-apple-darwin",- ])- .status()- .expect("failed to execute process");- Command::new("install_name_tool")- .args([- "-change",- "../../screenpipe-vision/lib/libscreenpipe.dylib",- "@executable_path/../Frameworks/libscreenpipe.dylib",- "./screenpipe-aarch64-apple-darwin",- ])- .status()- .expect("failed to execute process");- }- }+ // if env::var("PROFILE").unwrap() != "debug" {+ // Command::new("install_name_tool")+ // .args([+ // "-change",+ // "../../screenpipe-vision/lib/libscreenpipe_arm64.dylib",+ // "@executable_path/../Frameworks/libscreenpipe_arm64.dylib",+ // "./screenpipe-aarch64-apple-darwin",+ // ])+ // .status()+ // .expect("failed to execute process");+ // Command::new("install_name_tool")+ // .args([+ // "-change",+ // "../../screenpipe-vision/lib/libscreenpipe.dylib",+ // "@executable_path/../Frameworks/libscreenpipe.dylib",+ // "./screenpipe-aarch64-apple-darwin",+ // ])+ // .status()+ // .expect("failed to execute process");+ // }+ // }tauri_build::build()}