| 61 | } |
| 62 | |
| 63 | fn bundled_binary_path() -> Result<PathBuf, Box<dyn std::error::Error>> { |
| 64 | let exe_dir = std::env::current_exe()? |
| 65 | .parent() |
| 66 | .ok_or("could not get exe directory")? |
| 67 | .to_path_buf(); |
| 68 | |
| 69 | // Tauri bundles the sidecar without the target triple suffix in the final app |
| 70 | #[cfg(target_os = "windows")] |
| 71 | let name = "observe.exe"; |
| 72 | #[cfg(not(target_os = "windows"))] |
| 73 | let name = "observe"; |
| 74 | |
| 75 | Ok(exe_dir.join(name)) |
| 76 | } |
| 77 | |
| 78 | fn install_destination() -> Result<(PathBuf, String), Box<dyn std::error::Error>> { |
| 79 | #[cfg(target_os = "windows")] |