diff --git a/Cargo.lock b/Cargo.lock index a61a83d..00c0313 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4,9 +4,9 @@ version = 3 [[package]] name = "ab_glyph" -version = "0.2.21" +version = "0.2.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5110f1c78cf582855d895ecd0746b653db010cec6d9f5575293f27934d980a39" +checksum = "b1061f3ff92c2f65800df1f12fc7b4ff44ee14783104187dd04dfee6f11b0fd2" dependencies = [ "ab_glyph_rasterizer", "owned_ttf_parser", @@ -18,6 +18,15 @@ version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c71b1793ee61086797f5c80b6efa2b8ffa6d5dd703f118545808a7f2e27f7046" +[[package]] +name = "addr2line" +version = "0.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" +dependencies = [ + "gimli", +] + [[package]] name = "adler" version = "1.0.2" @@ -26,15 +35,21 @@ checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" [[package]] name = "ahash" -version = "0.7.6" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcb51a0695d8f838b1ee009b3fbf66bda078cd64590202a864a8f3e8c4315c47" +checksum = "2c99f64d1e06488f620f932677e24bc6e2897582980441ae90a671415bd7ec2f" dependencies = [ - "getrandom", + "cfg-if", "once_cell", "version_check", ] +[[package]] +name = "allocator-api2" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0942ffc6dcaadf03badf6e6a2d0228460359d5e34b57ccdc720b7382dfbd5ec5" + [[package]] name = "android_system_properties" version = "0.1.5" @@ -55,30 +70,29 @@ dependencies = [ [[package]] name = "anstream" -version = "0.3.2" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ca84f3628370c59db74ee214b3263d58f9aadd9b4fe7e711fd87dc452b7f163" +checksum = "2ab91ebe16eb252986481c5b62f6098f3b698a45e34b5b98200cf20dd2484a44" dependencies = [ "anstyle", "anstyle-parse", "anstyle-query", "anstyle-wincon", "colorchoice", - "is-terminal", "utf8parse", ] [[package]] name = "anstyle" -version = "1.0.0" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41ed9a86bf92ae6580e0a31281f65a1b1d867c0cc68d5346e2ae128dddfa6a7d" +checksum = "7079075b41f533b8c61d2a4d073c4676e1f8b249ff94a393b0595db304e0dd87" [[package]] name = "anstyle-parse" -version = "0.2.0" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e765fd216e48e067936442276d1d57399e37bce53c264d6fefbe298080cb57ee" +checksum = "317b9a89c1868f5ea6ff1d9539a69f45dffc21ce321ac1fd1160dfa48c8e2140" dependencies = [ "utf8parse", ] @@ -94,9 +108,9 @@ dependencies = [ [[package]] name = "anstyle-wincon" -version = "1.0.1" +version = "3.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "180abfa45703aebe0093f79badacc01b8fd4ea2e35118747e5811127f926e188" +checksum = "f0699d10d2f4d628a98ee7b57b289abbc98ff3bad977cb3152709d4bf2330628" dependencies = [ "anstyle", "windows-sys 0.48.0", @@ -104,9 +118,45 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.71" +version = "1.0.75" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4668cab20f66d8d020e1fbc0ebe47217433c1b6c8f2040faf858554e394ace6" + +[[package]] +name = "approx" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c7d0618f0e0b7e8ff11427422b64564d5fb0be1940354bfe2e0529b18a9d9b8" +checksum = "cab112f0a86d568ea0e627cc1d6be74a1e9cd55214684db5561995f6dad897c6" +dependencies = [ + "num-traits", +] + +[[package]] +name = "arrayref" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b4930d2cb77ce62f89ee5d5289b4ac049559b1c45539271f5ed4fdc7db34545" + +[[package]] +name = "arrayvec" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23b62fc65de8e4e7f52534fb52b0f3ed04746ae267519eef2a83941e8085068b" + +[[package]] +name = "arrayvec" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" + +[[package]] +name = "ash" +version = "0.37.3+1.3.251" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "39e9c3835d686b0a6084ab4234fcd1b07dbf6e4767dce60874b12356a25ecd4a" +dependencies = [ + "libloading 0.7.4", +] [[package]] name = "atty" @@ -125,11 +175,26 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" +[[package]] +name = "backtrace" +version = "0.3.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2089b7e3f35b9dd2d0ed921ead4f6d318c27680d4a5bd167b3ee120edb105837" +dependencies = [ + "addr2line", + "cc", + "cfg-if", + "libc", + "miniz_oxide", + "object", + "rustc-demangle", +] + [[package]] name = "base64" -version = "0.21.2" +version = "0.21.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "604178f6c5c21f02dc555784810edfb88d34ac2c73b2eae109655649ee73ce3d" +checksum = "9ba43ea6f343b788c8764558649e08df62f86c6ef251fdaeb1ffd010a9ae50a2" [[package]] name = "bit-set" @@ -152,6 +217,12 @@ version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" +[[package]] +name = "bitflags" +version = "2.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "327762f6e5a765692301e5bb513e0d9fef63be86bbc14528052b1cd3e6f03e07" + [[package]] name = "block" version = "0.1.6" @@ -169,22 +240,49 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.13.0" +version = "3.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3e2c3daef883ecc1b5d58c15adae93470a91d425f3532ba1695849656af3fc1" +checksum = "7f30e7476521f6f8af1a1c4c0b8cc94f0bee37d91763d0ca2665f299b6cd8aec" + +[[package]] +name = "bytemuck" +version = "1.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "374d28ec25809ee0e23827c2ab573d729e293f281dfe393500e7ad618baa61c6" +dependencies = [ + "bytemuck_derive", +] + +[[package]] +name = "bytemuck_derive" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "965ab7eb5f8f97d2a083c799f3a1b994fc397b2fe2da5d1da1626ce15a39f2b1" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.38", +] + +[[package]] +name = "byteorder" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.4.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89b2fd2a0dcf38d7971e2194b6b6eebab45ae01067456a7fd93d5547a61b70be" +checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223" [[package]] name = "calloop" -version = "0.10.5" +version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a59225be45a478d772ce015d9743e49e92798ece9e34eda9a6aa2a6a7f40192" +checksum = "52e0d00eb1ea24371a97d2da6201c6747a633dc6dc1988ef503403b4c59504a8" dependencies = [ + "bitflags 1.3.2", "log", "nix 0.25.1", "slotmap", @@ -194,9 +292,12 @@ dependencies = [ [[package]] name = "cc" -version = "1.0.79" +version = "1.0.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50d30906286121d95be3d479533b458f87493b30a4b5f79a607db8f5d11aa91f" +checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" +dependencies = [ + "libc", +] [[package]] name = "cfg-if" @@ -218,7 +319,7 @@ checksum = "a0610544180c38b88101fecf2dd634b174a62eef6946f84dfc6a7127512b381c" dependencies = [ "ansi_term", "atty", - "bitflags", + "bitflags 1.3.2", "strsim 0.8.0", "textwrap", "unicode-width", @@ -227,45 +328,133 @@ dependencies = [ [[package]] name = "clap" -version = "4.3.4" +version = "4.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80672091db20273a15cf9fdd4e47ed43b5091ec9841bf4c6145c9dfbbcae09ed" +checksum = "d04704f56c2cde07f43e8e2c154b43f216dc5c92fc98ada720177362f953b956" dependencies = [ "clap_builder", "clap_derive", - "once_cell", ] [[package]] name = "clap_builder" -version = "4.3.4" +version = "4.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1458a1df40e1e2afebb7ab60ce55c1fa8f431146205aa5f4887e0b111c27636" +checksum = "0e231faeaca65ebd1ea3c737966bf858971cd38c3849107aa3ea7de90a804e45" dependencies = [ "anstream", "anstyle", - "bitflags", "clap_lex", "strsim 0.10.0", ] [[package]] name = "clap_derive" -version = "4.3.2" +version = "4.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8cd2b2a819ad6eec39e8f1d6b53001af1e5469f8c177579cdaeb313115b825f" +checksum = "0862016ff20d69b84ef8247369fabf5c008a7417002411897d40ee1f4532b873" dependencies = [ "heck 0.4.1", "proc-macro2", "quote", - "syn 2.0.18", + "syn 2.0.38", ] [[package]] name = "clap_lex" -version = "0.5.0" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd7cc57abe963c6d3b9d8be5b06ba7c8957a930305ca90304f24ef040aa6f961" + +[[package]] +name = "clipboard-win" +version = "4.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7191c27c2357d9b7ef96baac1773290d4ca63b24205b82a3fd8a0637afcf0362" +dependencies = [ + "error-code", + "str-buf", + "winapi", +] + +[[package]] +name = "clipboard_macos" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2da6da31387c7e4ef160ffab6d5e7f00c42626fe39aea70a7b0f1773f7dd6c1b" +checksum = "145a7f9e9b89453bc0a5e32d166456405d389cea5b578f57f1274b1397588a95" +dependencies = [ + "objc", + "objc-foundation", + "objc_id", +] + +[[package]] +name = "clipboard_wayland" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f6364a9f7a66f2ac1a1a098aa1c7f6b686f2496c6ac5e5c0d773445df912747" +dependencies = [ + "smithay-clipboard", +] + +[[package]] +name = "clipboard_x11" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "983a7010836ecd04dde2c6d27a0cb56ec5d21572177e782bdcb24a600124e921" +dependencies = [ + "thiserror", + "x11rb", +] + +[[package]] +name = "cmake" +version = "0.1.50" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a31c789563b815f77f4250caee12365734369f942439b7defd71e18a48197130" +dependencies = [ + "cc", +] + +[[package]] +name = "cocoa" +version = "0.24.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f425db7937052c684daec3bd6375c8abe2d146dca4b8b143d6db777c39138f3a" +dependencies = [ + "bitflags 1.3.2", + "block", + "cocoa-foundation", + "core-foundation", + "core-graphics", + "foreign-types 0.3.2", + "libc", + "objc", +] + +[[package]] +name = "cocoa-foundation" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c6234cbb2e4c785b456c0644748b1ac416dd045799740356f8363dfe00c93f7" +dependencies = [ + "bitflags 1.3.2", + "block", + "core-foundation", + "core-graphics-types", + "libc", + "objc", +] + +[[package]] +name = "codespan-reporting" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3538270d33cc669650c4b093848450d380def10c331d38c768e34cac80576e6e" +dependencies = [ + "termcolor", + "unicode-width", +] [[package]] name = "colorchoice" @@ -287,10 +476,68 @@ dependencies = [ ] [[package]] -name = "cpufeatures" +name = "const_panic" version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03e69e28e9f7f77debdedbaafa2866e1de9ba56df55a8bd7cfc724c25a09987c" +checksum = "6051f239ecec86fde3410901ab7860d458d160371533842974fc61f96d15879b" + +[[package]] +name = "core-foundation" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "194a7a9e6de53fa55116934067c844d9d749312f75c6f6d0980e8c252f8c2146" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "core-foundation-sys" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e496a50fda8aacccc86d7529e2c1e0892dbd0f898a6b5645b5561b89c3210efa" + +[[package]] +name = "core-graphics" +version = "0.22.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2581bbab3b8ffc6fcbd550bf46c355135d16e9ff2a6ea032ad6b9bf1d7efe4fb" +dependencies = [ + "bitflags 1.3.2", + "core-foundation", + "core-graphics-types", + "foreign-types 0.3.2", + "libc", +] + +[[package]] +name = "core-graphics-types" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2bb142d41022986c1d8ff29103a1411c8a3dfad3552f87a4f8dc50d61d4f4e33" +dependencies = [ + "bitflags 1.3.2", + "core-foundation", + "libc", +] + +[[package]] +name = "core-text" +version = "19.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "99d74ada66e07c1cefa18f8abfba765b486f250de2e4a999e5727fc0dd4b4a25" +dependencies = [ + "core-foundation", + "core-graphics", + "foreign-types 0.3.2", + "libc", +] + +[[package]] +name = "cpufeatures" +version = "0.2.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a17b76ff3a4162b0b27f354a0c87015ddad39d35f9c0c36607a3bdd175dde1f1" dependencies = [ "libc", ] @@ -327,22 +574,22 @@ dependencies = [ [[package]] name = "crossbeam-epoch" -version = "0.9.14" +version = "0.9.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46bd5f3f85273295a9d14aedfb86f6aadbff6d8f5295c4a9edb08e819dcf5695" +checksum = "ae211234986c545741a7dc064309f67ee1e5ad243d0e48335adc0484d960bcc7" dependencies = [ "autocfg", "cfg-if", "crossbeam-utils", - "memoffset 0.8.0", + "memoffset 0.9.0", "scopeguard", ] [[package]] name = "crossbeam-utils" -version = "0.8.15" +version = "0.8.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c063cd8cc95f5c377ed0d4b49a4b21f632396ff690e8470c29b3359b346984b" +checksum = "5a22b2d63d4d1dc0b7f1b6b2747dd0088008a9be28b6ddf0b1e7d335e3037294" dependencies = [ "cfg-if", ] @@ -392,8 +639,8 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "827914e1f53b1e0e025ecd3d967a7836b7bcb54520f90e21ef8df7b4d88a2759" dependencies = [ - "bitflags", - "libloading", + "bitflags 1.3.2", + "libloading 0.7.4", "winapi", ] @@ -463,17 +710,52 @@ dependencies = [ "windows-sys 0.48.0", ] +[[package]] +name = "dispatch" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd0c93bb4b0c6d9b77f4435b0ae98c24d17f1c45b2ff844c6151a07256ca923b" + +[[package]] +name = "dlib" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "330c60081dcc4c72131f8eb70510f1ac07223e5d4163db481a04a0befcffa412" +dependencies = [ + "libloading 0.8.1", +] + +[[package]] +name = "downcast-rs" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ea835d29036a4087793836fa931b08837ad5e957da9e23886b29586fb9b6650" + +[[package]] +name = "dwrote" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "439a1c2ba5611ad3ed731280541d36d2e9c4ac5e7fb818a27b604bdc5a6aa65b" +dependencies = [ + "lazy_static", + "libc", + "serde", + "serde_derive", + "winapi", + "wio", +] + [[package]] name = "dyn-clone" -version = "1.0.11" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68b0cf012f1230e43cd00ebb729c6bb58707ecfa8ad08b52ef3a4ccd2697fc30" +checksum = "23d2f3407d9a573d666de4b5bdf10569d73ca9478087346697dcbae6244bfbcd" [[package]] name = "either" -version = "1.8.1" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fcaabb2fef8c910e7f4c7ce9f67a1283a1715879a7c230ca9d6d1ae31f16d91" +checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" [[package]] name = "encase" @@ -515,33 +797,18 @@ checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f" [[package]] name = "encoding_rs" -version = "0.8.32" +version = "0.8.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "071a31f4ee85403370b58aca746f01041ede6f0da2730960ad001edc2b71b394" +checksum = "7268b386296a025e474d5140678f75d6de9493ae55a5d709eeb9dd08149945e1" dependencies = [ "cfg-if", ] [[package]] -name = "errno" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4bcfec3a70f97c962c307b2d2c56e358cf1d00b558d74262b5f929ee8cc7e73a" -dependencies = [ - "errno-dragonfly", - "libc", - "windows-sys 0.48.0", -] - -[[package]] -name = "errno-dragonfly" -version = "0.1.2" +name = "equivalent" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa68f1b12764fab894d2755d2518754e71b4fd80ecfb822714a1206c2aab39bf" -dependencies = [ - "cc", - "libc", -] +checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] name = "error-code" @@ -583,21 +850,30 @@ dependencies = [ [[package]] name = "filetime" -version = "0.2.21" +version = "0.2.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cbc844cecaee9d4443931972e1289c8ff485cb4cc2767cb03ca139ed6885153" +checksum = "d4029edd3e734da6fe05b6cd7bd2960760a616bd2ddd0d59a0124746d6272af0" dependencies = [ "cfg-if", "libc", - "redox_syscall", + "redox_syscall 0.3.5", "windows-sys 0.48.0", ] +[[package]] +name = "find-crate" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59a98bbaacea1c0eb6a0876280051b892eb73594fd90cf3b20e9c817029c57d2" +dependencies = [ + "toml", +] + [[package]] name = "flate2" -version = "1.0.26" +version = "1.0.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b9429470923de8e8cbd4d2dc513535400b4b3fef0319fb5c4e1f520a7bef743" +checksum = "46303f565772937ffe1d394a4fac6f411c6013172fadde9dcdb1e147a086940e" dependencies = [ "crc32fast", "miniz_oxide", @@ -636,7 +912,7 @@ checksum = "1a5c6c585bc94aaf2c7b51dd4c2ba22680844aba4c687be581871a6f518c5742" dependencies = [ "proc-macro2", "quote", - "syn 2.0.16", + "syn 2.0.38", ] [[package]] @@ -666,7 +942,7 @@ version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "74eadec9d0a5c28c54bb9882e54787275152a4e36ce206b45d7451384e5bf5fb" dependencies = [ - "bitflags", + "bitflags 1.3.2", "freetype-sys", "libc", ] @@ -739,7 +1015,7 @@ checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72" dependencies = [ "proc-macro2", "quote", - "syn 2.0.18", + "syn 2.0.38", ] [[package]] @@ -812,11 +1088,122 @@ dependencies = [ "wasi", ] +[[package]] +name = "gimli" +version = "0.28.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6fb8d784f27acf97159b40fc4db5ecd8aa23b9ad5ef69cdd136d3bc80665f0c0" + +[[package]] +name = "glam" +version = "0.21.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "518faa5064866338b013ff9b2350dc318e14cc4fcd6cb8206d7e7c9886c98815" + +[[package]] +name = "glow" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d8bd5877156a19b8ac83a29b2306fe20537429d318f3ff0a1a2119f8d9c61919" +dependencies = [ + "js-sys", + "slotmap", + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "glyph_brush" +version = "0.7.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a3676f482c536a985fca36ce320a5e5b8fafd7b260806742af1963b71c5dc38c" +dependencies = [ + "glyph_brush_draw_cache", + "glyph_brush_layout", + "ordered-float", + "rustc-hash", + "twox-hash", +] + +[[package]] +name = "glyph_brush_draw_cache" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6010675390f6889e09a21e2c8b575b3ee25667ea8237a8d59423f73cb8c28610" +dependencies = [ + "ab_glyph", + "crossbeam-channel", + "crossbeam-deque", + "linked-hash-map", + "rayon", + "rustc-hash", +] + +[[package]] +name = "glyph_brush_layout" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc32c2334f00ca5ac3695c5009ae35da21da8c62d255b5b96d56e2597a637a38" +dependencies = [ + "ab_glyph", + "approx", + "xi-unicode", +] + +[[package]] +name = "gpu-alloc" +version = "0.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22beaafc29b38204457ea030f6fb7a84c9e4dd1b86e311ba0542533453d87f62" +dependencies = [ + "bitflags 1.3.2", + "gpu-alloc-types", +] + +[[package]] +name = "gpu-alloc-types" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "54804d0d6bc9d7f26db4eaec1ad10def69b599315f487d32c334a80d1efe67a5" +dependencies = [ + "bitflags 1.3.2", +] + +[[package]] +name = "gpu-descriptor" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc11df1ace8e7e564511f53af41f3e42ddc95b56fd07b3f4445d2a6048bc682c" +dependencies = [ + "bitflags 2.4.1", + "gpu-descriptor-types", + "hashbrown 0.14.1", +] + +[[package]] +name = "gpu-descriptor-types" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6bf0b36e6f090b7e1d8a4b49c0cb81c1f8376f72198c65dd3ad9ff3556b8b78c" +dependencies = [ + "bitflags 2.4.1", +] + +[[package]] +name = "guillotiere" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b62d5865c036cb1393e23c50693df631d3f5d7bcca4c04fe4cc0fd592e74a782" +dependencies = [ + "euclid", + "svg_fmt", +] + [[package]] name = "h2" -version = "0.3.19" +version = "0.3.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d357c7ae988e7d2182f7d7871d0b963962420b0678b0997ce7de72001aeab782" +checksum = "91fc23aa11be92976ef4729127f1a74adf36d8436f7816b185d18df956790833" dependencies = [ "bytes", "fnv", @@ -824,7 +1211,7 @@ dependencies = [ "futures-sink", "futures-util", "http", - "indexmap", + "indexmap 1.9.3", "slab", "tokio", "tokio-util", @@ -836,8 +1223,15 @@ name = "hashbrown" version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" + +[[package]] +name = "hashbrown" +version = "0.14.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7dfda62a12f55daeae5015f81b0baea145391cb4520f86c248fc615d72640d12" dependencies = [ "ahash", + "allocator-api2", ] [[package]] @@ -866,18 +1260,9 @@ dependencies = [ [[package]] name = "hermit-abi" -version = "0.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee512640fe35acbfb4bb779db6f0d80704c2cacfa2e39b601ef3e3f47d1ae4c7" -dependencies = [ - "libc", -] - -[[package]] -name = "hermit-abi" -version = "0.3.1" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fed44880c466736ef9a5c5b5facefb5ed0785676d0c02d612db14e54f0d84286" +checksum = "d77f7ec81a6d05a3abb01ab6eb7590f6083d08449fe5a1c8b1e620283546ccb7" [[package]] name = "hex" @@ -927,15 +1312,15 @@ checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" [[package]] name = "httpdate" -version = "1.0.2" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4a1e36c821dbe04574f602848a19f742f4fb3c98d40449f11bcad18d6b17421" +checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" [[package]] name = "hyper" -version = "0.14.26" +version = "0.14.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab302d72a6f11a3b910431ff93aae7e773078c769f0a3ef15fb9ec692ed147d4" +checksum = "ffb1cfd654a8219eaef89881fdb3bb3b1cdc5fa75ded05d6933b2b382e395468" dependencies = [ "bytes", "futures-channel", @@ -948,7 +1333,7 @@ dependencies = [ "httpdate", "itoa", "pin-project-lite", - "socket2", + "socket2 0.4.9", "tokio", "tower-service", "tracing", @@ -957,10 +1342,11 @@ dependencies = [ [[package]] name = "hyper-rustls" -version = "0.24.0" +version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0646026eb1b3eea4cd9ba47912ea5ce9cc07713d105b1a14698f4e6433d348b7" +checksum = "8d78e1e73ec14cf7375674f74d7dde185c8206fd9dea6fb6295e8a98098aaa97" dependencies = [ + "futures-util", "http", "hyper", "rustls", @@ -989,7 +1375,7 @@ version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6ade666613eb8b621971a59cfae9e11ec051f32afc5ed4d8e8915d5abfaf2cee" dependencies = [ - "bitflags", + "bitflags 1.3.2", "instant", "palette", ] @@ -1013,7 +1399,7 @@ version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "54177b85fdae36a8a1a4f052a5c65c5006565dc27f1feead13eeeed10fd0975a" dependencies = [ - "bitflags", + "bitflags 1.3.2", "bytemuck", "glam", "iced_native", @@ -1054,7 +1440,7 @@ version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c4bb296363d1b18d4f57e1c69bb19591405e61d47764e43078bba31c6689fca5" dependencies = [ - "bitflags", + "bitflags 1.3.2", "bytemuck", "encase", "futures", @@ -1109,19 +1495,29 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" dependencies = [ "autocfg", - "hashbrown", + "hashbrown 0.12.3", +] + +[[package]] +name = "indexmap" +version = "2.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8adf3ddd720272c6ea8bf59463c04e0f93d0bbf7c5439b691bca2987e0270897" +dependencies = [ + "equivalent", + "hashbrown 0.14.1", ] [[package]] name = "indicatif" -version = "0.17.5" +version = "0.17.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ff8cc23a7393a397ed1d7f56e6365cba772aba9f9912ab968b03043c395d057" +checksum = "fb28741c9db9a713d93deb3bb9515c20788cef5815265bee4980e87bde7e0f25" dependencies = [ "console", "instant", "number_prefix", - "portable-atomic 0.3.20", + "portable-atomic", "unicode-segmentation", "unicode-width", ] @@ -1132,7 +1528,7 @@ version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c33e7c1ddeb15c9abcbfef6029d8e29f69b52b6d6c891031b88ed91b5065803b" dependencies = [ - "bitflags", + "bitflags 1.3.2", "dyn-clone", "lazy_static", "newline-converter", @@ -1149,42 +1545,28 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" dependencies = [ "cfg-if", -] - -[[package]] -name = "io-lifetimes" -version = "1.0.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eae7b9aee968036d54dce06cebaefd919e4472e753296daccd6d344e3e2df0c2" -dependencies = [ - "hermit-abi 0.3.1", - "libc", - "windows-sys 0.48.0", + "js-sys", + "wasm-bindgen", + "web-sys", ] [[package]] name = "ipnet" -version = "2.7.2" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12b6ee2129af8d4fb011108c73d99a1b83a85977f23b82460c0ae2e25bb4b57f" +checksum = "28b29a3cd74f0f4598934efe3aeba42bae0eb4680554128851ebbecb02af14e6" [[package]] -name = "is-terminal" -version = "0.4.7" +name = "itoa" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adcf93614601c8129ddf72e2d5633df827ba6551541c6d8c59520a371475be1f" -dependencies = [ - "hermit-abi 0.3.1", - "io-lifetimes", - "rustix", - "windows-sys 0.48.0", -] +checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38" [[package]] -name = "itoa" -version = "1.0.6" +name = "jni-sys" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "453ad9f582a441959e5f0d088b02ce04cfe8d51a8eaf077f12ac6d3e94164ca6" +checksum = "8eaf4bc02d17cbdd7ff4c7438cafcdf7fb9a4613313ad11b4f8fefe7d3fa0130" [[package]] name = "js-sys" @@ -1202,7 +1584,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8c2352bd1d0bceb871cb9d40f24360c8133c11d7486b68b5381c1dd1a32015e3" dependencies = [ "libc", - "libloading", + "libloading 0.7.4", "pkg-config", ] @@ -1214,9 +1596,29 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "libc" -version = "0.2.146" +version = "0.2.149" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a08173bc88b7955d1b3145aa561539096c421ac8debde8cbc3612ec635fee29b" + +[[package]] +name = "libloading" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f92be4933c13fd498862a9e02a3055f8a8d9c039ce33db97306fd5a6caa7f29b" +checksum = "b67380fd3b2fbe7527a606e18729d21c6f3951633d0500574c4dc22d2d638b9f" +dependencies = [ + "cfg-if", + "winapi", +] + +[[package]] +name = "libloading" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c571b676ddfc9a8c12f1f3d3085a7b163966a8fd8098a90640953ce5f6170161" +dependencies = [ + "cfg-if", + "windows-sys 0.48.0", +] [[package]] name = "libprotonup" @@ -1239,16 +1641,26 @@ dependencies = [ ] [[package]] -name = "linux-raw-sys" -version = "0.3.8" +name = "linked-hash-map" +version = "0.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519" +checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f" + +[[package]] +name = "lock_api" +version = "0.4.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c168f8615b12bc01f9c17e2eb0cc07dcae1940121185446edc3744920e8ef45" +dependencies = [ + "autocfg", + "scopeguard", +] [[package]] name = "log" -version = "0.4.19" +version = "0.4.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b06a4cde4c0f271a446782e3eff8de789548ce57dbc8eca9292c27f4a42004b4" +checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" [[package]] name = "lzma-sys" @@ -1272,9 +1684,9 @@ dependencies = [ [[package]] name = "memchr" -version = "2.5.0" +version = "2.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" +checksum = "f665ee40bc4a3c5590afb1e9677db74a508659dfd71e126420da8274909a0167" [[package]] name = "memmap2" @@ -1286,62 +1698,147 @@ dependencies = [ ] [[package]] -name = "memoffset" -version = "0.6.5" +name = "memoffset" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5aa361d4faea93603064a027415f07bd8e1d5c88c9fbf68bf56a285428fd79ce" +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 = "metal" +version = "0.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "de11355d1f6781482d027a3b4d4de7825dcedb197bf573e0596d00008402d060" +dependencies = [ + "bitflags 1.3.2", + "block", + "core-graphics-types", + "foreign-types 0.3.2", + "log", + "objc", +] + +[[package]] +name = "mime" +version = "0.3.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" + +[[package]] +name = "minimal-lexical" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" + +[[package]] +name = "miniz_oxide" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7810e0be55b428ada41041c41f32c9f1a42817901b4ccf45fa3d4b6561e74c7" +dependencies = [ + "adler", + "simd-adler32", +] + +[[package]] +name = "mio" +version = "0.8.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "927a765cd3fc26206e66b296465fa9d3e5ab003e651c1b3c060e7956d96b19d2" +dependencies = [ + "libc", + "log", + "wasi", + "windows-sys 0.48.0", +] + +[[package]] +name = "naga" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "21bb1a241901d94de4725d638a5295187b046ceb89ed8b2be368038654d9c81d" +dependencies = [ + "bit-set", + "bitflags 1.3.2", + "codespan-reporting", + "hexf-parse", + "indexmap 1.9.3", + "log", + "num-traits", + "rustc-hash", + "spirv", + "termcolor", + "thiserror", + "unicode-xid", +] + +[[package]] +name = "ndk" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5aa361d4faea93603064a027415f07bd8e1d5c88c9fbf68bf56a285428fd79ce" +checksum = "451422b7e4718271c8b5b3aadf5adedba43dc76312454b387e98fae0fc951aa0" dependencies = [ - "autocfg", + "bitflags 1.3.2", + "jni-sys", + "ndk-sys", + "num_enum", + "raw-window-handle 0.5.2", + "thiserror", ] [[package]] -name = "memoffset" -version = "0.8.0" +name = "ndk-context" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d61c719bcfbcf5d62b3a09efa6088de8c54bc0bfcd3ea7ae39fcc186108b8de1" -dependencies = [ - "autocfg", -] +checksum = "27b02d87554356db9e9a873add8782d4ea6e3e58ea071a9adb9a2e8ddb884a8b" [[package]] -name = "metal" -version = "0.24.0" +name = "ndk-glue" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de11355d1f6781482d027a3b4d4de7825dcedb197bf573e0596d00008402d060" +checksum = "0434fabdd2c15e0aab768ca31d5b7b333717f03cf02037d5a0a3ff3c278ed67f" dependencies = [ - "bitflags", - "block", - "core-graphics-types", - "foreign-types 0.3.2", + "libc", "log", - "objc", + "ndk", + "ndk-context", + "ndk-macro", + "ndk-sys", + "once_cell", + "parking_lot 0.12.1", ] [[package]] -name = "mime" -version = "0.3.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" - -[[package]] -name = "miniz_oxide" -version = "0.7.1" +name = "ndk-macro" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7810e0be55b428ada41041c41f32c9f1a42817901b4ccf45fa3d4b6561e74c7" +checksum = "0df7ac00c4672f9d5aece54ee3347520b7e20f158656c7db2e6de01902eb7a6c" dependencies = [ - "adler", - "simd-adler32", + "darling", + "proc-macro-crate", + "proc-macro2", + "quote", + "syn 1.0.109", ] [[package]] -name = "mio" -version = "0.8.8" +name = "ndk-sys" +version = "0.4.1+23.1.7779620" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "927a765cd3fc26206e66b296465fa9d3e5ab003e651c1b3c060e7956d96b19d2" +checksum = "3cf2aae958bd232cac5069850591667ad422d263686d75b52a065f9badeee5a3" dependencies = [ - "libc", - "wasi", - "windows-sys 0.48.0", + "jni-sys", ] [[package]] @@ -1359,7 +1856,7 @@ version = "0.22.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e4916f159ed8e5de0082076562152a76b7a1f64a01fd9d1e0fea002c37624faf" dependencies = [ - "bitflags", + "bitflags 1.3.2", "cc", "cfg-if", "libc", @@ -1372,7 +1869,7 @@ version = "0.24.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fa52e972a9a719cecb6864fb88568781eb706bac2cd1d4f04a648542dbf78069" dependencies = [ - "bitflags", + "bitflags 1.3.2", "cfg-if", "libc", "memoffset 0.6.5", @@ -1385,7 +1882,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f346ff70e7dbfd675fe90590b92d59ef2de15a8779ae305ebcbfd3f0caf59be4" dependencies = [ "autocfg", - "bitflags", + "bitflags 1.3.2", "cfg-if", "libc", "memoffset 0.6.5", @@ -1403,20 +1900,20 @@ dependencies = [ [[package]] name = "num-traits" -version = "0.2.15" +version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd" +checksum = "39e3200413f237f41ab11ad6d161bc7239c84dcb631773ccd7de3dfe4b5c267c" dependencies = [ "autocfg", ] [[package]] name = "num_cpus" -version = "1.15.0" +version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fac9e2da13b5eb447a6ce3d392f23a29d8694bff781bf03a16cd9ac8697593b" +checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" dependencies = [ - "hermit-abi 0.2.6", + "hermit-abi 0.3.3", "libc", ] @@ -1493,16 +1990,19 @@ dependencies = [ ] [[package]] -name = "once_cell" -version = "1.18.0" +name = "object" +version = "0.32.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" +checksum = "9cf5f9dd3933bd50a9e1f149ec995f39ae2c496d31fd772c1fd45ebc27e902b0" +dependencies = [ + "memchr", +] [[package]] -name = "option-ext" -version = "0.2.0" +name = "once_cell" +version = "1.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" +checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" [[package]] name = "option-ext" @@ -1512,9 +2012,9 @@ checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" [[package]] name = "ordered-float" -version = "3.7.0" +version = "4.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2fc2dbde8f8a79f2102cc474ceb0ad68e3b80b85289ea62389b60e66777e4213" +checksum = "536900a8093134cf9ccf00a27deb3532421099e958d9dd431135d0c7543ca1e8" dependencies = [ "num-traits", ] @@ -1570,7 +2070,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" dependencies = [ "lock_api", - "parking_lot_core 0.9.7", + "parking_lot_core 0.9.9", ] [[package]] @@ -1582,22 +2082,22 @@ dependencies = [ "cfg-if", "instant", "libc", - "redox_syscall", + "redox_syscall 0.2.16", "smallvec", "winapi", ] [[package]] name = "parking_lot_core" -version = "0.9.7" +version = "0.9.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9069cbb9f99e3a5083476ccb29ceb1de18b9118cafa53e90c9551235de2b9521" +checksum = "4c42a9226546d68acdd9c0a280d17ce19bfe27a46bf68784e4066115788d008e" dependencies = [ "cfg-if", "libc", - "redox_syscall", + "redox_syscall 0.4.1", "smallvec", - "windows-sys 0.45.0", + "windows-targets 0.48.5", ] [[package]] @@ -1608,9 +2108,9 @@ checksum = "9b2a4787296e9989611394c33f193f676704af1686e70b8f8033ab5ba9a35a94" [[package]] name = "phf" -version = "0.11.1" +version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "928c6535de93548188ef63bb7c4036bd415cd8f36ad25af44b9789b2ee72a48c" +checksum = "ade2d8b8f33c7333b51bcf0428d37e217e9f32192ae4772156f65063b8ce03dc" dependencies = [ "phf_macros", "phf_shared", @@ -1618,9 +2118,9 @@ dependencies = [ [[package]] name = "phf_generator" -version = "0.11.1" +version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1181c94580fa345f50f19d738aaa39c0ed30a600d95cb2d3e23f94266f14fbf" +checksum = "48e4cc64c2ad9ebe670cb8fd69dd50ae301650392e81c05f9bfcb2d5bdbc24b0" dependencies = [ "phf_shared", "rand", @@ -1628,31 +2128,31 @@ dependencies = [ [[package]] name = "phf_macros" -version = "0.11.1" +version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92aacdc5f16768709a569e913f7451034034178b05bdc8acda226659a3dccc66" +checksum = "3444646e286606587e49f3bcf1679b8cef1dc2c5ecc29ddacaffc305180d464b" dependencies = [ "phf_generator", "phf_shared", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.38", ] [[package]] name = "phf_shared" -version = "0.11.1" +version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1fb5f6f826b772a8d4c0394209441e7d37cbbb967ae9c7e0e8134365c9ee676" +checksum = "90fcb95eef784c2ac79119d1dd819e162b5da872ce6f3c3abe1e8ca1c082f72b" dependencies = [ "siphasher", ] [[package]] name = "pin-project-lite" -version = "0.2.9" +version = "0.2.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116" +checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58" [[package]] name = "pin-utils" @@ -1666,11 +2166,40 @@ version = "0.3.27" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "26072860ba924cbfa98ea39c8c19b4dd6a4a25423dbdf219c1eca91aa0cf6964" +[[package]] +name = "png" +version = "0.17.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd75bf2d8dd3702b9707cdbc56a5b9ef42cec752eb8b3bafc01234558442aa64" +dependencies = [ + "bitflags 1.3.2", + "crc32fast", + "fdeflate", + "flate2", + "miniz_oxide", +] + [[package]] name = "portable-atomic" -version = "1.3.3" +version = "1.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "767eb9f07d4a5ebcb39bbf2d452058a93c011373abf6832e24194a1c3f004794" +checksum = "31114a898e107c51bb1609ffaf55a0e011cf6a4d7f1170d0015a165082c0338b" + +[[package]] +name = "ppv-lite86" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" + +[[package]] +name = "proc-macro-crate" +version = "1.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f4c021e1093a56626774e81216a4ce732a735e5bad4868a03f3ed65ca0c3919" +dependencies = [ + "once_cell", + "toml_edit", +] [[package]] name = "proc-macro-error" @@ -1698,18 +2227,18 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.60" +version = "1.0.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dec2b086b7a862cf4de201096214fa870344cf922b2b30c167badb3af3195406" +checksum = "134c189feb4956b20f6f547d2cf727d4c0fe06722b20a0eec87ed445a97f92da" dependencies = [ "unicode-ident", ] [[package]] name = "profiling" -version = "1.0.8" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "332cd62e95873ea4f41f3dfd6bbbfc5b52aec892d7e8d534197c4720a0bbbab2" +checksum = "f89dff0959d98c9758c88826cc002e2c3d0b9dfac4139711d1f30de442f1139b" [[package]] name = "protonup-gui" @@ -1726,7 +2255,7 @@ dependencies = [ name = "protonup-rs" version = "0.6.0" dependencies = [ - "clap 4.3.4", + "clap 4.4.6", "indicatif", "inquire", "libprotonup", @@ -1735,9 +2264,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.28" +version = "1.0.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b9ab9c7eadfd8df19006f1cf1a4aed13540ed5cbc047010ece5826e10825488" +checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" dependencies = [ "proc-macro2", ] @@ -1805,9 +2334,9 @@ checksum = "f2ff9a1f06a88b01621b7ae906ef0211290d1c8a168a15542486a8f61c0833b9" [[package]] name = "rayon" -version = "1.7.0" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d2df5196e37bcc87abebc0053e20787d73847bb33134a69841207dd0a47f03b" +checksum = "9c27db03db7734835b3f53954b534c91069375ce6ccaa2e065441e07d9b6cdb1" dependencies = [ "either", "rayon-core", @@ -1815,14 +2344,12 @@ dependencies = [ [[package]] name = "rayon-core" -version = "1.11.0" +version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b8f95bd6966f5c87776639160a66bd8ab9895d9d4ab01ddba9fc60661aebe8d" +checksum = "5ce3fb6ad83f861aac485e76e1985cd109d9a3713802152be56c3b1f0e0658ed" dependencies = [ - "crossbeam-channel", "crossbeam-deque", "crossbeam-utils", - "num_cpus", ] [[package]] @@ -1831,7 +2358,25 @@ version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" dependencies = [ - "bitflags", + "bitflags 1.3.2", +] + +[[package]] +name = "redox_syscall" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29" +dependencies = [ + "bitflags 1.3.2", +] + +[[package]] +name = "redox_syscall" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" +dependencies = [ + "bitflags 1.3.2", ] [[package]] @@ -1840,7 +2385,7 @@ version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8440d8acb4fd3d277125b4bd01a6f38aee8d814b3b5fc09b3f2b825d37d3fe8f" dependencies = [ - "redox_syscall", + "redox_syscall 0.2.16", ] [[package]] @@ -1850,15 +2395,21 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b033d837a7cf162d7993aded9304e30a83213c648b6e389db233191f891e5c2b" dependencies = [ "getrandom", - "redox_syscall", + "redox_syscall 0.2.16", "thiserror", ] +[[package]] +name = "renderdoc-sys" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1382d1f0a252c4bf97dc20d979a2fdd05b024acd7c2ed0f7595d7817666a157" + [[package]] name = "reqwest" -version = "0.11.18" +version = "0.11.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cde824a14b7c14f85caff81225f411faacc04a2013f41670f41443742b1c1c55" +checksum = "046cd98826c46c2ac8ddecae268eb5c2e58628688a5fc7a2643704a73faba95b" dependencies = [ "base64", "bytes", @@ -1882,6 +2433,7 @@ dependencies = [ "serde", "serde_json", "serde_urlencoded", + "system-configuration", "tokio", "tokio-rustls", "tokio-util", @@ -1911,24 +2463,22 @@ dependencies = [ ] [[package]] -name = "rustix" -version = "0.37.20" +name = "rustc-demangle" +version = "0.1.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b96e891d04aa506a6d1f318d2771bcb1c7dfda84e126660ace067c9b474bb2c0" -dependencies = [ - "bitflags", - "errno", - "io-lifetimes", - "libc", - "linux-raw-sys", - "windows-sys 0.45.0", -] +checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" + +[[package]] +name = "rustc-hash" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" [[package]] name = "rustls" -version = "0.21.2" +version = "0.21.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e32ca28af694bc1bbf399c33a516dbdf1c90090b8ab23c2bc24f834aa2247f5f" +checksum = "cd8d6c9f025a446bc4d18ad9632e69aec8f287aa84499ee335599fabd20c3fd8" dependencies = [ "log", "ring", @@ -1938,18 +2488,18 @@ dependencies = [ [[package]] name = "rustls-pemfile" -version = "1.0.2" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d194b56d58803a43635bdc398cd17e383d6f71f9182b9a192c127ca42494a59b" +checksum = "2d3987094b1d07b653b7dfdc3f70ce9a1da9c51ac18c1b06b662e4f9a0e9f4b2" dependencies = [ "base64", ] [[package]] name = "rustls-webpki" -version = "0.100.1" +version = "0.101.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6207cd5ed3d8dca7816f8f3725513a34609c0c765bf652b8c3cb4cfd87db46b" +checksum = "3c7d5dece342910d9ba34d259310cae3e0154b873b35408b787b59bce53d34fe" dependencies = [ "ring", "untrusted", @@ -1957,9 +2507,9 @@ dependencies = [ [[package]] name = "ryu" -version = "1.0.13" +version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f91339c0467de62360649f8d3e185ca8de4224ff281f66000de5eb2a77a79041" +checksum = "1ad4cc8da4ef723ed60bced201181d83791ad433213d8c24efffda1eec85d741" [[package]] name = "safe_arch" @@ -1978,9 +2528,9 @@ checksum = "e1cf6437eb19a8f4a6cc0f7dca544973b0b78843adbfeb3683d1a94a0024a294" [[package]] name = "scopeguard" -version = "1.1.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" [[package]] name = "sct" @@ -1992,31 +2542,43 @@ dependencies = [ "untrusted", ] +[[package]] +name = "sctk-adwaita" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61270629cc6b4d77ec1907db1033d5c2e1a404c412743621981a871dc9c12339" +dependencies = [ + "crossfont", + "log", + "smithay-client-toolkit", + "tiny-skia", +] + [[package]] name = "serde" -version = "1.0.164" +version = "1.0.189" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e8c8cf938e98f769bc164923b06dce91cea1751522f46f8466461af04c9027d" +checksum = "8e422a44e74ad4001bdc8eede9a4570ab52f71190e9c076d14369f38b9200537" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.164" +version = "1.0.189" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9735b638ccc51c28bf6914d90a2e9725b377144fc612c49a611fddd1b631d68" +checksum = "1e48d1f918009ce3145511378cf68d613e3b3d9137d67272562080d68a2b32d5" dependencies = [ "proc-macro2", "quote", - "syn 2.0.18", + "syn 2.0.38", ] [[package]] name = "serde_json" -version = "1.0.96" +version = "1.0.107" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "057d394a50403bcac12672b2b18fb387ab6d289d957dab67dd201875391e52f1" +checksum = "6b420ce6e3d8bd882e9b243c6eed35dbc9a6110c9769e74b584e0d68d1f20c65" dependencies = [ "itoa", "ryu", @@ -2058,9 +2620,9 @@ dependencies = [ [[package]] name = "sha2" -version = "0.10.7" +version = "0.10.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "479fb9d862239e610720565ca91403019f2f00410f1864c5aa7479b950a76ed8" +checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" dependencies = [ "cfg-if", "cpufeatures", @@ -2069,21 +2631,21 @@ dependencies = [ [[package]] name = "simd-adler32" -version = "0.3.5" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "238abfbb77c1915110ad968465608b68e869e0772622c9656714e73e5a1a522f" +checksum = "d66dc143e6b11c1eddc06d5c423cfc97062865baf299914ab64caa38182078fe" [[package]] name = "siphasher" -version = "0.3.10" +version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7bd3e3206899af3f8b12af284fafc038cc1dc2b41d1b89dd17297221c5d225de" +checksum = "38b58827f4464d87d377d175e90bf58eb00fd8716ff0a62f80356b5e61555d0d" [[package]] name = "slab" -version = "0.4.8" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6528351c9bc8ab22353f9d776db39a20288e8d6c37ef8cfe3317cf875eecfc2d" +checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" dependencies = [ "autocfg", ] @@ -2099,17 +2661,17 @@ dependencies = [ [[package]] name = "smallvec" -version = "1.10.0" +version = "1.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0" +checksum = "942b4a808e05215192e39f4ab80813e599068285906cc91aa64f923db842bd5a" [[package]] name = "smithay-client-toolkit" -version = "0.16.0" +version = "0.16.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f307c47d32d2715eb2e0ece5589057820e0e5e70d07c247d1063e844e107f454" +checksum = "870427e30b8f2cbe64bf43ec4b86e88fe39b0a84b3f15efd9c9c2d020bc86eb9" dependencies = [ - "bitflags", + "bitflags 1.3.2", "calloop", "dlib", "lazy_static", @@ -2142,6 +2704,16 @@ dependencies = [ "winapi", ] +[[package]] +name = "socket2" +version = "0.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4031e820eb552adee9295814c0ced9e5cf38ddf1e8b7d566d6de8e2538ea989e" +dependencies = [ + "libc", + "windows-sys 0.48.0", +] + [[package]] name = "spin" version = "0.5.2" @@ -2154,7 +2726,7 @@ version = "0.2.0+1.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "246bfa38fe3db3f1dfc8ca5a2cdeb7348c78be2112740cc0ec8ef18b6d94f830" dependencies = [ - "bitflags", + "bitflags 1.3.2", "num-traits", ] @@ -2225,20 +2797,41 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.18" +version = "2.0.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32d41677bcbe24c20c52e7c70b0d8db04134c5d1066bf98662e2871ad200ea3e" +checksum = "e96b79aaa137db8f61e26363a0c9b47d8b4ec75da28b7d1d614c2303e232408b" dependencies = [ "proc-macro2", "quote", "unicode-ident", ] +[[package]] +name = "system-configuration" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba3a3adc5c275d719af8cb4272ea1c4a6d668a777f37e115f6d11ddbc1c8e0e7" +dependencies = [ + "bitflags 1.3.2", + "core-foundation", + "system-configuration-sys", +] + +[[package]] +name = "system-configuration-sys" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a75fb188eb626b924683e3b95e3a48e63551fcfb51949de2f06a9d91dbee93c9" +dependencies = [ + "core-foundation-sys", + "libc", +] + [[package]] name = "tar" -version = "0.4.38" +version = "0.4.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b55807c0344e1e6c04d7c965f5289c39a8d94ae23ed5c0b57aabac549f871c6" +checksum = "b16afcea1f22891c49a00c751c7b63b2233284064f11a200fc624137c51e2ddb" dependencies = [ "filetime", "libc", @@ -2247,9 +2840,9 @@ dependencies = [ [[package]] name = "termcolor" -version = "1.2.0" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be55cf8942feac5c765c2c993422806843c9a9a45d4d5c407ad6dd2ea95eb9b6" +checksum = "6093bad37da69aab9d123a8091e4be0aa4a03e4d601ec641c327398315f62b64" dependencies = [ "winapi-util", ] @@ -2262,7 +2855,7 @@ checksum = "077185e2eac69c3f8379a4298e1e07cd36beb962290d4a51199acf0fdc10607e" dependencies = [ "libc", "numtoa", - "redox_syscall", + "redox_syscall 0.2.16", "redox_termios", ] @@ -2277,22 +2870,47 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.40" +version = "1.0.50" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "978c9a314bd8dc99be594bc3c175faaa9794be04a5a5e153caba6915336cebac" +checksum = "f9a7210f5c9a7156bb50aa36aed4c95afb51df0df00713949448cf9e97d382d2" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.40" +version = "1.0.50" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9456a42c5b0d803c8cd86e73dd7cc9edd429499f37a3550d286d5e86720569f" +checksum = "266b2e40bc00e5a6c09c3584011e08b06f123c00362c92b975ba9843aaaa14b8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.18", + "syn 2.0.38", +] + +[[package]] +name = "tiny-skia" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "642680569bb895b16e4b9d181c60be1ed136fa0c9c7f11d004daf053ba89bf82" +dependencies = [ + "arrayref", + "arrayvec 0.5.2", + "bytemuck", + "cfg-if", + "png", + "safe_arch", + "tiny-skia-path", +] + +[[package]] +name = "tiny-skia-path" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c114d32f0c2ee43d585367cb013dfaba967ab9f62b90d9af0d696e955e70fa6c" +dependencies = [ + "arrayref", + "bytemuck", ] [[package]] @@ -2312,17 +2930,17 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.28.2" +version = "1.33.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94d7b1cfd2aa4011f2de74c2c4c63665e27a71006b0a192dcd2710272e73dfa2" +checksum = "4f38200e3ef7995e5ef13baec2f432a6da0aa9ac495b2c0e8f3b7eec2c92d653" dependencies = [ - "autocfg", + "backtrace", "bytes", "libc", "mio", "num_cpus", "pin-project-lite", - "socket2", + "socket2 0.5.4", "tokio-macros", "windows-sys 0.48.0", ] @@ -2335,7 +2953,7 @@ checksum = "630bdcf245f78637c13ec01ffae6187cca34625e8c63150d424b59e55af2675e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.18", + "syn 2.0.38", ] [[package]] @@ -2350,9 +2968,9 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.7.8" +version = "0.7.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "806fe8c2c87eccc8b3267cbae29ed3ab2d0bd37fca70ab622e46aaa9375ddb7d" +checksum = "1d68074620f57a0b21594d9735eb2e98ab38b17f80d3fcb189fca266771ca60d" dependencies = [ "bytes", "futures-core", @@ -2373,17 +2991,17 @@ dependencies = [ [[package]] name = "toml_datetime" -version = "0.6.1" +version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ab8ed2edee10b50132aed5f331333428b011c99402b5a534154ed15746f9622" +checksum = "7cda73e2f1397b1262d6dfdcef8aafae14d1de7748d66822d3bfeeb6d03e5e4b" [[package]] name = "toml_edit" -version = "0.19.8" +version = "0.19.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "239410c8609e8125456927e6707163a3b1fdb40561e4b803bc041f466ccfdc13" +checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" dependencies = [ - "indexmap", + "indexmap 2.0.2", "toml_datetime", "winnow", ] @@ -2396,20 +3014,19 @@ checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" [[package]] name = "tracing" -version = "0.1.37" +version = "0.1.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ce8c33a8d48bd45d624a6e523445fd21ec13d3653cd51f681abf67418f54eb8" +checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" dependencies = [ - "cfg-if", "pin-project-lite", "tracing-core", ] [[package]] name = "tracing-core" -version = "0.1.31" +version = "0.1.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0955b8137a1df6f1a2e9a37d8a6656291ff0297c1a97c24e0d8425fe2312f79a" +checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" dependencies = [ "once_cell", ] @@ -2422,9 +3039,9 @@ checksum = "3528ecfd12c466c6f163363caf2d02a71161dd5e1cc6ae7b34207ea2d42d81ed" [[package]] name = "ttf-parser" -version = "0.19.0" +version = "0.19.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44dcf002ae3b32cd25400d6df128c5babec3927cd1eb7ce813cfff20eb6c3746" +checksum = "49d64318d8311fc2668e48b63969f4343e0a85c4a109aa8460d6672e364b8bd1" [[package]] name = "twox-hash" @@ -2439,9 +3056,9 @@ dependencies = [ [[package]] name = "typenum" -version = "1.16.0" +version = "1.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba" +checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" [[package]] name = "unicode-bidi" @@ -2451,9 +3068,9 @@ checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460" [[package]] name = "unicode-ident" -version = "1.0.9" +version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b15811caf2415fb889178633e7724bad2509101cde276048e013b9def5e51fa0" +checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" [[package]] name = "unicode-normalization" @@ -2472,9 +3089,9 @@ checksum = "1dd624098567895118886609431a7c3b8f516e41d30e0643f03d94592a147e36" [[package]] name = "unicode-width" -version = "0.1.10" +version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0edd1e5b14653f783770bce4a4dabb4a5108a5370a5f5d8cfe8710c361f6c8b" +checksum = "e51733f11c9c4f72aa0c160008246859e340b00807569a0da0e7a1079b27ba85" [[package]] name = "unicode-xid" @@ -2490,9 +3107,9 @@ checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" [[package]] name = "url" -version = "2.4.0" +version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50bff7831e19200a85b17131d085c25d7811bc4e186efdaf54bbd132994a88cb" +checksum = "143b538f18257fac9cad154828a57c6bf5157e1aa604d4816b5995bf6de87ae5" dependencies = [ "form_urlencoded", "idna", @@ -2553,7 +3170,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.18", + "syn 2.0.38", "wasm-bindgen-shared", ] @@ -2587,7 +3204,7 @@ checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.18", + "syn 2.0.38", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -2600,9 +3217,9 @@ checksum = "ca6ad05a4870b2bf5fe995117d3728437bd27d7cd5f06f13c17443ef369775a1" [[package]] name = "wasm-streams" -version = "0.2.3" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6bbae3363c08332cadccd13b67db371814cd214c2524020932f0804b8cf7c078" +checksum = "b4609d447824375f43e1ffbc051b50ad8f4b3ae8219680c94452ea05eb240ac7" dependencies = [ "futures-util", "js-sys", @@ -2612,41 +3229,116 @@ dependencies = [ ] [[package]] -name = "web-sys" -version = "0.3.64" +name = "wasm-timer" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b85cbef8c220a6abc02aefd892dfc0fc23afb1c6a426316ec33253a3877249b" +checksum = "be0ecb0db480561e9a7642b5d3e4187c128914e58aa84330b9493e3eb68c5e7f" dependencies = [ + "futures", "js-sys", + "parking_lot 0.11.2", + "pin-utils", "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", ] [[package]] -name = "webpki" -version = "0.22.0" +name = "wayland-client" +version = "0.29.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f095d78192e208183081cc07bc5515ef55216397af48b873e5edcd72637fa1bd" +checksum = "3f3b068c05a039c9f755f881dc50f01732214f5685e379829759088967c46715" dependencies = [ - "ring", - "untrusted", + "bitflags 1.3.2", + "downcast-rs", + "libc", + "nix 0.24.3", + "scoped-tls", + "wayland-commons", + "wayland-scanner", + "wayland-sys", ] [[package]] -name = "webpki-roots" -version = "0.22.6" +name = "wayland-commons" +version = "0.29.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8691f134d584a33a6606d9d717b95c4fa20065605f798a3f350d78dced02a902" +dependencies = [ + "nix 0.24.3", + "once_cell", + "smallvec", + "wayland-sys", +] + +[[package]] +name = "wayland-cursor" +version = "0.29.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6865c6b66f13d6257bef1cd40cbfe8ef2f150fb8ebbdb1e8e873455931377661" +dependencies = [ + "nix 0.24.3", + "wayland-client", + "xcursor", +] + +[[package]] +name = "wayland-protocols" +version = "0.29.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b950621f9354b322ee817a23474e479b34be96c2e909c14f7bc0100e9a970bc6" +dependencies = [ + "bitflags 1.3.2", + "wayland-client", + "wayland-commons", + "wayland-scanner", +] + +[[package]] +name = "wayland-scanner" +version = "0.29.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f4303d8fa22ab852f789e75a967f0a2cdc430a607751c0499bada3e451cbd53" +dependencies = [ + "proc-macro2", + "quote", + "xml-rs", +] + +[[package]] +name = "wayland-sys" +version = "0.29.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "be12ce1a3c39ec7dba25594b97b42cb3195d54953ddb9d3d95a7c3902bc6e9d4" +dependencies = [ + "dlib", + "lazy_static", + "pkg-config", +] + +[[package]] +name = "web-sys" +version = "0.3.64" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6c71e40d7d2c34a5106301fb632274ca37242cd0c9d3e64dbece371a40a2d87" +checksum = "9b85cbef8c220a6abc02aefd892dfc0fc23afb1c6a426316ec33253a3877249b" dependencies = [ - "webpki", + "js-sys", + "wasm-bindgen", ] +[[package]] +name = "webpki-roots" +version = "0.25.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "14247bb57be4f377dfb94c72830b8ce8fc6beac03cf4bf7b9732eadd414123fc" + [[package]] name = "wgpu" version = "0.14.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "81f643110d228fd62a60c5ed2ab56c4d5b3704520bd50561174ec4ec74932937" dependencies = [ - "arrayvec 0.7.2", + "arrayvec 0.7.4", "js-sys", "log", "naga", @@ -2668,9 +3360,9 @@ version = "0.14.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6000d1284ef8eec6076fd5544a73125fd7eb9b635f18dceeb829d826f41724ca" dependencies = [ - "arrayvec 0.7.2", + "arrayvec 0.7.4", "bit-vec", - "bitflags", + "bitflags 1.3.2", "cfg_aliases", "codespan-reporting", "fxhash", @@ -2693,10 +3385,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3cc320a61acb26be4f549c9b1b53405c10a223fbfea363ec39474c32c348d12f" dependencies = [ "android_system_properties", - "arrayvec 0.7.2", + "arrayvec 0.7.4", "ash", "bit-set", - "bitflags", + "bitflags 1.3.2", "block", "core-graphics-types", "d3d12", @@ -2707,7 +3399,7 @@ dependencies = [ "gpu-descriptor", "js-sys", "khronos-egl", - "libloading", + "libloading 0.7.4", "log", "metal", "naga", @@ -2731,7 +3423,7 @@ version = "0.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fb6b28ef22cac17b9109b25b3bf8c9a103eeb293d7c5f78653979b09140375f6" dependencies = [ - "bitflags", + "bitflags 1.3.2", ] [[package]] @@ -2764,9 +3456,9 @@ checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" [[package]] name = "winapi-util" -version = "0.1.5" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" +checksum = "f29e6f9198ba0d26b4c9f07dbe6f9ed633e1f3d5b8b414090084349e46a52596" dependencies = [ "winapi", ] @@ -2828,7 +3520,7 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" dependencies = [ - "windows-targets 0.48.0", + "windows-targets 0.48.5", ] [[package]] @@ -2848,17 +3540,17 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b1eb6f0cd7c80c79759c929114ef071b87354ce476d9d94271031c0497adfd5" +checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" dependencies = [ - "windows_aarch64_gnullvm 0.48.0", - "windows_aarch64_msvc 0.48.0", - "windows_i686_gnu 0.48.0", - "windows_i686_msvc 0.48.0", - "windows_x86_64_gnu 0.48.0", - "windows_x86_64_gnullvm 0.48.0", - "windows_x86_64_msvc 0.48.0", + "windows_aarch64_gnullvm 0.48.5", + "windows_aarch64_msvc 0.48.5", + "windows_i686_gnu 0.48.5", + "windows_i686_msvc 0.48.5", + "windows_x86_64_gnu 0.48.5", + "windows_x86_64_gnullvm 0.48.5", + "windows_x86_64_msvc 0.48.5", ] [[package]] @@ -2869,9 +3561,9 @@ checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" [[package]] name = "windows_aarch64_gnullvm" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc" +checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" [[package]] name = "windows_aarch64_msvc" @@ -2887,9 +3579,9 @@ checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" [[package]] name = "windows_aarch64_msvc" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3" +checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" [[package]] name = "windows_i686_gnu" @@ -2905,9 +3597,9 @@ checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" [[package]] name = "windows_i686_gnu" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241" +checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" [[package]] name = "windows_i686_msvc" @@ -2923,9 +3615,9 @@ checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" [[package]] name = "windows_i686_msvc" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00" +checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" [[package]] name = "windows_x86_64_gnu" @@ -2941,9 +3633,9 @@ checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" [[package]] name = "windows_x86_64_gnu" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1" +checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" [[package]] name = "windows_x86_64_gnullvm" @@ -2953,9 +3645,9 @@ checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" [[package]] name = "windows_x86_64_gnullvm" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953" +checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" [[package]] name = "windows_x86_64_msvc" @@ -2971,9 +3663,9 @@ checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" [[package]] name = "windows_x86_64_msvc" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a" +checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" [[package]] name = "winit" @@ -2981,7 +3673,7 @@ version = "0.27.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bb796d6fbd86b2fd896c9471e6f04d39d750076ebe5680a3958f00f5ab97657c" dependencies = [ - "bitflags", + "bitflags 1.3.2", "cocoa", "core-foundation", "core-graphics", @@ -3010,20 +3702,21 @@ dependencies = [ [[package]] name = "winnow" -version = "0.4.6" +version = "0.5.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61de7bac303dc551fe038e2b3cef0f571087a47571ea6e79a87692ac99b99699" +checksum = "a3b801d0e0a6726477cc207f60162da452f3a95adb368399bef20a946e06f65c" dependencies = [ "memchr", ] [[package]] name = "winreg" -version = "0.10.1" +version = "0.50.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80d0f4e272c85def139476380b12f9ac60926689dd2e01d4923222f40580869d" +checksum = "524e57b2c537c0f9b1e69f1965311ec12182b4122e45035b1508cd24d2adadb1" dependencies = [ - "winapi", + "cfg-if", + "windows-sys 0.48.0", ] [[package]] @@ -3060,9 +3753,9 @@ dependencies = [ [[package]] name = "xattr" -version = "0.2.3" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d1526bbe5aaeb5eb06885f4d987bcdfa5e23187055de9b83fe00156a821fabc" +checksum = "f4686009f71ff3e5c4dbcf1a282d0a44db3f021ba69350cd42086b3e5f1c6985" dependencies = [ "libc", ] @@ -3084,9 +3777,9 @@ checksum = "a67300977d3dc3f8034dae89778f502b6ba20b269527b3223ba59c0cf393bb8a" [[package]] name = "xml-rs" -version = "0.8.11" +version = "0.8.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1690519550bfa95525229b9ca2350c63043a4857b3b0013811b2ccf4a2420b01" +checksum = "0fcb9cbac069e033553e8bb871be2fbdffcab578eb25bd0f7c508cedc6dcd75a" [[package]] name = "xz2" diff --git a/libprotonup/src/apps.rs b/libprotonup/src/apps.rs index 0f9e19a..f97896e 100644 --- a/libprotonup/src/apps.rs +++ b/libprotonup/src/apps.rs @@ -24,14 +24,7 @@ impl fmt::Display for App { } impl App { - pub fn app_available_variants(&self) -> Vec { - match *self { - Self::Steam => vec![Variant::GEProton], - Self::Lutris => vec![Variant::WineGE, Variant::GEProton], - } - } - - pub fn app_default_variant(&self) -> Variant { + pub fn app_wine_version(&self) -> Variant { match *self { Self::Steam => Variant::GEProton, Self::Lutris => Variant::WineGE, diff --git a/libprotonup/src/github.rs b/libprotonup/src/github.rs index 3a2bc48..f571e60 100644 --- a/libprotonup/src/github.rs +++ b/libprotonup/src/github.rs @@ -1,5 +1,5 @@ use crate::constants; -use crate::variants::VariantParameters; +use crate::variants::VariantGithubParameters; use anyhow::Result; use serde::{Deserialize, Serialize}; @@ -8,16 +8,39 @@ pub type ReleaseList = Vec; #[derive(Serialize, Deserialize, Debug)] pub struct Release { /// API URL of the Release - url: String, + url: Option, /// Tag name of the Release, examples "8.7-GE-1-Lol" "GE-Proton8-5" pub tag_name: String, /// Release post name, examples "Wine-GE-Proton8-5 Released" " Lutris-GE-8.7-1-LoL" name: String, - published_at: String, /// Asset list for each Release, usually the tar.gz/tar.xz file and a sha512sum file for integrity checking assets: Vec, } +impl std::fmt::Display for Release { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> { + write!(f, "{}", self.tag_name) + } +} + +impl Release { + /// Returns a Download struct corresponding to the Release + pub fn get_download_info(&self) -> Download { + let mut download: Download = Download::default(); + download.version = self.tag_name.clone(); + for asset in &self.assets { + if asset.name.ends_with("sha512sum") { + download.sha512sum_url = asset.browser_download_url.clone(); + } else if asset.name.ends_with("tar.gz") || asset.name.ends_with("tar.xz") { + download.download_url = asset.browser_download_url.clone(); + download.size = asset.size as u64; + } + } + + download + } +} + #[derive(Serialize, Deserialize, Debug)] pub struct Asset { /// API URL of the Asset @@ -28,14 +51,15 @@ pub struct Asset { name: String, /// Size in Bytes, divide by 1_000_000 for MB size: i64, - created_at: String, updated_at: String, /// Direct download URL browser_download_url: String, } /// Returns a Vec of Releases from a GitHub repository, the URL used for the request is built from the passed in VariantParameters -pub async fn list_releases(source: &VariantParameters) -> Result { +pub async fn list_releases( + source: &VariantGithubParameters, +) -> Result { let agent = format!("{}/v{}", constants::USER_AGENT, constants::VERSION,); let url = format!( @@ -60,37 +84,6 @@ pub struct Download { pub download_url: String, /// Size of Wine or Proton archive in Bytes pub size: u64, - pub created_at: String, -} - -/// Returns a Download struct from the passed in VariantParameters and version tag. -pub async fn fetch_data_from_tag( - tag: &str, - source: &VariantParameters, -) -> Result { - let agent = format!("{}/v{}", constants::USER_AGENT, constants::VERSION,); - - let client = reqwest::Client::builder().user_agent(agent).build()?; - - let mut download = Download::default(); - let url = format!( - "{}/{}/{}/releases/{}", - source.repository_url, source.repository_account, source.repository_name, tag - ); - let release: Release = client.get(url).send().await?.json().await?; - - download.version = release.tag_name; - for asset in &release.assets { - if asset.name.ends_with("sha512sum") { - download.sha512sum_url = asset.browser_download_url.as_str().to_string(); - } - if asset.name.ends_with("tar.gz") || asset.name.ends_with("tar.xz") { - download.created_at = asset.created_at.clone(); - download.download_url = asset.browser_download_url.as_str().to_string(); - download.size = asset.size as u64; - } - } - Ok(download) } #[cfg(test)] @@ -100,66 +93,24 @@ mod tests { use super::*; #[tokio::test] - async fn test_fetch_data_from_tag() { + async fn test_list_releases() { let conditions = &[ ( - variants::Variant::WineGE.parameters(), - "latest", - "Get Steam", + variants::Variant::WineGE.get_github_parameters(), + "List WineGE", ), ( - variants::Variant::GEProton.parameters(), - "latest", - "Download Lutris", + variants::Variant::GEProton.get_github_parameters(), + "List GEProton", ), ]; - for (source_parameters, tag, desc) in conditions { - let result = fetch_data_from_tag(tag, source_parameters).await; - - assert!( - result.is_ok(), - "case :{} test: fetch_data_from_tag returned error", - desc - ); - - let result = result.unwrap(); - - assert!( - result.download_url.len() > 5, - "case : '{}' test: fetch_data_from_tag returned an wrong download link", - desc - ); - assert!( - result.sha512sum_url.len() > 5, - "case : '{}' test: fetch_data_from_tag returned an wrong sha512sum", - desc - ); - assert!( - result.size > 100, - "case : '{}' test: fetch_data_from_tag returned an wrong sha512sum", - desc - ); - assert!( - result.version.len() > 2, - "case : '{}' test: fetch_data_from_tag returned an wrong version", - desc - ); - } - } - - #[tokio::test] - async fn test_list_releases() { - let conditions = &[ - (variants::Variant::WineGE.parameters(), "List WineGE"), - (variants::Variant::GEProton.parameters(), "List GEProton"), - ]; for (source_parameters, desc) in conditions { let result = list_releases(source_parameters).await; assert!( result.is_ok(), - "case : '{}' test: fetch_data_from_tag returned error", + "case : '{}' test: list_releases returned error", desc ); @@ -188,8 +139,14 @@ mod tests { }; let conditions = &[ - (variants::Variant::WineGE.parameters(), "Get WineGE"), - (variants::Variant::GEProton.parameters(), "Get GEProton"), + ( + variants::Variant::WineGE.get_github_parameters(), + "Get WineGE", + ), + ( + variants::Variant::GEProton.get_github_parameters(), + "Get GEProton", + ), ]; for (source_parameters, desc) in conditions { let url = format!( diff --git a/libprotonup/src/variants.rs b/libprotonup/src/variants.rs index 9f681d6..9a46205 100644 --- a/libprotonup/src/variants.rs +++ b/libprotonup/src/variants.rs @@ -3,7 +3,7 @@ use std::{fmt, str::FromStr}; /// Struct used to build GitHub api request URLs. /// Contains the GitHub URL, username for GE, the repository name for either Wine GE or Proton GE, and a Variant Enum for identifying the parameters type -pub struct VariantParameters { +pub struct VariantGithubParameters { /// this is a link back to the enum variant variant_ref: Variant, /// URL of the repository server (GitHub compatible URL only at the moment) @@ -14,15 +14,15 @@ pub struct VariantParameters { pub repository_name: String, } -impl VariantParameters { +impl VariantGithubParameters { /// new_custom is a generator for custom VariantParameters pub fn new_custom( variant: Variant, repository_url: String, repository_account: String, repository_name: String, - ) -> VariantParameters { - VariantParameters { + ) -> VariantGithubParameters { + VariantGithubParameters { variant_ref: variant, repository_url, repository_account, @@ -74,16 +74,16 @@ impl Variant { } } - /// returns the default parameters for this Variant. - pub fn parameters(&self) -> VariantParameters { + /// Returns the default parameters for this Variant, used to build the GitHub URL + pub fn get_github_parameters(&self) -> VariantGithubParameters { match self { - Variant::GEProton => VariantParameters { + Variant::GEProton => VariantGithubParameters { variant_ref: Variant::GEProton, repository_url: GITHUB_URL.to_owned(), repository_name: GEPROTON_GITHUB_REPO.to_owned(), repository_account: GE_GITHUB_ACCOUNT.to_owned(), }, - Variant::WineGE => VariantParameters { + Variant::WineGE => VariantGithubParameters { variant_ref: Variant::WineGE, repository_url: GITHUB_URL.to_owned(), repository_name: WINEGE_GITHUB_REPO.to_owned(), diff --git a/protonup-gui/src/app.rs b/protonup-gui/src/app.rs index acf8142..e79e854 100644 --- a/protonup-gui/src/app.rs +++ b/protonup-gui/src/app.rs @@ -11,20 +11,16 @@ use iced::{ // Color, }; -use crate::utility::{self, Launcher, LauncherData}; - //use std::{cmp, path::PathBuf}; #[derive(Debug)] pub struct App { - launchers: Vec, - selected_launcher: Option, } #[derive(Debug, Clone)] pub enum Message { QuickUpdate, - LauncherSelected(Launcher), + LauncherSelected, } impl Application for App { @@ -36,18 +32,6 @@ impl Application for App { fn new(_flags: ()) -> (Self, Command) { ( Self { - // launchers: vec![ - // Launcher::Steam(Some(LauncherData { - // path: PathBuf::new(), - // installs: vec![], - // })), - // Launcher::Lutris(Some(LauncherData { - // path: PathBuf::new(), - // installs: vec![], - // })), - // ], - launchers: utility::find_launchers(), - selected_launcher: None, }, Command::none(), ) @@ -61,7 +45,7 @@ impl Application for App { match message { // TODO Message::QuickUpdate => {} - Message::LauncherSelected(launcher) => self.selected_launcher = Some(launcher), + Message::LauncherSelected => {}, }; Command::none() @@ -72,7 +56,7 @@ impl Application for App { } fn view(&self) -> Element { - let controls = Element::from( + let controls: Element = Element::from( column(vec![button("TODO: Quick Update") .on_press(Message::QuickUpdate) .into()]) @@ -83,56 +67,48 @@ impl Application for App { // TODO: will have a function to check the currently selected launcher based on the dropdown for already installed versions adding them to the list to be viewed let list = Element::from( column( - // vec![text("List of Downloaded Proton/Wine versions").into(), text("Version 1.1").into(), text("Version 1.2").into(),] - if let Some(launcher) = &self.selected_launcher { - match launcher { - Launcher::Lutris(data) => LauncherData::get_installs_text_list(data), - Launcher::LutrisFlatpak(data) => LauncherData::get_installs_text_list(data), - Launcher::Steam(data) => LauncherData::get_installs_text_list(data), - Launcher::SteamFlatpak(data) => LauncherData::get_installs_text_list(data), - } - } else { - vec![] - }, + vec![text("TODO: Under Construction - List of Downloaded Proton/Wine versions").into(), text("Version 1.1").into(), text("Version 1.2").into(),] ) .width(Length::FillPortion(4)) .padding(5), ); - let content = column(vec![ - container( - pick_list( - self.launchers.clone(), - self.selected_launcher.clone(), - Message::LauncherSelected, - ) - .width(Length::Fill), - ) - .height(Length::Units(40)) - .width(Length::Fill) - // Will figure out how to fix later - // .style(container::Style { - // background: Some(iced::Background::Color(iced::Color { - // r: 10.0, - // g: 11.0, - // b: 32.0, - // a: 0.0, - // })), - // ..Default::default() - // }) - .into(), - container(row(vec![controls, list])) - .height(Length::Fill) - .into(), - ]); + // let content = column(vec![ + // container( + // pick_list( + // self.launchers.clone(), + // self.selected_launcher.clone(), + // Message::LauncherSelected, + // ) + // .width(Length::Fill), + // ) + // .height(Length::Units(40)) + // .width(Length::Fill) + // // Will figure out how to fix later + // // .style(container::Style { + // // background: Some(iced::Background::Color(iced::Color { + // // r: 10.0, + // // g: 11.0, + // // b: 32.0, + // // a: 0.0, + // // })), + // // ..Default::default() + // // }) + // .into(), + // container(row(vec![controls, list])) + // .height(Length::Fill) + // .into(), + // ]); + + // container(content) + // .width(Length::Fill) + // .height(Length::Fill) + // .center_x() + // .center_y() + // .padding(10) + // .into() - container(content) - .width(Length::Fill) - .height(Length::Fill) - .center_x() - .center_y() - .padding(10) - .into() + list } fn theme(&self) -> Theme { diff --git a/protonup-gui/src/utility.rs b/protonup-gui/src/utility.rs index 0a00c26..e69de29 100644 --- a/protonup-gui/src/utility.rs +++ b/protonup-gui/src/utility.rs @@ -1,218 +0,0 @@ -use crate::app::Message; -use iced::{widget::text, Element}; -use std::{fmt, path::PathBuf}; - -/// Returns a list of -pub fn find_launchers() -> Vec { - LauncherCollection::find_launchers() - .into_iter() - .filter(|l| l.has_data()) - .fold(vec![], |mut list, l| { - list.push(l); - list - }) -} - -#[derive(Clone, Eq, PartialEq, Debug)] -pub enum Launcher { - Lutris(Option), - LutrisFlatpak(Option), - Steam(Option), - SteamFlatpak(Option), -} - -impl fmt::Display for Launcher { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "{}", - match self { - Launcher::Lutris(_data) => { - "Lutris:" - } - Launcher::LutrisFlatpak(_data) => { - "Lutris Flatpak:" - } - Launcher::Steam(_data) => { - "Steam:" - } - Launcher::SteamFlatpak(_data) => { - "Steam Flatpak:" - } - } - ) - } -} - -impl Launcher { - /// Returns a bool, true if the Launcher has Some LauncheData, false otherwise - fn has_data(&self) -> bool { - match self { - Launcher::Steam(data) => data.is_some(), - Launcher::SteamFlatpak(data) => data.is_some(), - Launcher::Lutris(data) => data.is_some(), - Launcher::LutrisFlatpak(data) => data.is_some(), - } - } -} - -#[derive(Clone, PartialEq, Eq, Debug)] -pub struct LauncherData { - // Location of launcher's runner/wine folder - pub path: PathBuf, - pub installs: Vec, -} - -impl LauncherData { - /// Gets the Proton/Wine data from a Launcher's data, will return an empty list if the data is None - pub fn get_installs_text_list(data: &Option) -> Vec> { - if let Some(data) = data { - data.installs - .iter() - .map(|d| text(d.name.clone()).into()) - .collect() - } else { - vec![] - } - } -} - -#[derive(Clone, PartialEq, Eq, Debug)] -pub struct Install { - pub name: String, -} - -pub struct LauncherCollection { - curr: u32, - steam: Launcher, - steam_flatpak: Launcher, - lutris: Launcher, - lutris_flatpak: Launcher, -} - -impl LauncherCollection { - pub fn new() -> LauncherCollection { - LauncherCollection { - curr: 0, - steam: Launcher::Steam(None), - steam_flatpak: Launcher::SteamFlatpak(None), - lutris: Launcher::Lutris(None), - lutris_flatpak: Launcher::LutrisFlatpak(None), - } - } - - /// Find any launcher's wine or proton folder, return all found in a list - pub fn find_launchers() -> LauncherCollection { - // Get a list of the known wine proton folder locations - let mut collection: LauncherCollection = LauncherCollection::new(); - - get_launcher_data(&mut collection.steam); - get_launcher_data(&mut collection.steam_flatpak); - get_launcher_data(&mut collection.lutris); - get_launcher_data(&mut collection.lutris_flatpak); - - collection - } -} - -impl Iterator for LauncherCollection { - type Item = Launcher; - - fn next(&mut self) -> Option { - self.curr += 1; - - match self.curr - 1 { - 0 => Some(self.steam.clone()), - 1 => Some(self.steam_flatpak.clone()), - 2 => Some(self.lutris.clone()), - 3 => Some(self.lutris_flatpak.clone()), - _ => None, - } - } -} - -/// Modifies the passed in Launcher's data -fn get_launcher_data(launcher: &mut Launcher) { - match launcher { - Launcher::Steam(data) => { - let pathbuf = libprotonup::utils::expand_tilde(PathBuf::from( - libprotonup::constants::DEFAULT_STEAM_INSTALL_DIR, - )) - .unwrap(); - modify_launcher_data(pathbuf, data); - } - Launcher::SteamFlatpak(data) => { - let pathbuf = libprotonup::utils::expand_tilde(PathBuf::from( - libprotonup::constants::DEFAULT_STEAM_INSTALL_DIR_FLATPAK, - )) - .unwrap(); - modify_launcher_data(pathbuf, data); - } - Launcher::Lutris(data) => { - let pathbuf = libprotonup::utils::expand_tilde(PathBuf::from( - libprotonup::constants::DEFAULT_LUTRIS_INSTALL_DIR, - )) - .unwrap(); - modify_launcher_data(pathbuf, data); - } - Launcher::LutrisFlatpak(data) => { - let pathbuf = libprotonup::utils::expand_tilde(PathBuf::from( - libprotonup::constants::DEFAULT_LUTRIS_INSTALL_DIR_FLATPAK, - )) - .unwrap(); - modify_launcher_data(pathbuf, data); - } - } -} - -/// Modifies the LauncherData part of any Launcher, each launcher's different path is passed in -fn modify_launcher_data(pathbuf: PathBuf, data: &mut Option) { - let dir_iter = pathbuf.read_dir(); - // If the read_dir returned an error, we'll set the LauncherData to None, otherwise continue - if dir_iter.is_err() { - eprintln!("Couldn't read passed in dir: {:?}\n{:?}", pathbuf, dir_iter); - *data = None - } else { - // Create a list to hold all the Strings of different Proton/Wine versions - let mut entry_list: Vec = vec![]; - for entry in dir_iter.unwrap() { - // If there's an error reading any Proton/Wine release, skip it in the loop - if let Ok(entry) = entry { - if let Ok(name) = entry.file_name().into_string() { - entry_list.push(Install { name }) - } - } - } - *data = Some(LauncherData { - path: pathbuf, - installs: entry_list, - }) - } -} - -#[cfg(test)] -mod tests { - use super::*; - - #[test] - fn test_modify_launcher_data() { - let mut launcher_data: Option = None; - let pathbuf = libprotonup::utils::expand_tilde(PathBuf::from( - libprotonup::constants::DEFAULT_STEAM_INSTALL_DIR, - )) - .unwrap(); - - modify_launcher_data(pathbuf, &mut launcher_data); - - if let Some(launcher_data) = launcher_data { - println!("Found installs: {:?}", launcher_data.installs) - } - } - - #[test] - fn test_find_launcher() { - let list = find_launchers(); - - println!("Got list: {:?}", list); - } -} diff --git a/protonup-rs/src/download.rs b/protonup-rs/src/download.rs index f67b23b..4290fa9 100644 --- a/protonup-rs/src/download.rs +++ b/protonup-rs/src/download.rs @@ -1,5 +1,7 @@ use indicatif::{ProgressBar, ProgressDrawTarget, ProgressStyle}; +use inquire::{Select, Text}; + use std::fs; use std::path::{Path, PathBuf}; use std::{ @@ -8,32 +10,28 @@ use std::{ time::Duration, }; -use libprotonup::{constants, files, github, utils, variants}; +use crate::{file_path, helper_menus}; -pub(crate) async fn download_file( - tag: &str, - source: &variants::VariantParameters, -) -> Result { - let mut temp_dir = utils::expand_tilde(constants::TEMP_DIR).unwrap(); +use libprotonup::{ + apps, constants, files, + github::{self, Download, Release}, + utils, + variants::{self, Variant}, +}; - let download = match github::fetch_data_from_tag(tag, source).await { - Ok(data) => data, - Err(e) => { - eprintln!("Failed to fetch GitHub data, make sure you're connected to the internet\nError: {}", e); - std::process::exit(1) - } - }; +pub(crate) async fn download_file(download: Download) -> Result { + let mut temp_dir = utils::expand_tilde(constants::TEMP_DIR).unwrap(); - temp_dir.push(if download.download.ends_with("tar.gz") { + temp_dir.push(if download.download_url.ends_with("tar.gz") { format!("{}.tar.gz", &download.version) - } else if download.download.ends_with("tar.xz") { + } else if download.download_url.ends_with("tar.xz") { format!("{}.tar.xz", &download.version) } else { eprintln!("Downloaded file wasn't of the expected type. (tar.(gz/xz)"); std::process::exit(1) }); - let git_hash = files::download_file_into_memory(&download.sha512sum) + let git_hash = files::download_file_into_memory(&download.sha512sum_url) .await .unwrap(); @@ -44,7 +42,7 @@ pub(crate) async fn download_file( let (progress, done) = files::create_progress_trackers(); let progress_read = Arc::clone(&progress); let done_read = Arc::clone(&done); - let url = String::from(&download.download); + let url = String::from(&download.download_url); let tmp_dir = String::from(temp_dir.to_str().unwrap()); // start ProgressBar in another thread @@ -73,7 +71,7 @@ pub(crate) async fn download_file( }); files::download_file_progress( - download.download, + download.download_url, download.size, temp_dir.clone().as_path(), progress, @@ -92,7 +90,7 @@ pub(crate) async fn download_file( pub(crate) async fn unpack_file( dowaload_path: &Path, install_path: &str, - source: &variants::VariantParameters, + wine_version: &Variant, ) -> Result<(), String> { let install_dir = utils::expand_tilde(install_path).unwrap(); @@ -100,12 +98,180 @@ pub(crate) async fn unpack_file( println!("Unpacking files into install location. Please wait"); files::decompress(dowaload_path, install_dir.as_path()).unwrap(); - let source_type = source.variant_type(); println!( "Done! Restart {}. {} installed in {}", - source_type.intended_application(), - source_type, + wine_version.intended_application(), + wine_version, install_dir.to_string_lossy(), ); Ok(()) } + +pub async fn run_quick_downloads() { + let found_apps = apps::list_installed_apps(); + if found_apps.is_empty() { + println!("No apps found. Please install at least one app before using this feature."); + return; + } + println!( + "Found the following apps: {}", + found_apps + .iter() + .map(|app| app.to_string()) + .collect::>() + .join(", ") + ); + + for app_inst in &found_apps { + let wine_version = app_inst.into_app().app_wine_version(); + let destination = app_inst.default_install_dir().to_string(); + println!( + "\nQuick Download: {} for {} into -> {}", + wine_version, + app_inst.into_app(), + destination + ); + + // Get the latest Download info for the wine_version + let download = match github::list_releases(&wine_version.get_github_parameters()).await { + // Get the Download info from the first item on the list, the latest version + Ok(release_list) => release_list[0].get_download_info(), + Err(e) => { + eprintln!("Failed to fetch Github data, make sure you're connected to the internet.\nError: {}", e); + std::process::exit(1) + } + }; + + let file = download_file(download).await.unwrap(); + unpack_file(&file, &destination, &wine_version) + .await + .unwrap_or_else(|e| { + eprintln!( + "Failed unpacking file {} into {}. Error: {}", + file.to_string_lossy(), + destination, + e + ); + }); + } +} + +/// Start the Download for the selected app +/// If no app is provided, the user is prompted for which version of Wine/Proton to use and what directory to extract to +pub async fn download_to_selected_app(app: Option) { + // Get the version of Wine/Proton to install + let wine_version = match app { + // Use the default for the app + Some(app) => app.app_wine_version(), + // Or have the user select which one + None => Select::new( + "Choose the variant you want to install:", + variants::ALL_VARIANTS.to_vec(), + ) + .prompt() + .unwrap_or_else(|_| std::process::exit(0)), + }; + + // Get the folder to install Wine/Proton into + let install_dir: String = match app { + // If the user selected an app (Steam/Lutris)... + Some(app) => match app.detect_installation_method() { + // Figure out which versions of the App the user has (Native/Flatpak) + installed_apps if installed_apps.len() == 1 => { + println!( + "Detected {}. Installing to {}", + installed_apps[0], + installed_apps[0].default_install_dir() + ); + installed_apps[0].default_install_dir().to_string() + } + // If the user has more than one installation method, ask them which one they would like to use + installed_apps => Select::new( + "Detected several app versions, which would you like to use?", + installed_apps, + ) + .prompt() + .unwrap_or_else(|_| std::process::exit(0)) + .default_install_dir() + .to_string(), + }, + // If the user didn't select an app, ask them what directory they want to install to + None => Text::new("Installation path:") + .with_autocomplete(file_path::FilePathCompleter::default()) + .with_help_message(&format!( + "Current directory: {}", + &std::env::current_dir() + .unwrap_or_else(|_| std::process::exit(0)) + .to_string_lossy() + )) + .with_default( + &std::env::current_dir() + .unwrap_or_else(|_| std::process::exit(0)) + .to_string_lossy(), + ) + .prompt() + .unwrap_or_else(|_| std::process::exit(0)), + }; + + let release_list = match github::list_releases(&wine_version.get_github_parameters()).await { + Ok(data) => data, + Err(e) => { + eprintln!("Failed to fetch Github data, make sure you're connected to the internet.\nError: {}", e); + std::process::exit(1) + } + }; + + // versions_to_install = vec![]; + + // Let the user choose which releases they want to use + let mut release_list = match helper_menus::multiple_select_menu( + "Select the versions you want to download :", + release_list, + ) { + Ok(release_list) => release_list, + Err(e) => { + eprintln!("The tag list could not be processed.\nError: {}", e); + vec![] + } + }; + + // Check if the versions the user selected are already on the disk + check_if_already_downloaded(&mut release_list, &install_dir).await; + + // Prepare the download for the user's chosen releases/versions + // TODO Look into using async in a way to download multiple files at once, would need to .join all the download_file() 'Futures' + for release in &release_list { + match download_file(release.get_download_info()).await { + Ok(file) => { + // TODO: should just upack once and copy to all folders + unpack_file(&file, &install_dir, &wine_version) + .await + .unwrap(); + } + Err(e) => { + eprintln!( + "Error downloading {}, make sure you're connected to the internet\nError: {}", + release.tag_name, e + ) + } + } + } +} + +/// Checks if the selected Release/version is already installed. +/// Will prompt the user to overwrite existing files +async fn check_if_already_downloaded(release_list: &mut Vec, install_dir: &str) { + release_list.retain(|release| { + // Check if versions exist in disk. + // If they do, ask the user if it should be overwritten + !(files::check_if_exists(&install_dir, &release.tag_name) + && !helper_menus::confirm_menu( + format!( + "Version {} exists in the installation path. Overwrite?", + &release.tag_name + ), + String::from("If you choose yes, you will re-install it."), + false, + )) + }); +} diff --git a/protonup-rs/src/helper_menus.rs b/protonup-rs/src/helper_menus.rs index d6721fe..db8c9dd 100644 --- a/protonup-rs/src/helper_menus.rs +++ b/protonup-rs/src/helper_menus.rs @@ -1,18 +1,15 @@ use inquire::{Confirm, InquireError, MultiSelect}; -use libprotonup::apps::AppInstallations; -pub(crate) fn tag_menu(message: &str, options: Vec) -> Result, InquireError> { - MultiSelect::new(message, options) - .with_default(&[0_usize]) - .prompt() -} - -pub(crate) fn variants_menu( +/// Creates a inquire::MultiSelect menu with the first option selected +pub(crate) fn multiple_select_menu( message: &str, - options: Vec, -) -> Result, InquireError> { + options: Vec, +) -> Result, InquireError> +where + T: std::fmt::Display, +{ MultiSelect::new(message, options) - .with_default(&[0_usize]) + .with_default(&[0]) .prompt() } diff --git a/protonup-rs/src/main.rs b/protonup-rs/src/main.rs index 325fcb3..b0ca81f 100644 --- a/protonup-rs/src/main.rs +++ b/protonup-rs/src/main.rs @@ -1,18 +1,16 @@ use clap::Parser; -use inquire::{Select, Text}; +use inquire::Select; use std::fmt; -use libprotonup::{apps, files, github, variants}; +use libprotonup::apps::App; mod download; mod file_path; mod helper_menus; mod manage_apps; -use download::{download_file, unpack_file}; -use helper_menus::{confirm_menu, tag_menu, variants_menu}; use manage_apps::manage_apps_routine; #[derive(Debug, Parser)] @@ -26,8 +24,8 @@ struct Opt { #[allow(clippy::upper_case_acronyms)] enum InitialMenu { QuickUpdate, - DoanloadForSteam, - DoanloadForLutris, + DownloadForSteam, + DownloadForLutris, DownloadIntoCustomLocation, ManageExistingInstallations, } @@ -36,8 +34,8 @@ impl InitialMenu { // could be generated by macro const VARIANTS: &'static [InitialMenu] = &[ Self::QuickUpdate, - Self::DoanloadForSteam, - Self::DoanloadForLutris, + Self::DownloadForSteam, + Self::DownloadForLutris, Self::DownloadIntoCustomLocation, Self::ManageExistingInstallations, ]; @@ -47,8 +45,8 @@ impl fmt::Display for InitialMenu { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { match *self { Self::QuickUpdate => write!(f, "Quick Update (detect apps and auto download)"), - Self::DoanloadForSteam => write!(f, "Download GE-Proton for Steam"), - Self::DoanloadForLutris => write!(f, "Download GE-Proton/Wine-GE for Lutris"), + Self::DownloadForSteam => write!(f, "Download GE-Proton for Steam"), + Self::DownloadForLutris => write!(f, "Download GE-Proton/Wine-GE for Lutris"), Self::DownloadIntoCustomLocation => { write!(f, "Download GE-Proton/Wine-GE into custom location") } @@ -60,280 +58,41 @@ impl fmt::Display for InitialMenu { #[tokio::main] async fn main() { // run quick downloads and skip InitialMenu - if run_quick_downloads().await { - return; - } - - // Default Parameters - let source: variants::VariantParameters; - let mut install_dirs: Vec = vec![]; - let mut tags: Vec = vec![]; - - let mut should_open_tag_selector = false; - let mut should_open_dir_selector = false; - let mut manage_existing_versions = false; - let mut should_detect_apps = false; - let mut apps_to_use: Vec = vec![]; - let mut selected_app: Option = None; - - let answer: InitialMenu = Select::new( - "ProtonUp Menu: Chose your action:", - InitialMenu::VARIANTS.to_vec(), - ) - .with_page_size(10) - .prompt() - .unwrap_or_else(|_| std::process::exit(0)); - - // Set parameters based on users choice - match answer { - InitialMenu::QuickUpdate => { - should_detect_apps = true; - } - InitialMenu::DoanloadForSteam => { - selected_app = Some(apps::App::Steam); - should_open_tag_selector = true; - } - InitialMenu::DoanloadForLutris => { - selected_app = Some(apps::App::Lutris); - should_open_tag_selector = true; - } - InitialMenu::DownloadIntoCustomLocation => { - should_open_dir_selector = true; - should_open_tag_selector = true; - } - InitialMenu::ManageExistingInstallations => manage_existing_versions = true, - } - - // This is where the execution happens - - // If the user wants to manage existing installations, we skip the rest of the menu - if manage_existing_versions { - manage_apps_routine(); - return; - } - - if should_detect_apps { - apps_to_use = apps::list_installed_apps(); - if apps_to_use.is_empty() { - println!("Could not find any version of Steam or Lutris. Please install at least one app before using this feature."); - return; - } - println!( - "Found the following apps: {}", - apps_to_use - .iter() - .map(|app| app.to_string()) - .collect::>() - .join(", ") - ); - - // TODO: this should be done in a single place. But here we use the default for every app, and in the other part we install all selected tags for all selected apps - for app_inst in &apps_to_use { - let variant = app_inst.into_app().app_default_variant(); - let destination = app_inst.default_install_dir().to_string(); - println!( - "\nQuick Download: {} for {} into -> {}\n", - variant, - app_inst.into_app(), - destination - ); - let file = download_file("latest", &variant.parameters()) - .await - .unwrap(); - unpack_file(&file, &destination, &variant.parameters()) - .await - .unwrap_or_else(|_| std::process::exit(0)); - } - return; - } - - // the rest of th execution is for updating/installing new versions - if should_open_dir_selector { - let current_dir = std::env::current_dir().unwrap_or_else(|_| std::process::exit(0)); - let help_message = format!("Current directory: {}", ¤t_dir.to_string_lossy()); - let answer = Text::new("Installation path:") - .with_autocomplete(file_path::FilePathCompleter::default()) - .with_help_message(&help_message) - .with_default(¤t_dir.to_string_lossy()) - .prompt(); - - match answer { - Ok(path) => { - println!("Will use the custom path: {}", path); - install_dirs.push(path) - } - Err(error) => { - println!("Error choosing custom path. Using the default. Error: {error:?}"); - } - }; - } - - let source_options = match selected_app { - Some(app) => app.app_available_variants(), - None => variants::ALL_VARIANTS.to_vec(), - }; - - if source_options.len() == 1 { - source = source_options[0].parameters(); - } else { - source = Select::new("Chose the variant you want to install:", source_options) - .prompt() - .map(|variant| variant.parameters()) - .unwrap_or_else(|_| std::process::exit(0)); - }; - - // if empty, no apps were detected, so we ask the user to chose one - if apps_to_use.is_empty() && selected_app.is_some() { - apps_to_use = apps::list_installed_apps(); - if !apps_to_use.is_empty() { - // filter detected app installations that match selected app - apps_to_use.retain(|app_inst| app_inst.into_app() == selected_app.unwrap()); - apps_to_use.retain(|app_inst| { - confirm_menu( - format!("Detected {app_inst} installation. Use it?"), - String::from("If you have multiple install options, you can chose all of them"), - true, - ) - }) - } - - // if apps_to_use is empty, list default options - if apps_to_use.is_empty() { - apps_to_use = variants_menu( - "Chose the app you want to install for:", - selected_app.unwrap().app_installations(), - ) - .unwrap_or_else(|_| std::process::exit(0)); - } - } - - // if still no apps were selected - if apps_to_use.is_empty() && selected_app.is_some() { - return; - } - - // past this point, either a path was manually selected or selected_app is not empty - if install_dirs.is_empty() { - install_dirs = apps_to_use - .iter() - .map(|app_inst| app_inst.default_install_dir().to_string()) - .collect(); - } - - if should_open_tag_selector { - tags = vec![]; - let release_list = match github::list_releases(&source).await { - Ok(data) => data, - Err(e) => { - eprintln!("Failed to fetch Github data, make sure you're connected to the internet.\nError: {}", e); - std::process::exit(1) - } - }; - let tag_list: Vec = release_list.into_iter().map(|r| (r.tag_name)).collect(); - let list = match tag_menu("Select the versions you want to download :", tag_list) { - Ok(tags) => tags, - Err(e) => { - eprintln!("The tag list could not be processed.\nError: {}", e); - vec![] - } - }; - for tag_iter in list.iter() { - let tag = String::from(tag_iter); - tags.push(tag); - } + let Opt { quick_download } = Opt::parse(); + if quick_download { + download::run_quick_downloads().await } else { - let tag = match github::fetch_data_from_tag("latest", &source).await { - Ok(data) => data, - Err(e) => { - eprintln!("Failed to fetch Github data, make sure you're connected to the internet.\nError: {}", e); - std::process::exit(1) - } - }; - tags.push(tag.version) - } - - tags.retain(|tag_name| { - // Check if versions exist in disk. - // If they do, ask the user if it should be overwritten - !(install_dirs - .iter() - .any(|install_dir| files::check_if_exists(install_dir, tag_name)) - && !confirm_menu( - format!("Version {tag_name} exists in the installation path. Overwrite?"), - String::from("If you choose yes, you will re-install it."), - false, - )) - }); - - // install the versions that are in the tags array, into the locations that are in the install_dirs array - for tag_name in tags.clone() { - let tag = match github::fetch_data_from_tag(&tag_name, &source).await { - Ok(data) => data, - Err(e) => { - eprintln!("Failed to fetch Github data, make sure you're connected to the internet.\nError: {}", e); - std::process::exit(1) + let answer: InitialMenu = Select::new( + "ProtonUp Menu: Chose your action:", + InitialMenu::VARIANTS.to_vec(), + ) + .with_page_size(10) + .prompt() + .unwrap_or_else(|_| std::process::exit(0)); + + // Set parameters based on users choice + match answer { + InitialMenu::QuickUpdate => download::run_quick_downloads().await, + InitialMenu::DownloadForSteam => { + download::download_to_selected_app(Some(App::Steam)).await } - }; - match download_file(&tag_name, &source).await { - Ok(file) => { - // TODO: should just upack once and copy to all folders - for install_path in &install_dirs { - unpack_file(&file, install_path, &source).await.unwrap(); - } + // selected_app = Some(apps::App::Steam); + // should_open_tag_selector = true; + // } + InitialMenu::DownloadForLutris => { + download::download_to_selected_app(Some(App::Lutris)).await } - Err(e) => { - eprintln!( - "Error downloading {}, make sure you're connected to the internet\nError: {}", - tag.version, e - ) + // selected_app = Some(apps::App::Lutris); + // should_open_tag_selector = true; + // } + InitialMenu::DownloadIntoCustomLocation => { + download::download_to_selected_app(None).await } + // should_open_dir_selector = true; + // should_open_tag_selector = true; + // } + InitialMenu::ManageExistingInstallations => manage_apps_routine(), } } } - -async fn run_quick_downloads() -> bool { - let Opt { quick_download } = Opt::parse(); - - if quick_download { - let found_apps = apps::list_installed_apps(); - if found_apps.is_empty() { - println!("No apps found. Please install at least one app before using this feature."); - return false; - } - println!( - "Found the following apps: {}", - found_apps - .iter() - .map(|app| app.to_string()) - .collect::>() - .join(", ") - ); - - for app_inst in &found_apps { - let variant = app_inst.into_app().app_default_variant(); - let destination = app_inst.default_install_dir().to_string(); - println!( - "\nQuick Download: {} for {} into -> {}", - variant, - app_inst.into_app(), - destination - ); - let file = download_file("latest", &variant.parameters()) - .await - .unwrap(); - unpack_file(&file, &destination, &variant.parameters()) - .await - .unwrap_or_else(|e| { - eprintln!( - "Failed unpacking file {} into {}. Error: {}", - file.to_string_lossy(), - destination, - e - ); - }); - } - } - - quick_download -} diff --git a/protonup-rs/src/manage_apps.rs b/protonup-rs/src/manage_apps.rs index 7a5d04f..d419c56 100644 --- a/protonup-rs/src/manage_apps.rs +++ b/protonup-rs/src/manage_apps.rs @@ -2,7 +2,7 @@ use inquire::MultiSelect; use libprotonup::{apps, files}; use std::fmt; -use super::helper_menus::{confirm_menu, tag_menu}; +use super::helper_menus::{confirm_menu, multiple_select_menu}; #[derive(Debug, PartialEq, Eq, Clone)] pub(crate) enum ManageAppsMenuOptions { @@ -66,7 +66,7 @@ pub(crate) fn manage_apps_routine() { println!("No versions found for {}, skipping... ", app); continue; } - let delete_versions = match tag_menu( + let delete_versions = match multiple_select_menu( &format!("Select the versions you want to DELETE from {}", app), versions, ) {