MCPcopy Index your code
hub / github.com/RustPython/RustPython / main

Function main

build.rs:1–17  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1fn main() {
2 if std::env::var("CARGO_CFG_TARGET_OS").unwrap() == "windows" {
3 println!("cargo:rerun-if-changed=logo.ico");
4 let mut res = winresource::WindowsResource::new();
5 if std::path::Path::new("logo.ico").exists() {
6 res.set_icon("logo.ico");
7 } else {
8 println!("cargo:warning=logo.ico not found, skipping icon embedding");
9 return;
10 }
11 res.compile()
12 .map_err(|e| {
13 println!("cargo:warning=Failed to compile Windows resources: {e}");
14 })
15 .ok();
16 }
17}

Callers

nothing calls this directly

Calls 5

newFunction · 0.85
okMethod · 0.80
unwrapMethod · 0.45
existsMethod · 0.45
compileMethod · 0.45

Tested by

no test coverage detected