Skip to content

Commit

Permalink
replace winres with winresource
Browse files Browse the repository at this point in the history
  • Loading branch information
mxve committed May 29, 2024
1 parent ec508d1 commit 714d01a
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 24 deletions.
56 changes: 50 additions & 6 deletions Cargo.lock

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

7 changes: 3 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ build = "res/build.rs"

[profile.release]
opt-level = "s"

panic = "abort"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
Expand Down Expand Up @@ -34,9 +33,9 @@ mslnk = "0.1.8"
self-replace = "1.3.7"

[build-dependencies]
winres = "0.1.12"
winresource = "0.1.17"

[package.metadata.winres]
[package.metadata.winresource]
OriginalFilename = "alterware-launcher.exe"
FileDescription = "AlterWare Launcher"
FileDescription = "github.com/mxve/alterware-launcher"
ProductName = "AlterWare Launcher"
19 changes: 5 additions & 14 deletions res/build.rs
Original file line number Diff line number Diff line change
@@ -1,16 +1,7 @@
#[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);
if std::env::var("CARGO_CFG_TARGET_OS").unwrap() == "windows" {
let mut res = winresource::WindowsResource::new();
res.set_icon("res/icon.ico").set_language(0x0409);
res.compile().unwrap();

Check warning on line 5 in res/build.rs

View workflow job for this annotation

GitHub Actions / Lints

Diff in /home/runner/work/alterware-launcher/alterware-launcher/res/build.rs

Check warning on line 5 in res/build.rs

View workflow job for this annotation

GitHub Actions / Lints

Diff in /home/runner/work/alterware-launcher/alterware-launcher/res/build.rs
}
}

#[cfg(unix)]
fn main() {}
}

0 comments on commit 714d01a

Please sign in to comment.