diff --git a/.envrc b/.envrc new file mode 100644 index 00000000..3550a30f --- /dev/null +++ b/.envrc @@ -0,0 +1 @@ +use flake diff --git a/.github/workflows/compile_release_build.yml b/.github/workflows/compile_release_build.yml index d3befdba..81596fd1 100644 --- a/.github/workflows/compile_release_build.yml +++ b/.github/workflows/compile_release_build.yml @@ -42,4 +42,4 @@ jobs: uses: actions/upload-artifact@v3.1.0 with: name: Release build - path: target/release/honkers-launcher \ No newline at end of file + path: target/release/honkers-launcher diff --git a/.gitignore b/.gitignore index 9b8adcb7..629f81b5 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ /target +/.direnv flamegraph.svg perf.data* diff --git a/.idea/.gitignore b/.idea/.gitignore deleted file mode 100644 index 13566b81..00000000 --- a/.idea/.gitignore +++ /dev/null @@ -1,8 +0,0 @@ -# Default ignored files -/shelf/ -/workspace.xml -# Editor-based HTTP Client requests -/httpRequests/ -# Datasource local storage ignored files -/dataSources/ -/dataSources.local.xml diff --git a/.idea/honkers-launcher.iml b/.idea/honkers-launcher.iml deleted file mode 100644 index cf84ae4a..00000000 --- a/.idea/honkers-launcher.iml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml deleted file mode 100644 index 373153d8..00000000 --- a/.idea/modules.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml deleted file mode 100644 index 35eb1ddf..00000000 --- a/.idea/vcs.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/.vscode/extensions.json b/.vscode/extensions.json deleted file mode 100644 index f8d40f32..00000000 --- a/.vscode/extensions.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "recommendations": [ - "vivaxy.vscode-conventional-commits", - "gruntfuggly.todo-tree", - "rust-lang.rust-analyzer", - "bungcip.better-toml", - "serayuzgur.crates" - ] -} \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json deleted file mode 100644 index 9210ffa7..00000000 --- a/.vscode/settings.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "conventionalCommits.scopes": [ - "tracing", - "core", - "ui", - "i18n" - ], - "editor.tabCompletion": "on", - "diffEditor.codeLens": true -} \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 096e6ece..90e8085a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,33 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Added + +- List missing dependencies on non-standard distros during initial setup +- Handle dwebp re-coding errors +- Added "Indonesia" wine language option +- Added writing of the game's output to the `game.log` file in the launcher's folder. + Size of this file is controlled by the `LAUNCHER_GAME_LOG_FILE_LIMIT` environment variable. +- Respect root `.version` file for game version parsing + +### Fixed + +- Fixed Italian localization breaking the launcher +- Fixed Discord RPC updates + +### Changed + +- Support new game API +- Updated desktop file entry to include "hl" keyword +- Localized `force-grab-cursor` to Ukrainian +- Changed background images processing logic +- Prioritize parsed game version over the API response + +### Removed + +- Removed `xdelta3` dependency +- Removed migrate installation feature + ## [1.6.3] - 20.05.2024 ### Fixed @@ -32,6 +59,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Added Thai - Added Ukrainian +### Fixed + +- Fixed GtkSwitch UI state representation + ### Changed - Update wish url diff --git a/Cargo.lock b/Cargo.lock index acadba3b..38db142f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4,9 +4,9 @@ version = 3 [[package]] name = "addr2line" -version = "0.21.0" +version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" +checksum = "6e4503c46a5c0c7844e948c9a4d6acd9f50cccb4de1c48eb9e291ea17470c678" dependencies = [ "gimli", ] @@ -37,7 +37,7 @@ dependencies = [ "cfg-if", "once_cell", "version_check", - "zerocopy", + "zerocopy 0.7.35", ] [[package]] @@ -57,8 +57,8 @@ checksum = "5c6cb57a04249c6480766f7f7cef5467412af1490f8d1e243141daddada3264f" [[package]] name = "anime-game-core" -version = "1.17.8" -source = "git+https://github.com/an-anime-team/anime-game-core?tag=1.17.8#8f3c1aecc8d61ae07f00d8af9d56c91f75b54bfb" +version = "1.22.2" +source = "git+https://github.com/an-anime-team/anime-game-core?tag=1.22.2#e3f2c3361bd986e60c8b8e11b0921ac46d6473b8" dependencies = [ "anyhow", "bzip2", @@ -82,8 +82,8 @@ dependencies = [ [[package]] name = "anime-launcher-sdk" -version = "1.12.10" -source = "git+https://github.com/an-anime-team/anime-launcher-sdk?tag=1.12.10#56a0d3b0b6ccb1fc5b359f8ff1f281225e122218" +version = "1.17.3" +source = "git+https://github.com/an-anime-team/anime-launcher-sdk?tag=1.17.3#1797ac466d1c8815e9ceae528043de66d033368c" dependencies = [ "anime-game-core", "anyhow", @@ -100,9 +100,9 @@ dependencies = [ [[package]] name = "anstream" -version = "0.6.14" +version = "0.6.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "418c75fa768af9c03be99d17643f93f79bbba589895012a80e3452a19ddda15b" +checksum = "64e15c1ab1f89faffbf04a634d5e1962e9074f2741eef6d97f3c4e322426d526" dependencies = [ "anstyle", "anstyle-parse", @@ -115,33 +115,33 @@ dependencies = [ [[package]] name = "anstyle" -version = "1.0.7" +version = "1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "038dfcf04a5feb68e9c60b21c9625a54c2c0616e79b72b0fd87075a056ae1d1b" +checksum = "1bec1de6f59aedf83baf9ff929c98f2ad654b97c9510f4e70cf6f661d49fd5b1" [[package]] name = "anstyle-parse" -version = "0.2.4" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c03a11a9034d92058ceb6ee011ce58af4a9bf61491aa7e1e59ecd24bd40d22d4" +checksum = "eb47de1e80c2b463c735db5b217a0ddc39d612e7ac9e2e96a5aed1f57616c1cb" dependencies = [ "utf8parse", ] [[package]] name = "anstyle-query" -version = "1.0.3" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a64c907d4e79225ac72e2a354c9ce84d50ebb4586dee56c82b3ee73004f537f5" +checksum = "6d36fc52c7f6c869915e99412912f22093507da8d9e942ceaf66fe4b7c14422a" dependencies = [ "windows-sys 0.52.0", ] [[package]] name = "anstyle-wincon" -version = "3.0.3" +version = "3.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61a38449feb7068f52bb06c12759005cf459ee52bb4adc1d5a7c4322d716fb19" +checksum = "5bf74e1b6e971609db8ca7a9ce79fd5768ab6ae46441c572e46cf596f59e57f8" dependencies = [ "anstyle", "windows-sys 0.52.0", @@ -173,9 +173,9 @@ checksum = "69f7f8c3906b62b754cd5326047894316021dcfe5a194c8ea52bdd94934a3457" [[package]] name = "arrayref" -version = "0.3.7" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b4930d2cb77ce62f89ee5d5289b4ac049559b1c45539271f5ed4fdc7db34545" +checksum = "9d151e35f61089500b617991b791fc8bfd237ae50cd5950803758a179b41e67a" [[package]] name = "arrayvec" @@ -202,12 +202,12 @@ dependencies = [ [[package]] name = "async-broadcast" -version = "0.7.0" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "258b52a1aa741b9f09783b2d86cf0aeeb617bbf847f6933340a39644227acbdb" +checksum = "20cd0e2e25ea8e5f7e9df04578dc6cf5c83577fd09b1a46aaf5c85e1c33f2a7e" dependencies = [ - "event-listener 5.3.0", - "event-listener-strategy 0.5.2", + "event-listener", + "event-listener-strategy", "futures-core", "pin-project-lite", ] @@ -219,16 +219,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "89b47800b0be77592da0afd425cc03468052844aff33b84e33cc696f64e77b6a" dependencies = [ "concurrent-queue", - "event-listener-strategy 0.5.2", + "event-listener-strategy", "futures-core", "pin-project-lite", ] [[package]] name = "async-io" -version = "2.3.2" +version = "2.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcccb0f599cfa2f8ace422d3555572f47424da5648a4382a9dd0310ff8210884" +checksum = "0d6baa8f0178795da0e71bc42c9e5d13261aac7ee549853162e66a241ba17964" dependencies = [ "async-lock", "cfg-if", @@ -245,20 +245,20 @@ dependencies = [ [[package]] name = "async-lock" -version = "3.3.0" +version = "3.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d034b430882f8381900d3fe6f0aaa3ad94f2cb4ac519b429692a1bc2dda4ae7b" +checksum = "ff6e472cdea888a4bd64f342f09b3f50e1886d32afe8df3d663c01140b811b18" dependencies = [ - "event-listener 4.0.3", - "event-listener-strategy 0.4.0", + "event-listener", + "event-listener-strategy", "pin-project-lite", ] [[package]] name = "async-process" -version = "2.2.2" +version = "2.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a53fc6301894e04a92cb2584fedde80cb25ba8e02d9dc39d4a87d036e22f397d" +checksum = "f7eda79bbd84e29c2b308d1dc099d7de8dcc7035e48f4bf5dc4a531a44ff5e2a" dependencies = [ "async-channel", "async-io", @@ -267,7 +267,7 @@ dependencies = [ "async-task", "blocking", "cfg-if", - "event-listener 5.3.0", + "event-listener", "futures-lite", "rustix", "tracing", @@ -287,9 +287,9 @@ dependencies = [ [[package]] name = "async-signal" -version = "0.2.6" +version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "afe66191c335039c7bb78f99dc7520b0cbb166b3a1cb33a03f53d8a1c6f2afda" +checksum = "dfb3634b73397aa844481f814fad23bbf07fdb0eabec10f2eb95e58944b1ec32" dependencies = [ "async-io", "async-lock", @@ -311,9 +311,9 @@ checksum = "8b75356056920673b02621b35afd0f7dda9306d03c79a30f5c56c44cf256e3de" [[package]] name = "async-trait" -version = "0.1.80" +version = "0.1.81" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6fa2087f2753a7da8cc1c0dbfcf89579dd57458e36769de5ac750b4671737ca" +checksum = "6e0c28dcc82d7c8ead5cb13beb15405b57b8546e93215673ff8ca0349a028107" dependencies = [ "proc-macro2", "quote", @@ -334,9 +334,9 @@ checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" [[package]] name = "backtrace" -version = "0.3.71" +version = "0.3.73" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26b05800d2e817c8b3b4b54abd461726265fa9789ae34330622f2db9ee696f9d" +checksum = "5cc23269a4f8976d0a4d2e7109211a419fe30e8d88d677cd60b6bc79c5732e0a" dependencies = [ "addr2line", "cc", @@ -367,15 +367,15 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.5.0" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1" +checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" [[package]] name = "blake3" -version = "1.5.1" +version = "1.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30cca6d3674597c30ddf2c587bf8d9d65c9a84d2326d941cc79c9842dfe0ef52" +checksum = "e9ec96fe9a81b5e365f9db71fe00edc4fe4ca2cc7dcb7861f0603012a7caa210" dependencies = [ "arrayref", "arrayvec", @@ -401,12 +401,11 @@ dependencies = [ [[package]] name = "blocking" -version = "1.6.0" +version = "1.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "495f7104e962b7356f0aeb34247aca1fe7d2e783b346582db7f2904cb5717e88" +checksum = "703f41c54fc768e63e091340b424302bb1c29ef4aa0c7f10fe849dfb114d29ea" dependencies = [ "async-channel", - "async-lock", "async-task", "futures-io", "futures-lite", @@ -415,9 +414,9 @@ dependencies = [ [[package]] name = "bstr" -version = "1.9.1" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05efc5cfd9110c8416e471df0e96702d58690178e206e61b7173706673c93706" +checksum = "40723b8fb387abc38f4f4a37c09073622e41dd12327033091ef8950659e6dc0c" dependencies = [ "memchr", "serde", @@ -437,9 +436,9 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.6.0" +version = "1.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "514de17de45fdb8dc022b1a7975556c53c86f9f0aa5f534b98977b171857c2c9" +checksum = "8318a53db07bb3f8dca91a600466bdb3f2eaadeedfdbcf02e1accbad9271ba50" [[package]] name = "bzip2" @@ -464,24 +463,24 @@ dependencies = [ [[package]] name = "cached" -version = "0.51.3" +version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd93a9f06ec296ca66b4c26fafa9ed63f32c473d7a708a5f28563ee64c948515" +checksum = "b4d73155ae6b28cf5de4cfc29aeb02b8a1c6dab883cb015d15cd514e42766846" dependencies = [ "ahash", "cached_proc_macro", "cached_proc_macro_types", "hashbrown", - "instant", "once_cell", "thiserror", + "web-time", ] [[package]] name = "cached_proc_macro" -version = "0.21.0" +version = "0.23.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "771aa57f3b17da6c8bcacb187bb9ec9bc81c8160e72342e67c329e0e1651a669" +checksum = "2f42a145ed2d10dce2191e1dcf30cfccfea9026660e143662ba5eec4017d5daa" dependencies = [ "darling", "proc-macro2", @@ -497,11 +496,11 @@ checksum = "ade8366b8bd5ba243f0a58f036cc0ca8a2f069cff1a2351ef1cac6b083e16fc0" [[package]] name = "cairo-rs" -version = "0.19.4" +version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2ac2a4d0e69036cf0062976f6efcba1aaee3e448594e6514bb2ddf87acce562" +checksum = "797fd5a634dcb0ad0d7d583df794deb0a236d88e759cd34b7da20198c6c9d145" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.6.0", "cairo-sys-rs", "glib", "libc", @@ -510,9 +509,9 @@ dependencies = [ [[package]] name = "cairo-sys-rs" -version = "0.19.2" +version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd3bb3119664efbd78b5e6c93957447944f16bdbced84c17a9f41c7829b81e64" +checksum = "428290f914b9b86089f60f5d8a9f6e440508e1bcff23b25afd51502b0a2da88f" dependencies = [ "glib-sys", "libc", @@ -521,13 +520,12 @@ dependencies = [ [[package]] name = "cc" -version = "1.0.98" +version = "1.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41c270e7540d725e65ac7f1b212ac8ce349719624d7bcff99f8e2e488e8cf03f" +checksum = "26a5c3fd7bfa1ce3897a3a3501d362b2d87b7f2583ebcb4a949ec25911025cbc" dependencies = [ "jobserver", "libc", - "once_cell", ] [[package]] @@ -548,9 +546,9 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "cfg_aliases" -version = "0.1.1" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd16c4719339c4530435d38e511904438d07cce7950afa3718a84ac36c10e89e" +checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" [[package]] name = "cipher" @@ -562,20 +560,11 @@ dependencies = [ "inout", ] -[[package]] -name = "cmake" -version = "0.1.50" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a31c789563b815f77f4250caee12365734369f942439b7defd71e18a48197130" -dependencies = [ - "cc", -] - [[package]] name = "colorchoice" -version = "1.0.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b6a852b24ab71dffc585bcb46eaf7959d175cb865a7152e35b348d1b2960422" +checksum = "d3fd119d74b830634cea2a0f58bbd0d54540518a14397557951e79340abc28c0" [[package]] name = "concurrent-queue" @@ -678,9 +667,9 @@ dependencies = [ [[package]] name = "darling" -version = "0.20.9" +version = "0.20.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83b2eb4d90d12bdda5ed17de686c2acb4c57914f8f921b8da7e112b5a36f3fe1" +checksum = "6f63b86c8a8826a49b8c21f08a2d07338eec8d900540f8630dc76284be802989" dependencies = [ "darling_core", "darling_macro", @@ -688,9 +677,9 @@ dependencies = [ [[package]] name = "darling_core" -version = "0.20.9" +version = "0.20.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "622687fe0bac72a04e5599029151f5796111b90f1baaa9b544d807a5e31cd120" +checksum = "95133861a8032aaea082871032f5815eb9e98cef03fa916ab4500513994df9e5" dependencies = [ "fnv", "ident_case", @@ -702,9 +691,9 @@ dependencies = [ [[package]] name = "darling_macro" -version = "0.20.9" +version = "0.20.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "733cabb43482b1a1b53eee8583c2b9e8684d592215ea83efd305dd31bc2f0178" +checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806" dependencies = [ "darling_core", "quote", @@ -713,9 +702,9 @@ dependencies = [ [[package]] name = "deflate64" -version = "0.1.8" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83ace6c86376be0b6cdcf3fb41882e81d94b31587573d1cfa9d01cd06bba210d" +checksum = "da692b8d1080ea3045efaab14434d40468c3d8657e42abddfffca87b428f4c1b" [[package]] name = "deranged" @@ -768,9 +757,9 @@ checksum = "bd0c93bb4b0c6d9b77f4435b0ae98c24d17f1c45b2ff844c6151a07256ca923b" [[package]] name = "displaydoc" -version = "0.2.4" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "487585f4d0c6655fe74905e2504d8ad6908e4db67f744eb140876906c2f3175d" +checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" dependencies = [ "proc-macro2", "quote", @@ -791,9 +780,9 @@ dependencies = [ [[package]] name = "either" -version = "1.12.0" +version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3dca9240753cf90908d7e4aac30f630662b02aebaa1b58a3cadabdb23385b58b" +checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" [[package]] name = "endi" @@ -823,9 +812,9 @@ dependencies = [ [[package]] name = "enumflags2" -version = "0.7.9" +version = "0.7.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3278c9d5fb675e0a51dabcf4c0d355f692b064171535ba72361be1528a9d8e8d" +checksum = "d232db7f5956f3f14313dc2f87985c58bd2c695ce124c8cdd984e08e15ac133d" dependencies = [ "enumflags2_derive", "serde", @@ -833,9 +822,9 @@ dependencies = [ [[package]] name = "enumflags2_derive" -version = "0.7.9" +version = "0.7.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c785274071b1b420972453b306eeca06acf4633829db4223b58a2a8c5953bc4" +checksum = "de0d48a183585823424a4ce1aa132d174a6a81bd540895822eb4c8373a8e49e8" dependencies = [ "proc-macro2", "quote", @@ -860,43 +849,22 @@ dependencies = [ [[package]] name = "event-listener" -version = "4.0.3" +version = "5.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67b215c49b2b248c855fb73579eb1f4f26c38ffdc12973e20e07b91d78d5646e" -dependencies = [ - "concurrent-queue", - "parking", - "pin-project-lite", -] - -[[package]] -name = "event-listener" -version = "5.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d9944b8ca13534cdfb2800775f8dd4902ff3fc75a50101466decadfdf322a24" +checksum = "6032be9bd27023a771701cc49f9f053c751055f71efb2e0ae5c15809093675ba" dependencies = [ "concurrent-queue", "parking", "pin-project-lite", ] -[[package]] -name = "event-listener-strategy" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "958e4d70b6d5e81971bebec42271ec641e7ff4e170a6fa605f2b8a8b65cb97d3" -dependencies = [ - "event-listener 4.0.3", - "pin-project-lite", -] - [[package]] name = "event-listener-strategy" version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0f214dc438f977e6d4e3500aaa277f5ad94ca83fbbd9b1a15713ce2344ccc5a1" dependencies = [ - "event-listener 5.3.0", + "event-listener", "pin-project-lite", ] @@ -935,7 +903,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5f54427cfd1c7829e2a139fcefea601bf088ebca651d2bf53ebc600eac295dae" dependencies = [ "crc32fast", - "libz-ng-sys", "miniz_oxide", ] @@ -1164,9 +1131,9 @@ dependencies = [ [[package]] name = "gdk-pixbuf" -version = "0.19.2" +version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6a23f8a0b5090494fd04924662d463f8386cc678dd3915015a838c1a3679b92" +checksum = "28bb53ecb56857c683c9ec859908e076dd3969c7d67598bd8b1ce095d211304a" dependencies = [ "gdk-pixbuf-sys", "gio", @@ -1176,9 +1143,9 @@ dependencies = [ [[package]] name = "gdk-pixbuf-sys" -version = "0.19.5" +version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fdbf021f8b9d19e30fb9ea6d6e5f2b6a712fe4645417c69f86f6ff1e1444a8f" +checksum = "9f6681a0c1330d1d3968bec1529f7172d62819ef0bdbb0d18022320654158b03" dependencies = [ "gio-sys", "glib-sys", @@ -1189,9 +1156,9 @@ dependencies = [ [[package]] name = "gdk4" -version = "0.8.2" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db265c9dd42d6a371e09e52deab3a84808427198b86ac792d75fd35c07990a07" +checksum = "4b7d7237c1487ed4b300aac7744efcbf1319e12d60d7afcd6f505414bd5b5dea" dependencies = [ "cairo-rs", "gdk-pixbuf", @@ -1204,9 +1171,9 @@ dependencies = [ [[package]] name = "gdk4-sys" -version = "0.8.2" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9418fb4e8a67074919fe7604429c45aa74eb9df82e7ca529767c6d4e9dc66dd" +checksum = "a67576c8ec012156d7f680e201a807b4432a77babb3157e0555e990ab6bcd878" dependencies = [ "cairo-sys-rs", "gdk-pixbuf-sys", @@ -1244,15 +1211,15 @@ dependencies = [ [[package]] name = "gimli" -version = "0.28.1" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" +checksum = "40ecd4077b5ae9fd2e9e169b102c6c330d0605168eb0e8bf79952b256dbefffd" [[package]] name = "gio" -version = "0.19.5" +version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be548be810e45dd31d3bbb89c6210980bb7af9bca3ea1292b5f16b75f8e394a7" +checksum = "398e3da68749fdc32783cbf7521ec3f65c9cf946db8c7774f8460af49e52c6e2" dependencies = [ "futures-channel", "futures-core", @@ -1268,9 +1235,9 @@ dependencies = [ [[package]] name = "gio-sys" -version = "0.19.5" +version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4bdbef451b0f0361e7f762987cc6bebd5facab1d535e85a3cf1115dfb08db40" +checksum = "e4feb96b31c32730ea3e1e89aecd2e4e37ecb1c473ad8f685e3430a159419f63" dependencies = [ "glib-sys", "gobject-sys", @@ -1281,11 +1248,11 @@ dependencies = [ [[package]] name = "glib" -version = "0.19.6" +version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0116c428e4841cab183a32a71b900fd6712194c20f9c424f01d2c016c96bd23" +checksum = "fee90a615ce05be7a32932cfb8adf2c4bbb4700e80d37713c981fb24c0c56238" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.6.0", "futures-channel", "futures-core", "futures-executor", @@ -1303,18 +1270,18 @@ dependencies = [ [[package]] name = "glib-build-tools" -version = "0.19.0" +version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "108f374fff60efd14b0d70d8916e7213aed18d7dd071ba3e9334ed2dac1dc86a" +checksum = "7029c2651d9b5d5a3eea93ec8a1995665c6d3a69ce9bf6042ad9064d134736d8" dependencies = [ "gio", ] [[package]] name = "glib-macros" -version = "0.19.5" +version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ed782fa3e949c31146671da6e7a227a5e7d354660df1db6d0aac4974dc82a3c" +checksum = "4da558d8177c0c8c54368818b508a4244e1286fce2858cef4e547023f0cfa5ef" dependencies = [ "heck", "proc-macro-crate", @@ -1325,9 +1292,9 @@ dependencies = [ [[package]] name = "glib-sys" -version = "0.19.5" +version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "767d23ead9bbdfcbb1c2242c155c8128a7d13dde7bf69c176f809546135e2282" +checksum = "4958c26e5a01c9af00dea669a97369eccbec29a8e6d125c24ea2d85ee7467b60" dependencies = [ "libc", "system-deps", @@ -1348,9 +1315,9 @@ dependencies = [ [[package]] name = "gobject-sys" -version = "0.19.5" +version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3787b0bfacca12bb25f8f822b0dbee9f7e4a86e6469a29976d332d2c14c945b" +checksum = "c6908864f5ffff15b56df7e90346863904f49b949337ed0456b9287af61903b8" dependencies = [ "glib-sys", "libc", @@ -1359,9 +1326,9 @@ dependencies = [ [[package]] name = "graphene-rs" -version = "0.19.2" +version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99e4d388e96c5f29e2b2f67045d229ddf826d0a8d6d282f94ed3b34452222c91" +checksum = "630e940ad5824f90221d6579043a9cd1f8bec86b4a17faaf7827d58eb16e8c1f" dependencies = [ "glib", "graphene-sys", @@ -1370,9 +1337,9 @@ dependencies = [ [[package]] name = "graphene-sys" -version = "0.19.5" +version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a60e7381afdd7be43bd10a89d3b6741d162aabbca3a8db73505afb6a3aea59d" +checksum = "6fb8fade7b754982f47ebbed241fd2680816fdd4598321784da10b9e1168836a" dependencies = [ "glib-sys", "libc", @@ -1382,9 +1349,9 @@ dependencies = [ [[package]] name = "gsk4" -version = "0.8.2" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7563884bf6939f4468e5d94654945bdd9afcaf8c3ba4c5dd17b5342b747221be" +checksum = "1f3cf2091e1af185b347b3450817d93dea6fe435df7abd4c2cd7fb5bcb4cfda8" dependencies = [ "cairo-rs", "gdk4", @@ -1397,9 +1364,9 @@ dependencies = [ [[package]] name = "gsk4-sys" -version = "0.8.2" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23024bf2636c38bbd1f822f58acc9d1c25b28da896ff0f291a1a232d4272b3dc" +checksum = "6aa69614a26d8760c186c3690f1b0fbb917572ca23ef83137445770ceddf8cde" dependencies = [ "cairo-sys-rs", "gdk4-sys", @@ -1413,9 +1380,9 @@ dependencies = [ [[package]] name = "gtk4" -version = "0.8.2" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b04e11319b08af11358ab543105a9e49b0c491faca35e2b8e7e36bfba8b671ab" +checksum = "eaffc6c743c9160514cc9b67eace364e5dc5798369fa809cdb04e035c21c5c5d" dependencies = [ "cairo-rs", "field-offset", @@ -1434,9 +1401,9 @@ dependencies = [ [[package]] name = "gtk4-macros" -version = "0.8.2" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec655a7ef88d8ce9592899deb8b2d0fa50bab1e6dd69182deb764e643c522408" +checksum = "188211f546ce5801f6d0245c37b6249143a2cb4fa040e54829ca1e76796e9f09" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -1446,9 +1413,9 @@ dependencies = [ [[package]] name = "gtk4-sys" -version = "0.8.2" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c8aa86b7f85ea71d66ea88c1d4bae1cfacf51ca4856274565133838d77e57b5" +checksum = "1114a207af8ada02cf4658a76692f4190f06f093380d5be07e3ca8b43aa7c666" dependencies = [ "cairo-sys-rs", "gdk-pixbuf-sys", @@ -1485,6 +1452,12 @@ version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" +[[package]] +name = "hermit-abi" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fbf6a919d6cf397374f7dfeeea91d974c7c0a7221d0d0f4f20d859d329e53fcc" + [[package]] name = "hex" version = "0.4.3" @@ -1527,9 +1500,9 @@ dependencies = [ [[package]] name = "human-panic" -version = "2.0.0" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4c5d0e9120f6bca6120d142c7ede1ba376dd6bf276d69dd3dbe6cbeb7824179" +checksum = "1c5a08ed290eac04006e21e63d32e90086b6182c7cd0452d10f4264def1fec9a" dependencies = [ "anstream", "anstyle", @@ -1538,7 +1511,7 @@ dependencies = [ "serde", "serde_derive", "toml", - "uuid 1.8.0", + "uuid 1.10.0", ] [[package]] @@ -1575,9 +1548,9 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.2.6" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" +checksum = "de3fc2e30ba82dd1b3911c8de1ffc143c74a914a14e99514d7637e3099df5ea0" dependencies = [ "equivalent", "hashbrown", @@ -1592,15 +1565,6 @@ dependencies = [ "generic-array", ] -[[package]] -name = "instant" -version = "0.1.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0242819d153cba4b4b05a5a8f2a7e9bbf97b6055b2a002b395c96b5ff3c0222" -dependencies = [ - "cfg-if", -] - [[package]] name = "intl-memoizer" version = "0.5.2" @@ -1641,9 +1605,9 @@ dependencies = [ [[package]] name = "is_terminal_polyfill" -version = "1.70.0" +version = "1.70.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8478577c03552c21db0e2724ffb8986a5ce7af88107e6be5d2ee6e158c12800" +checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf" [[package]] name = "itoa" @@ -1653,9 +1617,9 @@ checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" [[package]] name = "jobserver" -version = "0.1.31" +version = "0.1.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2b099aaa34a9751c5bf0878add70444e1ed2dd73f347be99003d4577277de6e" +checksum = "48d1dbcbbeb6a7fec7e059840aa538bd62aaccf972c7346c4d9d2059312853d0" dependencies = [ "libc", ] @@ -1677,17 +1641,16 @@ checksum = "ca9325aac17917b5650f25d477ce2909f2e9539688227fdee3ceb5093f666c9e" [[package]] name = "lazy_static" -version = "1.4.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" +checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" [[package]] name = "libadwaita" -version = "0.6.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91b4990248b9e1ec5e72094a2ccaea70ec3809f88f6fd52192f2af306b87c5d9" +checksum = "2ff9c222b5c783729de45185f07b2fec2d43a7f9c63961e777d3667e20443878" dependencies = [ - "gdk-pixbuf", "gdk4", "gio", "glib", @@ -1699,9 +1662,9 @@ dependencies = [ [[package]] name = "libadwaita-sys" -version = "0.6.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23a748e4e92be1265cd9e93d569c0b5dfc7814107985aa6743d670ab281ea1a8" +checksum = "1c44d8bdbad31d6639e1f20cc9c1424f1a8e02d751fc28d44659bf743fb9eca6" dependencies = [ "gdk4-sys", "gio-sys", @@ -1719,16 +1682,6 @@ version = "0.2.155" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c" -[[package]] -name = "libz-ng-sys" -version = "1.1.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6409efc61b12687963e602df8ecf70e8ddacf95bc6576bcf16e3ac6328083c5" -dependencies = [ - "cmake", - "libc", -] - [[package]] name = "linux-raw-sys" version = "0.4.14" @@ -1753,9 +1706,9 @@ checksum = "9374ef4228402d4b7e403e5838cb880d9ee663314b0a900d5a6aabf0c213552e" [[package]] name = "log" -version = "0.4.21" +version = "0.4.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c" +checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" [[package]] name = "lzma-rs" @@ -1809,9 +1762,9 @@ dependencies = [ [[package]] name = "memchr" -version = "2.7.2" +version = "2.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c8640c5d730cb13ebd907d8d04b52f55ac9a2eec55b440c8892f40d56c76c1d" +checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" [[package]] name = "memoffset" @@ -1824,18 +1777,18 @@ dependencies = [ [[package]] name = "miniz_oxide" -version = "0.7.3" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87dfd01fe195c66b572b37921ad8803d010623c0aca821bea2302239d155cdae" +checksum = "b8a240ddb74feaf34a79a7add65a741f3167852fba007066dcac1ca548d89c08" dependencies = [ "adler", ] [[package]] name = "minreq" -version = "2.11.2" +version = "2.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fdef521c74c2884a4f3570bcdb6d2a77b3c533feb6b27ac2ae72673cc221c64" +checksum = "763d142cdff44aaadd9268bebddb156ef6c65a0e13486bb81673cf2d8739f9b0" dependencies = [ "base64 0.12.3", "log", @@ -1850,13 +1803,14 @@ dependencies = [ [[package]] name = "mio" -version = "0.8.11" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4a650543ca06a924e8b371db273b2756685faae30f8487da1b56505a8f78b0c" +checksum = "4569e456d394deccd22ce1c1913e6ea0e54519f577285001215d33557431afe4" dependencies = [ + "hermit-abi 0.3.9", "libc", "wasi", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] @@ -1870,11 +1824,11 @@ dependencies = [ [[package]] name = "nix" -version = "0.28.0" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab2156c4fce2f8df6c499cc1c763e4394b7482525bf2a9701c9d79d215f519e4" +checksum = "71e2746dc3a24dd78b3cfcb7be93368c6de9963d30f43a6a73998a9cf4b17b46" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.6.0", "cfg-if", "cfg_aliases", "libc", @@ -1906,16 +1860,6 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" -[[package]] -name = "num_cpus" -version = "1.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" -dependencies = [ - "hermit-abi", - "libc", -] - [[package]] name = "objc" version = "0.2.7" @@ -1947,9 +1891,9 @@ dependencies = [ [[package]] name = "object" -version = "0.32.2" +version = "0.36.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6a622008b6e321afc04970976f62ee297fdbaa6f95318ca343e3eebb9648441" +checksum = "3f203fa8daa7bb185f760ae12bd8e097f63d17041dcdcaf675ac54cdf863170e" dependencies = [ "memchr", ] @@ -1962,9 +1906,9 @@ checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" [[package]] name = "open" -version = "5.1.3" +version = "5.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2eb49fbd5616580e9974662cb96a3463da4476e649a7e4b258df0de065db0657" +checksum = "61a877bf6abd716642a53ef1b89fb498923a4afca5c754f9050b4d081c05c4b3" dependencies = [ "is-wsl", "libc", @@ -2006,9 +1950,9 @@ checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" [[package]] name = "pango" -version = "0.19.5" +version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "504ce6e805439ea2c6791168fe7ef8e3da0c1b2ef82c44bc450dbc330592920d" +checksum = "54768854025df6903061d0084fd9702a253ddfd60db7d9b751d43b76689a7f0a" dependencies = [ "gio", "glib", @@ -2018,9 +1962,9 @@ dependencies = [ [[package]] name = "pango-sys" -version = "0.19.5" +version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4829555bdbb83692ddeaf5a6927fb2d025c8131e5ecaa4f7619fff6985d3505" +checksum = "b07cc57d10cee4ec661f718a6902cee18c2f4cfae08e87e5a390525946913390" dependencies = [ "glib-sys", "gobject-sys", @@ -2070,9 +2014,9 @@ checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" [[package]] name = "piper" -version = "0.2.2" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "464db0c665917b13ebb5d453ccdec4add5658ee1adc7affc7677615356a8afaf" +checksum = "ae1d5c74c9876f070d3e8fd503d748c7d974c3e48da8f41350fa5222ef9b4391" dependencies = [ "atomic-waker", "fastrand", @@ -2087,13 +2031,13 @@ checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" [[package]] name = "polling" -version = "3.7.0" +version = "3.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "645493cf344456ef24219d02a768cf1fb92ddf8c92161679ae3d91b91a637be3" +checksum = "a3ed00ed3fbf728b5816498ecd316d1716eecaced9c0c8d2c5a6740ca214985b" dependencies = [ "cfg-if", "concurrent-queue", - "hermit-abi", + "hermit-abi 0.4.0", "pin-project-lite", "rustix", "tracing", @@ -2114,9 +2058,12 @@ checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" [[package]] name = "ppv-lite86" -version = "0.2.17" +version = "0.2.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" +checksum = "dee4364d9f3b902ef14fab8a1ddffb783a1cb6b4bba3bfc1fa3922732c7de97f" +dependencies = [ + "zerocopy 0.6.6", +] [[package]] name = "proc-macro-crate" @@ -2135,9 +2082,9 @@ checksum = "dc375e1527247fe1a97d8b7156678dfe7c1af2fc075c9a4db3690ecd2a148068" [[package]] name = "proc-macro2" -version = "1.0.83" +version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b33eb56c327dec362a9e55b3ad14f9d2f0904fb5a5b03b513ab5465399e9f43" +checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" dependencies = [ "unicode-ident", ] @@ -2218,9 +2165,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.6" +version = "0.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86b83b8b9847f9bf95ef68afb0b8e6cdb80f498442f5179a29fad448fcc1eaea" +checksum = "38caf58cc5ef2fed281f89292ef23f6365465ed9a41b7a7754eb4e26496c92df" dependencies = [ "aho-corasick", "memchr", @@ -2229,15 +2176,15 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.8.3" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adad44e29e4c806119491a7f06f03de4d1af22c3a680dd47f1e6e179439d1f56" +checksum = "7a66a03ae7c801facd77a29370b4faec201768915ac14a721ba36f20bc9c209b" [[package]] name = "relm4" -version = "0.8.1" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6e0e187b58db367305e8486d3228158251da1c8ba1e18baa9de61894e822649" +checksum = "cf0363f92b6a7eefd985b47f27b7ae168dd2fd5cd4013a338c9b111c33744d1f" dependencies = [ "flume", "fragile", @@ -2245,16 +2192,23 @@ dependencies = [ "gtk4", "libadwaita", "once_cell", + "relm4-css", "relm4-macros", "tokio", "tracing", ] +[[package]] +name = "relm4-css" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d3b924557df1cddc687b60b313c4b76620fdbf0e463afa4b29f67193ccf37f9" + [[package]] name = "relm4-macros" -version = "0.8.1" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0774e846889823aa5766f5b62cface3189a5b36280e65b2faaa6df0319da1726" +checksum = "fc5885640821d60062497737dd42fd04248d13c7ecccee620caaa4b210fe9905" dependencies = [ "proc-macro2", "quote", @@ -2326,7 +2280,7 @@ version = "0.38.34" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "70dc5ec042f7a43c4a73241207cecc9873a06d45debb38b329f8541d85c2730f" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.6.0", "errno", "libc", "linux-raw-sys", @@ -2418,11 +2372,11 @@ dependencies = [ [[package]] name = "security-framework" -version = "2.11.0" +version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c627723fd09706bacdb5cf41499e95098555af3c3c29d014dc3c458ef6be11c0" +checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.6.0", "core-foundation", "core-foundation-sys", "libc", @@ -2431,9 +2385,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.11.0" +version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "317936bbbd05227752583946b9e66d7ce3b489f84e11a94a510b4437fef407d7" +checksum = "75da29fe9b9b08fe9d6b22b5b4bcbc75d8db3aa31e639aa56bb62e9d46bfceaf" dependencies = [ "core-foundation-sys", "libc", @@ -2462,18 +2416,18 @@ checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" [[package]] name = "serde" -version = "1.0.202" +version = "1.0.204" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "226b61a0d411b2ba5ff6d7f73a476ac4f8bb900373459cd00fab8512828ba395" +checksum = "bc76f558e0cbb2a839d37354c575f1dc3fdc6546b5be373ba43d95f231bf7c12" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.202" +version = "1.0.204" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6048858004bcff69094cd972ed40a32500f153bd3be9f716b2eed2e8217c4838" +checksum = "e0cd7e117be63d3c3678776753929474f3b04a43a080c744d6b0ae2a8c28e222" dependencies = [ "proc-macro2", "quote", @@ -2482,11 +2436,12 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.117" +version = "1.0.122" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "455182ea6142b14f93f4bc5320a2b31c1f266b66a4a5c858b013302a5d8cbfc3" +checksum = "784b6203951c57ff748476b126ccb5e8e2959a5c19e5c617ab1956be3dbc68da" dependencies = [ "itoa", + "memchr", "ryu", "serde", ] @@ -2504,9 +2459,9 @@ dependencies = [ [[package]] name = "serde_spanned" -version = "0.6.6" +version = "0.6.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79e674e01f999af37c49f70a6ede167a8a60b2503e56c5599532a65baa5969a0" +checksum = "eb5b1b31579f3811bf615c144393417496f152e12ac8b7663bf664f4a815306d" dependencies = [ "serde", ] @@ -2594,15 +2549,15 @@ checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" [[package]] name = "subtle" -version = "2.5.0" +version = "2.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" +checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" [[package]] name = "syn" -version = "2.0.65" +version = "2.0.72" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2863d96a84c6439701d7a38f9de935ec562c8832cc55d1dde0f513b52fad106" +checksum = "dc4b9b9bf2add8093d3f2c0204471e951b2285580335de42f9d2534f3ae7a8af" dependencies = [ "proc-macro2", "quote", @@ -2611,24 +2566,23 @@ dependencies = [ [[package]] name = "sysinfo" -version = "0.30.12" +version = "0.31.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "732ffa00f53e6b2af46208fba5718d9662a421049204e156328b66791ffa15ae" +checksum = "d4115055da5f572fff541dd0c4e61b0262977f453cc9fe04be83aba25a89bdab" dependencies = [ - "cfg-if", "core-foundation-sys", "libc", + "memchr", "ntapi", - "once_cell", "rayon", "windows", ] [[package]] name = "system-deps" -version = "6.2.2" +version = "7.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3e535eb8dded36d55ec13eddacd30dec501792ff23a0b1682c38601b8cf2349" +checksum = "6c81f13d9a334a6c242465140bd262fae382b752ff2011c4f7419919a9c97922" dependencies = [ "cfg-expr", "heck", @@ -2639,9 +2593,9 @@ dependencies = [ [[package]] name = "tar" -version = "0.4.40" +version = "0.4.41" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b16afcea1f22891c49a00c751c7b63b2233284064f11a200fc624137c51e2ddb" +checksum = "cb797dad5fb5b76fcf519e702f4a589483b5ef06567f160c392832c1f5e44909" dependencies = [ "filetime", "libc", @@ -2650,9 +2604,9 @@ dependencies = [ [[package]] name = "target-lexicon" -version = "0.12.14" +version = "0.12.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1fc403891a21bcfb7c37834ba66a547a8f402146eba7265b5a6d88059c9ff2f" +checksum = "61c41af27dd6d1e27b1b16b489db798443478cef1f06a660c96db617ba5de3b1" [[package]] name = "tempfile" @@ -2668,18 +2622,18 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.61" +version = "1.0.63" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c546c80d6be4bc6a00c0f01730c08df82eaa7a7a61f11d656526506112cc1709" +checksum = "c0342370b38b6a11b6cc11d6a805569958d54cfa061a29969c3b5ce2ea405724" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.61" +version = "1.0.63" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46c3384250002a6d5af4d114f2845d37b57521033f30d5c3f46c4d70e1197533" +checksum = "a4558b58466b9ad7ca0f102865eccc95938dca1a74a856f2b57b6629050da261" dependencies = [ "proc-macro2", "quote", @@ -2717,18 +2671,18 @@ checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" [[package]] name = "tinystr" -version = "0.7.5" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83c02bf3c538ab32ba913408224323915f4ef9a6d61c0e85d493f355921c0ece" +checksum = "9117f5d4db391c1cf6927e7bea3db74b9a1c1add8f7eda9ffd5364f40f57b82f" dependencies = [ "displaydoc", ] [[package]] name = "tinyvec" -version = "1.6.0" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" +checksum = "445e881f4f6d382d5f27c034e25eb92edd7c784ceab92a0937db7f2e9471b938" dependencies = [ "tinyvec_macros", ] @@ -2741,39 +2695,38 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.37.0" +version = "1.39.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1adbebffeca75fcfd058afa480fb6c0b81e165a0323f9c9d39c9697e37c46787" +checksum = "daa4fb1bc778bd6f04cbfc4bb2d06a7396a8f299dc33ea1900cedaa316f467b1" dependencies = [ "backtrace", "bytes", "libc", "mio", - "num_cpus", "pin-project-lite", "signal-hook-registry", "socket2", "tracing", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] name = "toml" -version = "0.8.13" +version = "0.8.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4e43f8cc456c9704c851ae29c67e17ef65d2c30017c17a9765b89c382dc8bba" +checksum = "a1ed1f98e3fdc28d6d910e6737ae6ab1a93bf1985935a1193e68f93eeb68d24e" dependencies = [ "serde", "serde_spanned", "toml_datetime", - "toml_edit 0.22.13", + "toml_edit 0.22.20", ] [[package]] name = "toml_datetime" -version = "0.6.6" +version = "0.6.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4badfd56924ae69bcc9039335b2e017639ce3f9b001c393c1b2d1ef846ce2cbf" +checksum = "0dd7358ecb8fc2f8d014bf86f6f638ce72ba252a2c3a2572f2a795f1d23efb41" dependencies = [ "serde", ] @@ -2791,15 +2744,15 @@ dependencies = [ [[package]] name = "toml_edit" -version = "0.22.13" +version = "0.22.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c127785850e8c20836d49732ae6abfa47616e60bf9d9f57c43c250361a9db96c" +checksum = "583c44c02ad26b0c3f3066fe629275e50627026c51ac2e595cca4c230ce1ce1d" dependencies = [ "indexmap", "serde", "serde_spanned", "toml_datetime", - "winnow 0.6.8", + "winnow 0.6.18", ] [[package]] @@ -2957,9 +2910,9 @@ checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" [[package]] name = "url" -version = "2.5.0" +version = "2.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31e6302e3bb753d46e83516cae55ae196fc0c309407cf11ab35cc51a4c2a4633" +checksum = "22784dbdf76fdde8af1aeda5622b546b422b6fc585325248a2bf9f5e41e94d6c" dependencies = [ "form_urlencoded", "idna", @@ -2975,9 +2928,9 @@ checksum = "daf8dba3b7eb870caf1ddeed7bc9d2a049f3cfdfae7cb521b087cc33ae4c49da" [[package]] name = "utf8parse" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" +checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" [[package]] name = "uuid" @@ -2990,9 +2943,9 @@ dependencies = [ [[package]] name = "uuid" -version = "1.8.0" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a183cf7feeba97b4dd1c0d46788634f6221d87fa961b305bed08c851829efcc0" +checksum = "81dfa00651efa65069b0b6b651f4aaa31ba9e3c3ce0137aaad053604ee7e0314" dependencies = [ "getrandom", ] @@ -3011,9 +2964,9 @@ checksum = "852e951cb7832cb45cb1169900d19760cfa39b82bc0ea9c0e5a14ae88411c98b" [[package]] name = "version_check" -version = "0.9.4" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" +checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" [[package]] name = "walkdir" @@ -3107,6 +3060,16 @@ dependencies = [ "wasm-bindgen", ] +[[package]] +name = "web-time" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a6580f308b1fad9207618087a65c04e7a10bc77e02c8e84e9b00dd4b12fa0bb" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + [[package]] name = "webpki-roots" version = "0.25.4" @@ -3163,21 +3126,55 @@ dependencies = [ [[package]] name = "windows" -version = "0.52.0" +version = "0.57.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e48a53791691ab099e5e2ad123536d0fff50652600abaf43bbf952894110d0be" +checksum = "12342cb4d8e3b046f3d80effd474a7a02447231330ef77d71daa6fbc40681143" dependencies = [ "windows-core", - "windows-targets 0.52.5", + "windows-targets 0.52.6", ] [[package]] name = "windows-core" -version = "0.52.0" +version = "0.57.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" +checksum = "d2ed2439a290666cd67ecce2b0ffaad89c2a56b976b736e6ece670297897832d" dependencies = [ - "windows-targets 0.52.5", + "windows-implement", + "windows-interface", + "windows-result", + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-implement" +version = "0.57.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9107ddc059d5b6fbfbffdfa7a7fe3e22a226def0b2608f72e9d552763d3e1ad7" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "windows-interface" +version = "0.57.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29bee4b38ea3cde66011baa44dba677c432a78593e202392d1e9070cf2a7fca7" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "windows-result" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e383302e8ec8515204254685643de10811af0ed97ea37210dc26fb0032647f8" +dependencies = [ + "windows-targets 0.52.6", ] [[package]] @@ -3195,7 +3192,7 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" dependencies = [ - "windows-targets 0.52.5", + "windows-targets 0.52.6", ] [[package]] @@ -3215,18 +3212,18 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f0713a46559409d202e70e28227288446bf7841d3211583a4b53e3f6d96e7eb" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" dependencies = [ - "windows_aarch64_gnullvm 0.52.5", - "windows_aarch64_msvc 0.52.5", - "windows_i686_gnu 0.52.5", + "windows_aarch64_gnullvm 0.52.6", + "windows_aarch64_msvc 0.52.6", + "windows_i686_gnu 0.52.6", "windows_i686_gnullvm", - "windows_i686_msvc 0.52.5", - "windows_x86_64_gnu 0.52.5", - "windows_x86_64_gnullvm 0.52.5", - "windows_x86_64_msvc 0.52.5", + "windows_i686_msvc 0.52.6", + "windows_x86_64_gnu 0.52.6", + "windows_x86_64_gnullvm 0.52.6", + "windows_x86_64_msvc 0.52.6", ] [[package]] @@ -3237,9 +3234,9 @@ checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" [[package]] name = "windows_aarch64_gnullvm" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7088eed71e8b8dda258ecc8bac5fb1153c5cffaf2578fc8ff5d61e23578d3263" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" [[package]] name = "windows_aarch64_msvc" @@ -3249,9 +3246,9 @@ checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" [[package]] name = "windows_aarch64_msvc" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9985fd1504e250c615ca5f281c3f7a6da76213ebd5ccc9561496568a2752afb6" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" [[package]] name = "windows_i686_gnu" @@ -3261,15 +3258,15 @@ checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" [[package]] name = "windows_i686_gnu" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88ba073cf16d5372720ec942a8ccbf61626074c6d4dd2e745299726ce8b89670" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" [[package]] name = "windows_i686_gnullvm" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87f4261229030a858f36b459e748ae97545d6f1ec60e5e0d6a3d32e0dc232ee9" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" [[package]] name = "windows_i686_msvc" @@ -3279,9 +3276,9 @@ checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" [[package]] name = "windows_i686_msvc" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db3c2bf3d13d5b658be73463284eaf12830ac9a26a90c717b7f771dfe97487bf" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" [[package]] name = "windows_x86_64_gnu" @@ -3291,9 +3288,9 @@ checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" [[package]] name = "windows_x86_64_gnu" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e4246f76bdeff09eb48875a0fd3e2af6aada79d409d33011886d3e1581517d9" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" [[package]] name = "windows_x86_64_gnullvm" @@ -3303,9 +3300,9 @@ checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" [[package]] name = "windows_x86_64_gnullvm" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "852298e482cd67c356ddd9570386e2862b5673c85bd5f88df9ab6802b334c596" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" [[package]] name = "windows_x86_64_msvc" @@ -3315,9 +3312,9 @@ checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" [[package]] name = "windows_x86_64_msvc" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bec47e5bfd1bff0eeaf6d8b485cc1074891a197ab4225d504cb7a1ab88b02bf0" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] name = "winnow" @@ -3330,9 +3327,9 @@ dependencies = [ [[package]] name = "winnow" -version = "0.6.8" +version = "0.6.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3c52e9c97a68071b23e836c9380edae937f17b9c4667bd021973efc689f618d" +checksum = "68a9bda4691f099d435ad181000724da8e5899daa10713c2d432552b9ccd3a6f" dependencies = [ "memchr", ] @@ -3350,12 +3347,12 @@ dependencies = [ [[package]] name = "xdg-home" -version = "1.1.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21e5a325c3cb8398ad6cf859c1135b25dd29e186679cf2da7581d9679f63b38e" +checksum = "ca91dcf8f93db085f3a0a29358cd0b9d670915468f4290e8b85d118a34211ab8" dependencies = [ "libc", - "winapi", + "windows-sys 0.52.0", ] [[package]] @@ -3378,16 +3375,16 @@ dependencies = [ [[package]] name = "zbus" -version = "4.2.2" +version = "4.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "989c3977a7aafa97b12b9a35d21cdcff9b0d2289762b14683f45d66b1ba6c48f" +checksum = "bb97012beadd29e654708a0fdb4c84bc046f537aecfde2c3ee0a9e4b4d48c725" dependencies = [ "async-broadcast", "async-process", "async-recursion", "async-trait", "enumflags2", - "event-listener 5.3.0", + "event-listener", "futures-core", "futures-sink", "futures-util", @@ -3411,9 +3408,9 @@ dependencies = [ [[package]] name = "zbus_macros" -version = "4.2.2" +version = "4.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fe9de53245dcf426b7be226a4217dd5e339080e5d46e64a02d6e5dcbf90fca1" +checksum = "267db9407081e90bbfa46d841d3cbc60f59c0351838c4bc65199ecd79ab1983e" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -3435,18 +3432,39 @@ dependencies = [ [[package]] name = "zerocopy" -version = "0.7.34" +version = "0.6.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "854e949ac82d619ee9a14c66a1b674ac730422372ccb759ce0c39cabcf2bf8e6" +dependencies = [ + "byteorder", + "zerocopy-derive 0.6.6", +] + +[[package]] +name = "zerocopy" +version = "0.7.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0" +dependencies = [ + "zerocopy-derive 0.7.35", +] + +[[package]] +name = "zerocopy-derive" +version = "0.6.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae87e3fcd617500e5d106f0380cf7b77f3c6092aae37191433159dda23cfb087" +checksum = "125139de3f6b9d625c39e2efdd73d41bdac468ccd556556440e322be0e1bbd91" dependencies = [ - "zerocopy-derive", + "proc-macro2", + "quote", + "syn", ] [[package]] name = "zerocopy-derive" -version = "0.7.34" +version = "0.7.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15e934569e47891f7d9411f1a451d947a60e000ab3bd24fbb970f000387d1b3b" +checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", @@ -3455,9 +3473,9 @@ dependencies = [ [[package]] name = "zeroize" -version = "1.7.0" +version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "525b4ec142c6b68a2d10f01f7bbf6755599ca3f81ea53b8431b7dd348f5fdb2d" +checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde" dependencies = [ "zeroize_derive", ] @@ -3475,9 +3493,9 @@ dependencies = [ [[package]] name = "zip" -version = "1.3.0" +version = "2.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1f4a27345eb6f7aa7bd015ba7eb4175fa4e1b462a29874b779e0bbcf96c6ac7" +checksum = "40dd8c92efc296286ce1fbd16657c5dbefff44f1b4ca01cc5f517d8b7b3d3e2e" dependencies = [ "aes", "arbitrary", @@ -3491,6 +3509,7 @@ dependencies = [ "hmac", "indexmap", "lzma-rs", + "memchr", "pbkdf2", "rand", "sha1", @@ -3517,27 +3536,27 @@ dependencies = [ [[package]] name = "zstd" -version = "0.13.1" +version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d789b1514203a1120ad2429eae43a7bd32b90976a7bb8a05f7ec02fa88cc23a" +checksum = "fcf2b778a664581e31e389454a7072dab1647606d44f7feea22cd5abb9c9f3f9" dependencies = [ "zstd-safe", ] [[package]] name = "zstd-safe" -version = "7.1.0" +version = "7.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cd99b45c6bc03a018c8b8a86025678c87e55526064e38f9df301989dce7ec0a" +checksum = "fa556e971e7b568dc775c136fc9de8c779b1c2fc3a63defaafadffdbd3181afa" dependencies = [ "zstd-sys", ] [[package]] name = "zstd-sys" -version = "2.0.10+zstd.1.5.6" +version = "2.0.12+zstd.1.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c253a4914af5bafc8fa8c86ee400827e83cf6ec01195ec1f1ed8441bf00d65aa" +checksum = "0a4e40c320c3cb459d9a9ff6de98cff88f4751ee9275d140e2be94a2b74e4c13" dependencies = [ "cc", "pkg-config", @@ -3545,9 +3564,9 @@ dependencies = [ [[package]] name = "zvariant" -version = "4.1.1" +version = "4.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9aa6d31a02fbfb602bfde791de7fedeb9c2c18115b3d00f3a36e489f46ffbbc7" +checksum = "2084290ab9a1c471c38fc524945837734fbf124487e105daec2bb57fd48c81fe" dependencies = [ "endi", "enumflags2", @@ -3559,9 +3578,9 @@ dependencies = [ [[package]] name = "zvariant_derive" -version = "4.1.1" +version = "4.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "642bf1b6b6d527988b3e8193d20969d53700a36eac734d21ae6639db168701c8" +checksum = "73e2ba546bda683a90652bac4a279bc146adad1386f25379cf73200d2002c449" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -3572,9 +3591,9 @@ dependencies = [ [[package]] name = "zvariant_utils" -version = "2.0.0" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc242db087efc22bd9ade7aa7809e4ba828132edc312871584a6b4391bdf8786" +checksum = "c51bcff7cc3dbb5055396bcf774748c3dab426b4b8659046963523cee4808340" dependencies = [ "proc-macro2", "quote", diff --git a/Cargo.toml b/Cargo.toml index 9c5b3078..4abdb111 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -15,28 +15,28 @@ lto = true opt-level = "s" [build-dependencies] -glib-build-tools = "0.19" +glib-build-tools = "0.20" [dependencies.anime-launcher-sdk] git = "https://github.com/an-anime-team/anime-launcher-sdk" -tag = "1.12.10" +tag = "1.17.3" features = ["all", "honkai", "honkai-patch"] # path = "../anime-launcher-sdk" # ! for dev purposes only [dependencies] -relm4 = { version = "0.8.1", features = ["macros", "libadwaita"] } -gtk = { package = "gtk4", version = "0.8.1", features = ["v4_12"] } -adw = { package = "libadwaita", version = "0.6.0", features = ["v1_4"] } +relm4 = { version = "0.9.0", features = ["macros", "libadwaita"] } +gtk = { package = "gtk4", version = "0.9.0", features = ["v4_12"] } +adw = { package = "libadwaita", version = "0.7.0", features = ["v1_4"] } rfd = { version = "0.14.1", features = ["xdg-portal", "tokio"], default-features = false } -open = "5.0.0" +open = "5.3.0" whatadistro = "0.1.0" serde_json = "1.0" anyhow = "1.0" -lazy_static = "1.4.0" -cached = { version = "0.51", features = ["proc_macro"] } +lazy_static = "1.5.0" +cached = { version = "0.53", features = ["proc_macro"] } md-5 = { version = "0.10", features = ["asm"] } enum-ordinalize = "4.3" @@ -46,4 +46,4 @@ tracing-subscriber = "0.3" fluent-templates = "0.9" unic-langid = "0.9" -human-panic = "2.0.0" +human-panic = "2.0.1" diff --git a/README.md b/README.md index 4f4421b2..b7056605 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,6 @@

Discord · - Matrix · Wiki

@@ -24,11 +23,17 @@ Or share them and ruin it for the dozens of Linux players. It's up to you. ## If you're going to share it anyway -Do what you must, but we would respectfully request that you try to label the game as "The Honkers Railway Game" +Do what you must, but we would respectfully request that you try to label the game as "The Honkers Game" instead of the actual name of the game, to avoid search engine parsing.
+# 🚧 Project status + +Due to lack of interest from my side the project stays in a legacy, maintaining-only state for a long period of time. This project will not receive huge updates unless really necessary. I still keep it up to date with latest changes in the game and work with community to solve the issues, but old-known unessential bugs will not be fixed, and new features will not be added. Instead, I'm working on other projects, and the future is in uniting all the launchers in one single [universal launcher](https://github.com/an-anime-team/anime-games-launcher). This project stays in "proof of concept" stage right now and requires major changes, which, again, require interest from my side. Keep your eye on our discord server for more details. + +
+ # ♥️ Useful links and thanks * Original patch project without which this project wouldn't be possible. Link is omitted for "privacy" purposes @@ -37,52 +42,62 @@ instead of the actual name of the game, to avoid search engine parsing. * [Releases page](https://github.com/an-anime-team/honkers-launcher/releases) where you can find latest available version * [Changelog](CHANGELOG.md) with chronology of the project +All the project's life happen in our discord server. If you have any questions or want to report an issue - please contact the dev directly there. +
# ⬇️ Download -| Distribution | Format | Wiki | Source | -| - | - | - | - | -| Any | Flatpak | [link](https://github.com/an-anime-team/honkers-launcher/wiki/Installation#-any-distribution-flatpak) | - | -| Arch Linux, Manjaro | AUR | [link](https://github.com/an-anime-team/honkers-launcher/wiki/Installation#-arch-linux-aur) | [honkers-launcher-bin](https://aur.archlinux.org/packages/honkers-launcher-bin) | -| Fedora, OpenSUSE | RPM | [link](https://github.com/an-anime-team/honkers-launcher/wiki/Installation#-fedora-rpm) | [HL](https://build.opensuse.org/repositories/home:Maroxy:AAT-Apps/HL) | -| Gentoo | Ebuild | [link](https://github.com/an-anime-team/honkers-launcher/wiki/Installation#-gentoo-linux-ebuild) | [gentoo-ebuilds](https://github.com/an-anime-team/gentoo-ebuilds) | -| NixOS | nixpkg | [link](https://github.com/an-anime-team/honkers-launcher/wiki/Installation#-nixos-nixpkg) | [aagl-gtk-on-nix](https://github.com/ezKEa/aagl-gtk-on-nix) | +Launcher developer does not provide any packages for this programm. Instead, we almost fully rely on other people to maintain them. -To see the installation guides, please visit the wiki page [here](https://github.com/an-anime-team/honkers-launcher/wiki/Installation) +To see the installation guides, please visit [this wiki page](https://github.com/an-anime-team/honkers-launcher/wiki/Installation). -Lutris integration described [here](https://github.com/an-anime-team/honkers-launcher/wiki/Installation#-lutris) -
+Instructions may be outdated due to lack of interest in maintaining them. You can help the project by keeping documentation up to date if you're interested in it. + +## 😀 Official support + +These packages are officially supported by the An Anime Team, and we try to ensure that they work for everyone. + +| Format | Wiki | Source | Distributions | Maintainer | +| - | - | - | - | - | +| Flatpak | [wiki](https://github.com/an-anime-team/honkers-launcher/wiki/Installation#-any-distribution-flatpak) | [flatpak-builds](https://github.com/an-anime-team/flatpak-builds) | Any (Fedora, Pop!_OS, SteamOS / Steam Deck, etc.) | Luna (available in discord) | +| RPM | [wiki](https://github.com/an-anime-team/honkers-launcher/wiki/Installation#-fedora-rpm) | [HL](https://build.opensuse.org/repositories/home:Maroxy:AAT-Apps/AAGL) * | Fedora, OpenSUSE | Maroxy (second discord admin) | + +> [!NOTE] +> RPM packages are often really outdated. It's not recommended to use them. + +## 🙂 Community support + +These packages are supported by active members of our community. They're widely used and we keep some level of interactions with their maintainers. -# 💻 Development +| Format | Wiki | Source | Distributions | Maintainer | +| - | - | - | - | - | +| AUR | [wiki](https://github.com/an-anime-team/honkers-launcher/wiki/Installation#-arch-linux-aur) | [honkers-launcher-bin](https://aur.archlinux.org/packages/honkers-launcher-bin) | Arch Linux, Manjaro, EndeavourOS | xstra * | +| NixOS module | [wiki](https://github.com/an-anime-team/honkers-launcher/wiki/Installation#-nixos-nixpkg) | [aagl-gtk-on-nix](https://github.com/ezKEa/aagl-gtk-on-nix) | NixOS | Luxxy * | -| Folder | Description | -| - | - | -| src | Rust source code | -| assets | App assets folder | -| assets/locales | App localizations | -| target/release | Release build of the app | +> [!NOTE] +> Honorary members of our discord server. We have direct contact with them. -## Clone repo +## 😑 Third party support -```sh -git clone --recursive https://github.com/an-anime-team/honkers-launcher -``` +These packages are supported by third party distributors. They either did not contact us, or contact exceptionally rarely. We do not verify state of these packages, and we are not related to their state at all. -## Run app +| Format | Source | Distributions | +| - | - | - | +| DEB | [honkers-launcher](https://launchpad.net/~thundergemios10/+archive/ubuntu/honkers-launcher) | Ubuntu, Linux Mint, Pop!_OS | +| Pacstall | [honkers-launcher-bin](https://pacstall.dev/packages/honkers-launcher-bin) | Ubuntu | +| Ebuild | [aagl-ebuilds](https://github.com/an-anime-team/gentoo-ebuilds) * | Gentoo | +| Lutris | `lutris.net/games/hon...-laun...` (stripping the link) | Any | -```sh -cargo run -``` +> [!NOTE] +> Although it's hosted in our official repo we didn't contact with its maintainer for some time already, and recent updates were made via merge requests by the community. -## Build app +## Chinese version support -```sh -cargo build --release -``` +This should be automatically enabled if you're using `zh_cn` (Chinese) as your system language. If you're not using it - you can change the game edition in the launcher settings. -## Updates strategy +The main problem, though, is that github is blocked in China, and it's used in other parts of the launcher - not just in game edition. Notably, you can't use the same components index as other people do. -We have 2 branches: stable ([main](https://github.com/an-anime-team/honkers-launcher/tree/main)) and dev ([next](https://github.com/an-anime-team/honkers-launcher/tree/next)). Code changes will be pushed into dev branch and merged into stable once they're ready for new version release +To fix this, you have to make your own copy of the [components](https://github.com/an-anime-team/components) repository and change all the links there from github releases to some mirror. Later you can update the components index repo link in your launcher's `config.json` file. - +If you have any questions - feel free to contact the dev in our discord server (or if you have no way to use discord - try sending me an email, but it's unlikely to be received). diff --git a/assets/honkers-launcher.desktop b/assets/honkers-launcher.desktop index c30d97e8..114f9ea4 100644 --- a/assets/honkers-launcher.desktop +++ b/assets/honkers-launcher.desktop @@ -5,3 +5,4 @@ Exec=AppRun Type=Application Categories=Game Terminal=false +Keywords=hl diff --git a/assets/locales/it/main.ftl b/assets/locales/it/main.ftl index 4c89ee5e..383f2319 100644 --- a/assets/locales/it/main.ftl +++ b/assets/locales/it/main.ftl @@ -17,12 +17,12 @@ wish-url = Apri i desideri about = Informazioni -close = { $commandType -> +close = { $form -> [verb] Chiudersi *[noun] Chiudi } -hide = { $commandType -> +hide = { $form -> [verb] Nascondersi *[noun] Nascondi } diff --git a/assets/locales/uk/gamescope.ftl b/assets/locales/uk/gamescope.ftl index b94a9a92..985b8719 100644 --- a/assets/locales/uk/gamescope.ftl +++ b/assets/locales/uk/gamescope.ftl @@ -12,5 +12,5 @@ other-settings = Інші налаштування framerate-limit = Обмеження кількості кадрів unfocused-framerate-limit = Обмеження кількості кадрів поза фокусом -force-grab-cursor = Force grab cursor -force-grab-cursor-description = Always use relative mouse mode instead of flipping dependent on cursor visibility. The mouse cursor will correctly be centered in the game +force-grab-cursor = Примусове захоплення курсору +force-grab-cursor-description = Завжди використовувати відносний режим миші замість гортання залежно від видимості курсору. Курсор миші буде коректно відцентровано у грі diff --git a/flake.lock b/flake.lock new file mode 100644 index 00000000..e50b66ae --- /dev/null +++ b/flake.lock @@ -0,0 +1,44 @@ +{ + "nodes": { + "nixpkgs": { + "locked": { + "lastModified": 1721226092, + "narHash": "sha256-UBvzVpo5sXSi2S/Av+t+Q+C2mhMIw/LBEZR+d6NMjws=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "c716603a63aca44f39bef1986c13402167450e0a", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-24.05", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs-unstable": { + "locked": { + "lastModified": 1721138476, + "narHash": "sha256-+W5eZOhhemLQxelojLxETfbFbc19NWawsXBlapYpqIA=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "ad0b5eed1b6031efaed382844806550c3dcb4206", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "nixpkgs": "nixpkgs", + "nixpkgs-unstable": "nixpkgs-unstable" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 00000000..8ab4a2bc --- /dev/null +++ b/flake.nix @@ -0,0 +1,37 @@ +{ + inputs = { + nixpkgs.url = "github:nixos/nixpkgs/nixos-24.05"; + nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable"; + }; + + outputs = { self, nixpkgs, nixpkgs-unstable }: + let + pkgs = nixpkgs.legacyPackages.x86_64-linux; + pkgs-unstable = nixpkgs-unstable.legacyPackages.x86_64-linux; + + in { + devShells.x86_64-linux.default = pkgs.mkShell { + nativeBuildInputs = with pkgs; [ + pkgs-unstable.rustup + pkgs-unstable.rustfmt + pkgs-unstable.clippy + + gcc + cmake + pkg-config + + p7zip + libwebp + ]; + + buildInputs = with pkgs; [ + gtk4 + glib + gdk-pixbuf + gobject-introspection + + libadwaita + ]; + }; + }; +} diff --git a/repository/branches.png b/repository/branches.png deleted file mode 100644 index 44de6899..00000000 Binary files a/repository/branches.png and /dev/null differ diff --git a/shell.nix b/shell.nix deleted file mode 100644 index f93061cb..00000000 --- a/shell.nix +++ /dev/null @@ -1,31 +0,0 @@ -let - nixpkgs-unstable = builtins.fetchTarball "https://github.com/NixOS/nixpkgs/archive/refs/heads/nixos-unstable.tar.gz"; - - pkgs = import {}; - pkgs-unstable = import nixpkgs-unstable {}; - -in - -pkgs.mkShell { - nativeBuildInputs = [ - pkgs-unstable.rustc - pkgs-unstable.cargo - pkgs-unstable.clippy - - pkgs.gcc - pkgs.cmake - pkgs.pkg-config - ]; - - buildInputs = [ - pkgs.gtk4 - pkgs.glib - pkgs.gdk-pixbuf - pkgs.gobject-introspection - - pkgs.libadwaita - ]; - - RUST_SRC_PATH = "${pkgs-unstable.rust.packages.stable.rustPlatform.rustLibSrc}"; - RUST_BACKTRACE = 1; -} diff --git a/src/background.rs b/src/background.rs index dced9819..ab5525db 100644 --- a/src/background.rs +++ b/src/background.rs @@ -1,3 +1,5 @@ +use std::process::Command; + use anime_launcher_sdk::anime_game_core::installer::downloader::Downloader; use anime_launcher_sdk::anime_game_core::minreq; @@ -10,30 +12,46 @@ pub struct Background { } pub fn get_uri() -> String { - let uri = concat!("https://sdk-os-static.", "ho", "yo", "verse", ".com/bh3_global/mdk/launcher/api/content?filter_adv=true&key=dpz65xJ3&launcher_id=10&language="); + let lang = crate::i18n::get_lang(); + + if lang.language == unic_langid::langid!("zh-cn").language { + concat!("https://hyp-api.", "mi", "ho", "yo", ".com/hyp/hyp-connect/api/getAllGameBasicInfo?launcher_id=jGHBHlcOq1").to_owned() + } + + else { + let uri = concat!("https://sg-hyp-api.", "ho", "yo", "verse", ".com/hyp/hyp-connect/api/getAllGameBasicInfo?launcher_id=VYTpXlbWo8&language="); - uri.to_owned() + &crate::i18n::format_lang(&crate::i18n::get_lang()) + uri.to_owned() + &crate::i18n::format_lang(lang) + } } #[cached::proc_macro::cached(result)] pub fn get_background_info() -> anyhow::Result { let json = serde_json::from_slice::(minreq::get(get_uri()).send()?.as_bytes())?; - let uri = match json["data"]["adv"]["background"].as_str() { - Some(uri) => uri.to_owned(), - None => anyhow::bail!("Failed to get background picture uri") - }; - - // This API field contains wrong md5 hash, but file's name - // from the uri above actually contains correct one, so - // I parse and use it few lines below - - /*let hash = match json["data"]["adv"]["bg_checksum"].as_str() { - Some(uri) => uri.to_owned(), - None => anyhow::bail!("Failed to get background picture checksum") - };*/ - - let hash = uri.split('/').last().unwrap_or_default().split('_').next().unwrap_or_default().to_owned(); + let uri = json["data"]["game_info_list"].as_array() + .ok_or_else(|| anyhow::anyhow!("Failed to list games in the backgrounds API"))? + .iter() + .find(|game| { + match game["game"]["biz"].as_str() { + Some(biz) => biz.starts_with("hkrpg_"), + _ => false + } + }) + .ok_or_else(|| anyhow::anyhow!("Failed to find the game in the backgrounds API"))?["backgrounds"] + .as_array() + .and_then(|backgrounds| backgrounds.iter().next()) + .and_then(|background| background["background"]["url"].as_str()) + .ok_or_else(|| anyhow::anyhow!("Failed to get background picture url"))? + .to_string(); + + let hash = uri.split('/') + .last() + .unwrap_or_default() + .split('_') + .next() + .unwrap_or_default() + .to_owned(); Ok(Background { uri, @@ -46,22 +64,47 @@ pub fn download_background() -> anyhow::Result<()> { let info = get_background_info()?; + let mut download_image = true; + if crate::BACKGROUND_FILE.exists() { let hash = Md5::digest(std::fs::read(crate::BACKGROUND_FILE.as_path())?); if format!("{:x}", hash).to_lowercase() == info.hash { tracing::debug!("Background picture is already downloaded. Skipping"); - return Ok(()); + download_image = false; } } - let mut downloader = Downloader::new(info.uri)?; + if download_image { + let mut downloader = Downloader::new(&info.uri)?; + + downloader.continue_downloading = false; - downloader.continue_downloading = false; + if let Err(err) = downloader.download(crate::BACKGROUND_FILE.as_path(), |_, _| {}) { + anyhow::bail!(err); + } + } + + // Workaround for GTK weakness + if info.uri.ends_with(".webp") { + Command::new("dwebp") + .arg(crate::BACKGROUND_FILE.as_path()) + .arg("-o") + .arg(crate::PROCESSED_BACKGROUND_FILE.as_path()) + .spawn()? + .wait()?; + + // If it failed to re-code the file - just copy it + // Will happen with HSR because devs apparently named + // their background image ".webp" while it's JPEG + if !crate::PROCESSED_BACKGROUND_FILE.exists() { + std::fs::copy(crate::BACKGROUND_FILE.as_path(), crate::PROCESSED_BACKGROUND_FILE.as_path())?; + } + } - if let Err(err) = downloader.download(crate::BACKGROUND_FILE.as_path(), |_, _| {}) { - anyhow::bail!(err); + else { + std::fs::copy(crate::BACKGROUND_FILE.as_path(), crate::PROCESSED_BACKGROUND_FILE.as_path())?; } Ok(()) diff --git a/src/i18n.rs b/src/i18n.rs index 4e208311..2b3f459d 100644 --- a/src/i18n.rs +++ b/src/i18n.rs @@ -1,3 +1,4 @@ +use std::sync::OnceLock; use unic_langid::{langid, LanguageIdentifier}; fluent_templates::static_loader! { @@ -32,14 +33,15 @@ pub const SUPPORTED_LANGUAGES: &[LanguageIdentifier] = &[ langid!("cs-cz") ]; -pub static mut LANG: LanguageIdentifier = langid!("en-us"); +/// Fallback used if the system language is not supported +static FALLBACK: LanguageIdentifier = langid!("en-us"); + +pub static LANG: OnceLock = OnceLock::new(); /// Set launcher language pub fn set_lang(lang: LanguageIdentifier) -> anyhow::Result<()> { if SUPPORTED_LANGUAGES.iter().any(|item| item.language == lang.language) { - unsafe { - LANG = lang - } + LANG.set(lang).expect("Can't overwrite language!"); Ok(()) } @@ -50,8 +52,8 @@ pub fn set_lang(lang: LanguageIdentifier) -> anyhow::Result<()> { } /// Get launcher language -pub fn get_lang() -> LanguageIdentifier { - unsafe { LANG.clone() } +pub fn get_lang() -> &'static LanguageIdentifier { + LANG.get().expect("Language hasn't been initialized!") } /// Get system language or default language if system one is not supported @@ -60,7 +62,7 @@ pub fn get_lang() -> LanguageIdentifier { /// - `LC_ALL` /// - `LC_MESSAGES` /// - `LANG` -pub fn get_default_lang() -> LanguageIdentifier { +pub fn get_default_lang() -> &'static LanguageIdentifier { let current = std::env::var("LC_ALL") .unwrap_or_else(|_| std::env::var("LC_MESSAGES") .unwrap_or_else(|_| std::env::var("LANG") @@ -69,11 +71,11 @@ pub fn get_default_lang() -> LanguageIdentifier { for lang in SUPPORTED_LANGUAGES { if current.starts_with(lang.language.as_str()) { - return lang.clone(); + return lang; } } - get_lang() + &FALLBACK } pub fn format_lang(lang: &LanguageIdentifier) -> String { @@ -106,8 +108,7 @@ macro_rules! tr { { use fluent_templates::Loader; - #[allow(unused_unsafe)] - $crate::i18n::LOCALES.lookup(unsafe { $crate::i18n::LANG.as_ref() }, $id) + $crate::i18n::LOCALES.lookup($crate::i18n::get_lang(), $id) } }; @@ -124,8 +125,7 @@ macro_rules! tr { args.insert($key, FluentValue::from($value)); )* - #[allow(unused_unsafe)] - $crate::i18n::LOCALES.lookup_complete(unsafe { $crate::i18n::LANG.as_ref() }, $id, Some(&args)) + $crate::i18n::LOCALES.lookup_complete($crate::i18n::get_lang(), $id, Some(&args)) } }; } diff --git a/src/main.rs b/src/main.rs index cff0bfe1..90bf4e40 100644 --- a/src/main.rs +++ b/src/main.rs @@ -61,6 +61,9 @@ lazy_static::lazy_static! { /// Path to `background` file. Standard is `$HOME/.local/share/honkers-launcher/background` pub static ref BACKGROUND_FILE: PathBuf = LAUNCHER_FOLDER.join("background"); + /// Path to the processed `background` file. Standard is `$HOME/.cache/anime-game-launcher/background` + pub static ref PROCESSED_BACKGROUND_FILE: PathBuf = CACHE_FOLDER.join("background"); + /// Path to `.keep-background` file. Used to mark launcher that it shouldn't update background picture /// /// Standard is `$HOME/.local/share/honkers-launcher/.keep-background` @@ -99,7 +102,7 @@ lazy_static::lazy_static! { .round-bin {{ border-radius: 24px; }} - ", BACKGROUND_FILE.to_string_lossy()); + ", PROCESSED_BACKGROUND_FILE.to_string_lossy()); } fn main() -> anyhow::Result<()> { @@ -117,7 +120,7 @@ fn main() -> anyhow::Result<()> { // CONFIG is initialized lazily so it will contain following changes as well let mut config = Config::get().expect("Failed to get config"); - config.launcher.language = i18n::format_lang(&i18n::get_default_lang()); + config.launcher.language = i18n::format_lang(i18n::get_default_lang()); Config::update_raw(config).expect("Failed to update config"); } @@ -198,6 +201,9 @@ fn main() -> anyhow::Result<()> { gtk::IconTheme::for_display(>k::gdk::Display::default().unwrap()) .add_resource_path(&format!("{APP_RESOURCE_PATH}/icons")); + // Set global css + relm4::set_global_css(&GLOBAL_CSS); + // Set application's title gtk::glib::set_application_name("Honkers Launcher"); gtk::glib::set_program_name(Some("Honkers Launcher")); @@ -215,9 +221,6 @@ fn main() -> anyhow::Result<()> { let app = RelmApp::new(APP_ID) .with_args(gtk_args); - // Set global css - app.set_global_css(&GLOBAL_CSS); - // Show first run window app.run::(()); } @@ -293,9 +296,6 @@ fn main() -> anyhow::Result<()> { let app = RelmApp::new(APP_ID) .with_args(gtk_args); - // Set global css - app.set_global_css(&GLOBAL_CSS); - // Show main window app.run::(()); } diff --git a/src/ui/about.rs b/src/ui/about.rs index 0cbc9828..8f35d877 100644 --- a/src/ui/about.rs +++ b/src/ui/about.rs @@ -39,7 +39,7 @@ impl SimpleComponent for AboutDialog { set_website: "https://github.com/an-anime-team/honkers-launcher", set_issue_url: "https://github.com/an-anime-team/honkers-launcher/issues", - set_license_type: gtk::License::Gpl30, + set_license_type: gtk::License::Gpl30Only, set_version: &APP_VERSION, set_developers: &[ @@ -100,10 +100,38 @@ impl SimpleComponent for AboutDialog { set_release_notes_version: &APP_VERSION, set_release_notes: &[ + "

Added

", + + "
    ", + "
  • List missing dependencies on non-standard distros during initial setup
  • ", + "
  • Handle dwebp re-coding errors
  • ", + "
  • Added \"Indonesia\" wine language option
  • ", + "
  • Added writing of the game's output to the \"game.log\" file in the launcher's folder
  • ", + "
  • Respect root \".version\" file for game version parsing
  • ", + "
", + "

Fixed

", "
    ", - "
  • Updated background URI API key
  • ", + "
  • Fixed Italian localization breaking the launcher
  • ", + "
  • Fixed Discord RPC updates
  • ", + "
", + + "

Changed

", + + "
    ", + "
  • Support new game API
  • ", + "
  • Updated desktop file entry to include \"hl\" keyword
  • ", + "
  • Localized \"force-grab-cursor\" to Ukrainian
  • ", + "
  • Changed background images processing logic
  • ", + "
  • Prioritize parsed game version over the API response
  • ", + "
", + + "

Removed

", + + "
    ", + "
  • Removed \"xdelta3\" dependency
  • ", + "
  • Removed migrate installation feature
  • ", "
" ].join("\n"), diff --git a/src/ui/components/version.rs b/src/ui/components/version.rs index df716853..df2ad8d1 100644 --- a/src/ui/components/version.rs +++ b/src/ui/components/version.rs @@ -161,33 +161,38 @@ impl SimpleAsyncComponent for ComponentVersion { let progress_bar_sender = self.progress_bar.sender().clone(); #[allow(unused_must_use)] - std::thread::spawn(clone!(@strong self.download_folder as download_folder => move || { - progress_bar_sender.send(ProgressBarMsg::Reset); - progress_bar_sender.send(ProgressBarMsg::SetVisible(true)); - - installer.install(download_folder, move |state| { - match &state { - InstallerUpdate::UnpackingFinished | - InstallerUpdate::DownloadingError(_) | - InstallerUpdate::UnpackingError(_) => { - progress_bar_sender.send(ProgressBarMsg::SetVisible(false)); - - if let InstallerUpdate::UnpackingFinished = &state { - sender.input(ComponentVersionMsg::SetState(VersionState::Downloaded)); - sender.output(ComponentGroupMsg::CallOnDownloaded); - } - - else { - sender.input(ComponentVersionMsg::SetState(VersionState::NotDownloaded)); - } - }, - - _ => () - } - - progress_bar_sender.send(ProgressBarMsg::UpdateFromState(state)); - }); - })); + std::thread::spawn(clone!( + #[strong(rename_to = download_folder)] + self.download_folder, + + move || { + progress_bar_sender.send(ProgressBarMsg::Reset); + progress_bar_sender.send(ProgressBarMsg::SetVisible(true)); + + installer.install(download_folder, move |state| { + match &state { + InstallerUpdate::UnpackingFinished | + InstallerUpdate::DownloadingError(_) | + InstallerUpdate::UnpackingError(_) => { + progress_bar_sender.send(ProgressBarMsg::SetVisible(false)); + + if let InstallerUpdate::UnpackingFinished = &state { + sender.input(ComponentVersionMsg::SetState(VersionState::Downloaded)); + sender.output(ComponentGroupMsg::CallOnDownloaded); + } + + else { + sender.input(ComponentVersionMsg::SetState(VersionState::NotDownloaded)); + } + }, + + _ => () + } + + progress_bar_sender.send(ProgressBarMsg::UpdateFromState(state)); + }); + } + )); } } diff --git a/src/ui/first_run/default_paths.rs b/src/ui/first_run/default_paths.rs index e73c4642..18e978b6 100644 --- a/src/ui/first_run/default_paths.rs +++ b/src/ui/first_run/default_paths.rs @@ -15,7 +15,6 @@ pub struct DefaultPathsApp { progress_bar: AsyncController, show_additional: bool, - migrate_installation: bool, show_progress: bool, launcher: PathBuf, @@ -60,8 +59,7 @@ pub enum DefaultPathsAppMsg { #[relm4::component(async, pub)] impl SimpleAsyncComponent for DefaultPathsApp { - /// If `true`, then use migrate installation mode - type Init = bool; + type Init = (); type Input = DefaultPathsAppMsg; type Output = FirstRunAppMsg; @@ -309,11 +307,7 @@ impl SimpleAsyncComponent for DefaultPathsApp { set_spacing: 8, gtk::Button { - set_label: &if model.migrate_installation { - tr!("migrate") - } else { - tr!("continue") - }, + set_label: &tr!("continue"), set_css_classes: &["suggested-action", "pill"], @@ -321,17 +315,10 @@ impl SimpleAsyncComponent for DefaultPathsApp { }, gtk::Button { - set_label: &if model.migrate_installation { - tr!("close", { "form" = "noun" }) - } else { - tr!("exit") - }, + set_label: &tr!("exit"), add_css_class: "pill", - #[watch] - set_visible: !model.migrate_installation, - connect_clicked => DefaultPathsAppMsg::Exit } } @@ -354,7 +341,7 @@ impl SimpleAsyncComponent for DefaultPathsApp { } } - async fn init(init: Self::Init, root: Self::Root, _sender: AsyncComponentSender) -> AsyncComponentParts { + async fn init(_init: Self::Init, root: Self::Root, _sender: AsyncComponentSender) -> AsyncComponentParts { let model = Self { progress_bar: ProgressBar::builder() .launch(ProgressBarInit { @@ -366,7 +353,6 @@ impl SimpleAsyncComponent for DefaultPathsApp { .detach(), show_additional: false, - migrate_installation: init, show_progress: false, launcher: LAUNCHER_FOLDER.to_path_buf(), @@ -382,12 +368,13 @@ impl SimpleAsyncComponent for DefaultPathsApp { components: CONFIG.components.path.clone(), patch: CONFIG.patch.path.clone(), - #[allow(clippy::or_fun_call)] - temp: CONFIG.launcher.temp.clone().unwrap_or(std::env::temp_dir()) + temp: CONFIG.launcher.temp.clone() + .unwrap_or_else(std::env::temp_dir) }; // Set progress bar width - model.progress_bar.widget().set_width_request(400); + model.progress_bar.widget() + .set_width_request(400); let widgets = view_output!(); @@ -443,52 +430,9 @@ impl SimpleAsyncComponent for DefaultPathsApp { #[allow(unused_must_use)] DefaultPathsAppMsg::Continue => { - let old_config = Config::get().unwrap_or_else(|_| CONFIG.clone()); - match self.update_config() { Ok(_) => { - if self.migrate_installation { - self.progress_bar.sender().send(ProgressBarMsg::SetVisible(true)); - - self.show_progress = true; - - let folders = [ - (old_config.game.wine.builds, &self.runners), - (old_config.game.dxvk.builds, &self.dxvks), - (old_config.game.wine.prefix, &self.prefix), - (old_config.game.path.global, &self.game_global), - (old_config.game.path.sea, &self.game_sea), - (old_config.game.path.china, &self.game_china), - (old_config.game.path.taiwan, &self.game_taiwan), - (old_config.game.path.korea, &self.game_korea), - (old_config.game.path.japan, &self.game_japan), - (old_config.components.path, &self.components), - (old_config.patch.path, &self.patch) - ]; - - #[allow(clippy::expect_fun_call)] - for (i, (from, to)) in folders.iter().enumerate() { - self.progress_bar.sender().send(ProgressBarMsg::UpdateCaption(Some( - from.to_str().map(|str| str.to_string()).unwrap_or_else(|| format!("{:?}", from)) - ))); - - if &from != to && from.exists() { - move_files::move_files(from, to).expect(&format!("Failed to move folder: {:?} -> {:?}", from, to)); - } - - self.progress_bar.sender().send(ProgressBarMsg::UpdateProgress(i as u64 + 1, folders.len() as u64)); - } - - // Restart the app - - std::process::Command::new(std::env::current_exe().unwrap()).spawn().unwrap(); - - relm4::main_application().quit(); - } - - else { - sender.output(Self::Output::ScrollToDownloadComponents); - } + sender.output(Self::Output::ScrollToDownloadComponents); } Err(err) => { @@ -501,14 +445,7 @@ impl SimpleAsyncComponent for DefaultPathsApp { } DefaultPathsAppMsg::Exit => { - if self.migrate_installation { - // TODO: this shit should return message to general preferences component somehow to close MigrateInstallation window - todo!(); - } - - else { - relm4::main_application().quit(); - } + relm4::main_application().quit(); } } } diff --git a/src/ui/first_run/dependencies.rs b/src/ui/first_run/dependencies.rs index e43883ac..f90a8614 100644 --- a/src/ui/first_run/dependencies.rs +++ b/src/ui/first_run/dependencies.rs @@ -10,7 +10,8 @@ use super::main::FirstRunAppMsg; pub struct DependenciesApp { show_arch: bool, show_debian: bool, - show_fedora: bool + show_fedora: bool, + show_list: bool } #[derive(Debug, Clone)] @@ -21,9 +22,9 @@ pub enum DependenciesAppMsg { #[relm4::component(async, pub)] impl SimpleAsyncComponent for DependenciesApp { - type Init = (); type Input = DependenciesAppMsg; type Output = FirstRunAppMsg; + type Init = (); view! { adw::PreferencesPage { @@ -67,7 +68,7 @@ impl SimpleAsyncComponent for DependenciesApp { }, gtk::Entry { - set_text: "sudo pacman -Syu git xdelta3 p7zip", + set_text: "sudo pacman -Syu git p7zip libwebp", set_editable: false } }, @@ -84,7 +85,7 @@ impl SimpleAsyncComponent for DependenciesApp { }, gtk::Entry { - set_text: "sudo apt install git xdelta3 p7zip-full", + set_text: "sudo apt install git p7zip-full webp", set_editable: false } }, @@ -101,9 +102,31 @@ impl SimpleAsyncComponent for DependenciesApp { }, gtk::Entry { - set_text: "sudo dnf install git xdelta p7zip", + set_text: "sudo dnf install git p7zip libwebp-tools", set_editable: false } + }, + + gtk::Box { + set_orientation: gtk::Orientation::Vertical, + set_spacing: 16, + + #[watch] + set_visible: model.show_list, + + adw::PreferencesGroup { + adw::ActionRow { + set_title: "git" + }, + + adw::ActionRow { + set_title: "p7zip" + }, + + adw::ActionRow { + set_title: "libwebp" + } + } } } }, @@ -138,7 +161,7 @@ impl SimpleAsyncComponent for DependenciesApp { async fn init(_init: Self::Init, root: Self::Root, _sender: AsyncComponentSender) -> AsyncComponentParts { let distro = whatadistro::identify(); - let model = Self { + let mut model = Self { show_arch: match &distro { Some(distro) => distro.is_similar("arch"), None => false @@ -152,9 +175,13 @@ impl SimpleAsyncComponent for DependenciesApp { show_fedora: match &distro { Some(distro) => distro.is_similar("fedora"), None => false - } + }, + + show_list: false }; + model.show_list = !model.show_arch && !model.show_debian && !model.show_fedora; + let widgets = view_output!(); AsyncComponentParts { model, widgets } @@ -164,7 +191,7 @@ impl SimpleAsyncComponent for DependenciesApp { match msg { #[allow(unused_must_use)] DependenciesAppMsg::Continue => { - let packages = ["git", "xdelta3"]; + let packages = ["git", "dwebp"]; for package in packages { if !is_available(package) { diff --git a/src/ui/first_run/main.rs b/src/ui/first_run/main.rs index f92b5c30..3fa4364f 100644 --- a/src/ui/first_run/main.rs +++ b/src/ui/first_run/main.rs @@ -138,7 +138,7 @@ impl SimpleComponent for FirstRunApp { .forward(sender.input_sender(), std::convert::identity), default_paths: DefaultPathsApp::builder() - .launch(false) + .launch(()) .forward(sender.input_sender(), std::convert::identity), download_components: DownloadComponentsApp::builder() diff --git a/src/ui/first_run/tos_warning.rs b/src/ui/first_run/tos_warning.rs index 7c47aa2c..6d79d86a 100644 --- a/src/ui/first_run/tos_warning.rs +++ b/src/ui/first_run/tos_warning.rs @@ -103,7 +103,12 @@ impl SimpleAsyncComponent for TosWarningApp { "exit" => relm4::main_application().quit(), "continue" => { - if is_available("git") && is_available("xdelta3") && is_available("7z") { + let installed = + is_available("git") && + is_available("dwebp") && + (is_available("7z") || is_available("7za")); + + if installed { sender.output(Self::Output::ScrollToDefaultPaths); } else { sender.output(Self::Output::ScrollToDependencies); diff --git a/src/ui/main/apply_mfplat_patch.rs b/src/ui/main/apply_mfplat_patch.rs deleted file mode 100644 index 775bec0d..00000000 --- a/src/ui/main/apply_mfplat_patch.rs +++ /dev/null @@ -1,36 +0,0 @@ -use relm4::prelude::*; - -use anime_launcher_sdk::anime_game_core::prelude::*; - -use anime_launcher_sdk::config::ConfigExt; -use anime_launcher_sdk::honkai::config::Config; - -use crate::*; - -use super::{App, AppMsg}; - -pub fn apply_mfplat_patch(sender: ComponentSender) { - sender.input(AppMsg::DisableButtons(true)); - - let config = Config::get().unwrap(); - - std::thread::spawn(move || { - let temp = config.launcher.temp.clone() - .unwrap_or_else(std::env::temp_dir); - - if let Err(err) = mfplat::apply(config.get_wine_prefix_path(), temp) { - tracing::error!("Failed to patch the game"); - - sender.input(AppMsg::Toast { - title: tr!("game-patching-error"), - description: Some(err.to_string()) - }); - } - - sender.input(AppMsg::DisableButtons(false)); - sender.input(AppMsg::UpdateLauncherState { - perform_on_download_needed: false, - show_status_page: true - }); - }); -} diff --git a/src/ui/main/download_diff.rs b/src/ui/main/download_diff.rs index e9047faa..d775ee6b 100644 --- a/src/ui/main/download_diff.rs +++ b/src/ui/main/download_diff.rs @@ -26,33 +26,38 @@ pub fn download_diff(sender: ComponentSender, progress_bar_input: Sender move |state| { - match &state { - InstallerUpdate::DownloadingError(err) => { - tracing::error!("Downloading failed: {err}"); - - sender.input(AppMsg::Toast { - title: tr!("downloading-failed"), - description: Some(err.to_string()) - }); + let result = diff.install_to(game_path, clone!( + #[strong] + sender, + + move |state| { + match &state { + InstallerUpdate::DownloadingError(err) => { + tracing::error!("Downloading failed: {err}"); + + sender.input(AppMsg::Toast { + title: tr!("downloading-failed"), + description: Some(err.to_string()) + }); + } + + InstallerUpdate::UnpackingError(err) => { + tracing::error!("Unpacking failed: {err}"); + + sender.input(AppMsg::Toast { + title: tr!("unpacking-failed"), + description: Some(err.clone()) + }); + } + + _ => () } - InstallerUpdate::UnpackingError(err) => { - tracing::error!("Unpacking failed: {err}"); - - sender.input(AppMsg::Toast { - title: tr!("unpacking-failed"), - description: Some(err.clone()) - }); + #[allow(unused_must_use)] { + progress_bar_input.send(ProgressBarMsg::UpdateFromState(state)); } - - _ => () - } - - #[allow(unused_must_use)] { - progress_bar_input.send(ProgressBarMsg::UpdateFromState(state)); } - })); + )); let mut perform_on_download_needed = true; diff --git a/src/ui/main/download_wine.rs b/src/ui/main/download_wine.rs index 96bc7830..93d28d16 100644 --- a/src/ui/main/download_wine.rs +++ b/src/ui/main/download_wine.rs @@ -54,45 +54,55 @@ pub fn download_wine(sender: ComponentSender, progress_bar_input: Sender move || { - installer.install(&config.game.wine.builds, clone!(@strong sender => move |state| { - match &state { - InstallerUpdate::DownloadingError(err) => { - tracing::error!("Downloading failed: {err}"); - - sender.input(AppMsg::Toast { - title: tr!("downloading-failed"), - description: Some(err.to_string()) - }); + std::thread::spawn(clone!( + #[strong] + sender, + + move || { + installer.install(&config.game.wine.builds, clone!( + #[strong] + sender, + + move |state| { + match &state { + InstallerUpdate::DownloadingError(err) => { + tracing::error!("Downloading failed: {err}"); + + sender.input(AppMsg::Toast { + title: tr!("downloading-failed"), + description: Some(err.to_string()) + }); + } + + InstallerUpdate::UnpackingError(err) => { + tracing::error!("Unpacking failed: {err}"); + + sender.input(AppMsg::Toast { + title: tr!("unpacking-failed"), + description: Some(err.clone()) + }); + } + + _ => () + } + + #[allow(unused_must_use)] { + progress_bar_input.send(ProgressBarMsg::UpdateFromState(state)); + } } + )); - InstallerUpdate::UnpackingError(err) => { - tracing::error!("Unpacking failed: {err}"); + config.game.wine.selected = Some(wine.name.clone()); - sender.input(AppMsg::Toast { - title: tr!("unpacking-failed"), - description: Some(err.clone()) - }); - } - - _ => () - } - - #[allow(unused_must_use)] { - progress_bar_input.send(ProgressBarMsg::UpdateFromState(state)); - } - })); - - config.game.wine.selected = Some(wine.name.clone()); - - Config::update(config); + Config::update(config); - sender.input(AppMsg::SetDownloading(false)); - sender.input(AppMsg::UpdateLauncherState { - perform_on_download_needed: false, - show_status_page: true - }); - })); + sender.input(AppMsg::SetDownloading(false)); + sender.input(AppMsg::UpdateLauncherState { + perform_on_download_needed: false, + show_status_page: true + }); + } + )); } Err(err) => sender.input(AppMsg::Toast { diff --git a/src/ui/main/mod.rs b/src/ui/main/mod.rs index 4b29912b..c6ca218c 100644 --- a/src/ui/main/mod.rs +++ b/src/ui/main/mod.rs @@ -10,7 +10,6 @@ use adw::prelude::*; use gtk::glib::clone; mod repair_game; -mod apply_mfplat_patch; mod update_patch; mod download_wine; mod create_prefix; @@ -77,9 +76,6 @@ pub enum AppMsg { /// was retrieved from the API SetGameDiff(Option), - /// Supposed to be called automatically on app's run - SetMfplatPatch(bool), - /// Supposed to be called automatically on app's run when the latest main patch version /// was retrieved from remote repos SetMainPatch(Option<(Version, JadeitePatchStatusVariant)>), @@ -317,8 +313,7 @@ impl SimpleComponent for App { Some(LauncherState::PrefixNotExists) => "document-save-symbolic", Some(LauncherState::GameUpdateAvailable(_)) | - Some(LauncherState::GameNotInstalled(_)) | - Some(LauncherState::MfplatPatchAvailable) => "document-save-symbolic", + Some(LauncherState::GameNotInstalled(_)) => "document-save-symbolic", Some(LauncherState::PatchBroken) | Some(LauncherState::PatchUnsafe) | @@ -331,7 +326,6 @@ impl SimpleComponent for App { Some(LauncherState::PatchNotVerified) | Some(LauncherState::PatchConcerning) => tr!("launch"), - Some(LauncherState::MfplatPatchAvailable) => tr!("apply-patch"), Some(LauncherState::WineNotInstalled) => tr!("download-wine"), Some(LauncherState::PrefixNotExists) => tr!("create-prefix"), Some(LauncherState::GameNotInstalled(_)) => tr!("download"), @@ -427,11 +421,16 @@ impl SimpleComponent for App { connect_clicked[sender] => move |_| { sender.input(AppMsg::DisableKillGameButton(true)); - std::thread::spawn(clone!(@strong sender => move || { - std::thread::sleep(std::time::Duration::from_secs(3)); + std::thread::spawn(clone!( + #[strong] + sender, + + move || { + std::thread::sleep(std::time::Duration::from_secs(3)); - sender.input(AppMsg::DisableKillGameButton(false)); - })); + sender.input(AppMsg::DisableKillGameButton(false)); + } + )); let result = std::process::Command::new("pkill") .arg("-f") // full text search @@ -587,56 +586,76 @@ impl SimpleComponent for App { // TODO: reduce code somehow - group.add_action::(RelmAction::new_stateless(clone!(@strong sender => move |_| { - if let Err(err) = open::that(LAUNCHER_FOLDER.as_path()) { - sender.input(AppMsg::Toast { - title: tr!("launcher-folder-opening-error"), - description: Some(err.to_string()) - }); + group.add_action::(RelmAction::new_stateless(clone!( + #[strong] + sender, - tracing::error!("Failed to open launcher folder: {err}"); - } - }))); + move |_| { + if let Err(err) = open::that(LAUNCHER_FOLDER.as_path()) { + sender.input(AppMsg::Toast { + title: tr!("launcher-folder-opening-error"), + description: Some(err.to_string()) + }); - group.add_action::(RelmAction::new_stateless(clone!(@strong sender => move |_| { - let path = match Config::get() { - Ok(config) => config.game.path.for_edition(config.launcher.edition).to_path_buf(), - Err(_) => CONFIG.game.path.for_edition(CONFIG.launcher.edition).to_path_buf() - }; + tracing::error!("Failed to open launcher folder: {err}"); + } + } + ))); - if let Err(err) = open::that(path) { - sender.input(AppMsg::Toast { - title: tr!("game-folder-opening-error"), - description: Some(err.to_string()) - }); + group.add_action::(RelmAction::new_stateless(clone!( + #[strong] + sender, - tracing::error!("Failed to open game folder: {err}"); - } - }))); + move |_| { + let path = match Config::get() { + Ok(config) => config.game.path.for_edition(config.launcher.edition).to_path_buf(), + Err(_) => CONFIG.game.path.for_edition(CONFIG.launcher.edition).to_path_buf(), + }; - group.add_action::(RelmAction::new_stateless(clone!(@strong sender => move |_| { - if let Ok(file) = config_file() { - if let Err(err) = open::that(file) { + if let Err(err) = open::that(path) { sender.input(AppMsg::Toast { - title: tr!("config-file-opening-error"), + title: tr!("game-folder-opening-error"), description: Some(err.to_string()) }); - tracing::error!("Failed to open config file: {err}"); + tracing::error!("Failed to open game folder: {err}"); } } - }))); + ))); - group.add_action::(RelmAction::new_stateless(clone!(@strong sender => move |_| { - if let Err(err) = open::that(crate::DEBUG_FILE.as_os_str()) { - sender.input(AppMsg::Toast { - title: tr!("debug-file-opening-error"), - description: Some(err.to_string()) - }); + group.add_action::(RelmAction::new_stateless(clone!( + #[strong] + sender, - tracing::error!("Failed to open debug file: {err}"); + move |_| { + if let Ok(file) = config_file() { + if let Err(err) = open::that(file) { + sender.input(AppMsg::Toast { + title: tr!("config-file-opening-error"), + description: Some(err.to_string()) + }); + + tracing::error!("Failed to open config file: {err}"); + } + } } - }))); + ))); + + group.add_action::(RelmAction::new_stateless(clone!( + #[strong] + sender, + + move |_| { + if let Err(err) = open::that(crate::DEBUG_FILE.as_os_str()) { + sender.input(AppMsg::Toast { + title: tr!("debug-file-opening-error"), + description: Some(err.to_string()) + }); + + tracing::error!("Failed to open debug file: {err}"); + } + } + ))); group.add_action::(RelmAction::new_stateless(move |_| { about_dialog_broker.send(AboutDialogMsg::Show); @@ -657,129 +676,135 @@ impl SimpleComponent for App { // Download background picture if needed if download_picture { - tasks.push(std::thread::spawn(clone!(@strong sender => move || { - if let Err(err) = crate::background::download_background() { - tracing::error!("Failed to download background picture: {err}"); - - sender.input(AppMsg::Toast { - title: tr!("background-downloading-failed"), - description: Some(err.to_string()) - }); + tasks.push(std::thread::spawn(clone!( + #[strong] + sender, + + move || { + if let Err(err) = crate::background::download_background() { + tracing::error!("Failed to download background picture: {err}"); + + sender.input(AppMsg::Toast { + title: tr!("background-downloading-failed"), + description: Some(err.to_string()) + }); + } } - }))); + ))); } // Update components index - tasks.push(std::thread::spawn(clone!(@strong sender => move || { - let components = ComponentsLoader::new(&CONFIG.components.path); - - match components.is_sync(&CONFIG.components.servers) { - Ok(Some(_)) => (), - - Ok(None) => { - for host in &CONFIG.components.servers { - match components.sync(host) { - Ok(changes) => { - sender.input(AppMsg::Toast { - title: tr!("components-index-updated"), - description: if changes.is_empty() { - None - } else { - Some(changes.into_iter() - .map(|line| format!("- {line}")) - .collect::>() - .join("\n")) - } - }); + tasks.push(std::thread::spawn(clone!( + #[strong] + sender, + + move || { + let components = ComponentsLoader::new(&CONFIG.components.path); + + match components.is_sync(&CONFIG.components.servers) { + Ok(Some(_)) => (), + + Ok(None) => { + for host in &CONFIG.components.servers { + match components.sync(host) { + Ok(changes) => { + sender.input(AppMsg::Toast { + title: tr!("components-index-updated"), + description: if changes.is_empty() { + None + } else { + Some(changes.into_iter() + .map(|line| format!("- {line}")) + .collect::>() + .join("\n")) + } + }); - break; - } + break; + } - Err(err) => { - tracing::error!("Failed to sync components index"); + Err(err) => { + tracing::error!("Failed to sync components index"); - sender.input(AppMsg::Toast { - title: tr!("components-index-sync-failed"), - description: Some(err.to_string()) - }); + sender.input(AppMsg::Toast { + title: tr!("components-index-sync-failed"), + description: Some(err.to_string()) + }); + } } } } - } - Err(err) => { - tracing::error!("Failed to verify that components index synced"); + Err(err) => { + tracing::error!("Failed to verify that components index synced"); - sender.input(AppMsg::Toast { - title: tr!("components-index-verify-failed"), - description: Some(err.to_string()) - }); + sender.input(AppMsg::Toast { + title: tr!("components-index-verify-failed"), + description: Some(err.to_string()) + }); + } } } - }))); + ))); // Update initial patch status - tasks.push(std::thread::spawn(clone!(@strong sender => move || { - // Check mfplay patch - match mfplat::is_applied(CONFIG.get_wine_prefix_path()) { - Ok(applied) => sender.input(AppMsg::SetMfplatPatch(applied)), - - Err(err) => { - tracing::error!("Failed to check mfplat patch status: {err}"); + tasks.push(std::thread::spawn(clone!( + #[strong] + sender, - sender.input(AppMsg::Toast { - title: tr!("patch-state-check-failed"), - description: Some(err.to_string()) - }); - } - } + move || { + // Get main patch status + sender.input(AppMsg::SetMainPatch(match jadeite::get_metadata() { + Ok(metadata) => { + let status = GAME.get_version() + .map(|version| metadata.games.hsr.global.get_status(version)) + .unwrap_or(metadata.games.hsr.global.status); - // Get main patch status - sender.input(AppMsg::SetMainPatch(match jadeite::get_metadata() { - Ok(metadata) => { - let status = GAME.get_version() - .map(|version| metadata.games.hi3rd.global.get_status(version)) - .unwrap_or(metadata.games.hi3rd.global.status); + Some((metadata.jadeite.version, status)) + } - Some((metadata.jadeite.version, status)) - } + Err(err) => { + tracing::error!("Failed to fetch patch metadata: {err}"); - Err(err) => { - tracing::error!("Failed to fetch patch metadata: {err}"); + sender.input(AppMsg::Toast { + title: tr!("patch-info-fetching-error"), + description: Some(err.to_string()) + }); - sender.input(AppMsg::Toast { - title: tr!("patch-info-fetching-error"), - description: Some(err.to_string()) - }); - - None - } - })); + None + } + })); - tracing::info!("Updated patch status"); - }))); + tracing::info!("Updated patch status"); + } + ))); // Update initial game version status - tasks.push(std::thread::spawn(clone!(@strong sender => move || { - sender.input(AppMsg::SetGameDiff(match GAME.try_get_diff() { - Ok(diff) => Some(diff), - Err(err) => { - tracing::error!("Failed to find game diff: {err}"); + tasks.push(std::thread::spawn(clone!( + #[strong] + sender, - sender.input(AppMsg::Toast { - title: tr!("game-diff-finding-error"), - description: Some(err.to_string()) - }); + move || { + sender.input(AppMsg::SetGameDiff(match GAME.try_get_diff() { + Ok(diff) => Some(diff), + Err(err) => { + tracing::error!("Failed to find game diff: {err}"); - None - } - })); + sender.input(AppMsg::Toast { + title: tr!("game-diff-finding-error"), + description: Some(err.to_string()) + }); - tracing::info!("Updated game version status"); - }))); + None + } + })); + + tracing::info!("Updated game version status"); + } + ))); // Await for tasks to finish execution for task in tasks { @@ -813,19 +838,24 @@ impl SimpleComponent for App { self.disabled_buttons = true; } - let updater = clone!(@strong sender => move |state| { - if show_status_page { - match state { - StateUpdating::Game => { - sender.input(AppMsg::SetLoadingStatus(Some(Some(tr!("loading-launcher-state--game"))))); - } + let updater = clone!( + #[strong] + sender, - StateUpdating::Patch => { - sender.input(AppMsg::SetLoadingStatus(Some(Some(tr!("loading-launcher-state--patch"))))); + move |state| { + if show_status_page { + match state { + StateUpdating::Game => { + sender.input(AppMsg::SetLoadingStatus(Some(Some(tr!("loading-launcher-state--game"))))); + } + + StateUpdating::Patch => { + sender.input(AppMsg::SetLoadingStatus(Some(Some(tr!("loading-launcher-state--patch"))))); + } } } } - }); + ); let state = match LauncherState::get_from_config(updater) { Ok(state) => Some(state), @@ -863,11 +893,6 @@ impl SimpleComponent for App { PREFERENCES_WINDOW.as_ref().unwrap_unchecked().sender().send(PreferencesAppMsg::SetGameDiff(diff)); } - #[allow(unused_must_use)] - AppMsg::SetMfplatPatch(applied) => unsafe { - PREFERENCES_WINDOW.as_ref().unwrap_unchecked().sender().send(PreferencesAppMsg::SetMfplatPatch(applied)); - } - #[allow(unused_must_use)] AppMsg::SetMainPatch(patch) => unsafe { PREFERENCES_WINDOW.as_ref().unwrap_unchecked().sender().send(PreferencesAppMsg::SetMainPatch(patch)); @@ -913,8 +938,6 @@ impl SimpleComponent for App { LauncherState::PatchConcerning | LauncherState::Launch => launch::launch(sender), - LauncherState::MfplatPatchAvailable => apply_mfplat_patch::apply_mfplat_patch(sender), - LauncherState::PatchNotInstalled | LauncherState::PatchUpdateAvailable => update_patch::update_patch(sender, self.progress_bar.sender().to_owned()), diff --git a/src/ui/main/repair_game.rs b/src/ui/main/repair_game.rs index 2bcb6bb0..8d4a6010 100644 --- a/src/ui/main/repair_game.rs +++ b/src/ui/main/repair_game.rs @@ -3,6 +3,8 @@ use relm4::{ Sender }; +use gtk::glib::clone; + use anime_launcher_sdk::config::ConfigExt; use anime_launcher_sdk::honkai::config::Config; @@ -52,17 +54,22 @@ pub fn repair_game(sender: ComponentSender, progress_bar_input: Sender, progress_bar_input: Sender move |state| { - match &state { - InstallerUpdate::DownloadingError(err) => { - tracing::error!("Downloading failed: {err}"); - - sender.input(AppMsg::Toast { - title: tr!("downloading-failed"), - description: Some(err.to_string()) - }); - } + .and_then(|patch| patch.install(config.patch.path, clone!( + #[strong] + sender, + + move |state| { + match &state { + InstallerUpdate::DownloadingError(err) => { + tracing::error!("Downloading failed: {err}"); + + sender.input(AppMsg::Toast { + title: tr!("downloading-failed"), + description: Some(err.to_string()) + }); + } - InstallerUpdate::UnpackingError(err) => { - tracing::error!("Unpacking failed: {err}"); + InstallerUpdate::UnpackingError(err) => { + tracing::error!("Unpacking failed: {err}"); - sender.input(AppMsg::Toast { - title: tr!("unpacking-failed"), - description: Some(err.clone()) - }); + sender.input(AppMsg::Toast { + title: tr!("unpacking-failed"), + description: Some(err.clone()) + }); + } + + _ => () } - - _ => () - } - #[allow(unused_must_use)] { - progress_bar_input.send(ProgressBarMsg::UpdateFromState(state)); + #[allow(unused_must_use)] { + progress_bar_input.send(ProgressBarMsg::UpdateFromState(state)); + } } - }))); + ))); if let Err(err) = result { tracing::error!("Failed to download latest patch version"); diff --git a/src/ui/migrate_installation.rs b/src/ui/migrate_installation.rs deleted file mode 100644 index a31a98fa..00000000 --- a/src/ui/migrate_installation.rs +++ /dev/null @@ -1,52 +0,0 @@ -use relm4::prelude::*; -use gtk::prelude::*; - -use crate::tr; - -use super::first_run::default_paths::DefaultPathsApp; - -pub struct MigrateInstallationApp { - default_paths: AsyncController, -} - -#[relm4::component(pub)] -impl SimpleComponent for MigrateInstallationApp { - type Init = (); - type Input = (); - type Output = (); - - view! { - adw::Window { - set_default_size: (780, 560), - set_modal: true, - set_hide_on_close: true, - - #[watch] - set_title: Some(&tr!("migrate-installation")), - - gtk::Box { - set_orientation: gtk::Orientation::Vertical, - - adw::HeaderBar { - add_css_class: "flat" - }, - - append = model.default_paths.widget(), - } - } - } - - fn init(_init: Self::Init, root: Self::Root, _sender: ComponentSender) -> ComponentParts { - tracing::info!("Initializing migration window"); - - let model = Self { - default_paths: DefaultPathsApp::builder() - .launch(true) - .detach() - }; - - let widgets = view_output!(); - - ComponentParts { model, widgets } - } -} diff --git a/src/ui/mod.rs b/src/ui/mod.rs index eae65455..e5365c9a 100644 --- a/src/ui/mod.rs +++ b/src/ui/mod.rs @@ -3,4 +3,3 @@ pub mod about; pub mod preferences; pub mod components; pub mod first_run; -pub mod migrate_installation; diff --git a/src/ui/preferences/enhancements/mod.rs b/src/ui/preferences/enhancements/mod.rs index 22feda4b..4102d9d1 100644 --- a/src/ui/preferences/enhancements/mod.rs +++ b/src/ui/preferences/enhancements/mod.rs @@ -213,7 +213,8 @@ impl SimpleAsyncComponent for EnhancementsApp { "Español", "中国", "日本語", - "한국어" + "한국어", + "Indonesia" ]), set_selected: CONFIG.game.wine.language.ordinal() as u32, diff --git a/src/ui/preferences/general/mod.rs b/src/ui/preferences/general/mod.rs index 5f2d77a6..e17908c9 100644 --- a/src/ui/preferences/general/mod.rs +++ b/src/ui/preferences/general/mod.rs @@ -17,18 +17,15 @@ pub mod components; use components::*; -use crate::ui::migrate_installation::MigrateInstallationApp; use crate::ui::preferences::main::PreferencesAppMsg; use crate::i18n::*; use crate::*; pub struct GeneralApp { - migrate_installation: Controller, components_page: AsyncController, game_diff: Option, - mfplat_patch: bool, main_patch: Option<(Version, JadeitePatchStatusVariant)>, style: LauncherStyle, @@ -41,9 +38,6 @@ pub enum GeneralAppMsg { /// was retrieved from the API SetGameDiff(Option), - /// Supposed to be called automatically on app's run - SetMfplatPatch(bool), - /// Supposed to be called automatically on app's run when the latest main patch version /// was retrieved from remote repos SetMainPatch(Option<(Version, JadeitePatchStatusVariant)>), @@ -51,7 +45,6 @@ pub enum GeneralAppMsg { UpdateDownloadedWine, UpdateDownloadedDxvk, - OpenMigrateInstallation, RepairGame, OpenMainPage, @@ -231,13 +224,6 @@ impl SimpleAsyncComponent for GeneralApp { set_spacing: 8, set_margin_top: 16, - gtk::Button { - set_label: &tr!("migrate-installation"), - set_tooltip_text: Some(&tr!("migrate-installation-description")), - - connect_clicked => GeneralAppMsg::OpenMigrateInstallation - }, - gtk::Button { set_label: &tr!("repair-game"), @@ -332,52 +318,6 @@ impl SimpleAsyncComponent for GeneralApp { None => String::new() }) } - }, - - adw::ActionRow { - set_title: &tr!("mfplat-patch-version"), - set_subtitle: &tr!("mfplat-patch-version-description"), - - add_suffix = >k::Label { - #[watch] - set_text: &if model.mfplat_patch { - tr!("applied") - } else { - tr!("not-applied") - }, - - #[watch] - set_css_classes: if model.mfplat_patch { - &["success"] - } else { - &["warning"] - } - } - } - }, - - add = &adw::PreferencesGroup { - adw::ActionRow { - set_title: &tr!("apply-mfplat-patch"), - - add_suffix = >k::Switch { - set_valign: gtk::Align::Center, - - set_state: CONFIG.patch.apply_mfplat, - - connect_state_notify[sender] => move |switch| { - if is_ready() { - #[allow(unused_must_use)] - if let Ok(mut config) = Config::get() { - config.patch.apply_mfplat = switch.state(); - - Config::update(config); - - sender.output(PreferencesAppMsg::UpdateLauncherState); - } - } - } - } } }, @@ -502,16 +442,11 @@ impl SimpleAsyncComponent for GeneralApp { tracing::info!("Initializing general settings"); let model = Self { - migrate_installation: MigrateInstallationApp::builder() - .launch(()) - .detach(), - components_page: ComponentsPage::builder() .launch(()) .forward(sender.input_sender(), std::convert::identity), game_diff: None, - mfplat_patch: false, main_patch: None, style: CONFIG.launcher.style, @@ -533,10 +468,6 @@ impl SimpleAsyncComponent for GeneralApp { self.game_diff = diff; } - GeneralAppMsg::SetMfplatPatch(applied) => { - self.mfplat_patch = applied; - } - GeneralAppMsg::SetMainPatch(patch) => { self.main_patch = patch; } @@ -553,14 +484,6 @@ impl SimpleAsyncComponent for GeneralApp { .unwrap(); } - GeneralAppMsg::OpenMigrateInstallation => unsafe { - if let Some(window) = crate::ui::main::PREFERENCES_WINDOW.as_ref() { - self.migrate_installation.widget().set_transient_for(Some(window.widget())); - } - - self.migrate_installation.widget().present(); - } - GeneralAppMsg::RepairGame => { sender.output(Self::Output::RepairGame).unwrap(); } diff --git a/src/ui/preferences/main.rs b/src/ui/preferences/main.rs index f98a50a1..ff2dac44 100644 --- a/src/ui/preferences/main.rs +++ b/src/ui/preferences/main.rs @@ -28,9 +28,6 @@ pub enum PreferencesAppMsg { /// was retrieved from the API SetGameDiff(Option), - /// Supposed to be called automatically on app's run - SetMfplatPatch(bool), - /// Supposed to be called automatically on app's run when the latest main patch version /// was retrieved from remote repos SetMainPatch(Option<(Version, JadeitePatchStatusVariant)>), @@ -114,11 +111,6 @@ impl SimpleAsyncComponent for PreferencesApp { self.general.emit(GeneralAppMsg::SetGameDiff(diff)); } - #[allow(unused_must_use)] - PreferencesAppMsg::SetMfplatPatch(applied) => { - self.general.sender().send(GeneralAppMsg::SetMfplatPatch(applied)); - } - #[allow(unused_must_use)] PreferencesAppMsg::SetMainPatch(patch) => { self.general.sender().send(GeneralAppMsg::SetMainPatch(patch));