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: build.rs

Louis Beaumont50aa3d46cba5
diff --git a/screenpipe-app-tauri/src-tauri/build.rs b/screenpipe-app-tauri/src-tauri/build.rs
index f92827a20..3d26d2997 100644
--- a/screenpipe-app-tauri/src-tauri/build.rs
+++ b/screenpipe-app-tauri/src-tauri/build.rs
@@ -21,7 +21,18 @@ fn main() {
}
#[cfg(target_arch = "aarch64")]
{
- fs::copy("../../target/aarch64-apple-darwin/release/screenpipe", "screenpipe-aarch64-apple-darwin").unwrap();
+ 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
+ };
+
+ fs::copy(source_path, "screenpipe-aarch64-apple-darwin")
+ .expect("failed to copy screenpipe binary");
+
Command::new("install_name_tool")
.args(["-change", "../../screenpipe-vision/lib/libscreenpipe_arm64.dylib",
"@executable_path/../Frameworks/libscreenpipe_arm64.dylib", "./screenpipe-aarch64-apple-darwin"])