Skip to content

Commit

Permalink
Add icon and build script
Browse files Browse the repository at this point in the history
  • Loading branch information
Naamloos committed Nov 23, 2021
1 parent 2aefd77 commit 7609f4b
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,7 @@ edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
winapi = { version = "0.3", features = ["winuser"] }
winapi = { version = "0.3", features = ["winuser"] }

[target.'cfg(windows)'.build-dependencies]
winres = "0.1"
Binary file added assets/icon.ico
Binary file not shown.
12 changes: 12 additions & 0 deletions build.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
use std::io;
#[cfg(windows)] use winres::WindowsResource;

fn main() -> io::Result<()> {
#[cfg(windows)] {
WindowsResource::new()
// This path can be absolute, or relative to your crate root.
.set_icon("assets/icon.ico")
.compile()?;
}
Ok(())
}

0 comments on commit 7609f4b

Please sign in to comment.