Skip to content

Commit

Permalink
feat: windows executable icon
Browse files Browse the repository at this point in the history
  • Loading branch information
ChatDisabled committed Jul 31, 2024
1 parent 6ffe85a commit a081542
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ default = []

[build-dependencies]
vergen = { version = "8.2.6", features = ["build", "git", "gitcl", "rustc", "cargo"] }
winres = "0.1.12"

[dependencies]
kaspa-addresses.workspace = true
Expand Down
7 changes: 7 additions & 0 deletions core/build.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
use std::error::Error;
use vergen::EmitBuilder;
extern crate winres;

// https://docs.rs/vergen/latest/vergen/struct.EmitBuilder.html#method.emit
fn main() -> Result<(), Box<dyn Error>> {
if cfg!(target_os = "windows") {
let mut res = winres::WindowsResource::new();
res.set_icon("resources/icons/exeicon.ico");
res.compile().unwrap();
}

EmitBuilder::builder()
.all_build()
.all_cargo()
Expand Down
Binary file added core/resources/icons/exeicon.ico
Binary file not shown.

0 comments on commit a081542

Please sign in to comment.