Compare commits

...

2 Commits

Author SHA1 Message Date
Michael Neale
f7d1c8e42a Merge branch 'main' into micn/libvision-fix
* main:
  control commands for machine mode
  Fix duplicate dump at end
  minor
  --machine mode flag for verbose CLI output
  fixed x,y detection in vision click
  screenshotting bug fix
2025-10-28 13:56:49 +11:00
Michael Neale
8a7d6ad4ba lets you run the binary from anywhere 2025-10-24 19:28:14 +11:00
2 changed files with 22 additions and 0 deletions

11
build.rs Normal file
View File

@@ -0,0 +1,11 @@
use std::env;
fn main() {
// Only add rpaths on macOS
if env::var("CARGO_CFG_TARGET_OS").unwrap() == "macos" {
// Add rpath so libVisionBridge.dylib can be found at runtime
// @executable_path means "relative to the executable"
println!("cargo:rustc-link-arg=-Wl,-rpath,@executable_path");
println!("cargo:rustc-link-arg=-Wl,-rpath,@loader_path");
}
}

11
crates/g3-cli/build.rs Normal file
View File

@@ -0,0 +1,11 @@
use std::env;
fn main() {
// Only add rpaths on macOS
if env::var("CARGO_CFG_TARGET_OS").unwrap() == "macos" {
// Add rpath so libVisionBridge.dylib can be found at runtime
// @executable_path means "relative to the executable"
println!("cargo:rustc-link-arg=-Wl,-rpath,@executable_path");
println!("cargo:rustc-link-arg=-Wl,-rpath,@loader_path");
}
}