diff --git a/rust/Cargo.lock b/rust/Cargo.lock index c69038b..61739f6 100644 --- a/rust/Cargo.lock +++ b/rust/Cargo.lock @@ -83,10 +83,60 @@ dependencies = [ ] [[package]] -name = "anyhow" -version = "1.0.96" +name = "anstream" +version = "0.6.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b964d184e89d9b6b67dd2715bc8e74cf3107fb2b529990c90cf517326150bf4" +checksum = "8acc5369981196006228e28809f761875c0327210a891e941f4c683b3a99529b" +dependencies = [ + "anstyle", + "anstyle-parse", + "anstyle-query", + "anstyle-wincon", + "colorchoice", + "is_terminal_polyfill", + "utf8parse", +] + +[[package]] +name = "anstyle" +version = "1.0.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55cc3b69f167a1ef2e161439aa98aed94e6028e5f9a59be9a6ffb47aef1651f9" + +[[package]] +name = "anstyle-parse" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b2d16507662817a6a20a9ea92df6652ee4f94f914589377d69f3b21bc5798a9" +dependencies = [ + "utf8parse", +] + +[[package]] +name = "anstyle-query" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "79947af37f4177cfead1110013d678905c37501914fba0efea834c3fe9a8d60c" +dependencies = [ + "windows-sys 0.59.0", +] + +[[package]] +name = "anstyle-wincon" +version = "3.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca3534e77181a9cc07539ad51f2141fe32f6c3ffd4df76db8ad92346b003ae4e" +dependencies = [ + "anstyle", + "once_cell", + "windows-sys 0.59.0", +] + +[[package]] +name = "anyhow" +version = "1.0.97" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dcfed56ad506cb2c684a14971b8861fdc3baaaae314b9e5f9bb532cbe3ba7a4f" [[package]] name = "arbitrary" @@ -155,9 +205,9 @@ dependencies = [ [[package]] name = "async-compression" -version = "0.4.18" +version = "0.4.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df895a515f70646414f4b45c0b79082783b80552b373a68283012928df56f522" +checksum = "310c9bcae737a48ef5cdee3174184e6d548b292739ede61a1f955ef76a738861" dependencies = [ "flate2", "futures-core", @@ -263,7 +313,7 @@ checksum = "3b43422f69d8ff38f95f1b2bb76517c91589a924d1559a0e935d7c8ce0274c11" dependencies = [ "proc-macro2", "quote", - "syn 2.0.98", + "syn 2.0.99", ] [[package]] @@ -318,13 +368,13 @@ checksum = "8b75356056920673b02621b35afd0f7dda9306d03c79a30f5c56c44cf256e3de" [[package]] name = "async-trait" -version = "0.1.86" +version = "0.1.87" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "644dd749086bf3771a2fbc5f256fdb982d53f011c7d5d560304eafeecebce79d" +checksum = "d556ec1359574147ec0c4fc5eb525f3f23263a592b1a9c07e0a75b427de55c97" dependencies = [ "proc-macro2", "quote", - "syn 2.0.98", + "syn 2.0.99", ] [[package]] @@ -408,9 +458,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.8.0" +version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f68f53c83ab957f72c32642f3868eec03eb974d1fb82e453128456482613d36" +checksum = "5c8214115b7bf84099f1309324e63141d4c5d7cc26862f97a0a857dbefe165bd" dependencies = [ "serde", ] @@ -484,9 +534,9 @@ checksum = "1628fb46dfa0b37568d12e5edd512553eccf6a22a78e8bde00bb4aed84d5bdbf" [[package]] name = "bytemuck" -version = "1.21.0" +version = "1.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef657dfab802224e671f5818e9a4935f9b1957ed18e58292690cc39e7a4092a3" +checksum = "b6b1fc10dbac614ebc03540c9dbd60e83887fda27794998c6528f1782047d540" [[package]] name = "byteorder" @@ -496,30 +546,29 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.10.0" +version = "1.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f61dac84819c6588b558454b194026eb1f09c293b9036ae9b159e74e73ab6cf9" +checksum = "d71b6127be86fdcfddb610f7182ac57211d4b18a3e9c82eb2d17662f2227ad6a" dependencies = [ "serde", ] [[package]] name = "bzip2" -version = "0.5.1" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75b89e7c29231c673a61a46e722602bcd138298f6b9e81e71119693534585f5c" +checksum = "49ecfb22d906f800d4fe833b6282cf4dc1c298f5057ca0b5445e5c209735ca47" dependencies = [ "bzip2-sys", ] [[package]] name = "bzip2-sys" -version = "0.1.12+1.0.8" +version = "0.1.13+1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72ebc2f1a417f01e1da30ef264ee86ae31d2dcd2d603ea283d3c244a883ca2a9" +checksum = "225bff33b2141874fe80d71e07d6eec4f85c5c216453dd96388240f96e1acc14" dependencies = [ "cc", - "libc", "pkg-config", ] @@ -529,7 +578,7 @@ version = "0.18.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8ca26ef0159422fb77631dc9d17b102f253b876fe1586b03b803e63a309b4ee2" dependencies = [ - "bitflags 2.8.0", + "bitflags 2.9.0", "cairo-sys-rs", "glib", "libc", @@ -568,16 +617,16 @@ dependencies = [ [[package]] name = "cargo_metadata" -version = "0.19.1" +version = "0.19.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8769706aad5d996120af43197bf46ef6ad0fda35216b4505f926a365a232d924" +checksum = "dd5eb614ed4c27c5d706420e4320fbe3216ab31fa1c33cd8246ac36dae4479ba" dependencies = [ "camino", "cargo-platform", "semver", "serde", "serde_json", - "thiserror 2.0.11", + "thiserror 2.0.12", ] [[package]] @@ -592,9 +641,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.2.15" +version = "1.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c736e259eea577f443d5c86c304f9f4ae0295c43f3ba05c21f1d66b5f06001af" +checksum = "be714c154be609ec7f5dad223a33bf1482fff90472de28f7362806e6d4832b8c" dependencies = [ "jobserver", "libc", @@ -711,6 +760,12 @@ dependencies = [ "tracing-error", ] +[[package]] +name = "colorchoice" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b63caa9aa9397e2d9480a9b13673856c78d8ac123288526c37d7839f2a86990" + [[package]] name = "colored" version = "2.2.0" @@ -814,7 +869,7 @@ version = "0.24.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fa95a34622365fa5bbf40b20b75dba8dfa8c94c734aea8ac9a5ca38af14316f1" dependencies = [ - "bitflags 2.8.0", + "bitflags 2.9.0", "core-foundation 0.10.0", "core-graphics-types", "foreign-types 0.5.0", @@ -827,7 +882,7 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3d44a101f213f6c4cdc1853d4b78aef6db6bdfa3468798cc1d9912f4735013eb" dependencies = [ - "bitflags 2.8.0", + "bitflags 2.9.0", "core-foundation 0.10.0", "libc", ] @@ -920,7 +975,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "13b588ba4ac1a99f7f2964d24b3d896ddc6bf847ee3855dbd4366f058cfcd331" dependencies = [ "quote", - "syn 2.0.98", + "syn 2.0.99", ] [[package]] @@ -930,7 +985,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32a2785755761f3ddc1492979ce1e48d2c00d09311c39e4466429188f3dd6501" dependencies = [ "quote", - "syn 2.0.98", + "syn 2.0.99", ] [[package]] @@ -954,7 +1009,7 @@ dependencies = [ "proc-macro2", "quote", "strsim 0.11.1", - "syn 2.0.98", + "syn 2.0.99", ] [[package]] @@ -965,7 +1020,7 @@ checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806" dependencies = [ "darling_core", "quote", - "syn 2.0.98", + "syn 2.0.99", ] [[package]] @@ -992,7 +1047,7 @@ checksum = "30542c1ad912e0e3d22a1935c290e12e8a29d704a420177a31faad4a601a0800" dependencies = [ "proc-macro2", "quote", - "syn 2.0.98", + "syn 2.0.99", ] [[package]] @@ -1013,7 +1068,7 @@ dependencies = [ "darling", "proc-macro2", "quote", - "syn 2.0.98", + "syn 2.0.99", ] [[package]] @@ -1023,7 +1078,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ab63b0e2bf4d5928aff72e83a7dace85d7bba5fe12dcc3c5a572d78caffd3f3c" dependencies = [ "derive_builder_core", - "syn 2.0.98", + "syn 2.0.99", ] [[package]] @@ -1036,7 +1091,7 @@ dependencies = [ "proc-macro2", "quote", "rustc_version", - "syn 2.0.98", + "syn 2.0.99", ] [[package]] @@ -1056,7 +1111,7 @@ checksum = "bda628edc44c4bb645fbe0f758797143e4e07926f7ebf4e9bdfbd3d2ce621df3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.98", + "syn 2.0.99", "unicode-xid", ] @@ -1115,20 +1170,20 @@ checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.98", + "syn 2.0.99", ] [[package]] name = "displayz" -version = "0.1.0" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12b411b792aa2feace76922db6aa2e748f089370aa994c8da4f5c0b48e701a25" +checksum = "1c4dcacd3bb7333a58f8a9e21349c63c2d6d67e0785c1f64e58110bb7ab9a528" dependencies = [ "color-eyre", "env_logger", "log", "structopt", - "thiserror 1.0.69", + "thiserror 2.0.12", "winsafe 0.0.10", ] @@ -1161,7 +1216,7 @@ checksum = "f2b99bf03862d7f545ebc28ddd33a665b50865f4dfd84031a393823879bd4c54" dependencies = [ "proc-macro2", "quote", - "syn 2.0.98", + "syn 2.0.99", ] [[package]] @@ -1190,9 +1245,9 @@ dependencies = [ [[package]] name = "dtoa" -version = "1.0.9" +version = "1.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcbb2bf8e87535c23f7a8a321e364ce21462d0ff10cb6407820e8e96dfff6653" +checksum = "d6add3b8cff394282be81f3fc1a0605db594ed69890078ca6e2cab1c408bcf04" [[package]] name = "dtoa-short" @@ -1211,15 +1266,15 @@ checksum = "92773504d58c093f6de2459af4af33faa518c13451eb8f2b5698ed3d36e7c813" [[package]] name = "dyn-clone" -version = "1.0.18" +version = "1.0.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "feeef44e73baff3a26d371801df019877a9866a8c493d315ab00177843314f35" +checksum = "1c7a8fb8a9fbf66c1f703fe16184d10ca0ee9d23be5b4436400408ba54a95005" [[package]] name = "embed-resource" -version = "3.0.1" +version = "3.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4762ce03154ba57ebaeee60cc631901ceae4f18219cbb874e464347471594742" +checksum = "7fbc6e0d8e0c03a655b53ca813f0463d2c956bc4db8138dbc89f120b066551e3" dependencies = [ "cc", "memchr", @@ -1268,20 +1323,30 @@ checksum = "fc4caf64a58d7a6d65ab00639b046ff54399a39f5f2554728895ace4b297cd79" dependencies = [ "proc-macro2", "quote", - "syn 2.0.98", + "syn 2.0.99", +] + +[[package]] +name = "env_filter" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "186e05a59d4c50738528153b83b0b0194d3a29507dfec16eccd4b342903397d0" +dependencies = [ + "log", + "regex", ] [[package]] name = "env_logger" -version = "0.9.3" +version = "0.11.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a12e6657c4c97ebab115a42dcee77225f7f482cdd841cf7088c657a42e9e00e7" +checksum = "dcaee3d8e3cfc3fd92428d477bc97fc29ec8716d180c0d74c643bb26166660e0" dependencies = [ - "atty", + "anstream", + "anstyle", + "env_filter", "humantime", "log", - "regex", - "termcolor", ] [[package]] @@ -1292,9 +1357,9 @@ checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" [[package]] name = "erased-serde" -version = "0.4.5" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24e2389d65ab4fab27dc2a5de7b191e1f6617d1f1c8855c0dc569c94a4cbb18d" +checksum = "e004d887f51fcb9fef17317a2f3525c887d8aa3f4f50fed920816a688284a5b7" dependencies = [ "serde", "typeid", @@ -1415,7 +1480,7 @@ checksum = "1a5c6c585bc94aaf2c7b51dd4c2ba22680844aba4c687be581871a6f518c5742" dependencies = [ "proc-macro2", "quote", - "syn 2.0.98", + "syn 2.0.99", ] [[package]] @@ -1518,7 +1583,7 @@ checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" dependencies = [ "proc-macro2", "quote", - "syn 2.0.98", + "syn 2.0.99", ] [[package]] @@ -1749,7 +1814,7 @@ version = "0.18.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "233daaf6e83ae6a12a52055f568f9d7cf4671dabb78ff9560ab6da230ce00ee5" dependencies = [ - "bitflags 2.8.0", + "bitflags 2.9.0", "futures-channel", "futures-core", "futures-executor", @@ -1777,7 +1842,7 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.98", + "syn 2.0.99", ] [[package]] @@ -1868,7 +1933,7 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.98", + "syn 2.0.99", ] [[package]] @@ -1981,7 +2046,7 @@ checksum = "f16ca2af56261c99fba8bac40a10251ce8188205a4c448fbb745a2e4daa76fea" dependencies = [ "bytes", "fnv", - "itoa 1.0.14", + "itoa 1.0.15", ] [[package]] @@ -2015,9 +2080,9 @@ checksum = "21dec9db110f5f872ed9699c3ecf50cf16f423502706ba5c72462e28d3157573" [[package]] name = "httparse" -version = "1.10.0" +version = "1.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2d708df4e7140240a16cd6ab0ab65c972d7433ab77819ea693fde9c43811e2a" +checksum = "6dbf3de79e51f3d586ab4cb9d5c3e2c14aa28ed23d180cf89b4df0454a69cc87" [[package]] name = "humantime" @@ -2038,7 +2103,7 @@ dependencies = [ "http", "http-body", "httparse", - "itoa 1.0.14", + "itoa 1.0.15", "pin-project-lite", "smallvec", "tokio", @@ -2246,7 +2311,7 @@ checksum = "1ec89e9337638ecdc08744df490b221a7399bf8d164eb52a665454e60e075ad6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.98", + "syn 2.0.99", ] [[package]] @@ -2347,6 +2412,12 @@ dependencies = [ "once_cell", ] +[[package]] +name = "is_terminal_polyfill" +version = "1.70.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf" + [[package]] name = "itoa" version = "0.4.8" @@ -2355,9 +2426,9 @@ checksum = "b71991ff56294aa922b450139ee08b3bfc70982c6b2c7562771375cf73542dd4" [[package]] name = "itoa" -version = "1.0.14" +version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d75a2a4b1b190afb6f5425f10f6a8f959d2ea0b9c2b1d79553551850539e4674" +checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c" [[package]] name = "javascriptcore-rs" @@ -2461,7 +2532,7 @@ version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b750dcadc39a09dbadd74e118f6dd6598df77fa01df0cfcdc52c28dece74528a" dependencies = [ - "bitflags 2.8.0", + "bitflags 2.9.0", "serde", "unicode-segmentation", ] @@ -2550,7 +2621,7 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d" dependencies = [ - "bitflags 2.8.0", + "bitflags 2.9.0", "libc", ] @@ -2680,9 +2751,9 @@ dependencies = [ [[package]] name = "muda" -version = "0.16.0" +version = "0.16.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89fed9ce3e5c01700e3a129d3d74619bbf468645b58274b420885107e496ecff" +checksum = "4de14a9b5d569ca68d7c891d613b390cf5ab4f851c77aaa2f9e435555d3d9492" dependencies = [ "crossbeam-channel", "dpi", @@ -2695,7 +2766,7 @@ dependencies = [ "once_cell", "png", "serde", - "thiserror 2.0.11", + "thiserror 2.0.12", "windows-sys 0.59.0", ] @@ -2722,7 +2793,7 @@ version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c3f42e7bbe13d351b6bead8286a43aac9534b82bd3cc43e47037f012ebfd62d4" dependencies = [ - "bitflags 2.8.0", + "bitflags 2.9.0", "jni-sys", "log", "ndk-sys", @@ -2758,7 +2829,7 @@ version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "71e2746dc3a24dd78b3cfcb7be93368c6de9963d30f43a6a73998a9cf4b17b46" dependencies = [ - "bitflags 2.8.0", + "bitflags 2.9.0", "cfg-if", "cfg_aliases", "libc", @@ -2804,7 +2875,7 @@ dependencies = [ "proc-macro-crate 3.2.0", "proc-macro2", "quote", - "syn 2.0.98", + "syn 2.0.99", ] [[package]] @@ -2848,7 +2919,7 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e4e89ad9e3d7d297152b17d39ed92cd50ca8063a89a9fa569046d41568891eff" dependencies = [ - "bitflags 2.8.0", + "bitflags 2.9.0", "block2 0.5.1", "libc", "objc2 0.5.2", @@ -2864,7 +2935,7 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5906f93257178e2f7ae069efb89fbd6ee94f0592740b5f8a1512ca498814d0fb" dependencies = [ - "bitflags 2.8.0", + "bitflags 2.9.0", "block2 0.6.0", "libc", "objc2 0.6.0", @@ -2883,7 +2954,7 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6c1948a9be5f469deadbd6bcb86ad7ff9e47b4f632380139722f7d9840c0d42c" dependencies = [ - "bitflags 2.8.0", + "bitflags 2.9.0", "objc2 0.6.0", "objc2-foundation 0.3.0", ] @@ -2894,7 +2965,7 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "617fbf49e071c178c0b24c080767db52958f716d9eabdf0890523aeae54773ef" dependencies = [ - "bitflags 2.8.0", + "bitflags 2.9.0", "block2 0.5.1", "objc2 0.5.2", "objc2-foundation 0.2.2", @@ -2906,7 +2977,7 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1f860f8e841f6d32f754836f51e6bc7777cd7e7053cf18528233f6811d3eceb4" dependencies = [ - "bitflags 2.8.0", + "bitflags 2.9.0", "objc2 0.6.0", "objc2-foundation 0.3.0", ] @@ -2917,7 +2988,7 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "daeaf60f25471d26948a1c2f840e3f7d86f4109e3af4e8e4b5cd70c39690d925" dependencies = [ - "bitflags 2.8.0", + "bitflags 2.9.0", "objc2 0.6.0", ] @@ -2927,7 +2998,7 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f8dca602628b65356b6513290a21a6405b4d4027b8b250f0b98dddbb28b7de02" dependencies = [ - "bitflags 2.8.0", + "bitflags 2.9.0", "objc2 0.6.0", "objc2-core-foundation", "objc2-io-surface", @@ -2976,7 +3047,7 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0ee638a5da3799329310ad4cfa62fbf045d5f56e3ef5ba4149e7452dcf89d5a8" dependencies = [ - "bitflags 2.8.0", + "bitflags 2.9.0", "block2 0.5.1", "dispatch", "libc", @@ -2989,7 +3060,7 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3a21c6c9014b82c39515db5b396f91645182611c97d24637cf56ac01e5f8d998" dependencies = [ - "bitflags 2.8.0", + "bitflags 2.9.0", "block2 0.6.0", "libc", "objc2 0.6.0", @@ -3002,7 +3073,7 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "161a8b87e32610086e1a7a9e9ec39f84459db7b3a0881c1f16ca5a2605581c19" dependencies = [ - "bitflags 2.8.0", + "bitflags 2.9.0", "objc2 0.6.0", "objc2-core-foundation", ] @@ -3013,7 +3084,7 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dd0cba1276f6023976a406a14ffa85e1fdd19df6b0f737b063b95f6c8c7aadd6" dependencies = [ - "bitflags 2.8.0", + "bitflags 2.9.0", "block2 0.5.1", "objc2 0.5.2", "objc2-foundation 0.2.2", @@ -3025,7 +3096,7 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e42bee7bff906b14b167da2bac5efe6b6a07e6f7c0a21a7308d40c960242dc7a" dependencies = [ - "bitflags 2.8.0", + "bitflags 2.9.0", "block2 0.5.1", "objc2 0.5.2", "objc2-foundation 0.2.2", @@ -3038,7 +3109,7 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6fb3794501bb1bee12f08dcad8c61f2a5875791ad1c6f47faa71a0f033f20071" dependencies = [ - "bitflags 2.8.0", + "bitflags 2.9.0", "objc2 0.6.0", "objc2-foundation 0.3.0", ] @@ -3049,7 +3120,7 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "777a571be14a42a3990d4ebedaeb8b54cd17377ec21b92e8200ac03797b3bee1" dependencies = [ - "bitflags 2.8.0", + "bitflags 2.9.0", "objc2 0.6.0", "objc2-core-foundation", "objc2-foundation 0.3.0", @@ -3061,7 +3132,7 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b717127e4014b0f9f3e8bba3d3f2acec81f1bde01f656823036e823ed2c94dce" dependencies = [ - "bitflags 2.8.0", + "bitflags 2.9.0", "block2 0.6.0", "objc2 0.6.0", "objc2-app-kit 0.3.0", @@ -3102,7 +3173,7 @@ version = "0.10.71" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5e14130c6a98cd258fdcb0fb6d744152343ff729cbfcb28c656a9d12b999fbcd" dependencies = [ - "bitflags 2.8.0", + "bitflags 2.9.0", "cfg-if", "foreign-types 0.3.2", "libc", @@ -3119,7 +3190,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.98", + "syn 2.0.99", ] [[package]] @@ -3265,7 +3336,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b7cafe60d6cf8e62e1b9b2ea516a089c008945bb5a275416789e7db0bc199dc" dependencies = [ "memchr", - "thiserror 2.0.11", + "thiserror 2.0.12", "ucd-trie", ] @@ -3289,7 +3360,7 @@ dependencies = [ "pest_meta", "proc-macro2", "quote", - "syn 2.0.98", + "syn 2.0.99", ] [[package]] @@ -3407,7 +3478,7 @@ dependencies = [ "phf_shared 0.11.3", "proc-macro2", "quote", - "syn 2.0.98", + "syn 2.0.99", ] [[package]] @@ -3462,9 +3533,9 @@ dependencies = [ [[package]] name = "pkg-config" -version = "0.3.31" +version = "0.3.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "953ec861398dccce10c670dfeaf3ec4911ca479e9c02154b3a215178c5f566f2" +checksum = "7edddbd0b52d732b21ad9a5fab5c704c14cd949e5e9a1ec5929a24fded1b904c" [[package]] name = "plist" @@ -3588,9 +3659,9 @@ checksum = "dc375e1527247fe1a97d8b7156678dfe7c1af2fc075c9a4db3690ecd2a148068" [[package]] name = "proc-macro2" -version = "1.0.93" +version = "1.0.94" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60946a68e5f9d28b0dc1c21bb8a97ee7d018a8b322fa57838ba31cc878e22d99" +checksum = "a31971752e70b8b2686d7e46ec17fb38dad4051d94024c88df49b667caea9c84" dependencies = [ "unicode-ident", ] @@ -3626,7 +3697,7 @@ dependencies = [ "rustc-hash", "rustls", "socket2", - "thiserror 2.0.11", + "thiserror 2.0.12", "tokio", "tracing", ] @@ -3645,7 +3716,7 @@ dependencies = [ "rustls", "rustls-pki-types", "slab", - "thiserror 2.0.11", + "thiserror 2.0.12", "tinyvec", "tracing", "web-time", @@ -3667,9 +3738,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.38" +version = "1.0.39" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e4dccaaaf89514f546c693ddc140f729f958c247918a13380cccc6078391acc" +checksum = "c1f1914ce909e1658d9907913b4b91947430c7d9be598b15a1912935b8c04801" dependencies = [ "proc-macro2", ] @@ -3763,11 +3834,11 @@ checksum = "20675572f6f24e9e76ef639bc5552774ed45f1c30e2951e1e99c59888861c539" [[package]] name = "redox_syscall" -version = "0.5.9" +version = "0.5.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82b568323e98e49e2a0899dcee453dd679fae22d69adf9b11dd508d1549b7e2f" +checksum = "0b8c0c260b63a8219631167be35e6a988e9554dbd323f8bd08439c8ed1302bd1" dependencies = [ - "bitflags 2.8.0", + "bitflags 2.9.0", ] [[package]] @@ -3778,7 +3849,7 @@ checksum = "dd6f9d3d47bdd2ad6945c5015a226ec6155d0bcdfd8f7cd29f86b71f8de99d2b" dependencies = [ "getrandom 0.2.15", "libredox", - "thiserror 2.0.11", + "thiserror 2.0.12", ] [[package]] @@ -3938,7 +4009,7 @@ version = "0.38.44" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fdb5bc1ae2baa591800df16c9ca78619bf65c0488b41b96ccec5d11220d8c154" dependencies = [ - "bitflags 2.8.0", + "bitflags 2.9.0", "errno", "libc", "linux-raw-sys", @@ -3990,15 +4061,15 @@ dependencies = [ [[package]] name = "rustversion" -version = "1.0.19" +version = "1.0.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7c45b9784283f1b2e7fb61b42047c2fd678ef0960d4f6f1eba131594cc369d4" +checksum = "eded382c5f5f786b989652c49544c4877d9f015cc22e145a5ea8ea66c2921cd2" [[package]] name = "ryu" -version = "1.0.19" +version = "1.0.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ea1a2d0a644769cc99faa24c3ad26b379b786fe7c36fd3c546254801650e6dd" +checksum = "28d3b2b1366ec20994f1fd18c3c594f05c5dd4bc44d8bb0c1c632c8d6829481f" [[package]] name = "same-file" @@ -4042,7 +4113,7 @@ dependencies = [ "proc-macro2", "quote", "serde_derive_internals", - "syn 2.0.98", + "syn 2.0.99", ] [[package]] @@ -4063,7 +4134,7 @@ version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" dependencies = [ - "bitflags 2.8.0", + "bitflags 2.9.0", "core-foundation 0.9.4", "core-foundation-sys", "libc", @@ -4102,9 +4173,9 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.25" +version = "1.0.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f79dfe2d285b0488816f30e700a7438c5a73d816b5b7d3ac72fbc48b0d185e03" +checksum = "56e6fa9c48d24d85fb3de5ad847117517440f6beceb7798af16b4a87d616b8d0" dependencies = [ "serde", ] @@ -4120,9 +4191,9 @@ dependencies = [ [[package]] name = "serde-untagged" -version = "0.1.6" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2676ba99bd82f75cae5cbd2c8eda6fa0b8760f18978ea840e980dd5567b5c5b6" +checksum = "299d9c19d7d466db4ab10addd5703e4c615dec2a5a16dbbafe191045e87ee66e" dependencies = [ "erased-serde", "serde", @@ -4137,7 +4208,7 @@ checksum = "f09503e191f4e797cb8aac08e9a4a4695c5edf6a2e70e376d961ddd5c969f82b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.98", + "syn 2.0.99", ] [[package]] @@ -4148,16 +4219,16 @@ checksum = "18d26a20a969b9e3fdf2fc2d9f21eda6c40e2de84c9408bb5d3b05d499aae711" dependencies = [ "proc-macro2", "quote", - "syn 2.0.98", + "syn 2.0.99", ] [[package]] name = "serde_json" -version = "1.0.139" +version = "1.0.140" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44f86c3acccc9c65b153fe1b85a3be07fe5515274ec9f0653b4a0875731c72a6" +checksum = "20068b6e96dc6c9bd23e01df8827e6c7e1f2fddd43c21810382803c136b99373" dependencies = [ - "itoa 1.0.14", + "itoa 1.0.15", "memchr", "ryu", "serde", @@ -4176,13 +4247,13 @@ dependencies = [ [[package]] name = "serde_repr" -version = "0.1.19" +version = "0.1.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c64451ba24fc7a6a2d60fc75dd9c83c90903b19028d4eff35e88fc1e86564e9" +checksum = "175ee3e80ae9982737ca543e96133087cbd9a485eecc3bc4de9c1a37b47ea59c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.98", + "syn 2.0.99", ] [[package]] @@ -4201,7 +4272,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" dependencies = [ "form_urlencoded", - "itoa 1.0.14", + "itoa 1.0.15", "ryu", "serde", ] @@ -4233,7 +4304,7 @@ dependencies = [ "darling", "proc-macro2", "quote", - "syn 2.0.98", + "syn 2.0.99", ] [[package]] @@ -4567,9 +4638,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.98" +version = "2.0.99" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36147f1a48ae0ec2b5b3bc5b537d267457555a10dc06f3dbc8cb11ba3006d3b1" +checksum = "e02e925281e18ffd9d640e234264753c43edc62d64b2d4cf898f1bc5e75f3fc2" dependencies = [ "proc-macro2", "quote", @@ -4593,7 +4664,7 @@ checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" dependencies = [ "proc-macro2", "quote", - "syn 2.0.98", + "syn 2.0.99", ] [[package]] @@ -4602,7 +4673,7 @@ version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3c879d448e9d986b661742763247d3693ed13609438cf3d006f51f5368a5ba6b" dependencies = [ - "bitflags 2.8.0", + "bitflags 2.9.0", "core-foundation 0.9.4", "system-configuration-sys", ] @@ -4632,11 +4703,11 @@ dependencies = [ [[package]] name = "tao" -version = "0.32.3" +version = "0.32.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d8f5e5fe19612f3dd187ac3928d48f5ad23d3edd9821806d05b0c3beb6537bd" +checksum = "7e7f38988a68dfb559899ea307b97577f008d3254f6cfdd219a67e27ce34c95b" dependencies = [ - "bitflags 2.8.0", + "bitflags 2.9.0", "core-foundation 0.10.0", "core-graphics", "crossbeam-channel", @@ -4663,7 +4734,7 @@ dependencies = [ "tao-macros", "unicode-segmentation", "url", - "windows 0.60.0", + "windows", "windows-core 0.60.1", "windows-version", "x11-dl", @@ -4677,7 +4748,7 @@ checksum = "f4e16beb8b2ac17db28eab8bca40e62dbfbb34c0fcdc6d9826b11b7b5d047dfd" dependencies = [ "proc-macro2", "quote", - "syn 2.0.98", + "syn 2.0.99", ] [[package]] @@ -4688,9 +4759,9 @@ checksum = "61c41af27dd6d1e27b1b16b489db798443478cef1f06a660c96db617ba5de3b1" [[package]] name = "tauri" -version = "2.3.0" +version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f32eadd4a507f1b61e4fd1f792d0ed4184127a3241ff5bcb1848b9a574a58d6" +checksum = "3be747b26bf28674977fac47bdf6963fd9c7578271c3fbeb25d8686de6596f35" dependencies = [ "anyhow", "bytes", @@ -4726,7 +4797,7 @@ dependencies = [ "tauri-runtime", "tauri-runtime-wry", "tauri-utils", - "thiserror 2.0.11", + "thiserror 2.0.12", "tokio", "tray-icon", "url", @@ -4734,7 +4805,7 @@ dependencies = [ "webkit2gtk", "webview2-com", "window-vibrancy", - "windows 0.60.0", + "windows", ] [[package]] @@ -4777,9 +4848,9 @@ dependencies = [ "serde", "serde_json", "sha2", - "syn 2.0.98", + "syn 2.0.99", "tauri-utils", - "thiserror 2.0.11", + "thiserror 2.0.12", "time", "url", "uuid", @@ -4795,7 +4866,7 @@ dependencies = [ "heck 0.5.0", "proc-macro2", "quote", - "syn 2.0.98", + "syn 2.0.99", "tauri-codegen", "tauri-utils", ] @@ -4830,7 +4901,7 @@ dependencies = [ "tauri", "tauri-plugin", "tauri-utils", - "thiserror 2.0.11", + "thiserror 2.0.12", "tracing", "url", "windows-registry 0.3.0", @@ -4851,7 +4922,7 @@ dependencies = [ "tauri", "tauri-plugin", "tauri-plugin-fs", - "thiserror 2.0.11", + "thiserror 2.0.12", "url", ] @@ -4872,7 +4943,7 @@ dependencies = [ "tauri", "tauri-plugin", "tauri-utils", - "thiserror 2.0.11", + "thiserror 2.0.12", "toml", "url", "uuid", @@ -4880,23 +4951,23 @@ dependencies = [ [[package]] name = "tauri-plugin-opener" -version = "2.2.5" +version = "2.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "635ed7c580dc3cdc61c94097d38ef517d749ffc0141c806d904e68e4b0cf1c2a" +checksum = "2fdc6cb608e04b7d2b6d1f21e9444ad49245f6d03465ba53323d692d1ceb1a30" dependencies = [ "dunce", "glob", - "objc2-app-kit 0.2.2", - "objc2-foundation 0.2.2", + "objc2-app-kit 0.3.0", + "objc2-foundation 0.3.0", "open", "schemars", "serde", "serde_json", "tauri", "tauri-plugin", - "thiserror 2.0.11", + "thiserror 2.0.12", "url", - "windows 0.58.0", + "windows", "zbus", ] @@ -4917,7 +4988,7 @@ dependencies = [ "shared_child", "tauri", "tauri-plugin", - "thiserror 2.0.11", + "thiserror 2.0.12", "tokio", ] @@ -4931,7 +5002,7 @@ dependencies = [ "serde_json", "tauri", "tauri-plugin-deep-link", - "thiserror 2.0.11", + "thiserror 2.0.12", "tracing", "windows-sys 0.59.0", "zbus", @@ -4951,16 +5022,16 @@ dependencies = [ "serde", "serde_json", "tauri-utils", - "thiserror 2.0.11", + "thiserror 2.0.12", "url", - "windows 0.60.0", + "windows", ] [[package]] name = "tauri-runtime-wry" -version = "2.4.0" +version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ef46e0c9c30d3524990cb10556f82cde0aa2281e9600e7ed2f499842db8b080" +checksum = "8b2beb90decade4c71e8b09c9e4a9245837a8a97693f945b77e32baf13f51fec" dependencies = [ "gtk", "http", @@ -4969,6 +5040,7 @@ dependencies = [ "objc2 0.6.0", "objc2-app-kit 0.3.0", "objc2-foundation 0.3.0", + "once_cell", "percent-encoding", "raw-window-handle", "softbuffer", @@ -4978,7 +5050,7 @@ dependencies = [ "url", "webkit2gtk", "webview2-com", - "windows 0.60.0", + "windows", "wry", ] @@ -5011,7 +5083,7 @@ dependencies = [ "serde_json", "serde_with", "swift-rs", - "thiserror 2.0.11", + "thiserror 2.0.12", "toml", "url", "urlpattern", @@ -5054,15 +5126,6 @@ dependencies = [ "utf-8", ] -[[package]] -name = "termcolor" -version = "1.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06794f8f6c5c898b3275aebefa6b8a1cb24cd2c6c79397ab15774837a0bc5755" -dependencies = [ - "winapi-util", -] - [[package]] name = "textwrap" version = "0.11.0" @@ -5089,11 +5152,11 @@ dependencies = [ [[package]] name = "thiserror" -version = "2.0.11" +version = "2.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d452f284b73e6d76dd36758a0c8684b1d5be31f92b89d07fd5822175732206fc" +checksum = "567b8a2dae586314f7be2a752ec7474332959c6460e02bde30d702a66d488708" dependencies = [ - "thiserror-impl 2.0.11", + "thiserror-impl 2.0.12", ] [[package]] @@ -5104,18 +5167,18 @@ checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.98", + "syn 2.0.99", ] [[package]] name = "thiserror-impl" -version = "2.0.11" +version = "2.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26afc1baea8a989337eeb52b6e72a039780ce45c3edfcc9c5b9d112feeb173c2" +checksum = "7f7cf42b4507d8ea322120659672cf1b9dbb93f8f2d4ecfd6e51350ff5b17a1d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.98", + "syn 2.0.99", ] [[package]] @@ -5130,12 +5193,12 @@ dependencies = [ [[package]] name = "time" -version = "0.3.37" +version = "0.3.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35e7868883861bd0e56d9ac6efcaaca0d6d5d82a2a7ec8209ff492c07cf37b21" +checksum = "bb041120f25f8fbe8fd2dbe4671c7c2ed74d83be2e7a77529bf7e0790ae3f472" dependencies = [ "deranged", - "itoa 1.0.14", + "itoa 1.0.15", "libc", "num-conv", "num_threads", @@ -5147,15 +5210,15 @@ dependencies = [ [[package]] name = "time-core" -version = "0.1.2" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" +checksum = "765c97a5b985b7c11d7bc27fa927dc4fe6af3a6dfb021d28deb60d3bf51e76ef" [[package]] name = "time-macros" -version = "0.2.19" +version = "0.2.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2834e6017e3e5e4b9834939793b282bc03b37a3336245fa820e35e233e2a85de" +checksum = "e8093bc3e81c3bc5f7879de09619d06c9a5a5e45ca44dfeeb7225bae38005c5c" dependencies = [ "num-conv", "time-core", @@ -5182,9 +5245,9 @@ dependencies = [ [[package]] name = "tinyvec" -version = "1.8.1" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "022db8904dfa342efe721985167e9fcd16c29b226db4397ed752a761cfce81e8" +checksum = "09b3661f17e86524eccd4371ab0429194e0d7c008abb45f7a7495b1719463c71" dependencies = [ "tinyvec_macros", ] @@ -5222,7 +5285,7 @@ checksum = "6e06d43f1345a3bcd39f6a56dbb7dcab2ba47e68e8ac134855e7e2bdbaf8cab8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.98", + "syn 2.0.99", ] [[package]] @@ -5237,9 +5300,9 @@ dependencies = [ [[package]] name = "tokio-rustls" -version = "0.26.1" +version = "0.26.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f6d0975eaace0cf0fcadee4e4aaa5da15b5c079146f2cffb67c113be122bf37" +checksum = "8e727b36a1a0e8b74c376ac2211e40c2c8af09fb4013c60d910495810f008e9b" dependencies = [ "rustls", "tokio", @@ -5360,7 +5423,7 @@ checksum = "395ae124c09f9e6918a2310af6038fba074bcf474ac352496d5910dd59a2226d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.98", + "syn 2.0.99", ] [[package]] @@ -5412,7 +5475,7 @@ dependencies = [ "once_cell", "png", "serde", - "thiserror 2.0.11", + "thiserror 2.0.12", "windows-sys 0.59.0", ] @@ -5430,9 +5493,9 @@ checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" [[package]] name = "typeid" -version = "1.0.2" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e13db2e0ccd5e14a544e8a246ba2312cd25223f616442d7f2cb0e3db614236e" +checksum = "bc7d623258602320d5c55d1bc22793b57daff0ec7efc270ea7d55ce1d5f5471c" [[package]] name = "typenum" @@ -5500,9 +5563,9 @@ dependencies = [ [[package]] name = "unicode-ident" -version = "1.0.17" +version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00e2473a93778eb0bad35909dff6a10d28e63f792f16ed15e404fca9d5eeedbe" +checksum = "5a5f39404a5da50712a4c1eecf25e90dd62b613502b7e925fd4e4d19b5c96512" [[package]] name = "unicode-segmentation" @@ -5570,6 +5633,12 @@ version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" +[[package]] +name = "utf8parse" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" + [[package]] name = "uuid" version = "1.15.1" @@ -5698,7 +5767,7 @@ dependencies = [ "log", "proc-macro2", "quote", - "syn 2.0.98", + "syn 2.0.99", "wasm-bindgen-shared", ] @@ -5733,7 +5802,7 @@ checksum = "8ae87ea40c9f689fc23f209965b6fb8a99ad69aeeb0231408be24920604395de" dependencies = [ "proc-macro2", "quote", - "syn 2.0.98", + "syn 2.0.99", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -5780,7 +5849,7 @@ version = "0.31.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c2120de3d33638aaef5b9f4472bff75f07c56379cf76ea320bd3a3d65ecaf73f" dependencies = [ - "bitflags 2.8.0", + "bitflags 2.9.0", "rustix", "wayland-backend", "wayland-scanner", @@ -5792,7 +5861,7 @@ version = "0.32.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0781cf46869b37e36928f7b432273c0995aa8aed9552c556fb18754420541efc" dependencies = [ - "bitflags 2.8.0", + "bitflags 2.9.0", "wayland-backend", "wayland-client", "wayland-scanner", @@ -5901,10 +5970,10 @@ checksum = "b0d606f600e5272b514dbb66539dd068211cc20155be8d3958201b4b5bd79ed3" dependencies = [ "webview2-com-macros", "webview2-com-sys", - "windows 0.60.0", + "windows", "windows-core 0.60.1", - "windows-implement 0.59.0", - "windows-interface 0.59.0", + "windows-implement", + "windows-interface", ] [[package]] @@ -5915,7 +5984,7 @@ checksum = "1d228f15bba3b9d56dde8bddbee66fa24545bd17b48d5128ccf4a8742b18e431" dependencies = [ "proc-macro2", "quote", - "syn 2.0.98", + "syn 2.0.99", ] [[package]] @@ -5924,8 +5993,8 @@ version = "0.36.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bfb27fccd3c27f68e9a6af1bcf48c2d82534b8675b83608a4d81446d095a17ac" dependencies = [ - "thiserror 2.0.11", - "windows 0.60.0", + "thiserror 2.0.12", + "windows", "windows-core 0.60.1", ] @@ -5975,16 +6044,6 @@ dependencies = [ "windows-version", ] -[[package]] -name = "windows" -version = "0.58.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd04d41d93c4992d421894c18c8b43496aa748dd4c081bac0dc93eb0489272b6" -dependencies = [ - "windows-core 0.58.0", - "windows-targets 0.52.6", -] - [[package]] name = "windows" version = "0.60.0" @@ -6016,27 +6075,14 @@ dependencies = [ "windows-targets 0.52.6", ] -[[package]] -name = "windows-core" -version = "0.58.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ba6d44ec8c2591c134257ce647b7ea6b20335bf6379a27dac5f1641fcf59f99" -dependencies = [ - "windows-implement 0.58.0", - "windows-interface 0.58.0", - "windows-result 0.2.0", - "windows-strings 0.1.0", - "windows-targets 0.52.6", -] - [[package]] name = "windows-core" version = "0.60.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ca21a92a9cae9bf4ccae5cf8368dce0837100ddf6e6d57936749e85f152f6247" dependencies = [ - "windows-implement 0.59.0", - "windows-interface 0.59.0", + "windows-implement", + "windows-interface", "windows-link", "windows-result 0.3.1", "windows-strings 0.3.1", @@ -6052,17 +6098,6 @@ dependencies = [ "windows-link", ] -[[package]] -name = "windows-implement" -version = "0.58.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2bbd5b46c938e506ecbce286b6628a02171d56153ba733b6c741fc627ec9579b" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.98", -] - [[package]] name = "windows-implement" version = "0.59.0" @@ -6071,18 +6106,7 @@ checksum = "83577b051e2f49a058c308f17f273b570a6a758386fc291b5f6a934dd84e48c1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.98", -] - -[[package]] -name = "windows-interface" -version = "0.58.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "053c4c462dc91d3b1504c6fe5a726dd15e216ba718e84a0e46a88fbe5ded3515" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.98", + "syn 2.0.99", ] [[package]] @@ -6093,7 +6117,7 @@ checksum = "cb26fd936d991781ea39e87c3a27285081e3c0da5ca0fcbc02d368cc6f52ff01" dependencies = [ "proc-macro2", "quote", - "syn 2.0.98", + "syn 2.0.99", ] [[package]] @@ -6449,7 +6473,7 @@ version = "0.33.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3268f3d866458b787f390cf61f4bbb563b922d091359f9608842999eaee3943c" dependencies = [ - "bitflags 2.8.0", + "bitflags 2.9.0", ] [[package]] @@ -6466,9 +6490,9 @@ checksum = "1e9df38ee2d2c3c5948ea468a8406ff0db0b29ae1ffde1bcf20ef305bcc95c51" [[package]] name = "wry" -version = "0.50.1" +version = "0.50.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a5eabce267929af61619166232d5221aeec2d7af8712bc33cf54a78416ad711" +checksum = "d2ec139df5102db821f92a42033c3fa0467c5ab434511e79c65881d6bdf2b369" dependencies = [ "base64 0.22.1", "block2 0.6.0", @@ -6497,12 +6521,12 @@ dependencies = [ "sha2", "soup3", "tao-macros", - "thiserror 2.0.11", + "thiserror 2.0.12", "url", "webkit2gtk", "webkit2gtk-sys", "webview2-com", - "windows 0.60.0", + "windows", "windows-core 0.60.1", "windows-version", "x11-dl", @@ -6559,7 +6583,7 @@ checksum = "2380878cad4ac9aac1e2435f3eb4020e8374b5f13c296cb75b4620ff8e229154" dependencies = [ "proc-macro2", "quote", - "syn 2.0.98", + "syn 2.0.99", "synstructure", ] @@ -6609,7 +6633,7 @@ dependencies = [ "proc-macro-crate 3.2.0", "proc-macro2", "quote", - "syn 2.0.98", + "syn 2.0.99", "zbus_names", "zvariant", "zvariant_utils", @@ -6645,7 +6669,7 @@ checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.98", + "syn 2.0.99", ] [[package]] @@ -6665,7 +6689,7 @@ checksum = "d71e5d6e06ab090c67b5e44993ec16b72dcbaabc526db883a360057678b48502" dependencies = [ "proc-macro2", "quote", - "syn 2.0.98", + "syn 2.0.99", "synstructure", ] @@ -6686,7 +6710,7 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.98", + "syn 2.0.99", ] [[package]] @@ -6708,7 +6732,7 @@ checksum = "6eafa6dfb17584ea3e2bd6e76e0cc15ad7af12b09abdd1ca55961bed9b1063c6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.98", + "syn 2.0.99", ] [[package]] @@ -6733,7 +6757,7 @@ dependencies = [ "pbkdf2", "rand 0.8.5", "sha1", - "thiserror 2.0.11", + "thiserror 2.0.12", "time", "zeroize", "zopfli", @@ -6807,7 +6831,7 @@ dependencies = [ "proc-macro-crate 3.2.0", "proc-macro2", "quote", - "syn 2.0.98", + "syn 2.0.99", "zvariant_utils", ] @@ -6821,6 +6845,6 @@ dependencies = [ "quote", "serde", "static_assertions", - "syn 2.0.98", + "syn 2.0.99", "winnow 0.7.3", ] diff --git a/rust/Cargo.toml b/rust/Cargo.toml index 4b3b7e5..d727527 100644 --- a/rust/Cargo.toml +++ b/rust/Cargo.toml @@ -46,4 +46,4 @@ tauri-plugin-single-instance = { version = "2", features = ["deep-link"] } [target.'cfg(target_os = "windows")'.dependencies] winsafe = { version = "0.0.23", features = ["user"] } -displayz = "0.1.0" +displayz = "^0.2.0" \ No newline at end of file diff --git a/rust/src/appdata.rs b/rust/src/appdata.rs index 85cc279..a2a91b6 100644 --- a/rust/src/appdata.rs +++ b/rust/src/appdata.rs @@ -14,56 +14,51 @@ pub struct GlobalConfig { pub struct AppData { pub profile: Option, pub pkgs: PackageStore, - pub cfg: GlobalConfig + pub cfg: GlobalConfig, } impl AppData { - pub fn new(app: AppHandle) -> AppData { - let path = util::get_dirs() - .config_dir() - .join("config.json"); - - let cfg = std::fs::read_to_string(&path) + pub fn new(apph: AppHandle) -> AppData { + let cfg = std::fs::read_to_string(util::config_dir().join("config.json")) .and_then(|s| Ok(serde_json::from_str::(&s)?)) .unwrap_or_default(); let profile = match cfg.recent_profile { - Some((ref game, ref name)) => Profile::load(game, name).ok(), + Some((ref game, ref name)) => Profile::load(game.clone(), name.clone()).ok(), None => None }; AppData { profile, - pkgs: PackageStore::new(app), - cfg + pkgs: PackageStore::new(apph.clone()), + cfg, } } pub fn write(&self) -> Result<(), std::io::Error> { - let path = util::get_dirs() - .config_dir() - .join("config.json"); - - std::fs::write(&path, serde_json::to_string(&self.cfg)?) + std::fs::write(util::config_dir().join("config.json"), serde_json::to_string(&self.cfg)?) } - pub fn switch_profile(&mut self, game: &Game, name: &str) -> Result<()> { - self.profile = Profile::load(game, name).ok(); - if self.profile.is_some() { - self.cfg.recent_profile = Some((game.to_owned(), name.to_owned())); - } else { - self.cfg.recent_profile = None; + pub fn switch_profile(&mut self, game: Game, name: String) -> Result<()> { + match Profile::load(game.clone(), name.clone()) { + Ok(profile) => { + self.profile = Some(profile); + self.cfg.recent_profile = Some((game, name)); + self.write()?; + Ok(()) + } + Err(e) => { + self.profile = None; + self.cfg.recent_profile = None; + Err(e) + } } - self.write()?; - - Ok(()) } pub fn toggle_package(&mut self, key: PkgKey, enable: bool) -> Result<()> { log::debug!("toggle: {} {}", key, enable); - let profile = self.profile.as_mut() - .ok_or_else(|| anyhow!("No profile"))?; + let profile = self.profile.as_mut().ok_or_else(|| anyhow!("No profile"))?; if enable { let pkg = self.pkgs.get(&key)?; diff --git a/rust/src/cmd.rs b/rust/src/cmd.rs index 37d93d0..3293be2 100644 --- a/rust/src/cmd.rs +++ b/rust/src/cmd.rs @@ -1,6 +1,5 @@ use log; use std::collections::HashMap; -use std::path::PathBuf; use tokio::sync::Mutex; use tokio::fs; @@ -9,7 +8,7 @@ use crate::pkg::{Package, PkgKey}; use crate::pkg_store::InstallResult; use crate::profile::Profile; use crate::appdata::AppData; -use crate::{liner, start}; +use crate::{liner, start, util}; use tauri::{AppHandle, Manager, State}; @@ -121,7 +120,7 @@ pub async fn load_profile(state: State<'_, Mutex>, game: Game, name: St log::debug!("invoke: load_profile({} {:?})", game, name); let mut appd = state.lock().await; - appd.switch_profile(&game, &name).map_err(|e| e.to_string())?; + appd.switch_profile(game, name).map_err(|e| e.to_string())?; Ok(()) } @@ -133,17 +132,6 @@ pub async fn get_current_profile(state: State<'_, Mutex>) -> Result>) -> Result { - let appd = state.lock().await; - - if let Some(p) = &appd.profile { - Ok(p.dir()) - } else { - Err("No profile loaded") - } -} - #[tauri::command] pub async fn save_current_profile(state: State<'_, Mutex>) -> Result<(), ()> { log::debug!("invoke: save_current_profile"); @@ -161,54 +149,23 @@ pub async fn save_current_profile(state: State<'_, Mutex>) -> Result<() #[tauri::command] pub async fn init_profile( state: State<'_, Mutex>, - exe_path: PathBuf + game: Game, + name: String ) -> Result { - log::debug!("invoke: init_profile({:?})", exe_path); + log::debug!("invoke: init_profile({}, {})", game, name); let mut appd = state.lock().await; - if let Some(new_profile) = Profile::new(exe_path) { - new_profile.save().await; - appd.profile = Some(new_profile.clone()); - fs::create_dir_all(new_profile.dir()).await - .map_err(|e| format!("Unable to create the profile directory: {}", e))?; + let new_profile = Profile::new(game, name); - Ok(new_profile) - } else { - Err("Unrecognized game".to_owned()) - } -} + fs::create_dir_all(new_profile.config_dir()).await + .map_err(|e| format!("Unable to create the profile config directory: {}", e))?; + fs::create_dir_all(new_profile.data_dir()).await + .map_err(|e| format!("Unable to create the profile data directory: {}", e))?; -#[tauri::command] -pub async fn read_profile_data( - state: State<'_, Mutex>, - path: PathBuf -) -> Result { - let appd = state.lock().await; + appd.profile = Some(new_profile.clone()); + new_profile.save().await; - if let Some(p) = &appd.profile { - let res = fs::read_to_string(p.dir().join(&path)).await - .map_err(|e| format!("Unable to open {:?}: {}", path, e))?; - Ok(res) - } else { - Err("No profile loaded".to_owned()) - } -} - -#[tauri::command] -pub async fn write_profile_data( - state: State<'_, Mutex>, - path: PathBuf, - content: String -) -> Result<(), String> { - let appd = state.lock().await; - - if let Some(p) = &appd.profile { - fs::write(p.dir().join(&path), content).await - .map_err(|e| format!("Unable to write to {:?}: {}", path, e))?; - Ok(()) - } else { - Err("No profile loaded".to_owned()) - } + Ok(new_profile) } #[tauri::command] @@ -266,3 +223,10 @@ pub async fn list_displays() -> Result, ()> { Ok(Vec::new()) } + +#[tauri::command] +pub async fn list_directories() -> Result { + log::debug!("invoke: list_directores"); + + Ok(util::all_dirs().clone()) +} \ No newline at end of file diff --git a/rust/src/display.rs b/rust/src/display.rs index 3184912..5298b93 100644 --- a/rust/src/display.rs +++ b/rust/src/display.rs @@ -17,7 +17,7 @@ pub async fn prepare_display(_: &Profile) -> Result<()> { #[cfg(target_os = "windows")] pub async fn prepare_display(p: &Profile) -> Result> { use anyhow::anyhow; - use displayz::{query_displays, Orientation, Resolution}; + use displayz::{query_displays, Orientation, Resolution, Frequency}; let display_name = p.get_str("display", "default"); let rotation = p.get_int("display-rotation", 0); @@ -57,11 +57,22 @@ pub async fn prepare_display(p: &Profile) -> Result> { } } + let frequency: u32 = p.get_int("frequency", 60) + .try_into() + .map_err(|e| anyhow!("Invalid display frequency: {}", e))?; + + let width: u32 = p.get_int("rez-w", 1080) + .try_into() + .map_err(|e| anyhow!("Invalid display width: {}", e))?; + + let height: u32 = p.get_int("rez-h", 1080) + .try_into() + .map_err(|e| anyhow!("Invalid display height: {}", e))?; + + settings.borrow_mut().frequency = Frequency::new(frequency); + if p.get_str("display-mode", "borderless") == "borderless" && p.get_bool("borderless-fullscreen", false) { - settings.borrow_mut().resolution = Resolution::new( - p.get_int("rez-w", 1080).try_into().expect("Negative resolution"), - p.get_int("rez-h", 1920).try_into().expect("Negative resolution") - ); + settings.borrow_mut().resolution = Resolution::new(width, height); } display_set.apply()?; @@ -74,6 +85,7 @@ pub async fn prepare_display(p: &Profile) -> Result> { #[cfg(target_os = "windows")] pub async fn undo_display(info: DisplayInfo) -> Result<()> { + use anyhow::anyhow; use displayz::query_displays; let display_set = query_displays()?; diff --git a/rust/src/lib.rs b/rust/src/lib.rs index 8ecdb8f..fc8319b 100644 --- a/rust/src/lib.rs +++ b/rust/src/lib.rs @@ -31,12 +31,6 @@ pub async fn run(_args: Vec) { .unwrap_or_default() ); - try_join!( - fs::create_dir_all(util::config_dir()), - fs::create_dir_all(util::pkg_dir()), - fs::create_dir_all(util::cache_dir()) - ).expect("Unable to create working directories"); - tauri::Builder::default() .plugin(tauri_plugin_single_instance::init(|app, args, _cwd| { let _ = app @@ -74,12 +68,29 @@ pub async fn run(_args: Vec) { .plugin(tauri_plugin_shell::init()) .plugin(tauri_plugin_opener::init()) .setup(|app| { + let apph = app.handle(); + + util::init_dirs(&apph); + let app_data = AppData::new(app.handle().clone()); app.manage(Mutex::new(app_data)); app.deep_link().register_all()?; - let apph = app.handle(); + log::debug!("\n{:?}\n{:?}\n{:?}", util::config_dir(), util::pkg_dir(), util::cache_dir()); + + tauri::async_runtime::spawn(async { + let e = try_join!( + fs::create_dir_all(util::config_dir()), + fs::create_dir_all(util::pkg_dir()), + fs::create_dir_all(util::cache_dir()) + ); + if let Err(e) = e { + log::error!("Unable to create base directories: {}", e); + std::process::exit(1); + } + }); + app.listen("download-end", closure!(clone apph, |ev| { let raw = ev.payload(); @@ -107,17 +118,15 @@ pub async fn run(_args: Vec) { cmd::init_profile, cmd::load_profile, cmd::get_current_profile, - cmd::get_current_profile_dir, cmd::save_current_profile, - cmd::read_profile_data, - cmd::write_profile_data, + cmd::set_cfg, cmd::startline, cmd::kill, - cmd::list_platform_capabilities, - cmd::set_cfg, cmd::list_displays, + cmd::list_platform_capabilities, + cmd::list_directories, ]) .run(tauri::generate_context!()) .expect("error while running tauri application"); diff --git a/rust/src/liner.rs b/rust/src/liner.rs index 18dc600..226aa51 100644 --- a/rust/src/liner.rs +++ b/rust/src/liner.rs @@ -17,7 +17,7 @@ async fn symlink(src: impl AsRef, dst: impl AsRef) -> std::io::Resul } pub async fn line_up(p: &Profile, pkg_hash: String) -> Result<()> { - let dir_out = p.dir(); + let dir_out = p.data_dir(); if dir_out.join("option").exists() { fs::remove_dir_all(dir_out.join("option")).await?; @@ -25,7 +25,7 @@ pub async fn line_up(p: &Profile, pkg_hash: String) -> Result<()> { fs::create_dir_all(dir_out.join("option")).await?; - let hash_path = p.dir().join(".sl-state"); + let hash_path = p.data_dir().join(".sl-state"); let prev_hash = fs::read_to_string(&hash_path).await.unwrap_or_default(); if prev_hash != pkg_hash { log::debug!("state {} -> {}", prev_hash, pkg_hash); @@ -40,7 +40,7 @@ pub async fn line_up(p: &Profile, pkg_hash: String) -> Result<()> { } async fn prepare_packages(p: &Profile) -> Result<()> { - let dir_out = p.dir(); + let dir_out = p.data_dir(); if dir_out.join("BepInEx").exists() { fs::remove_dir_all(dir_out.join("BepInEx")).await?; @@ -71,25 +71,26 @@ async fn prepare_packages(p: &Profile) -> Result<()> { } async fn prepare_config(p: &Profile) -> Result<()> { - let dir_out = p.dir(); + let dir_out = p.data_dir(); - let ini_in_raw = fs::read_to_string(p.data.exe_dir.join("segatools.ini")).await?; + let target_path = PathBuf::from(p.get_str("target-path", "")); + let exe_dir = target_path.parent().ok_or_else(|| anyhow!("Invalid target path"))?; + let ini_in_raw = fs::read_to_string(p.config_dir().join("segatools-base.ini")).await?; let ini_in = Ini::load_from_str(&ini_in_raw)?; - let mut opt_dir_in = PathBuf::from( - ini_in.section(Some("vfs")) - .ok_or_else(|| anyhow!("No VFS section in segatools.ini"))? - .get("option") - .ok_or_else(|| anyhow!("No option specified in segatools.ini"))? - ); - if opt_dir_in.is_relative() { - opt_dir_in = p.data.exe_dir.join(opt_dir_in); + let mut opt_dir_in = PathBuf::from(p.get_str("option", "")); + if opt_dir_in.as_os_str().len() > 0 && opt_dir_in.is_relative() { + opt_dir_in = exe_dir.join(opt_dir_in); } let opt_dir_out = &dir_out.join("option"); let mut ini_out = ini_in.clone(); - ini_out.with_section(Some("vfs")).set( - "option", - util::path_to_str(opt_dir_out)? + ini_out.with_section(Some("vfs")) + .set( + "option", + util::path_to_str(opt_dir_out)? + ) + .set("amfs", p.get_str("amfs", "")) + .set("appdata", p.get_str("appdata", "appdata") ); ini_out.with_section(Some("unity")) .set("enable", "1") @@ -107,9 +108,11 @@ async fn prepare_config(p: &Profile) -> Result<()> { ini_out.write_to_file(dir_out.join("segatools.ini"))?; log::debug!("Option dir: {:?} -> {:?}", opt_dir_in, opt_dir_out); - for opt in opt_dir_in.read_dir()? { - let opt = opt?; - symlink(&opt.path(), opt_dir_out.join(opt.file_name())).await?; + if opt_dir_in.as_os_str().len() > 0 { + for opt in opt_dir_in.read_dir()? { + let opt = opt?; + symlink(&opt.path(), opt_dir_out.join(opt.file_name())).await?; + } } log::debug!("prepare config: done"); diff --git a/rust/src/model/rainy.rs b/rust/src/model/rainy.rs index 4b076d2..14bdfee 100644 --- a/rust/src/model/rainy.rs +++ b/rust/src/model/rainy.rs @@ -5,7 +5,6 @@ use crate::pkg::PkgKeyVersion; // /c/{game}/api/v1/package #[derive(Deserialize)] -#[allow(dead_code)] pub struct V1Package { pub owner: String, pub package_url: String, @@ -14,7 +13,6 @@ pub struct V1Package { } #[derive(Deserialize)] -#[allow(dead_code)] pub struct V1Version { pub name: String, pub description: String, diff --git a/rust/src/profile.rs b/rust/src/profile.rs index 7150ac5..48196d1 100644 --- a/rust/src/profile.rs +++ b/rust/src/profile.rs @@ -14,73 +14,67 @@ pub struct Profile { // The contents of profile-{game}-{name}.json #[derive(Deserialize, Serialize, Clone)] pub struct ProfileData { - pub exe_dir: PathBuf, pub mods: BTreeSet, - pub wine_runtime: Option, - pub wine_prefix: Option, // cfg is temporarily just a map to make iteration easier // eventually it should become strict pub cfg: BTreeMap } impl Profile { - pub fn new(exe_path: PathBuf) -> Option { - let game; - if exe_path.ends_with("mu3.exe") { - game = misc::Game::Ongeki - } else if exe_path.ends_with("chusanApp.exe") { - // game = misc::Game::Chunithm; - return None; - } else { - return None; + pub fn new(game: Game, mut name: String) -> Profile { + name = name.trim().replace(" ", "-"); + + while Self::config_dir_f(&game, &name).exists() { + name = format!("new-{}", name); } - Some(Profile { - name: format!("{}", "default"), + Profile { + name, game, data: ProfileData { - exe_dir: exe_path.parent().unwrap().to_owned(), mods: BTreeSet::new(), - wine_runtime: None, - wine_prefix: None, cfg: BTreeMap::new() } - }) + } } - pub fn dir(&self) -> PathBuf { - util::get_dirs() - .data_dir() - .join(format!("profile-{}-{}", self.game, self.name)) - .to_owned() + fn config_dir_f(game: &Game, name: &str) -> PathBuf { + util::config_dir().join(format!("profile-{}-{}", game, name)) + } + + pub fn config_dir(&self) -> PathBuf { + Self::config_dir_f(&self.game, &self.name) + } + + pub fn data_dir(&self) -> PathBuf { + util::data_dir().join(format!("profile-{}-{}", self.game, self.name)) } pub async fn list() -> Result> { - let path = std::fs::read_dir( - util::get_dirs().config_dir() - )?; + let path = std::fs::read_dir(util::config_dir())?; let mut res = Vec::new(); for f in path { let f = f?; - if let Some(pair) = Self::name_from_path(f.path()) { - res.push(pair); + if let Ok(meta) = f.metadata() { + if !meta.is_dir() { + continue; + } + log::debug!("{:?}", f); + if let Some(pair) = Self::name_from_path(f.path()) { + res.push(pair); + } } } Ok(res) } - pub fn load(game: &Game, name: &str) -> Result { - let path = util::get_dirs() - .config_dir() - .join(format!("profile-{}-{}.json", game, name)); + pub fn load(game: Game, name: String) -> Result { + let path = Self::config_dir_f(&game, &name).join("profile.json"); if let Ok(s) = std::fs::read_to_string(&path) { - let (game, name) = Self::name_from_path(&path) - .ok_or_else(|| anyhow!("Invalid filename: {:?}", path.file_name()))?; - let data = serde_json::from_str::(&s) .map_err(|e| anyhow!("Unable to parse {:?}: {:?}", path, e))?; @@ -95,9 +89,7 @@ impl Profile { } pub async fn save(&self) { - let path = util::get_dirs() - .config_dir() - .join(format!("profile-{}-{}.json", self.game, self.name)); + let path = self.config_dir().join("profile.json"); let s = serde_json::to_string_pretty(&self.data).unwrap(); fs::write(&path, s).await.unwrap(); @@ -131,7 +123,7 @@ impl Profile { fn name_from_path(path: impl AsRef) -> Option<(Game, String)> { let regex = regex::Regex::new( - r"profile-([^\-]+)-([^\-]+)\.json" + r"^profile-([^\-]+)-(.+)$" ).expect("Invalid regex"); let fname = path.as_ref().file_name().unwrap_or_default().to_string_lossy(); diff --git a/rust/src/start.rs b/rust/src/start.rs index 0da0cca..d5fa082 100644 --- a/rust/src/start.rs +++ b/rust/src/start.rs @@ -1,5 +1,6 @@ -use anyhow::Result; +use anyhow::{anyhow, Result}; use std::fs::File; +use std::path::PathBuf; use tokio::process::Command; use tauri::{AppHandle, Emitter}; use std::process::Stdio; @@ -12,19 +13,22 @@ static CREATE_NO_WINDOW: u32 = 0x08000000; pub async fn start(p: &Profile, app: AppHandle) -> Result<()> { use tokio::task::JoinSet; - let ini_path = p.dir().join("segatools.ini"); + let ini_path = p.data_dir().join("segatools.ini"); log::debug!("With path {}", ini_path.to_string_lossy()); let mut game_builder; let mut amd_builder; + let target_path = PathBuf::from(p.get_str("target-path", "")); + let exe_dir = target_path.parent().ok_or_else(|| anyhow!("Invalid target path"))?; + #[cfg(target_os = "windows")] let display_info = crate::display::prepare_display(p).await?; #[cfg(target_os = "windows")] { - game_builder = Command::new(p.data.exe_dir.join("inject.exe")); + game_builder = Command::new(exe_dir.join("inject.exe")); amd_builder = Command::new("cmd.exe"); } #[cfg(target_os = "linux")] @@ -35,7 +39,7 @@ pub async fn start(p: &Profile, app: AppHandle) -> Result<()> { game_builder = Command::new(&wine); amd_builder = Command::new(&wine); - game_builder.arg(p.data.exe_dir.join("inject.exe")); + game_builder.arg(exe_dir.join("inject.exe")); amd_builder.arg("cmd.exe"); } @@ -45,10 +49,10 @@ pub async fn start(p: &Profile, app: AppHandle) -> Result<()> { "SEGATOOLS_CONFIG_PATH", &ini_path, ) - .current_dir(&p.data.exe_dir) + .current_dir(&exe_dir) .args([ "/C", - &util::path_to_str(p.data.exe_dir.join("inject.exe"))?, "-d", "-k", "mu3hook.dll", + &util::path_to_str(exe_dir.join("inject.exe"))?, "-d", "-k", "mu3hook.dll", "amdaemon.exe", "-f", "-c", "config_common.json", "config_server.json", "config_client.json" ]); game_builder @@ -58,9 +62,9 @@ pub async fn start(p: &Profile, app: AppHandle) -> Result<()> { ) .env( "INOHARA_CONFIG_PATH", - p.dir().join("inohara.cfg"), + p.config_dir().join("inohara.cfg"), ) - .current_dir(&p.data.exe_dir) + .current_dir(&exe_dir) .args([ "-d", "-k", "mu3hook.dll", "mu3.exe", "-monitor 1", @@ -86,8 +90,8 @@ pub async fn start(p: &Profile, app: AppHandle) -> Result<()> { } - let amd_log = File::create(p.dir().join("amdaemon.log"))?; - let game_log = File::create(p.dir().join("mu3.log"))?; + let amd_log = File::create(p.data_dir().join("amdaemon.log"))?; + let game_log = File::create(p.data_dir().join("mu3.log"))?; amd_builder .stdout(Stdio::from(amd_log)); diff --git a/rust/src/util.rs b/rust/src/util.rs index 1dae268..90aae21 100644 --- a/rust/src/util.rs +++ b/rust/src/util.rs @@ -1,26 +1,63 @@ use anyhow::{anyhow, Result}; -use directories::ProjectDirs; -use std::path::{Path, PathBuf}; +use serde::{Deserialize, Serialize}; +use tauri::{AppHandle, Manager}; +use std::{path::{Path, PathBuf}, sync::OnceLock}; -pub fn get_dirs() -> ProjectDirs { - ProjectDirs::from("org", "7EVENDAYSHOLIDAYS", "STARTLINER") - .expect("Unable to set up config directories") +#[cfg(not(target_os = "windows"))] +static NAME: &str = "startliner"; + +#[cfg(target_os = "windows")] +static NAME: &str = "STARTLINER"; + +#[derive(Clone, Serialize, Deserialize)] +pub struct Dirs { + config_dir: PathBuf, + data_dir: PathBuf, + cache_dir: PathBuf, } -pub fn config_dir() -> PathBuf { - get_dirs().config_dir().to_owned() +static DIRS: OnceLock = OnceLock::new(); + +pub fn init_dirs(apph: &AppHandle) { + DIRS.get_or_init(|| { + if cfg!(windows) { + Dirs { + config_dir: apph.path().data_dir().expect("Unable to set project directories").join(NAME).join("cfg"), + data_dir: apph.path().data_dir().expect("Unable to set project directories").join(NAME).join("data"), + cache_dir: apph.path().cache_dir().expect("Unable to set project directories").join(NAME), + } + } else { + Dirs { + config_dir: apph.path().config_dir().expect("Unable to set project directories").join(NAME), + data_dir: apph.path().data_dir().expect("Unable to set project directories").join(NAME), + cache_dir: apph.path().cache_dir().expect("Unable to set project directories").join(NAME), + } + } + }); +} + +pub fn all_dirs() -> &'static Dirs { + &DIRS.get().expect("Directories uninitialized") +} + +pub fn config_dir() -> &'static Path { + &DIRS.get().expect("Directories uninitialized").config_dir +} + +pub fn data_dir() -> &'static Path { + &DIRS.get().expect("Directories uninitialized").data_dir +} + +pub fn cache_dir() -> &'static Path { + &DIRS.get().expect("Directories uninitialized").cache_dir } pub fn pkg_dir() -> PathBuf { - get_dirs().data_dir().join("pkg").to_owned() + data_dir().join("pkg") } pub fn pkg_dir_of(namespace: &str, name: &str) -> PathBuf { - pkg_dir().join(format!("{}-{}", namespace, name)).to_owned() -} - -pub fn cache_dir() -> PathBuf { - get_dirs().cache_dir().to_owned() + pkg_dir().join(format!("{}-{}", namespace, name)) } pub fn path_to_str(p: impl AsRef) -> Result { @@ -40,4 +77,4 @@ pub fn copy_recursive(src: &Path, dst: &Path) -> std::io::Result<()> { } } Ok(()) -} +} \ No newline at end of file diff --git a/src/components/App.vue b/src/components/App.vue index ced024f..69dd8df 100644 --- a/src/components/App.vue +++ b/src/components/App.vue @@ -11,10 +11,13 @@ import ModStore from './ModStore.vue'; import OptionList from './OptionList.vue'; import ProfileList from './ProfileList.vue'; import StartButton from './StartButton.vue'; -import { usePkgStore, usePrfStore } from '../stores'; +import { invoke } from '../invoke'; +import { useGeneralStore, usePkgStore, usePrfStore } from '../stores'; +import { Dirs } from '../types'; const pkg = usePkgStore(); const prf = usePrfStore(); +const general = useGeneralStore(); pkg.setupListeners(); @@ -23,6 +26,10 @@ const currentTab = ref('3'); const isProfileDisabled = computed(() => prf.current === null); onMounted(async () => { + invoke('list_directories').then((d) => { + general.dirs = d as Dirs; + }); + await prf.reloadList(); await prf.reload(); @@ -65,27 +72,10 @@ onMounted(async () => { - UNDER CONSTRUCTION
Many features are + UNDER CONSTRUCTION
Some features are missing.
Existing features are expected to break any time. -
-
Select mu3.exe to create a profile: -
-
-
- segatools 2024-12-23 or later has to be installed -
- (this will change in the future) -
{ class="fixed bottom-0 right-0" />


-