From e17545fa05adc99b218f0e5baf5c29f42917a7c0 Mon Sep 17 00:00:00 2001 From: Nikita Podvirnyi Date: Wed, 11 Sep 2024 22:05:00 +0200 Subject: [PATCH 1/3] build: updated dependencies --- Cargo.lock | 103 +++++++++++++++++++++++------------------------------ Cargo.toml | 2 +- 2 files changed, 45 insertions(+), 60 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 5273418..39eea32 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4,19 +4,13 @@ version = 3 [[package]] name = "addr2line" -version = "0.22.0" +version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e4503c46a5c0c7844e948c9a4d6acd9f50cccb4de1c48eb9e291ea17470c678" +checksum = "f5fb1d8e4442bd405fdfd1dacb42792696b0cf9cb15882e5d097b742a676d375" dependencies = [ "gimli", ] -[[package]] -name = "adler" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" - [[package]] name = "adler2" version = "2.0.0" @@ -63,8 +57,8 @@ checksum = "5c6cb57a04249c6480766f7f7cef5467412af1490f8d1e243141daddada3264f" [[package]] name = "anime-game-core" -version = "1.24.2" -source = "git+https://github.com/an-anime-team/anime-game-core?tag=1.24.2#dd0e9fd265d7600005840fe4cbda9f1a76d7b520" +version = "1.25.0" +source = "git+https://github.com/an-anime-team/anime-game-core?tag=1.25.0#4c6efced5fccacc82831d31881ae80635306db20" dependencies = [ "anyhow", "bzip2", @@ -88,8 +82,8 @@ dependencies = [ [[package]] name = "anime-launcher-sdk" -version = "1.20.3" -source = "git+https://github.com/an-anime-team/anime-launcher-sdk?tag=1.20.3#a101b856e8e2d7b57ca6566b2752d2c8ab7cc3d9" +version = "1.21.0" +source = "git+https://github.com/an-anime-team/anime-launcher-sdk?tag=1.21.0#4002dcfddbdc58f4b416e72dc6711aaf8162dd57" dependencies = [ "anime-game-core", "anyhow", @@ -155,9 +149,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.86" +version = "1.0.88" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da" +checksum = "4e1496f8fb1fbf272686b8d37f523dab3e4a7443300055e74cdaa449f3114356" dependencies = [ "backtrace", ] @@ -311,9 +305,9 @@ checksum = "8b75356056920673b02621b35afd0f7dda9306d03c79a30f5c56c44cf256e3de" [[package]] name = "async-trait" -version = "0.1.81" +version = "0.1.82" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e0c28dcc82d7c8ead5cb13beb15405b57b8546e93215673ff8ca0349a028107" +checksum = "a27b8a3a6e1a44fa4c8baf1f653e4172e81486d4941f2237e20dc2d0cf4ddff1" dependencies = [ "proc-macro2", "quote", @@ -334,17 +328,17 @@ checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" [[package]] name = "backtrace" -version = "0.3.73" +version = "0.3.74" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cc23269a4f8976d0a4d2e7109211a419fe30e8d88d677cd60b6bc79c5732e0a" +checksum = "8d82cb332cdfaed17ae235a638438ac4d4839913cc2af585c3c6746e8f8bee1a" dependencies = [ "addr2line", - "cc", "cfg-if", "libc", - "miniz_oxide 0.7.4", + "miniz_oxide", "object", "rustc-demangle", + "windows-targets 0.52.6", ] [[package]] @@ -513,9 +507,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.1.15" +version = "1.1.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57b6a275aa2903740dc87da01c62040406b8812552e97129a63ea8850a17c6e6" +checksum = "b62ac837cdb5cb22e10a256099b4fc502b1dfe560cb282963a974d7abd80e476" dependencies = [ "jobserver", "libc", @@ -593,9 +587,9 @@ checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" [[package]] name = "cpufeatures" -version = "0.2.13" +version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51e852e6dc9a5bed1fae92dd2375037bf2b768725bf3be87811edee3249d09ad" +checksum = "608697df725056feaccfa42cffdaeeec3fccc4ffc38358ecd19b243e716a78e0" dependencies = [ "libc", ] @@ -897,7 +891,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "324a1be68054ef05ad64b861cc9eaf1d623d2d8cb25b4bf2cb9cdd902b4bf253" dependencies = [ "crc32fast", - "miniz_oxide 0.8.0", + "miniz_oxide", ] [[package]] @@ -1191,9 +1185,9 @@ dependencies = [ [[package]] name = "gimli" -version = "0.29.0" +version = "0.31.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40ecd4077b5ae9fd2e9e169b102c6c330d0605168eb0e8bf79952b256dbefffd" +checksum = "32085ea23f3234fc7846555e85283ba4de91e21016dc0455a16286d87a292d64" [[package]] name = "gio" @@ -1227,9 +1221,9 @@ dependencies = [ [[package]] name = "glib" -version = "0.20.2" +version = "0.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c1ea829497810f8e87f5ee6d05c4879af641704add879e6b6080607cceeefe4" +checksum = "95648aac01b75503000bb3bcaa5ec7a7a2dd61e43636b8b1814854de94dd80e4" dependencies = [ "bitflags", "futures-channel", @@ -1257,9 +1251,9 @@ dependencies = [ [[package]] name = "glib-macros" -version = "0.20.2" +version = "0.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "951aa19c5e89555c0ca5e94ee874b24b2594ece8412b387bd84ee3266b8a3ea0" +checksum = "302f1d633c9cdef4350330e7b68fd8016e2834bb106c93fdf9789fcde753c1ab" dependencies = [ "heck", "proc-macro-crate", @@ -1280,9 +1274,9 @@ dependencies = [ [[package]] name = "globset" -version = "0.4.14" +version = "0.4.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57da3b9b5b85bd66f31093f8c408b90a74431672542466497dcbdfdc02034be1" +checksum = "15f1ce686646e7f1e19bf7d5533fe443a45dbfb990e00629110797578b42fb19" dependencies = [ "aho-corasick", "bstr", @@ -1510,9 +1504,9 @@ dependencies = [ [[package]] name = "ignore" -version = "0.4.22" +version = "0.4.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b46810df39e66e925525d6e38ce1e7f6e1d208f72dc39757880fcb66e2c58af1" +checksum = "6d89fd380afde86567dfba715db065673989d6253f42b88179abd3eae47bda4b" dependencies = [ "crossbeam-deque", "globset", @@ -1764,15 +1758,6 @@ dependencies = [ "autocfg", ] -[[package]] -name = "miniz_oxide" -version = "0.7.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8a240ddb74feaf34a79a7add65a741f3167852fba007066dcac1ca548d89c08" -dependencies = [ - "adler", -] - [[package]] name = "miniz_oxide" version = "0.8.0" @@ -1972,9 +1957,9 @@ dependencies = [ [[package]] name = "parking" -version = "2.2.0" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb813b8af86854136c6922af0598d719255ecb2179515e6e7730d468f05c9cae" +checksum = "f38d5652c16fde515bb1ecef450ab0f6a219d619a7274976324d5e377f7dceba" [[package]] name = "pathdiff" @@ -2274,9 +2259,9 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.35" +version = "0.38.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a85d50532239da68e9addb745ba38ff4612a242c1c7ceea689c4bc7c2f43c36f" +checksum = "8acb788b847c24f28525660c4d7758620a7210875711f79e7f663cc152726811" dependencies = [ "bitflags", "errno", @@ -2345,11 +2330,11 @@ dependencies = [ [[package]] name = "schannel" -version = "0.1.23" +version = "0.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbc91545643bcf3a0bbb6569265615222618bdf33ce4ffbbd13c4bbd4c093534" +checksum = "e9aaafd5a2b6e3d657ff009d82fbd630b6bd54dd4eb06f21693925cdf80f9b8b" dependencies = [ - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -2414,18 +2399,18 @@ checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" [[package]] name = "serde" -version = "1.0.209" +version = "1.0.210" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99fce0ffe7310761ca6bf9faf5115afbc19688edd00171d81b1bb1b116c63e09" +checksum = "c8e3592472072e6e22e0a54d5904d9febf8508f65fb8552499a1abc7d1078c3a" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.209" +version = "1.0.210" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5831b979fd7b5439637af1752d535ff49f4860c0f341d1baeb6faf0f4242170" +checksum = "243902eda00fad750862fc144cea25caca5e20d615af0a81bee94ca738f1df1f" dependencies = [ "proc-macro2", "quote", @@ -2434,9 +2419,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.127" +version = "1.0.128" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8043c06d9f82bd7271361ed64f415fe5e12a77fdb52e573e7f06a516dea329ad" +checksum = "6ff5456707a1de34e7e37f2a6fd3d3f808c318259cbd01ab6377795054b483d8" dependencies = [ "itoa", "memchr", @@ -2883,9 +2868,9 @@ checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75" [[package]] name = "unicode-ident" -version = "1.0.12" +version = "1.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" +checksum = "e91b56cd4cadaeb79bbf1a5645f6b4f8dc5bde8834ad5894a8db35fda9efa1fe" [[package]] name = "unicode-normalization" diff --git a/Cargo.toml b/Cargo.toml index bc12f3a..47e3d74 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -19,7 +19,7 @@ glib-build-tools = "0.20" [dependencies.anime-launcher-sdk] git = "https://github.com/an-anime-team/anime-launcher-sdk" -tag = "1.20.3" +tag = "1.21.0" features = ["all", "star-rail", "star-rail-patch"] # path = "../anime-launcher-sdk" # ! for dev purposes only From 569954d5cc75a710eadb8a7a239dd0f7f17d8f17 Mon Sep 17 00:00:00 2001 From: Nikita Podvirnyi Date: Wed, 11 Sep 2024 22:08:04 +0200 Subject: [PATCH 2/3] feat: require 7z binary --- src/ui/first_run/dependencies.rs | 26 +++++++++++++++++++++----- src/ui/first_run/tos_warning.rs | 7 ++++--- 2 files changed, 25 insertions(+), 8 deletions(-) diff --git a/src/ui/first_run/dependencies.rs b/src/ui/first_run/dependencies.rs index d9d217b..715abf5 100644 --- a/src/ui/first_run/dependencies.rs +++ b/src/ui/first_run/dependencies.rs @@ -41,7 +41,7 @@ impl SimpleAsyncComponent for DependenciesApp { gtk::Label { set_label: &tr!("missing-dependencies-message"), - + set_justify: gtk::Justification::Center, set_wrap: true, set_margin_top: 32 @@ -68,7 +68,7 @@ impl SimpleAsyncComponent for DependenciesApp { }, gtk::Entry { - set_text: "sudo pacman -Syu git libwebp", + set_text: "sudo pacman -Syu git p7zip libwebp", set_editable: false } }, @@ -85,7 +85,7 @@ impl SimpleAsyncComponent for DependenciesApp { }, gtk::Entry { - set_text: "sudo apt install git webp", + set_text: "sudo apt install git p7zip-full webp", set_editable: false } }, @@ -102,7 +102,7 @@ impl SimpleAsyncComponent for DependenciesApp { }, gtk::Entry { - set_text: "sudo dnf install git libwebp-tools", + set_text: "sudo dnf install git p7zip libwebp-tools", set_editable: false } }, @@ -119,6 +119,10 @@ impl SimpleAsyncComponent for DependenciesApp { set_title: "git" }, + adw::ActionRow { + set_title: "p7zip" + }, + adw::ActionRow { set_title: "libwebp" } @@ -130,7 +134,7 @@ impl SimpleAsyncComponent for DependenciesApp { add = &adw::PreferencesGroup { set_valign: gtk::Align::Center, set_vexpand: true, - + gtk::Box { set_orientation: gtk::Orientation::Horizontal, set_halign: gtk::Align::Center, @@ -202,6 +206,18 @@ impl SimpleAsyncComponent for DependenciesApp { } } + // 7z sometimes has different binaries + if !is_available("7z") && !is_available("7za") { + sender.output(Self::Output::Toast { + title: tr!("package-not-available", { + "package" = "7z" + }), + description: None + }); + + return; + } + sender.output(Self::Output::ScrollToDefaultPaths); } diff --git a/src/ui/first_run/tos_warning.rs b/src/ui/first_run/tos_warning.rs index cd6c0d0..d1b4a0f 100644 --- a/src/ui/first_run/tos_warning.rs +++ b/src/ui/first_run/tos_warning.rs @@ -48,12 +48,12 @@ impl SimpleAsyncComponent for TosWarningApp { add = &adw::PreferencesGroup { set_valign: gtk::Align::Center, set_vexpand: true, - + gtk::Box { set_orientation: gtk::Orientation::Horizontal, set_halign: gtk::Align::Center, set_spacing: 8, - + gtk::Button { set_label: &tr!("continue"), set_css_classes: &["suggested-action", "pill"], @@ -105,7 +105,8 @@ impl SimpleAsyncComponent for TosWarningApp { "continue" => { let installed = is_available("git") && - is_available("dwebp"); + is_available("dwebp") && + (is_available("7z") || is_available("7za")); if installed { sender.output(Self::Output::ScrollToDefaultPaths); From 5f1ac9d815f927c2fcbe0fc44838701d2177272f Mon Sep 17 00:00:00 2001 From: Nikita Podvirnyi Date: Wed, 11 Sep 2024 22:09:30 +0200 Subject: [PATCH 3/3] feat: updated changelog --- CHANGELOG.md | 5 +++++ src/ui/about.rs | 5 +++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 93f75f9..4f64ea3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Added + +- Added support for new game installation format +- Added 7z binary requirement + ## [1.8.1] - 02.09.2024 ### Fixed diff --git a/src/ui/about.rs b/src/ui/about.rs index 39b94c5..7747a64 100644 --- a/src/ui/about.rs +++ b/src/ui/about.rs @@ -100,10 +100,11 @@ impl SimpleComponent for AboutDialog { set_release_notes_version: &APP_VERSION, set_release_notes: &[ - "

Fixed

", + "

Added

", "
    ", - "
  • Fixed gamescope config file layout
  • ", + "
  • Added support for new game installation format
  • ", + "
  • Added 7z binary requirement
  • ", "
" ].join("\n"),