Skip to content

Commit

Permalink
added windows metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
mxve committed Mar 13, 2022
1 parent 99e7bbf commit a81eaf5
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 1 deletion.
21 changes: 20 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
name = "plutonium-updater"
version = "0.3.0"
edition = "2021"
build = "res/build.rs"

[profile.release]
opt-level = "s"
Expand All @@ -15,3 +16,12 @@ http_req = { version = "0.8.1", default-features = false, features = [
serde = { version = "1.0.136", features = ["derive"] }
serde_json = "1.0.78"
sha1_smol = "1.0.0"

[build-dependencies]
winres = "0.1"

[package.metadata.winres]
OriginalFilename = "plutonium-updater.exe"
LegalCopyright = "© mxve 2022 | GPLv3"
FileDescription = "CLI Updater for plutonium.pw"
ProductName = "plutonium-updater.rs"
18 changes: 18 additions & 0 deletions res/build.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#[cfg(windows)]
extern crate winres;

#[cfg(windows)]
fn main() {
let mut res = winres::WindowsResource::new();
res.set_icon("res/icon.ico")
.set_language(0x0409);

if let Err(e) = res.compile() {
eprintln!("{}", e);
std::process::exit(1);
}
}

#[cfg(unix)]
fn main() {
}
Binary file added res/icon.ico
Binary file not shown.

0 comments on commit a81eaf5

Please sign in to comment.