diff --git a/.envrc b/.envrc index 1d953f4..3550a30 100644 --- a/.envrc +++ b/.envrc @@ -1 +1 @@ -use nix +use flake diff --git a/CHANGELOG.md b/CHANGELOG.md index 12bc9ce..c847d9a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,19 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Added + +- Respect root `.version` file for game version parsing +- Added disabling of 2 new telemetry servers + +### Changed + +- Prioritize parsed game version over the API response + +### Removed + +- Removed migrate installation feature + ## [1.0.1] - 05.07.2024 ### Fixed diff --git a/Cargo.lock b/Cargo.lock index 8a7f9c2..246702f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -57,8 +57,8 @@ checksum = "5c6cb57a04249c6480766f7f7cef5467412af1490f8d1e243141daddada3264f" [[package]] name = "anime-game-core" -version = "1.21.2" -source = "git+https://github.com/an-anime-team/anime-game-core?tag=1.21.2#7944efab8516e581367963e82674060a33b9d72e" +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.16.3" -source = "git+https://github.com/an-anime-team/anime-launcher-sdk?tag=1.16.3#91ce712a941dbbee8b24b8beadaf50bb01dfb32f" +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.1.0" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad186efb764318d35165f1758e7dcef3b10628e26d41a44bc5550652e6804391" +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" @@ -226,9 +226,9 @@ dependencies = [ [[package]] name = "async-io" -version = "2.3.3" +version = "2.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d6baa8f0178795da0e71bc42c9e5d13261aac7ee549853162e66a241ba17964" +checksum = "444b0228950ee6501b3568d3c93bf1176a1fdbc3b758dcd9475046d30f4dc7e8" dependencies = [ "async-lock", "cfg-if", @@ -240,7 +240,7 @@ dependencies = [ "rustix", "slab", "tracing", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -256,9 +256,9 @@ dependencies = [ [[package]] name = "async-process" -version = "2.2.3" +version = "2.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7eda79bbd84e29c2b308d1dc099d7de8dcc7035e48f4bf5dc4a531a44ff5e2a" +checksum = "a8a07789659a4d385b79b18b9127fc27e1a59e1e89117c78c5ea3b806f016374" dependencies = [ "async-channel", "async-io", @@ -271,7 +271,7 @@ dependencies = [ "futures-lite", "rustix", "tracing", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -287,9 +287,9 @@ dependencies = [ [[package]] name = "async-signal" -version = "0.2.8" +version = "0.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "794f185324c2f00e771cd9f1ae8b5ac68be2ca7abb129a87afd6e86d228bc54d" +checksum = "637e00349800c0bdf8bfc21ebbc0b6524abea702b0da4168ac00d070d0c0b9f3" dependencies = [ "async-io", "async-lock", @@ -300,7 +300,7 @@ dependencies = [ "rustix", "signal-hook-registry", "slab", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -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", @@ -359,12 +359,6 @@ version = "0.21.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" -[[package]] -name = "bitflags" -version = "1.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" - [[package]] name = "bitflags" version = "2.6.0" @@ -373,9 +367,9 @@ 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", @@ -414,9 +408,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", @@ -436,9 +430,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" @@ -463,24 +457,24 @@ dependencies = [ [[package]] name = "cached" -version = "0.52.0" +version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8466736fe5dbcaf8b8ee24f9bbefe43c884dc3e9ff7178da70f55bffca1133c" +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.22.0" +version = "0.23.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "575f32e012222055211b70f5b0601f951f84523410a0e65c81f2744a6042450d" +checksum = "2f42a145ed2d10dce2191e1dcf30cfccfea9026660e143662ba5eec4017d5daa" dependencies = [ "darling", "proc-macro2", @@ -496,22 +490,21 @@ checksum = "ade8366b8bd5ba243f0a58f036cc0ca8a2f069cff1a2351ef1cac6b083e16fc0" [[package]] name = "cairo-rs" -version = "0.19.4" +version = "0.20.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2ac2a4d0e69036cf0062976f6efcba1aaee3e448594e6514bb2ddf87acce562" +checksum = "e8a0ea147c94108c9613235388f540e4d14c327f7081c9e471fc8ee8a2533e69" dependencies = [ - "bitflags 2.6.0", + "bitflags", "cairo-sys-rs", "glib", "libc", - "thiserror", ] [[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", @@ -520,13 +513,13 @@ dependencies = [ [[package]] name = "cc" -version = "1.0.104" +version = "1.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74b6a57f98764a267ff415d50a25e6e166f3831a5071af4995296ea97d210490" +checksum = "72db2f7947ecee9b03b510377e8bb9077afa27176fdbff55c51027e976fdcc48" dependencies = [ "jobserver", "libc", - "once_cell", + "shlex", ] [[package]] @@ -563,9 +556,9 @@ dependencies = [ [[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" @@ -594,15 +587,15 @@ dependencies = [ [[package]] name = "core-foundation-sys" -version = "0.8.6" +version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" +checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" [[package]] name = "cpufeatures" -version = "0.2.12" +version = "0.2.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53fe5e26ff1b7aef8bca9c6080520cfb8d9333c7568e1829cef191a9723e5504" +checksum = "51e852e6dc9a5bed1fae92dd2375037bf2b768725bf3be87811edee3249d09ad" dependencies = [ "libc", ] @@ -668,9 +661,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", @@ -678,9 +671,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", @@ -692,9 +685,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", @@ -703,9 +696,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" @@ -887,21 +880,21 @@ dependencies = [ [[package]] name = "filetime" -version = "0.2.23" +version = "0.2.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ee447700ac8aa0b2f2bd7bc4462ad686ba06baa6727ac149a2d6277f0d240fd" +checksum = "bf401df4a4e3872c4fe8151134cf483738e74b67fc934d6532c882b3d24a4550" dependencies = [ "cfg-if", "libc", - "redox_syscall", - "windows-sys 0.52.0", + "libredox", + "windows-sys 0.59.0", ] [[package]] name = "flate2" -version = "1.0.30" +version = "1.0.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f54427cfd1c7829e2a139fcefea601bf088ebca651d2bf53ebc600eac295dae" +checksum = "7f211bbe8e69bbd0cfdea405084f128ae8b4aaa6b0b522fc8f2b009084797920" dependencies = [ "crc32fast", "miniz_oxide", @@ -1132,9 +1125,9 @@ dependencies = [ [[package]] name = "gdk-pixbuf" -version = "0.19.8" +version = "0.20.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "624eaba126021103c7339b2e179ae4ee8cdab842daab419040710f38ed9f8699" +checksum = "8730751991b97419fc3f0c2dca2c9e45b48edf46e48e0f965964ecf33889812f" dependencies = [ "gdk-pixbuf-sys", "gio", @@ -1144,9 +1137,9 @@ dependencies = [ [[package]] name = "gdk-pixbuf-sys" -version = "0.19.8" +version = "0.20.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4efa05a4f83c8cc50eb4d883787b919b85e5f1d8dd10b5a1df53bf5689782379" +checksum = "1ffbf649fd5b1c8c0f0feeb015b7533c3ef92da2887fb95ddd338bc2b1644a7c" dependencies = [ "gio-sys", "glib-sys", @@ -1157,9 +1150,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", @@ -1172,9 +1165,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", @@ -1218,9 +1211,9 @@ checksum = "40ecd4077b5ae9fd2e9e169b102c6c330d0605168eb0e8bf79952b256dbefffd" [[package]] name = "gio" -version = "0.19.8" +version = "0.20.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c49f117d373ffcc98a35d114db5478bc223341cff53e39a5d6feced9e2ddffe" +checksum = "dcacaa37401cad0a95aadd266bc39c72a131d454fc012f6dfd217f891d76cc52" dependencies = [ "futures-channel", "futures-core", @@ -1231,14 +1224,13 @@ dependencies = [ "libc", "pin-project-lite", "smallvec", - "thiserror", ] [[package]] name = "gio-sys" -version = "0.19.8" +version = "0.20.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2cd743ba4714d671ad6b6234e8ab2a13b42304d0e13ab7eba1dcdd78a7d6d4ef" +checksum = "5237611e97e9b86ab5768adc3eef853ae713ea797aa3835404acdfacffc9fb38" dependencies = [ "glib-sys", "gobject-sys", @@ -1249,11 +1241,11 @@ dependencies = [ [[package]] name = "glib" -version = "0.19.9" +version = "0.20.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39650279f135469465018daae0ba53357942a5212137515777d5fdca74984a44" +checksum = "b19429cb83fcbf1f00b31ae3a123fab5cd3761bdd15b0cc07905804742f0d0e4" dependencies = [ - "bitflags 2.6.0", + "bitflags", "futures-channel", "futures-core", "futures-executor", @@ -1266,23 +1258,22 @@ dependencies = [ "libc", "memchr", "smallvec", - "thiserror", ] [[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.9" +version = "0.20.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4429b0277a14ae9751350ad9b658b1be0abb5b54faa5bcdf6e74a3372582fad7" +checksum = "960349f56469b75794157e93bf04f0bc8a622d0a6612d6a8f8d7eac41e0e1ee1" dependencies = [ "heck", "proc-macro-crate", @@ -1293,9 +1284,9 @@ dependencies = [ [[package]] name = "glib-sys" -version = "0.19.8" +version = "0.20.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c2dc18d3a82b0006d470b13304fbbb3e0a9bd4884cf985a60a7ed733ac2c4a5" +checksum = "44edae63bea922f18f7e63977ee60a257ec27c4613aff1a6a9bb572ad0d88269" dependencies = [ "libc", "system-deps", @@ -1316,9 +1307,9 @@ dependencies = [ [[package]] name = "gobject-sys" -version = "0.19.8" +version = "0.20.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e697e252d6e0416fd1d9e169bda51c0f1c926026c39ca21fbe8b1bb5c3b8b9e" +checksum = "fa3d1dcd8a1eb2e7c22be3d5e792b14b186f3524f79b25631730f9a8c169d49a" dependencies = [ "glib-sys", "libc", @@ -1327,9 +1318,9 @@ dependencies = [ [[package]] name = "graphene-rs" -version = "0.19.8" +version = "0.20.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f5fb86031d24d9ec0a2a15978fc7a65d545a2549642cf1eb7c3dda358da42bcf" +checksum = "80aac87f74e81c0e13433e892a047237abdc37945c86887f5eed905038356e69" dependencies = [ "glib", "graphene-sys", @@ -1338,9 +1329,9 @@ dependencies = [ [[package]] name = "graphene-sys" -version = "0.19.8" +version = "0.20.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f530e0944bccba4b55065e9c69f4975ad691609191ebac16e13ab8e1f27af05" +checksum = "cc2f91ecd32989efad60326cc20a8fb252bd2852239a08e4e70cde8c100de9ca" dependencies = [ "glib-sys", "libc", @@ -1350,9 +1341,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", @@ -1365,9 +1356,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", @@ -1381,9 +1372,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", @@ -1402,9 +1393,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", @@ -1414,9 +1405,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", @@ -1476,9 +1467,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", @@ -1487,7 +1478,7 @@ dependencies = [ "serde", "serde_derive", "toml", - "uuid 1.9.1", + "uuid 1.10.0", ] [[package]] @@ -1524,9 +1515,9 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.2.6" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" +checksum = "93ead53efc7ea8ed3cfb0c79fc8023fbb782a5432b52830b6518941cebe6505c" dependencies = [ "equivalent", "hashbrown", @@ -1541,15 +1532,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" @@ -1590,9 +1572,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" @@ -1602,18 +1584,18 @@ 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", ] [[package]] name = "js-sys" -version = "0.3.69" +version = "0.3.70" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29c15563dc2726973df627357ce0c9ddddbea194836909d655df6a75d2cf296d" +checksum = "1868808506b929d7b0cfa8f75951347aa71bb21144b7791bae35d9bccfcfe37a" dependencies = [ "wasm-bindgen", ] @@ -1632,11 +1614,10 @@ 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", @@ -1648,9 +1629,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", @@ -1664,9 +1645,20 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.155" +version = "0.2.156" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c" +checksum = "a5f43f184355eefb8d17fc948dbecf6c13be3c141f20d834ae842193a448c72a" + +[[package]] +name = "libredox" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d" +dependencies = [ + "bitflags", + "libc", + "redox_syscall", +] [[package]] name = "linux-raw-sys" @@ -1772,9 +1764,9 @@ dependencies = [ [[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", @@ -1789,13 +1781,14 @@ dependencies = [ [[package]] name = "mio" -version = "0.8.11" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4a650543ca06a924e8b371db273b2756685faae30f8487da1b56505a8f78b0c" +checksum = "80e04d1dcff3aae0704555fe5fee3bcfaf3d1fdf8a7e521d5b9d2b42acb52cec" dependencies = [ + "hermit-abi 0.3.9", "libc", "wasi", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] @@ -1813,7 +1806,7 @@ version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "71e2746dc3a24dd78b3cfcb7be93368c6de9963d30f43a6a73998a9cf4b17b46" dependencies = [ - "bitflags 2.6.0", + "bitflags", "cfg-if", "cfg_aliases", "libc", @@ -1845,16 +1838,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 0.3.9", - "libc", -] - [[package]] name = "objc" version = "0.2.7" @@ -1886,9 +1869,9 @@ dependencies = [ [[package]] name = "object" -version = "0.36.1" +version = "0.36.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "081b846d1d56ddfc18fdf1a922e4f6e07a11768ea1b92dec44e42b72712ccfce" +checksum = "27b64972346851a39438c60b341ebc01bba47464ae329e55cf343eb93964efd9" dependencies = [ "memchr", ] @@ -1901,9 +1884,9 @@ checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" [[package]] name = "open" -version = "5.2.0" +version = "5.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d2c909a3fce3bd80efef4cd1c6c056bd9376a8fe06fcfdbebaf32cb485a7e37" +checksum = "61a877bf6abd716642a53ef1b89fb498923a4afca5c754f9050b4d081c05c4b3" dependencies = [ "is-wsl", "libc", @@ -1945,9 +1928,9 @@ checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" [[package]] name = "pango" -version = "0.19.8" +version = "0.20.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f0d328648058085cfd6897c9ae4272884098a926f3a833cd50c8c73e6eccecd" +checksum = "5764e5a174a5a0ec054fe5962ce6d4fc7052e2d0dcc23bbc77202b40a4a403d3" dependencies = [ "gio", "glib", @@ -1957,9 +1940,9 @@ dependencies = [ [[package]] name = "pango-sys" -version = "0.19.8" +version = "0.20.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff03da4fa086c0b244d4a4587d3e20622a3ecdb21daea9edf66597224c634ba0" +checksum = "fd317e1de76b14b3d3efe05518c08b360327f1ab7fec150473a89ffcad4b072d" dependencies = [ "glib-sys", "gobject-sys", @@ -2009,9 +1992,9 @@ checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" [[package]] name = "piper" -version = "0.2.3" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae1d5c74c9876f070d3e8fd503d748c7d974c3e48da8f41350fa5222ef9b4391" +checksum = "96c8c490f422ef9a4efd2cb5b42b76c8613d7e7dfc1caf667b8a3350a5acc066" dependencies = [ "atomic-waker", "fastrand", @@ -2026,9 +2009,9 @@ checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" [[package]] name = "polling" -version = "3.7.2" +version = "3.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3ed00ed3fbf728b5816498ecd316d1716eecaced9c0c8d2c5a6740ca214985b" +checksum = "cc2790cd301dec6cd3b7a025e4815cf825724a51c98dccfe6a3e55f05ffb6511" dependencies = [ "cfg-if", "concurrent-queue", @@ -2036,7 +2019,7 @@ dependencies = [ "pin-project-lite", "rustix", "tracing", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -2053,9 +2036,12 @@ checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" [[package]] name = "ppv-lite86" -version = "0.2.17" +version = "0.2.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" +checksum = "77957b295656769bb8ad2b6a6b09d897d94f05c41b069aede1fcdaa675eaea04" +dependencies = [ + "zerocopy", +] [[package]] name = "proc-macro-crate" @@ -2148,11 +2134,11 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.4.1" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" +checksum = "2a908a6e00f1fdd0dfd9c0eb08ce85126f6d8bbda50017e74bc4a4b7d4a926a4" dependencies = [ - "bitflags 1.3.2", + "bitflags", ] [[package]] @@ -2174,9 +2160,9 @@ 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", @@ -2184,16 +2170,23 @@ dependencies = [ "gtk4", "libadwaita", "once_cell", + "relm4-css", "relm4-macros", "tokio", "tracing", ] [[package]] -name = "relm4-macros" -version = "0.8.1" +name = "relm4-css" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0774e846889823aa5766f5b62cface3189a5b36280e65b2faaa6df0319da1726" +checksum = "1d3b924557df1cddc687b60b313c4b76620fdbf0e463afa4b29f67193ccf37f9" + +[[package]] +name = "relm4-macros" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc5885640821d60062497737dd42fd04248d13c7ecccee620caaa4b210fe9905" dependencies = [ "proc-macro2", "quote", @@ -2265,7 +2258,7 @@ version = "0.38.34" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "70dc5ec042f7a43c4a73241207cecc9873a06d45debb38b329f8541d85c2730f" dependencies = [ - "bitflags 2.6.0", + "bitflags", "errno", "libc", "linux-raw-sys", @@ -2357,11 +2350,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.6.0", + "bitflags", "core-foundation", "core-foundation-sys", "libc", @@ -2370,9 +2363,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", @@ -2401,18 +2394,18 @@ checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" [[package]] name = "serde" -version = "1.0.203" +version = "1.0.208" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7253ab4de971e72fb7be983802300c30b5a7f0c2e56fab8abfc6a214307c0094" +checksum = "cff085d2cb684faa248efb494c39b68e522822ac0de72ccf08109abde717cfb2" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.203" +version = "1.0.208" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "500cbc0ebeb6f46627f50f3f5811ccf6bf00643be300b4c3eabc0ef55dc5b5ba" +checksum = "24008e81ff7613ed8e5ba0cfaf24e2c2f1e5b8a0495711e44fcd4882fca62bcf" dependencies = [ "proc-macro2", "quote", @@ -2421,11 +2414,12 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.120" +version = "1.0.125" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e0d21c9a8cae1235ad58a00c11cb40d4b1e5c784f1ef2c537876ed6ffd8b7c5" +checksum = "83c8e735a073ccf5be70aa8066aa984eaf2fa000db6c8d0100ae605b366d31ed" dependencies = [ "itoa", + "memchr", "ryu", "serde", ] @@ -2443,9 +2437,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", ] @@ -2470,6 +2464,12 @@ dependencies = [ "lazy_static", ] +[[package]] +name = "shlex" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" + [[package]] name = "signal-hook-registry" version = "1.4.2" @@ -2564,9 +2564,9 @@ checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" [[package]] name = "syn" -version = "2.0.68" +version = "2.0.74" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "901fa70d88b9d6c98022e23b4136f9f3e54e4662c3bc1bd1d84a42a9a0f0c1e9" +checksum = "1fceb41e3d546d0bd83421d3409b1460cc7444cd389341a4c880fe7a042cb3d7" dependencies = [ "proc-macro2", "quote", @@ -2575,24 +2575,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", @@ -2614,36 +2613,37 @@ 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" -version = "3.10.1" +version = "3.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85b77fafb263dd9d05cbeac119526425676db3784113aa9295c88498cbf8bff1" +checksum = "04cbcdd0c794ebb0d4cf35e88edd2f7d2c4c3e9a5a6dab322839b321c6a87a64" dependencies = [ "cfg-if", "fastrand", + "once_cell", "rustix", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[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", @@ -2690,9 +2690,9 @@ dependencies = [ [[package]] name = "tinyvec" -version = "1.7.0" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce6b6a2fb3a985e99cebfaefa9faa3024743da73304ca1c683a36429613d3d22" +checksum = "445e881f4f6d382d5f27c034e25eb92edd7c784ceab92a0937db7f2e9471b938" dependencies = [ "tinyvec_macros", ] @@ -2705,39 +2705,38 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.38.0" +version = "1.39.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba4f4a02a7a80d6f274636f0aa95c7e383b912d41fe721a31f29e29698585a4a" +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.14" +version = "0.8.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f49eb2ab21d2f26bd6db7bf383edc527a7ebaee412d17af4d40fdccd442f335" +checksum = "a1ed1f98e3fdc28d6d910e6737ae6ab1a93bf1985935a1193e68f93eeb68d24e" dependencies = [ "serde", "serde_spanned", "toml_datetime", - "toml_edit 0.22.14", + "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", ] @@ -2755,15 +2754,15 @@ dependencies = [ [[package]] name = "toml_edit" -version = "0.22.14" +version = "0.22.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f21c7aaf97f1bd9ca9d4f9e73b0a6c74bd5afef56f2bc931943a6e1c37e04e38" +checksum = "583c44c02ad26b0c3f3066fe629275e50627026c51ac2e595cca4c230ce1ce1d" dependencies = [ "indexmap", "serde", "serde_spanned", "toml_datetime", - "winnow 0.6.13", + "winnow 0.6.18", ] [[package]] @@ -2954,9 +2953,9 @@ dependencies = [ [[package]] name = "uuid" -version = "1.9.1" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5de17fd2f7da591098415cff336e12965a28061ddace43b59cb3c430179c9439" +checksum = "81dfa00651efa65069b0b6b651f4aaa31ba9e3c3ce0137aaad053604ee7e0314" dependencies = [ "getrandom", ] @@ -2975,9 +2974,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" @@ -2997,19 +2996,20 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.92" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4be2531df63900aeb2bca0daaaddec08491ee64ceecbee5076636a3b026795a8" +checksum = "a82edfc16a6c469f5f44dc7b571814045d60404b55a0ee849f9bcfa2e63dd9b5" dependencies = [ "cfg-if", + "once_cell", "wasm-bindgen-macro", ] [[package]] name = "wasm-bindgen-backend" -version = "0.2.92" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "614d787b966d3989fa7bb98a654e369c762374fd3213d212cfc0251257e747da" +checksum = "9de396da306523044d3302746f1208fa71d7532227f15e347e2d93e4145dd77b" dependencies = [ "bumpalo", "log", @@ -3022,9 +3022,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-futures" -version = "0.4.42" +version = "0.4.43" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76bc14366121efc8dbb487ab05bcc9d346b3b5ec0eaa76e46594cabbe51762c0" +checksum = "61e9300f63a621e96ed275155c108eb6f843b6a26d053f122ab69724559dc8ed" dependencies = [ "cfg-if", "js-sys", @@ -3034,9 +3034,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.92" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1f8823de937b71b9460c0c34e25f3da88250760bec0ebac694b49997550d726" +checksum = "585c4c91a46b072c92e908d99cb1dcdf95c5218eeb6f3bf1efa991ee7a68cccf" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -3044,9 +3044,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.92" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" +checksum = "afc340c74d9005395cf9dd098506f7f44e38f2b4a21c6aaacf9a105ea5e1e836" dependencies = [ "proc-macro2", "quote", @@ -3057,15 +3057,25 @@ dependencies = [ [[package]] name = "wasm-bindgen-shared" -version = "0.2.92" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96" +checksum = "c62a0a307cb4a311d3a07867860911ca130c3494e8c2719593806c08bc5d0484" [[package]] name = "web-sys" -version = "0.3.69" +version = "0.3.70" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77afa9a11836342370f4817622a2f0f418b134426d91a82dfb48f532d2ec13ef" +checksum = "26fdeaafd9bd129f65e7c031593c24d62186301e0c72c8978fa1678be7d532c0" +dependencies = [ + "js-sys", + "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", @@ -3101,11 +3111,11 @@ checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" [[package]] name = "winapi-util" -version = "0.1.8" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d4cc384e1e73b93bafa6fb4f1df8c41695c8a91cf9c4c64358067d15a7b6c6b" +checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb" dependencies = [ - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -3127,9 +3137,9 @@ 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.6", @@ -3137,9 +3147,43 @@ dependencies = [ [[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-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", ] @@ -3162,6 +3206,15 @@ dependencies = [ "windows-targets 0.52.6", ] +[[package]] +name = "windows-sys" +version = "0.59.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" +dependencies = [ + "windows-targets 0.52.6", +] + [[package]] name = "windows-targets" version = "0.48.5" @@ -3294,9 +3347,9 @@ dependencies = [ [[package]] name = "winnow" -version = "0.6.13" +version = "0.6.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59b5e5f6c299a3c7890b876a2a587f3115162487e704907d9b6cd29473052ba1" +checksum = "68a9bda4691f099d435ad181000724da8e5899daa10713c2d432552b9ccd3a6f" dependencies = [ "memchr", ] @@ -3314,12 +3367,12 @@ dependencies = [ [[package]] name = "xdg-home" -version = "1.2.0" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca91dcf8f93db085f3a0a29358cd0b9d670915468f4290e8b85d118a34211ab8" +checksum = "ec1cdab258fb55c0da61328dc52c8764709b249011b2cad0454c72f0bf10a1f6" dependencies = [ "libc", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -3342,9 +3395,9 @@ dependencies = [ [[package]] name = "zbus" -version = "4.3.1" +version = "4.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "851238c133804e0aa888edf4a0229481c753544ca12a60fd1c3230c8a500fe40" +checksum = "bb97012beadd29e654708a0fdb4c84bc046f537aecfde2c3ee0a9e4b4d48c725" dependencies = [ "async-broadcast", "async-process", @@ -3375,9 +3428,9 @@ dependencies = [ [[package]] name = "zbus_macros" -version = "4.3.1" +version = "4.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d5a3f12c20bd473be3194af6b49d50d7bb804ef3192dc70eddedb26b85d9da7" +checksum = "267db9407081e90bbfa46d841d3cbc60f59c0351838c4bc65199ecd79ab1983e" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -3403,6 +3456,7 @@ version = "0.7.35" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0" dependencies = [ + "byteorder", "zerocopy-derive", ] @@ -3439,9 +3493,9 @@ dependencies = [ [[package]] name = "zip" -version = "2.1.3" +version = "2.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "775a2b471036342aa69bc5a602bc889cb0a06cda00477d0c69566757d5553d39" +checksum = "40dd8c92efc296286ce1fbd16657c5dbefff44f1b4ca01cc5f517d8b7b3d3e2e" dependencies = [ "aes", "arbitrary", @@ -3482,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.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cd99b45c6bc03a018c8b8a86025678c87e55526064e38f9df301989dce7ec0a" +checksum = "54a3ab4db68cea366acc5c897c7b4d4d1b8994a9cd6e6f841f8964566a419059" dependencies = [ "zstd-sys", ] [[package]] name = "zstd-sys" -version = "2.0.11+zstd.1.5.6" +version = "2.0.13+zstd.1.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75652c55c0b6f3e6f12eb786fe1bc960396bf05a1eb3bf1f3691c3610ac2e6d4" +checksum = "38ff0f21cfee8f97d94cef41359e0c89aa6113028ab0291aa8ca0038995a95aa" dependencies = [ "cc", "pkg-config", @@ -3510,9 +3564,9 @@ dependencies = [ [[package]] name = "zvariant" -version = "4.1.2" +version = "4.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1724a2b330760dc7d2a8402d841119dc869ef120b139d29862d6980e9c75bfc9" +checksum = "2084290ab9a1c471c38fc524945837734fbf124487e105daec2bb57fd48c81fe" dependencies = [ "endi", "enumflags2", @@ -3524,9 +3578,9 @@ dependencies = [ [[package]] name = "zvariant_derive" -version = "4.1.2" +version = "4.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55025a7a518ad14518fb243559c058a2e5b848b015e31f1d90414f36e3317859" +checksum = "73e2ba546bda683a90652bac4a279bc146adad1386f25379cf73200d2002c449" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -3537,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 0824fcd..9abc0f7 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.16.3" +tag = "1.17.3" features = ["all", "zzz"] # path = "../anime-launcher-sdk" # ! for dev purposes only [dependencies] -relm4 = { version = "0.8.1", features = ["macros", "libadwaita"] } -gtk = { package = "gtk4", version = "0.8.2", 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.2.0" +open = "5.3.0" whatadistro = "0.1.0" serde_json = "1.0" anyhow = "1.0" lazy_static = "1.5.0" -cached = { version = "0.52", features = ["proc_macro"] } +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 3a1e88e..bd01eec 100644 --- a/README.md +++ b/README.md @@ -10,6 +10,12 @@
+# 🚧 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 * [macOS launcher](https://github.com/3Shain/yet-another-anime-game-launcher) which contains some additional compatibility components @@ -17,58 +23,62 @@ * [Releases page](https://github.com/an-anime-team/sleepy-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 | -| - | - | - | - | -| Fedora | Flatpak | [link](https://github.com/an-anime-team/sleepy-launcher/wiki/Installation#-any-distribution-flatpak) | - | -| Arch Linux, Manjaro | AUR | [link](https://github.com/an-anime-team/sleepy-launcher/wiki/Installation#-arch-linux-aur) | [sleepy-launcher-bin](https://aur.archlinux.org/packages/sleepy-launcher-bin) | -| Fedora, OpenSUSE | RPM | [link](https://github.com/an-anime-team/sleepy-launcher/wiki/Installation#-fedora-rpm) | [SL](https://build.opensuse.org/repositories/home:Maroxy:AAT-Apps/SL) | -| Ubuntu | pacstall | - | [sleepy-launcher-bin](https://pacstall.dev/packages/sleepy-launcher-bin) | -| Gentoo | ebuild | [link](https://github.com/an-anime-team/sleepy-launcher/wiki/Installation#-gentoo-linux-ebuild) | [aagl-ebuilds](https://github.com/an-anime-team/gentoo-ebuilds) | -| NixOS | nixpkg | [link](https://github.com/an-anime-team/sleepy-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/sleepy-launcher/wiki/Installation) +To see the installation guides, please visit [this wiki page](https://github.com/an-anime-team/sleepy-launcher/wiki/Installation). -Lutris integration described [here](https://github.com/an-anime-team/sleepy-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/sleepy-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/sleepy-launcher/wiki/Installation#-fedora-rpm) | [AAGL](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. + +| Format | Wiki | Source | Distributions | Maintainer | +| - | - | - | - | - | +| AUR | [wiki](https://github.com/an-anime-team/sleepy-launcher/wiki/Installation#-arch-linux-aur) | [sleepy-launcher-bin](https://aur.archlinux.org/packages/sleepy-launcher-bin) | Arch Linux, Manjaro, EndeavourOS | xstra * | +| NixOS module | [wiki](https://github.com/an-anime-team/sleepy-launcher/wiki/Installation#-nixos-nixpkg) | [aagl-gtk-on-nix](https://github.com/ezKEa/aagl-gtk-on-nix) | NixOS | Luxxy * | + +> [!NOTE] +> Honorary members of our discord server. We have direct contact with them. + +## 😑 Third party support + +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. + +| Format | Source | Distributions | +| - | - | - | +| DEB | [sleepy-launcher](https://launchpad.net/~thundergemios10/+archive/ubuntu/sleepy-launcher) | Ubuntu, Linux Mint, Pop!_OS | +| Pacstall | [sleepy-launcher-bin](https://pacstall.dev/packages/sleepy-launcher-bin) | Ubuntu | +| Ebuild | [aagl-ebuilds](https://github.com/an-anime-team/gentoo-ebuilds) * | Gentoo | +| Lutris | `lutris.net/games/zen...-zero` (stripping the link) | Any | + +> [!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. ## Chinese version support -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 +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. -
+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. -# 💻 Development +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. -| Folder | Description | -| - | - | -| src | Rust source code | -| assets | App assets folder | -| assets/locales | App localizations | -| target/release | Release build of the app | - -## Clone repo - -```sh -git clone --recursive https://github.com/an-anime-team/sleepy-launcher -``` - -## Run app - -```sh -cargo run -``` - -## Build app - -```sh -cargo build --release -``` - -## Updates strategy - -Starting from 3.2.1 ([fcab428](https://github.com/an-anime-team/sleepy-launcher/commit/fcab428cb40b1457f41e0856f9d1e1473acbe653)) we have 2 branches: stable ([main](https://github.com/an-anime-team/sleepy-launcher/tree/main)) and dev ([next](https://github.com/an-anime-team/sleepy-launcher/tree/next)). Code changes will be pushed into dev branch and merged into stable once they're ready for new version release - - +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/flake.lock b/flake.lock new file mode 100644 index 0000000..e50b66a --- /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 0000000..9e7c0cc --- /dev/null +++ b/flake.nix @@ -0,0 +1,36 @@ +{ + 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 + + 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 44de689..0000000 Binary files a/repository/branches.png and /dev/null differ diff --git a/shell.nix b/shell.nix deleted file mode 100644 index ef6b1df..0000000 --- a/shell.nix +++ /dev/null @@ -1,40 +0,0 @@ -let - nixpkgs = builtins.fetchGit { - name = "nixos-24.05"; - url = "https://github.com/nixos/nixpkgs"; - ref = "refs/heads/nixos-24.05"; - }; - - nixpkgs-unstable = builtins.fetchGit { - name = "nixos-unstable"; - url = "https://github.com/nixos/nixpkgs"; - ref = "refs/heads/nixos-unstable"; - }; - - pkgs = import nixpkgs {}; - pkgs-unstable = import nixpkgs-unstable {}; - -in pkgs.mkShell { - nativeBuildInputs = with pkgs; [ - pkgs-unstable.rustup - pkgs-unstable.rustfmt - pkgs-unstable.clippy - - gcc - cmake - pkg-config - - xdelta - p7zip - libwebp - ]; - - buildInputs = with pkgs; [ - gtk4 - glib - gdk-pixbuf - gobject-introspection - - libadwaita - ]; -} diff --git a/src/background.rs b/src/background.rs index f44ae6c..c5d9d4f 100644 --- a/src/background.rs +++ b/src/background.rs @@ -21,7 +21,7 @@ pub fn get_uri() -> String { 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(&lang) + uri.to_owned() + &crate::i18n::format_lang(lang) } } @@ -73,12 +73,6 @@ pub fn download_background() -> anyhow::Result<()> { tracing::debug!("Background picture is already downloaded. Skipping"); download_image = false; - - if crate::BACKGROUND_PRIMARY_FILE.exists() { - tracing::debug!("Background picture is already patched. Skipping"); - - return Ok(()); - } } } @@ -97,20 +91,20 @@ pub fn download_background() -> anyhow::Result<()> { Command::new("dwebp") .arg(crate::BACKGROUND_FILE.as_path()) .arg("-o") - .arg(crate::BACKGROUND_PRIMARY_FILE.as_path()) + .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::BACKGROUND_PRIMARY_FILE.exists() { - std::fs::copy(crate::BACKGROUND_FILE.as_path(), crate::BACKGROUND_PRIMARY_FILE.as_path())?; + if !crate::PROCESSED_BACKGROUND_FILE.exists() { + std::fs::copy(crate::BACKGROUND_FILE.as_path(), crate::PROCESSED_BACKGROUND_FILE.as_path())?; } } else { - std::fs::copy(crate::BACKGROUND_FILE.as_path(), crate::BACKGROUND_PRIMARY_FILE.as_path())?; + 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 4e20831..2b3f459 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 81986b9..7dd37db 100644 --- a/src/main.rs +++ b/src/main.rs @@ -61,8 +61,8 @@ lazy_static::lazy_static! { /// Path to `background` file. Standard is `$HOME/.local/share/anime-game-launcher/background` pub static ref BACKGROUND_FILE: PathBuf = LAUNCHER_FOLDER.join("background"); - /// Path to `background-primary` file. Standard is `$HOME/.local/share/anime-game-launcher/background-primary` - pub static ref BACKGROUND_PRIMARY_FILE: PathBuf = LAUNCHER_FOLDER.join("background-primary"); + /// 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 /// @@ -102,7 +102,7 @@ lazy_static::lazy_static! { .round-bin {{ border-radius: 24px; }} - ", BACKGROUND_PRIMARY_FILE.to_string_lossy()); + ", PROCESSED_BACKGROUND_FILE.to_string_lossy()); } fn main() -> anyhow::Result<()> { @@ -120,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"); } @@ -201,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("Sleepy Launcher"); gtk::glib::set_program_name(Some("Sleepy Launcher")); @@ -218,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::(()); } @@ -252,9 +252,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 f626d7c..107dbc9 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/sleepy-launcher", set_issue_url: "https://github.com/an-anime-team/sleepy-launcher/issues", - set_license_type: gtk::License::Gpl30, + set_license_type: gtk::License::Gpl30Only, set_version: &APP_VERSION, set_developers: &[ @@ -91,17 +91,23 @@ impl SimpleComponent for AboutDialog { set_release_notes_version: &APP_VERSION, set_release_notes: &[ - "

Fixed

", + "

Added

", "
    ", - "
  • Fixed infinite updates loop on minor game patches (notably 1.0.1)
  • ", - "
  • Fixed prefix paths for proton builds for game drives mapping
  • ", + "
  • Respect root \".version\" file for game version parsing
  • ", + "
  • Added disabling of 2 new telemetry servers
  • ", "
", "

Changed

", "
    ", - "
  • Removed xdelta3 runtime dependency, updated dwebp package name for fedora
  • ", + "
  • Prioritize parsed game version over the API response
  • ", + "
", + + "

Removed

", + + "
    ", + "
  • Removed migrate installation feature
  • ", "
" ].join("\n"), diff --git a/src/ui/components/version.rs b/src/ui/components/version.rs index 4e0b602..c2bf088 100644 --- a/src/ui/components/version.rs +++ b/src/ui/components/version.rs @@ -162,33 +162,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)); + std::thread::spawn(clone!( + #[strong(rename_to = download_folder)] + self.download_folder, - installer.install(download_folder, move |state| { - match &state { - InstallerUpdate::UnpackingFinished | - InstallerUpdate::DownloadingError(_) | - InstallerUpdate::UnpackingError(_) => { - progress_bar_sender.send(ProgressBarMsg::SetVisible(false)); + move || { + progress_bar_sender.send(ProgressBarMsg::Reset); + progress_bar_sender.send(ProgressBarMsg::SetVisible(true)); - if let InstallerUpdate::UnpackingFinished = &state { - sender.input(ComponentVersionMsg::SetState(VersionState::Downloaded)); - sender.output(ComponentGroupMsg::CallOnDownloaded); - } + installer.install(download_folder, move |state| { + match &state { + InstallerUpdate::UnpackingFinished | + InstallerUpdate::DownloadingError(_) | + InstallerUpdate::UnpackingError(_) => { + progress_bar_sender.send(ProgressBarMsg::SetVisible(false)); - else { - sender.input(ComponentVersionMsg::SetState(VersionState::NotDownloaded)); - } - }, + 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(DiffUpdate::InstallerUpdate(state))); - }); - })); + _ => () + } + + progress_bar_sender.send(ProgressBarMsg::UpdateFromState(DiffUpdate::InstallerUpdate(state))); + }); + } + )); } } diff --git a/src/ui/first_run/default_paths.rs b/src/ui/first_run/default_paths.rs index 5ee3d76..7a12c6e 100644 --- a/src/ui/first_run/default_paths.rs +++ b/src/ui/first_run/default_paths.rs @@ -12,7 +12,6 @@ pub struct DefaultPathsApp { progress_bar: AsyncController, show_additional: bool, - migrate_installation: bool, show_progress: bool, launcher: PathBuf, @@ -47,8 +46,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; @@ -226,11 +224,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"], @@ -238,17 +232,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 } } @@ -271,7 +258,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 { @@ -283,7 +270,6 @@ impl SimpleAsyncComponent for DefaultPathsApp { .detach(), show_additional: false, - migrate_installation: init, show_progress: false, launcher: LAUNCHER_FOLDER.to_path_buf(), @@ -294,12 +280,13 @@ impl SimpleAsyncComponent for DefaultPathsApp { game_china: CONFIG.game.path.china.clone(), components: CONFIG.components.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!(); @@ -345,47 +332,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.china, &self.game_china), - (old_config.components.path, &self.components) - ]; - - #[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) => { @@ -398,14 +347,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/main.rs b/src/ui/first_run/main.rs index f4a7ac1..b567e8e 100644 --- a/src/ui/first_run/main.rs +++ b/src/ui/first_run/main.rs @@ -127,7 +127,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/main/download_diff.rs b/src/ui/main/download_diff.rs index cf58f25..f6ff382 100644 --- a/src/ui/main/download_diff.rs +++ b/src/ui/main/download_diff.rs @@ -21,33 +21,38 @@ pub fn download_diff(sender: ComponentSender, progress_bar_input: Sender move |state| { - match &state { - DiffUpdate::InstallerUpdate(InstallerUpdate::DownloadingError(err)) => { - tracing::error!("Downloading failed: {err}"); + let result = diff.install_to(game_path, clone!( + #[strong] + sender, - sender.input(AppMsg::Toast { - title: tr!("downloading-failed"), - description: Some(err.to_string()) - }); + move |state| { + match &state { + DiffUpdate::InstallerUpdate(InstallerUpdate::DownloadingError(err)) => { + tracing::error!("Downloading failed: {err}"); + + sender.input(AppMsg::Toast { + title: tr!("downloading-failed"), + description: Some(err.to_string()) + }); + } + + DiffUpdate::InstallerUpdate(InstallerUpdate::UnpackingError(err)) => { + tracing::error!("Unpacking failed: {err}"); + + sender.input(AppMsg::Toast { + title: tr!("unpacking-failed"), + description: Some(err.clone()) + }); + } + + _ => () } - DiffUpdate::InstallerUpdate(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 06f2414..69898f2 100644 --- a/src/ui/main/download_wine.rs +++ b/src/ui/main/download_wine.rs @@ -52,45 +52,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}"); + std::thread::spawn(clone!( + #[strong] + sender, - sender.input(AppMsg::Toast { - title: tr!("downloading-failed"), - description: Some(err.to_string()) - }); + 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(DiffUpdate::InstallerUpdate(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()) - }); - } + Config::update(config); - _ => () - } - - #[allow(unused_must_use)] { - progress_bar_input.send(ProgressBarMsg::UpdateFromState(DiffUpdate::InstallerUpdate(state))); - } - })); - - config.game.wine.selected = Some(wine.name.clone()); - - 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 fda59c0..8a2d2ad 100644 --- a/src/ui/main/mod.rs +++ b/src/ui/main/mod.rs @@ -483,11 +483,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, - sender.input(AppMsg::DisableKillGameButton(false)); - })); + move || { + std::thread::sleep(std::time::Duration::from_secs(3)); + + sender.input(AppMsg::DisableKillGameButton(false)); + } + )); let result = std::process::Command::new("pkill") .arg("-f") // full text search @@ -643,56 +648,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}"); - } - }))); - - 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(), - }; - - if let Err(err) = open::that(path) { - sender.input(AppMsg::Toast { - title: tr!("game-folder-opening-error"), - description: Some(err.to_string()) - }); - - tracing::error!("Failed to open game folder: {err}"); - } - }))); - - group.add_action::(RelmAction::new_stateless(clone!(@strong sender => move |_| { - if let Ok(file) = config_file() { - if let Err(err) = open::that(file) { + move |_| { + if let Err(err) = open::that(LAUNCHER_FOLDER.as_path()) { sender.input(AppMsg::Toast { - title: tr!("config-file-opening-error"), + title: tr!("launcher-folder-opening-error"), description: Some(err.to_string()) }); - tracing::error!("Failed to open config file: {err}"); + tracing::error!("Failed to open launcher 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 |_| { + 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(), + }; + + if let Err(err) = open::that(path) { + sender.input(AppMsg::Toast { + title: tr!("game-folder-opening-error"), + description: Some(err.to_string()) + }); + + tracing::error!("Failed to open game folder: {err}"); + } } - }))); + ))); + + group.add_action::(RelmAction::new_stateless(clone!( + #[strong] + sender, + + 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); @@ -713,87 +738,102 @@ 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}"); + tasks.push(std::thread::spawn(clone!( + #[strong] + sender, - sender.input(AppMsg::Toast { - title: tr!("background-downloading-failed"), - description: Some(err.to_string()) - }); + 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); + tasks.push(std::thread::spawn(clone!( + #[strong] + sender, - match components.is_sync(&CONFIG.components.servers) { - Ok(Some(_)) => (), + move || { + let components = ComponentsLoader::new(&CONFIG.components.path); - 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")) - } - }); + match components.is_sync(&CONFIG.components.servers) { + Ok(Some(_)) => (), - break; - } + 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")) + } + }); - Err(err) => { - tracing::error!("Failed to sync components index"); + break; + } - sender.input(AppMsg::Toast { - title: tr!("components-index-sync-failed"), - description: Some(err.to_string()) - }); + Err(err) => { + tracing::error!("Failed to sync components index"); + + 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 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 { @@ -827,15 +867,20 @@ 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, + + move |state| { + if show_status_page { + match state { + StateUpdating::Game => { + sender.input(AppMsg::SetLoadingStatus(Some(Some(tr!("loading-launcher-state--game"))))); + } } } } - }); + ); let state = match LauncherState::get_from_config(updater) { Ok(state) => Some(state), @@ -921,9 +966,14 @@ impl SimpleComponent for App { progress_bar_input.send(ProgressBarMsg::UpdateCaption(Some(tr!("downloading")))); std::thread::spawn(move || { - let result = game.download_to(&tmp, clone!(@strong progress_bar_input => move |curr, total| { - progress_bar_input.send(ProgressBarMsg::UpdateProgress(curr, total)); - })); + let result = game.download_to(&tmp, clone!( + #[strong] + progress_bar_input, + + move |curr, total| { + progress_bar_input.send(ProgressBarMsg::UpdateProgress(curr, total)); + } + )); if let Err(err) = result { sender.input(AppMsg::Toast { diff --git a/src/ui/main/repair_game.rs b/src/ui/main/repair_game.rs index 190558e..e89f6e1 100644 --- a/src/ui/main/repair_game.rs +++ b/src/ui/main/repair_game.rs @@ -52,17 +52,22 @@ pub fn repair_game(sender: ComponentSender, progress_bar_input: Sender move || { - for file in thread_files { - let status = if config.launcher.repairer.fast { - file.fast_verify(&game_path) - } else { - file.verify(&game_path) - }; + std::thread::spawn(clone!( + #[strong] + game_path, - thread_sender.send((file, status)).unwrap(); + move || { + for file in thread_files { + let status = if config.launcher.repairer.fast { + file.fast_verify(&game_path) + } else { + file.verify(&game_path) + }; + + thread_sender.send((file, status)).unwrap(); + } } - })); + )); } // We have [config.launcher.repairer.threads] copies of this sender + the original one diff --git a/src/ui/migrate_installation.rs b/src/ui/migrate_installation.rs deleted file mode 100644 index a31a98f..0000000 --- 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 eae6545..e5365c9 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 6e54be2..2b2ffb3 100644 --- a/src/ui/preferences/enhancements/mod.rs +++ b/src/ui/preferences/enhancements/mod.rs @@ -212,7 +212,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 dd99e46..a13d3b2 100644 --- a/src/ui/preferences/general/mod.rs +++ b/src/ui/preferences/general/mod.rs @@ -16,14 +16,12 @@ pub mod components; use components::*; -use crate::ui::migrate_installation::MigrateInstallationApp; use crate::i18n::*; use crate::*; use super::main::PreferencesAppMsg; pub struct GeneralApp { - migrate_installation: Controller, components_page: AsyncController, game_diff: Option, @@ -40,7 +38,6 @@ pub enum GeneralAppMsg { UpdateDownloadedWine, UpdateDownloadedDxvk, - OpenMigrateInstallation, RepairGame, OpenMainPage, @@ -248,13 +245,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"), @@ -446,10 +436,6 @@ 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), @@ -486,14 +472,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(); }