From 4b4090114195e3a0df28bcb766df735792fc0503 Mon Sep 17 00:00:00 2001 From: Observer KRypt0n_ Date: Thu, 8 Jun 2023 11:44:38 +0200 Subject: [PATCH] feat(core): updated SDK --- Cargo.lock | 292 ++++++++++++----------- Cargo.toml | 4 +- src/ui/components/group.rs | 23 +- src/ui/components/list.rs | 14 +- src/ui/components/mod.rs | 4 +- src/ui/components/progress_bar.rs | 4 +- src/ui/components/version.rs | 27 ++- src/ui/first_run/download_components.rs | 12 +- src/ui/main/create_prefix.rs | 2 +- src/ui/preferences/general/components.rs | 14 +- src/ui/preferences/general/mod.rs | 1 + 11 files changed, 206 insertions(+), 191 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 23709e0..db36743 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -39,17 +39,17 @@ dependencies = [ [[package]] name = "aho-corasick" -version = "1.0.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67fc08ce920c31afb70f013dcce1bfc3a3195de6a228474e45e1f145b36f8d04" +checksum = "43f6cb1bf222025340178f382c426f13757b2960e89779dfcb319c32542a5a41" dependencies = [ "memchr", ] [[package]] name = "anime-game-core" -version = "1.10.3" -source = "git+https://github.com/an-anime-team/anime-game-core?tag=1.10.3#045a5442a8d4d15326abbd3c294ec934603947d1" +version = "1.11.5" +source = "git+https://github.com/an-anime-team/anime-game-core?tag=1.11.5#f24164f70b353f5e80ee9ad0e25d496d51443cea" dependencies = [ "anyhow", "bzip2", @@ -96,8 +96,8 @@ dependencies = [ [[package]] name = "anime-launcher-sdk" -version = "1.4.5" -source = "git+https://github.com/an-anime-team/anime-launcher-sdk?tag=1.4.5#af03ab65d4350b35711d9ce118702844f79daf9e" +version = "1.6.3" +source = "git+https://github.com/an-anime-team/anime-launcher-sdk?tag=1.6.3#6aef2d3d5ddb5d1e5e66df861146e8c36e9ed7dc" dependencies = [ "anime-game-core", "anyhow", @@ -244,7 +244,7 @@ checksum = "0e97ce7de6cf12de5d7226c73f5ba9811622f4db3a5b91b55c53e987e5f91cba" dependencies = [ "proc-macro2", "quote", - "syn 2.0.16", + "syn 2.0.18", ] [[package]] @@ -287,15 +287,9 @@ checksum = "b9ccdd8f2a161be9bd5c023df56f1b2a0bd1d83872ae53b71a84a12c9bf6e842" dependencies = [ "proc-macro2", "quote", - "syn 2.0.16", + "syn 2.0.18", ] -[[package]] -name = "async_once" -version = "0.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ce4f10ea3abcd6617873bae9f91d1c5332b4a778bd9ce34d0cd517474c1de82" - [[package]] name = "atomic-waker" version = "1.1.1" @@ -331,9 +325,9 @@ checksum = "3441f0f7b02788e948e47f457ca01f1d7e6d92c693bc132c22b087d3141c03ff" [[package]] name = "base64" -version = "0.21.1" +version = "0.21.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f1e31e207a6b8fb791a38ea3105e6cb541f55e4d029902d3039a4ad07cc4105" +checksum = "604178f6c5c21f02dc555784810edfb88d34ac2c73b2eae109655649ee73ce3d" [[package]] name = "base64ct" @@ -422,18 +416,16 @@ dependencies = [ [[package]] name = "cached" -version = "0.43.0" +version = "0.44.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc2fafddf188d13788e7099295a59b99e99b2148ab2195cae454e754cc099925" +checksum = "b195e4fbc4b6862bbd065b991a34750399c119797efff72492f28a5864de8700" dependencies = [ "async-trait", - "async_once", "cached_proc_macro", "cached_proc_macro_types", "futures", "hashbrown 0.13.2", "instant", - "lazy_static", "once_cell", "thiserror", "tokio", @@ -441,9 +433,9 @@ dependencies = [ [[package]] name = "cached_proc_macro" -version = "0.16.0" +version = "0.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e10ca87c81aaa3a949dbbe2b5e6c2c45dbc94ba4897e45ea31ff9ec5087be3dc" +checksum = "b48814962d2fd604c50d2b9433c2a41a0ab567779ee2c02f7fba6eca1221f082" dependencies = [ "cached_proc_macro_types", "darling", @@ -460,9 +452,9 @@ checksum = "3a4f925191b4367301851c6d99b09890311d74b0d43f274c0b34c86d308a3663" [[package]] name = "cairo-rs" -version = "0.17.0" +version = "0.17.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8af54f5d48af1226928adc1f57edd22f5df1349e7da1fc96ae15cf43db0e871" +checksum = "ab3603c4028a5e368d09b51c8b624b9a46edcd7c3778284077a6125af73c9f0a" dependencies = [ "bitflags", "cairo-sys-rs", @@ -474,9 +466,9 @@ dependencies = [ [[package]] name = "cairo-sys-rs" -version = "0.17.0" +version = "0.17.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f55382a01d30e5e53f185eee269124f5e21ab526595b872751278dfbb463594e" +checksum = "691d0c66b1fb4881be80a760cb8fe76ea97218312f9dfe2c9cc0f496ca279cb1" dependencies = [ "glib-sys", "libc", @@ -494,9 +486,9 @@ dependencies = [ [[package]] name = "cfg-expr" -version = "0.15.1" +version = "0.15.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8790cf1286da485c72cf5fc7aeba308438800036ec67d89425924c4807268c9" +checksum = "e70d3ad08698a0568b0562f22710fe6bfc1f4a61a367c77d0398c562eadd453a" dependencies = [ "smallvec", "target-lexicon", @@ -620,16 +612,6 @@ dependencies = [ "typenum", ] -[[package]] -name = "ctor" -version = "0.1.26" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d2301688392eb071b0bf1a37be05c469d3cc4dbbd95df672fe28ab021e6a096" -dependencies = [ - "quote", - "syn 1.0.109", -] - [[package]] name = "darling" version = "0.14.4" @@ -713,7 +695,7 @@ checksum = "487585f4d0c6655fe74905e2504d8ad6908e4db67f744eb140876906c2f3175d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.16", + "syn 2.0.18", ] [[package]] @@ -750,7 +732,7 @@ dependencies = [ "num-traits", "proc-macro2", "quote", - "syn 2.0.16", + "syn 2.0.18", ] [[package]] @@ -771,7 +753,7 @@ checksum = "5e9a1f9f7d83e59740248a6e14ecf93929ade55027844dfcea78beafccc15745" dependencies = [ "proc-macro2", "quote", - "syn 2.0.16", + "syn 2.0.18", ] [[package]] @@ -812,11 +794,11 @@ dependencies = [ [[package]] name = "field-offset" -version = "0.3.5" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3cf3a800ff6e860c863ca6d4b16fd999db8b752819c1606884047b73e468535" +checksum = "38e2275cc4e4fc009b0669731a1e5ab7ebf11f469eaede2bab9309a5b4d6057f" dependencies = [ - "memoffset 0.8.0", + "memoffset 0.9.0", "rustc_version", ] @@ -946,9 +928,9 @@ checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" [[package]] name = "form_urlencoded" -version = "1.1.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9c384f161156f5260c24a097c56119f9be8c798586aecc13afbcbe7b7e26bf8" +checksum = "a62bc1cf6f830c2ec14a513a9fb124d0a213a629668a4186f329db21fe045652" dependencies = [ "percent-encoding", ] @@ -1036,7 +1018,7 @@ checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72" dependencies = [ "proc-macro2", "quote", - "syn 2.0.16", + "syn 2.0.18", ] [[package]] @@ -1071,9 +1053,9 @@ dependencies = [ [[package]] name = "gdk-pixbuf" -version = "0.17.0" +version = "0.17.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b023fbe0c6b407bd3d9805d107d9800da3829dc5a676653210f1d5f16d7f59bf" +checksum = "695d6bc846438c5708b07007537b9274d883373dd30858ca881d7d71b5540717" dependencies = [ "bitflags", "gdk-pixbuf-sys", @@ -1085,9 +1067,9 @@ dependencies = [ [[package]] name = "gdk-pixbuf-sys" -version = "0.17.0" +version = "0.17.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b41bd2b44ed49d99277d3925652a163038bd5ed943ec9809338ffb2f4391e3b" +checksum = "9285ec3c113c66d7d0ab5676599176f1f42f4944ca1b581852215bf5694870cb" dependencies = [ "gio-sys", "glib-sys", @@ -1141,9 +1123,9 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.9" +version = "0.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c85e1d9ab2eadba7e5040d4e09cbd6d072b76a557ad64e797c2cb9d4da21d7e4" +checksum = "be4136b2a15dd319360be1c07d9933517ccf0be8f16bf62a3bee4f0d618df427" dependencies = [ "cfg-if", "js-sys", @@ -1160,9 +1142,9 @@ checksum = "ad0a93d233ebf96623465aad4046a8d3aa4da22d4f4beba5388838c8a434bbb4" [[package]] name = "gio" -version = "0.17.9" +version = "0.17.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d14522e56c6bcb6f7a3aebc25cbcfb06776af4c0c25232b601b4383252d7cb92" +checksum = "a6973e92937cf98689b6a054a9e56c657ed4ff76de925e36fc331a15f0c5d30a" dependencies = [ "bitflags", "futures-channel", @@ -1180,9 +1162,9 @@ dependencies = [ [[package]] name = "gio-sys" -version = "0.17.4" +version = "0.17.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b1d43b0d7968b48455244ecafe41192871257f5740aa6b095eb19db78e362a5" +checksum = "0ccf87c30a12c469b6d958950f6a9c09f2be20b7773f7e70d20b867fdf2628c3" dependencies = [ "glib-sys", "gobject-sys", @@ -1193,9 +1175,9 @@ dependencies = [ [[package]] name = "glib" -version = "0.17.9" +version = "0.17.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7f1de7cbde31ea4f0a919453a2dcece5d54d5b70e08f8ad254dc4840f5f09b6" +checksum = "d3fad45ba8d4d2cea612b432717e834f48031cd8853c8aaf43b2c79fec8d144b" dependencies = [ "bitflags", "futures-channel", @@ -1216,15 +1198,15 @@ dependencies = [ [[package]] name = "glib-build-tools" -version = "0.17.0" +version = "0.17.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f8480c9ba9cc06aa8d5baf446037f8dc237bee127e9b62080c4db7e293d8ea0" +checksum = "7a65d79efe318ef2cbbbb37032b125866fd82c34ea44c816132621bbc552e716" [[package]] name = "glib-macros" -version = "0.17.9" +version = "0.17.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a7206c5c03851ef126ea1444990e81fdd6765fb799d5bc694e4897ca01bb97f" +checksum = "eca5c79337338391f1ab8058d6698125034ce8ef31b72a442437fa6c8580de26" dependencies = [ "anyhow", "heck", @@ -1237,9 +1219,9 @@ dependencies = [ [[package]] name = "glib-sys" -version = "0.17.4" +version = "0.17.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49f00ad0a1bf548e61adfff15d83430941d9e1bb620e334f779edd1c745680a5" +checksum = "d80aa6ea7bba0baac79222204aa786a6293078c210abe69ef1336911d4bdc4f0" dependencies = [ "libc", "system-deps", @@ -1272,9 +1254,9 @@ dependencies = [ [[package]] name = "gobject-sys" -version = "0.17.4" +version = "0.17.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15e75b0000a64632b2d8ca3cf856af9308e3a970844f6e9659bd197f026793d0" +checksum = "cd34c3317740a6358ec04572c1bcfd3ac0b5b6529275fae255b237b314bb8062" dependencies = [ "glib-sys", "libc", @@ -1283,9 +1265,9 @@ dependencies = [ [[package]] name = "graphene-rs" -version = "0.17.1" +version = "0.17.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21cf11565bb0e4dfc2f99d4775b6c329f0d40a2cff9c0066214d31a0e1b46256" +checksum = "def4bb01265b59ed548b05455040d272d989b3012c42d4c1bbd39083cb9b40d9" dependencies = [ "glib", "graphene-sys", @@ -1294,9 +1276,9 @@ dependencies = [ [[package]] name = "graphene-sys" -version = "0.17.0" +version = "0.17.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf80a4849a8d9565410a8fec6fc3678e9c617f4ac7be182ca55ab75016e07af9" +checksum = "1856fc817e6a6675e36cea0bd9a3afe296f5d9709d1e2d3182803ac77f0ab21d" dependencies = [ "glib-sys", "libc", @@ -1448,9 +1430,9 @@ checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" [[package]] name = "idna" -version = "0.3.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e14ddfc70884202db2244c223200c204c2bda1bc6e0998d11b5e024d657209e6" +checksum = "7d20d6b07bfbc108882d88ed8e37d39636dcc260e15e30c45e6ba089610b917c" dependencies = [ "unicode-bidi", "unicode-normalization", @@ -1632,9 +1614,9 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.144" +version = "0.2.146" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b00cc1c228a6782d0f076e7b232802e0c5689d41bb5df366f2a6b6621cfdfe1" +checksum = "f92be4933c13fd498862a9e02a3055f8a8d9c039ce33db97306fd5a6caa7f29b" [[package]] name = "linux-raw-sys" @@ -1644,9 +1626,9 @@ checksum = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519" [[package]] name = "lock_api" -version = "0.4.9" +version = "0.4.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "435011366fe56583b16cf956f9df0095b405b82d76425bc8981c0e22e60ec4df" +checksum = "c1cc9717a20b1bb222f333e6a92fd32f7d8a18ddc5a3191a11af45dcbf4dcd16" dependencies = [ "autocfg", "scopeguard", @@ -1654,11 +1636,10 @@ dependencies = [ [[package]] name = "log" -version = "0.4.17" +version = "0.4.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e" +checksum = "518ef76f2f87365916b142844c16d8fefd85039bc5699050210a7778ee1cd1de" dependencies = [ - "cfg-if", "value-bag", ] @@ -1725,6 +1706,15 @@ dependencies = [ "autocfg", ] +[[package]] +name = "memoffset" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a634b1c61a95585bd15607c6ab0c4e5b226e695ff2800ba0cdccddf208c406c" +dependencies = [ + "autocfg", +] + [[package]] name = "miniz_oxide" version = "0.6.2" @@ -1872,18 +1862,18 @@ dependencies = [ [[package]] name = "object" -version = "0.30.3" +version = "0.30.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea86265d3d3dcb6a27fc51bd29a4bf387fae9d2986b823079d4986af253eb439" +checksum = "03b4680b86d9cfafba8fc491dc9b6df26b68cf40e9e6cd73909194759a63c385" dependencies = [ "memchr", ] [[package]] name = "once_cell" -version = "1.17.1" +version = "1.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7e5500299e16ebb147ae15a00a942af264cf3688f47923b8fc2cd5858f23ad3" +checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" [[package]] name = "open" @@ -1919,9 +1909,9 @@ checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" [[package]] name = "pango" -version = "0.17.4" +version = "0.17.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52c280b82a881e4208afb3359a8e7fde27a1b272280981f1f34610bed5770d37" +checksum = "35be456fc620e61f62dff7ff70fbd54dcbaf0a4b920c0f16de1107c47d921d48" dependencies = [ "bitflags", "gio", @@ -1933,9 +1923,9 @@ dependencies = [ [[package]] name = "pango-sys" -version = "0.17.0" +version = "0.17.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4293d0f0b5525eb5c24734d30b0ed02cd02aa734f216883f376b54de49625de8" +checksum = "3da69f9f3850b0d8990d462f8c709561975e95f689c1cdf0fecdebde78b35195" dependencies = [ "glib-sys", "gobject-sys", @@ -1949,6 +1939,29 @@ version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "14f2252c834a40ed9bb5422029649578e63aa341ac401f74e719dd1afda8394e" +[[package]] +name = "parking_lot" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" +dependencies = [ + "lock_api", + "parking_lot_core", +] + +[[package]] +name = "parking_lot_core" +version = "0.9.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93f00c865fe7cabf650081affecd3871070f26767e7b2070a3ffae14c654b447" +dependencies = [ + "cfg-if", + "libc", + "redox_syscall 0.3.5", + "smallvec", + "windows-targets 0.48.0", +] + [[package]] name = "password-hash" version = "0.4.2" @@ -1980,9 +1993,9 @@ dependencies = [ [[package]] name = "percent-encoding" -version = "2.2.0" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "478c572c3d73181ff3c2539045f6eb99e5491218eae919370993b890cdbdd98e" +checksum = "9b2a4787296e9989611394c33f193f676704af1686e70b8f8033ab5ba9a35a94" [[package]] name = "pin-project" @@ -2001,7 +2014,7 @@ checksum = "39407670928234ebc5e6e580247dd567ad73a3578460c5990f9503df207e8f07" dependencies = [ "proc-macro2", "quote", - "syn 2.0.16", + "syn 2.0.18", ] [[package]] @@ -2092,18 +2105,18 @@ checksum = "dc375e1527247fe1a97d8b7156678dfe7c1af2fc075c9a4db3690ecd2a148068" [[package]] name = "proc-macro2" -version = "1.0.58" +version = "1.0.60" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa1fb82fc0c281dd9671101b66b771ebbe1eaf967b96ac8740dcba4b70005ca8" +checksum = "dec2b086b7a862cf4de201096214fa870344cf922b2b30c167badb3af3195406" dependencies = [ "unicode-ident", ] [[package]] name = "quote" -version = "1.0.27" +version = "1.0.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f4f29d145265ec1c483c7c654450edde0bfe043d3938d6972630663356d9500" +checksum = "1b9ab9c7eadfd8df19006f1cf1a4aed13540ed5cbc047010ece5826e10825488" dependencies = [ "proc-macro2", ] @@ -2186,11 +2199,11 @@ dependencies = [ [[package]] name = "regex" -version = "1.8.2" +version = "1.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d1a59b5d8e97dee33696bf13c5ba8ab85341c002922fba050069326b9c498974" +checksum = "d0ab3ca65655bb1e41f2a8c8cd662eb4fb035e67c3f78da1d61dffe89d07300f" dependencies = [ - "aho-corasick 1.0.1", + "aho-corasick 1.0.2", "memchr", "regex-syntax", ] @@ -2221,13 +2234,13 @@ dependencies = [ [[package]] name = "relm4-macros" -version = "0.6.0-beta.1" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fa06febb3685960e7c1c44e21e44a3829325940b31d1e91391a43c32020c201" +checksum = "848a6e1b4954b7aa8155d4a234516d46ed543a614666adc1ea73a922bc841e2a" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.18", ] [[package]] @@ -2335,7 +2348,7 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d194b56d58803a43635bdc398cd17e383d6f71f9182b9a192c127ca42494a59b" dependencies = [ - "base64 0.21.1", + "base64 0.21.2", ] [[package]] @@ -2415,22 +2428,22 @@ checksum = "bebd363326d05ec3e2f532ab7660680f3b02130d780c299bca73469d521bc0ed" [[package]] name = "serde" -version = "1.0.163" +version = "1.0.164" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2113ab51b87a539ae008b5c6c02dc020ffa39afd2d83cffcb3f4eb2722cebec2" +checksum = "9e8c8cf938e98f769bc164923b06dce91cea1751522f46f8466461af04c9027d" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.163" +version = "1.0.164" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c805777e3930c8883389c602315a24224bcc738b63905ef87cd1420353ea93e" +checksum = "d9735b638ccc51c28bf6914d90a2e9725b377144fc612c49a611fddd1b631d68" dependencies = [ "proc-macro2", "quote", - "syn 2.0.16", + "syn 2.0.18", ] [[package]] @@ -2452,7 +2465,7 @@ checksum = "bcec881020c684085e55a25f7fd888954d56609ef363479dc5a1305eb0d40cab" dependencies = [ "proc-macro2", "quote", - "syn 2.0.16", + "syn 2.0.18", ] [[package]] @@ -2598,9 +2611,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.16" +version = "2.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6f671d4b5ffdb8eadec19c0ae67fe2639df8684bd7bc4b83d986b8db549cf01" +checksum = "32d41677bcbe24c20c52e7c70b0d8db04134c5d1066bf98662e2871ad200ea3e" dependencies = [ "proc-macro2", "quote", @@ -2609,9 +2622,9 @@ dependencies = [ [[package]] name = "sysinfo" -version = "0.29.0" +version = "0.29.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02f1dc6930a439cc5d154221b5387d153f8183529b07c19aca24ea31e0a167e1" +checksum = "9557d0845b86eea8182f7b10dff120214fb6cd9fd937b6f4917714e546a38695" dependencies = [ "cfg-if", "core-foundation-sys", @@ -2654,15 +2667,16 @@ checksum = "fd1ba337640d60c3e96bc6f0638a939b9c9a7f2c316a1598c279828b3d1dc8c5" [[package]] name = "tempfile" -version = "3.5.0" +version = "3.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9fbec84f381d5795b08656e4912bec604d162bff9291d6189a78f4c8ab87998" +checksum = "31c0432476357e58790aaa47a8efb0c5138f137343f3b5f23bd36a27e3b0a6d6" dependencies = [ + "autocfg", "cfg-if", "fastrand", "redox_syscall 0.3.5", "rustix", - "windows-sys 0.45.0", + "windows-sys 0.48.0", ] [[package]] @@ -2682,7 +2696,7 @@ checksum = "f9456a42c5b0d803c8cd86e73dd7cc9edd429499f37a3550d286d5e86720569f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.16", + "syn 2.0.18", ] [[package]] @@ -2697,9 +2711,9 @@ dependencies = [ [[package]] name = "time" -version = "0.3.21" +version = "0.3.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f3403384eaacbca9923fa06940178ac13e4edb725486d70e8e15881d0c836cc" +checksum = "ea9e1b3cf1243ae005d9e74085d4d542f3125458f3a81af210d901dcd7411efd" dependencies = [ "serde", "time-core", @@ -2737,12 +2751,13 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.28.1" +version = "1.28.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0aa32867d44e6f2ce3385e89dceb990188b8bb0fb25b0cf576647a6f98ac5105" +checksum = "94d7b1cfd2aa4011f2de74c2c4c63665e27a71006b0a192dcd2710272e73dfa2" dependencies = [ "autocfg", "num_cpus", + "parking_lot", "pin-project-lite", "tokio-macros", "windows-sys 0.48.0", @@ -2756,7 +2771,7 @@ checksum = "630bdcf245f78637c13ec01ffae6187cca34625e8c63150d424b59e55af2675e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.16", + "syn 2.0.18", ] [[package]] @@ -2813,7 +2828,7 @@ checksum = "0f57e3ca2a01450b1a921183a9c9cbfda207fd822cef4ccb00a65402cbba7a74" dependencies = [ "proc-macro2", "quote", - "syn 2.0.16", + "syn 2.0.18", ] [[package]] @@ -2948,9 +2963,9 @@ checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" [[package]] name = "url" -version = "2.3.1" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d68c799ae75762b8c3fe375feb6600ef5602c883c5d21eb51c09f22b83c4643" +checksum = "50bff7831e19200a85b17131d085c25d7811bc4e186efdaf54bbd132994a88cb" dependencies = [ "form_urlencoded", "idna", @@ -2981,13 +2996,9 @@ checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" [[package]] name = "value-bag" -version = "1.0.0-alpha.9" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2209b78d1249f7e6f3293657c9779fe31ced465df091bbd433a1cf88e916ec55" -dependencies = [ - "ctor", - "version_check", -] +checksum = "a4d330786735ea358f3bc09eea4caa098569c1c93f342d9aca0514915022fe7e" [[package]] name = "version-compare" @@ -3044,7 +3055,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.16", + "syn 2.0.18", "wasm-bindgen-shared", ] @@ -3078,7 +3089,7 @@ checksum = "e128beba882dd1eb6200e1dc92ae6c5dbaa4311aa7bb211ca035779e5efc39f8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.16", + "syn 2.0.18", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -3157,9 +3168,13 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] name = "wincompatlib" -version = "0.4.1" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3096bb9e88e30abe60a159e8fd55ad2ba140b389e67f3814b10db93303f70df8" +checksum = "d5f1df70b617ad08dc336d13f1c7998a95781313fd6a0bffa1f45857c8254581" +dependencies = [ + "anyhow", + "minreq", +] [[package]] name = "windows" @@ -3185,15 +3200,6 @@ dependencies = [ "windows_x86_64_msvc 0.42.2", ] -[[package]] -name = "windows-sys" -version = "0.45.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" -dependencies = [ - "windows-targets 0.42.2", -] - [[package]] name = "windows-sys" version = "0.48.0" diff --git a/Cargo.toml b/Cargo.toml index 7627503..b03b915 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -17,7 +17,7 @@ glib-build-tools = "0.17" [dependencies.anime-launcher-sdk] git = "https://github.com/an-anime-team/anime-launcher-sdk" -tag = "1.4.5" +tag = "1.6.3" features = ["all", "genshin"] # path = "../anime-launcher-sdk" # ! for dev purposes only @@ -34,7 +34,7 @@ whatadistro = "0.1.0" serde_json = "1.0" anyhow = "1.0" lazy_static = "1.4.0" -cached = { version = "0.43", features = ["proc_macro"] } +cached = { version = "0.44", features = ["proc_macro"] } md-5 = { version = "0.10", features = ["asm"] } tracing = "0.1" diff --git a/src/ui/components/group.rs b/src/ui/components/group.rs index 98f9712..966e3b6 100644 --- a/src/ui/components/group.rs +++ b/src/ui/components/group.rs @@ -1,9 +1,12 @@ +use std::path::PathBuf; + use relm4::prelude::*; use relm4::component::*; use adw::prelude::*; -use std::path::PathBuf; +use super::ComponentsListMsg; +use super::ComponentVersionMsg; pub struct ComponentGroup { pub title: String, @@ -13,7 +16,7 @@ pub struct ComponentGroup { } #[derive(Debug)] -pub enum AppMsg { +pub enum ComponentGroupMsg { ShowRecommendedOnly(bool), CallOnDownloaded, CallOnDeleted @@ -22,8 +25,8 @@ pub enum AppMsg { #[relm4::component(async, pub)] impl SimpleAsyncComponent for ComponentGroup { type Init = (super::ComponentsListGroup, PathBuf); - type Input = AppMsg; - type Output = super::list::AppMsg; + type Input = ComponentGroupMsg; + type Output = super::list::ComponentsListMsg; view! { group = adw::ExpanderRow { @@ -61,23 +64,23 @@ impl SimpleAsyncComponent for ComponentGroup { async fn update(&mut self, msg: Self::Input, sender: AsyncComponentSender) { match msg { - AppMsg::ShowRecommendedOnly(state) => { + ComponentGroupMsg::ShowRecommendedOnly(state) => { self.show_recommended_only = state; // todo for version in &self.versions { - version.sender().send(super::version::AppMsg::ShowRecommendedOnly(state)).unwrap(); + version.sender().send(ComponentVersionMsg::ShowRecommendedOnly(state)).unwrap(); } } #[allow(unused_must_use)] - AppMsg::CallOnDownloaded => { - sender.output(super::list::AppMsg::CallOnDownloaded); + ComponentGroupMsg::CallOnDownloaded => { + sender.output(ComponentsListMsg::CallOnDownloaded); } #[allow(unused_must_use)] - AppMsg::CallOnDeleted => { - sender.output(super::list::AppMsg::CallOnDeleted); + ComponentGroupMsg::CallOnDeleted => { + sender.output(ComponentsListMsg::CallOnDeleted); } } } diff --git a/src/ui/components/list.rs b/src/ui/components/list.rs index d9894e8..1289c24 100644 --- a/src/ui/components/list.rs +++ b/src/ui/components/list.rs @@ -3,6 +3,8 @@ use relm4::component::*; use adw::prelude::*; +use super::ComponentGroupMsg; + #[derive(Debug, Clone)] pub struct ComponentsListInit { pub pattern: super::ComponentsListPattern, @@ -18,7 +20,7 @@ pub struct ComponentsList { } #[derive(Debug)] -pub enum AppMsg { +pub enum ComponentsListMsg { ShowRecommendedOnly(bool), CallOnDownloaded, CallOnDeleted @@ -27,7 +29,7 @@ pub enum AppMsg { #[relm4::component(async, pub)] impl SimpleAsyncComponent for ComponentsList { type Init = ComponentsListInit; - type Input = AppMsg; + type Input = ComponentsListMsg; type Output = T; view! { @@ -66,22 +68,22 @@ impl SimpleAsyncComponent for ComponentsLi async fn update(&mut self, msg: Self::Input, sender: AsyncComponentSender) { match msg { - AppMsg::ShowRecommendedOnly(state) => { + ComponentsListMsg::ShowRecommendedOnly(state) => { self.show_recommended_only = state; // todo for group in &self.groups { - group.sender().send(super::group::AppMsg::ShowRecommendedOnly(state)).unwrap(); + group.sender().send(ComponentGroupMsg::ShowRecommendedOnly(state)).unwrap(); } } #[allow(unused_must_use)] - AppMsg::CallOnDownloaded => if let Some(on_downloaded) = &self.init.on_downloaded { + ComponentsListMsg::CallOnDownloaded => if let Some(on_downloaded) = &self.init.on_downloaded { sender.output(on_downloaded.to_owned()); } #[allow(unused_must_use)] - AppMsg::CallOnDeleted => if let Some(on_deleted) = &self.init.on_deleted { + ComponentsListMsg::CallOnDeleted => if let Some(on_deleted) = &self.init.on_deleted { sender.output(on_deleted.to_owned()); } } diff --git a/src/ui/components/mod.rs b/src/ui/components/mod.rs index 2e81eac..9a0269e 100644 --- a/src/ui/components/mod.rs +++ b/src/ui/components/mod.rs @@ -1,3 +1,5 @@ +use std::path::PathBuf; + pub mod list; pub mod group; pub mod version; @@ -10,8 +12,6 @@ pub use progress_bar::*; use anime_launcher_sdk::components::*; -use std::path::PathBuf; - #[derive(Debug, Clone, PartialEq, Eq)] pub struct ComponentsListPattern { pub download_folder: PathBuf, diff --git a/src/ui/components/progress_bar.rs b/src/ui/components/progress_bar.rs index d4734fb..d40ca8d 100644 --- a/src/ui/components/progress_bar.rs +++ b/src/ui/components/progress_bar.rs @@ -132,7 +132,9 @@ impl SimpleAsyncComponent for ProgressBar { ProgressBarMsg::UpdateFromState(state) => { match state { - DiffUpdate::InstallerUpdate(InstallerUpdate::CheckingFreeSpace(_)) => self.caption = Some(tr("checking-free-space")), + DiffUpdate::CheckingFreeSpace(_) | + DiffUpdate::InstallerUpdate(InstallerUpdate::CheckingFreeSpace(_)) => self.caption = Some(tr("checking-free-space")), + DiffUpdate::InstallerUpdate(InstallerUpdate::DownloadingStarted(_)) => self.caption = Some(tr("downloading")), DiffUpdate::InstallerUpdate(InstallerUpdate::UnpackingStarted(_)) => self.caption = Some(tr("unpacking")), diff --git a/src/ui/components/version.rs b/src/ui/components/version.rs index d1a222d..1b3afb3 100644 --- a/src/ui/components/version.rs +++ b/src/ui/components/version.rs @@ -1,3 +1,5 @@ +use std::path::PathBuf; + use relm4::prelude::*; use relm4::component::*; @@ -12,8 +14,7 @@ use anime_launcher_sdk::anime_game_core::genshin::prelude::*; use anime_launcher_sdk::config::ConfigExt; use anime_launcher_sdk::genshin::config::Config; -use std::path::PathBuf; - +use super::ComponentGroupMsg; use super::progress_bar::ProgressBarMsg; #[derive(Debug, Clone, PartialEq, Eq)] @@ -38,7 +39,7 @@ pub struct ComponentVersion { } #[derive(Debug)] -pub enum AppMsg { +pub enum ComponentVersionMsg { ShowRecommendedOnly(bool), PerformAction, SetState(VersionState) @@ -47,8 +48,8 @@ pub enum AppMsg { #[relm4::component(async, pub)] impl SimpleAsyncComponent for ComponentVersion { type Init = (super::ComponentsListVersion, PathBuf); - type Input = AppMsg; - type Output = super::group::AppMsg; + type Input = ComponentVersionMsg; + type Output = ComponentGroupMsg; view! { row = adw::ActionRow { @@ -72,7 +73,7 @@ impl SimpleAsyncComponent for ComponentVersion { #[watch] set_visible: model.state != VersionState::Downloading, - connect_clicked => AppMsg::PerformAction + connect_clicked => ComponentVersionMsg::PerformAction } } } @@ -122,9 +123,9 @@ impl SimpleAsyncComponent for ComponentVersion { async fn update(&mut self, msg: Self::Input, sender: AsyncComponentSender) { match msg { - AppMsg::ShowRecommendedOnly(state) => self.show_recommended_only = state, + ComponentVersionMsg::ShowRecommendedOnly(state) => self.show_recommended_only = state, - AppMsg::PerformAction => { + ComponentVersionMsg::PerformAction => { match self.state { VersionState::Downloaded => { let path = self.download_folder.join(&self.name); @@ -140,7 +141,7 @@ impl SimpleAsyncComponent for ComponentVersion { self.state = VersionState::NotDownloaded; #[allow(unused_must_use)] { - sender.output(super::group::AppMsg::CallOnDeleted); + sender.output(ComponentGroupMsg::CallOnDeleted); } } @@ -168,12 +169,12 @@ impl SimpleAsyncComponent for ComponentVersion { progress_bar_sender.send(ProgressBarMsg::SetVisible(false)); if let InstallerUpdate::UnpackingFinished = &state { - sender.input(AppMsg::SetState(VersionState::Downloaded)); - sender.output(super::group::AppMsg::CallOnDownloaded); + sender.input(ComponentVersionMsg::SetState(VersionState::Downloaded)); + sender.output(ComponentGroupMsg::CallOnDownloaded); } else { - sender.input(AppMsg::SetState(VersionState::NotDownloaded)); + sender.input(ComponentVersionMsg::SetState(VersionState::NotDownloaded)); } }, @@ -190,7 +191,7 @@ impl SimpleAsyncComponent for ComponentVersion { } } - AppMsg::SetState(state) => self.state = state + ComponentVersionMsg::SetState(state) => self.state = state } } } diff --git a/src/ui/first_run/download_components.rs b/src/ui/first_run/download_components.rs index 4c0b328..ee70fdb 100644 --- a/src/ui/first_run/download_components.rs +++ b/src/ui/first_run/download_components.rs @@ -1,3 +1,5 @@ +use std::path::PathBuf; + use relm4::prelude::*; use relm4::component::*; @@ -7,13 +9,11 @@ use anime_launcher_sdk::anime_game_core::prelude::*; use anime_launcher_sdk::wincompatlib::prelude::*; use anime_launcher_sdk::components::*; -use anime_launcher_sdk::components::wine::WincompatlibWine; +use anime_launcher_sdk::components::wine::UnifiedWine; use anime_launcher_sdk::config::ConfigExt; use anime_launcher_sdk::genshin::config::Config; -use std::path::PathBuf; - use super::main::FirstRunAppMsg; use crate::ui::components::*; use crate::i18n::*; @@ -435,6 +435,8 @@ impl SimpleAsyncComponent for DownloadComponentsApp { } } + // TODO: perhaps I could re-use main/create_prefix.rs here? + #[allow(unused_must_use)] DownloadComponentsAppMsg::CreatePrefix => { self.downloading_wine = Some(true); @@ -453,7 +455,7 @@ impl SimpleAsyncComponent for DownloadComponentsApp { .with_arch(WineArch::Win64); std::thread::spawn(move || { - match wine.update_prefix::<&str>(None) { + match wine.init_prefix(None::<&str>) { // Download DXVK Ok(_) => sender.input(DownloadComponentsAppMsg::DownloadDXVK), @@ -576,7 +578,7 @@ impl SimpleAsyncComponent for DownloadComponentsApp { ..InstallParams::default() }; - let WincompatlibWine::Default(wine) = wine else { + let UnifiedWine::Default(wine) = wine else { sender.input(DownloadComponentsAppMsg::Continue); return; diff --git a/src/ui/main/create_prefix.rs b/src/ui/main/create_prefix.rs index 62d6cb1..ebe3d3a 100644 --- a/src/ui/main/create_prefix.rs +++ b/src/ui/main/create_prefix.rs @@ -22,7 +22,7 @@ pub fn create_prefix(sender: ComponentSender) { .with_loader(WineLoader::Current) .with_arch(WineArch::Win64); - if let Err(err) = wine.update_prefix::<&str>(None) { + if let Err(err) = wine.init_prefix(None::<&str>) { tracing::error!("Failed to create wine prefix"); sender.input(AppMsg::Toast { diff --git a/src/ui/preferences/general/components.rs b/src/ui/preferences/general/components.rs index a26ae77..17a12a1 100644 --- a/src/ui/preferences/general/components.rs +++ b/src/ui/preferences/general/components.rs @@ -7,13 +7,11 @@ use adw::prelude::*; use anime_launcher_sdk::wincompatlib::prelude::*; use anime_launcher_sdk::components::*; -use anime_launcher_sdk::components::wine::WincompatlibWine; +use anime_launcher_sdk::components::wine::UnifiedWine; use super::GeneralAppMsg; -use crate::ui::components; use crate::ui::components::*; - use crate::i18n::*; use crate::*; @@ -345,12 +343,12 @@ impl SimpleAsyncComponent for ComponentsPage { match msg { ComponentsPageMsg::WineRecommendedOnly(state) => { // todo - self.wine_components.sender().send(components::list::AppMsg::ShowRecommendedOnly(state)).unwrap(); + self.wine_components.sender().send(ComponentsListMsg::ShowRecommendedOnly(state)).unwrap(); } ComponentsPageMsg::DxvkRecommendedOnly(state) => { // todo - self.dxvk_components.sender().send(components::list::AppMsg::ShowRecommendedOnly(state)).unwrap(); + self.dxvk_components.sender().send(ComponentsListMsg::ShowRecommendedOnly(state)).unwrap(); } ComponentsPageMsg::UpdateDownloadedWine => { @@ -426,7 +424,7 @@ impl SimpleAsyncComponent for ComponentsPage { let wine_name = version.name.to_string(); std::thread::spawn(move || { - match wine.update_prefix::<&str>(None) { + match wine.update_prefix(None::<&str>) { Ok(_) => { config.game.wine.selected = Some(wine_name); @@ -463,8 +461,8 @@ impl SimpleAsyncComponent for ComponentsPage { let mut wine = match config.get_selected_wine() { Ok(Some(version)) => { match version.to_wine(config.components.path, Some(config.game.wine.builds.join(&version.name))) { - WincompatlibWine::Default(wine) => wine, - WincompatlibWine::Proton(_) => return + UnifiedWine::Default(wine) => wine, + UnifiedWine::Proton(_) => return } } diff --git a/src/ui/preferences/general/mod.rs b/src/ui/preferences/general/mod.rs index b7010a7..7e97043 100644 --- a/src/ui/preferences/general/mod.rs +++ b/src/ui/preferences/general/mod.rs @@ -21,6 +21,7 @@ use anime_launcher_sdk::genshin::env_emulation::Environment; pub mod components; use components::*; + use super::main::PreferencesAppMsg; use crate::ui::migrate_installation::MigrateInstallationApp;