Skip to content

Commit da8971b

Browse files
committed
display logo on windows executable
1 parent 5e682e3 commit da8971b

File tree

5 files changed

+80
-0
lines changed

5 files changed

+80
-0
lines changed

Cargo.lock

Lines changed: 70 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ ssl = ["rustpython-stdlib/ssl"]
2424
ssl-vendor = ["ssl", "rustpython-stdlib/ssl-vendor"]
2525
tkinter = ["rustpython-stdlib/tkinter"]
2626

27+
[build-dependencies]
28+
winresource = "0.1"
29+
2730
[dependencies]
2831
rustpython-compiler = { workspace = true }
2932
rustpython-pylib = { workspace = true, optional = true }

build.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
fn main() {
2+
if std::env::var("CARGO_CFG_TARGET_OS").unwrap() == "windows" {
3+
let mut res = winresource::WindowsResource::new();
4+
res.set_icon("logo.ico");
5+
res.compile().unwrap();
6+
}
7+
}

logo.ico

4.19 KB
Binary file not shown.

0 commit comments

Comments
 (0)