diff --git a/core/Cargo.toml b/core/Cargo.toml index 6de2916..6d46f14 100644 --- a/core/Cargo.toml +++ b/core/Cargo.toml @@ -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 diff --git a/core/build.rs b/core/build.rs index da52894..d3ca757 100644 --- a/core/build.rs +++ b/core/build.rs @@ -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> { + 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() diff --git a/core/resources/icons/exeicon.ico b/core/resources/icons/exeicon.ico new file mode 100644 index 0000000..0519cef Binary files /dev/null and b/core/resources/icons/exeicon.ico differ