diff --git a/Cargo.lock b/Cargo.lock index bef1c36..5ad5ef2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -184,8 +184,15 @@ dependencies = [ "home", "rand", "sfml", + "winres", ] +[[package]] +name = "serde" +version = "1.0.136" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce31e24b01e1e524df96f1c2fdd054405f8d7376249a5110886fb4b658484789" + [[package]] name = "sfml" version = "0.16.0" @@ -207,6 +214,15 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "53e0893aaf18583de27202b17007258377d5c4be16e1d0b601fd6943bc36c98b" +[[package]] +name = "toml" +version = "0.5.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a31142970826733df8241ef35dc040ef98c679ab14d7c3e54d827099b3acecaa" +dependencies = [ + "serde", +] + [[package]] name = "unicode-xid" version = "0.2.2" @@ -246,3 +262,12 @@ name = "winapi-x86_64-pc-windows-gnu" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" + +[[package]] +name = "winres" +version = "0.1.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b68db261ef59e9e52806f688020631e987592bd83619edccda9c47d42cde4f6c" +dependencies = [ + "toml", +] diff --git a/Cargo.toml b/Cargo.toml index 006cb4d..5cc057f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,6 +2,7 @@ name = "septadrop" version = "1.1.0" edition = "2021" +build = "build.rs" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html @@ -15,4 +16,7 @@ sfml = "0.16.0" rand = "0.8.5" home = "0.5.3" gcd = "2.1.0" -const_format = "0.2.22" \ No newline at end of file +const_format = "0.2.22" + +[build-dependencies] +winres = "0.1" \ No newline at end of file diff --git a/build.rs b/build.rs new file mode 100644 index 0000000..71f942d --- /dev/null +++ b/build.rs @@ -0,0 +1,9 @@ +extern crate winres; + +fn main() { + if cfg!(target_os = "windows") { + let mut res = winres::WindowsResource::new(); + res.set_icon("septadrop.ico"); + res.compile().unwrap(); + } +} \ No newline at end of file diff --git a/septadrop.ico b/septadrop.ico new file mode 100644 index 0000000..86ed60b Binary files /dev/null and b/septadrop.ico differ