MCPcopy Create free account
hub / github.com/GraphiteEditor/Graphite / main

Function main

desktop/bundle/src/win.rs:9–22  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

7const EXECUTABLE: &str = "Graphite.exe";
8
9pub 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
24fn bundle(out_dir: &Path, app_bin: &Path) -> PathBuf {
25 let app_dir = out_dir.join(APP_NAME);

Callers

nothing calls this directly

Calls 7

build_binFunction · 0.85
profile_pathFunction · 0.85
run_commandFunction · 0.85
bundleFunction · 0.70
positionMethod · 0.45
iterMethod · 0.45
as_strMethod · 0.45

Tested by

no test coverage detected