diff --git a/Cargo.lock b/Cargo.lock index ca9fe55..ebdace0 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -36,7 +36,7 @@ dependencies = [ "simple-log", "steamlocate", "tokio", - "winres", + "winresource", ] [[package]] @@ -1349,6 +1349,15 @@ dependencies = [ "serde", ] +[[package]] +name = "serde_spanned" +version = "0.6.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "79e674e01f999af37c49f70a6ede167a8a60b2503e56c5599532a65baa5969a0" +dependencies = [ + "serde", +] + [[package]] name = "serde_urlencoded" version = "0.7.1" @@ -1594,13 +1603,38 @@ dependencies = [ [[package]] name = "toml" -version = "0.5.11" +version = "0.7.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd79e69d3b627db300ff956027cc6c3798cef26d22526befdfcd12feeb6d2257" +dependencies = [ + "serde", + "serde_spanned", + "toml_datetime", + "toml_edit", +] + +[[package]] +name = "toml_datetime" +version = "0.6.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4f7f0dd8d50a853a531c426359045b1998f04219d88799810762cd4ad314234" +checksum = "4badfd56924ae69bcc9039335b2e017639ce3f9b001c393c1b2d1ef846ce2cbf" dependencies = [ "serde", ] +[[package]] +name = "toml_edit" +version = "0.19.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" +dependencies = [ + "indexmap 2.2.6", + "serde", + "serde_spanned", + "toml_datetime", + "winnow", +] + [[package]] name = "tower" version = "0.4.13" @@ -2050,6 +2084,15 @@ version = "0.52.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32b752e52a2da0ddfbdbcc6fceadfeede4c939ed16d13e648833a61dfb611ed8" +[[package]] +name = "winnow" +version = "0.5.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f593a95398737aeed53e489c785df13f3618e41dbcd6718c6addbf1395aa6876" +dependencies = [ + "memchr", +] + [[package]] name = "winreg" version = "0.51.0" @@ -2071,12 +2114,13 @@ dependencies = [ ] [[package]] -name = "winres" -version = "0.1.12" +name = "winresource" +version = "0.1.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b68db261ef59e9e52806f688020631e987592bd83619edccda9c47d42cde4f6c" +checksum = "77e2aaaf8cfa92078c0c0375423d631f82f2f57979c2884fdd5f604a11e45329" dependencies = [ "toml", + "version_check", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index 878d3dd..636bcdb 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -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 @@ -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" diff --git a/res/build.rs b/res/build.rs index 02edd90..78438a1 100644 --- a/res/build.rs +++ b/res/build.rs @@ -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(); } -} - -#[cfg(unix)] -fn main() {} +} \ No newline at end of file