()
| 7 | const EXECUTABLE: &str = "Graphite.exe"; |
| 8 | |
| 9 | pub fn main() -> Result<(), Box<dyn Error>> { |
| 10 | let app_bin = build_bin("graphite-desktop-platform-win", None, None)?; |
| 11 | |
| 12 | let executable = bundle(&profile_path(), &app_bin); |
| 13 | |
| 14 | // TODO: Consider adding more useful cli |
| 15 | let args: Vec<String> = std::env::args().collect(); |
| 16 | if let Some(pos) = args.iter().position(|a| a == "open") { |
| 17 | let extra_args: Vec<&str> = args[pos + 1..].iter().map(|s| s.as_str()).collect(); |
| 18 | run_command(&executable.to_string_lossy(), &extra_args).expect("failed to open app") |
| 19 | } |
| 20 | |
| 21 | Ok(()) |
| 22 | } |
| 23 | |
| 24 | fn bundle(out_dir: &Path, app_bin: &Path) -> PathBuf { |
| 25 | let app_dir = out_dir.join(APP_NAME); |
nothing calls this directly
no test coverage detected