acquire key
This commit is contained in:
parent
762d481707
commit
772f1c634c
408
Cargo.lock
generated
408
Cargo.lock
generated
@ -92,8 +92,8 @@ dependencies = [
|
|||||||
"hashbrown",
|
"hashbrown",
|
||||||
"paste",
|
"paste",
|
||||||
"static_assertions",
|
"static_assertions",
|
||||||
"windows 0.58.0",
|
"windows",
|
||||||
"windows-core 0.58.0",
|
"windows-core",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@ -275,6 +275,25 @@ dependencies = [
|
|||||||
"libloading",
|
"libloading",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "ashpd"
|
||||||
|
version = "0.11.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "6cbdf310d77fd3aaee6ea2093db7011dc2d35d2eb3481e5607f1f8d942ed99df"
|
||||||
|
dependencies = [
|
||||||
|
"async-fs",
|
||||||
|
"async-net",
|
||||||
|
"enumflags2",
|
||||||
|
"futures-channel",
|
||||||
|
"futures-util",
|
||||||
|
"rand 0.9.0",
|
||||||
|
"raw-window-handle",
|
||||||
|
"serde",
|
||||||
|
"serde_repr",
|
||||||
|
"url",
|
||||||
|
"zbus 5.5.0",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "async-broadcast"
|
name = "async-broadcast"
|
||||||
version = "0.7.2"
|
version = "0.7.2"
|
||||||
@ -353,6 +372,17 @@ dependencies = [
|
|||||||
"pin-project-lite",
|
"pin-project-lite",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "async-net"
|
||||||
|
version = "2.0.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "b948000fad4873c1c9339d60f2623323a0cfd3816e5181033c6a5cb68b2accf7"
|
||||||
|
dependencies = [
|
||||||
|
"async-io",
|
||||||
|
"blocking",
|
||||||
|
"futures-lite",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "async-process"
|
name = "async-process"
|
||||||
version = "2.3.0"
|
version = "2.3.0"
|
||||||
@ -481,12 +511,6 @@ version = "1.4.0"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26"
|
checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26"
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "beul"
|
|
||||||
version = "1.0.0"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "d3c3baedf037b161e69da9200947329f52afa3b6e1cdbe6f344d6aa350fedd2f"
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "bit-set"
|
name = "bit-set"
|
||||||
version = "0.8.0"
|
version = "0.8.0"
|
||||||
@ -777,6 +801,15 @@ dependencies = [
|
|||||||
"cfg-if",
|
"cfg-if",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "crossbeam-channel"
|
||||||
|
version = "0.5.14"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "06ba6d68e24814cb8de6bb986db8222d3a027d15872cabc0d18817bc3c0e4471"
|
||||||
|
dependencies = [
|
||||||
|
"crossbeam-utils",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "crossbeam-utils"
|
name = "crossbeam-utils"
|
||||||
version = "0.8.21"
|
version = "0.8.21"
|
||||||
@ -836,6 +869,18 @@ version = "0.2.0"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "bd0c93bb4b0c6d9b77f4435b0ae98c24d17f1c45b2ff844c6151a07256ca923b"
|
checksum = "bd0c93bb4b0c6d9b77f4435b0ae98c24d17f1c45b2ff844c6151a07256ca923b"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "dispatch2"
|
||||||
|
version = "0.2.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "1a0d569e003ff27784e0e14e4a594048698e0c0f0b66cabcb51511be55a7caa0"
|
||||||
|
dependencies = [
|
||||||
|
"bitflags 2.9.0",
|
||||||
|
"block2 0.6.0",
|
||||||
|
"libc",
|
||||||
|
"objc2 0.6.0",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "displaydoc"
|
name = "displaydoc"
|
||||||
version = "0.2.5"
|
version = "0.2.5"
|
||||||
@ -979,6 +1024,15 @@ dependencies = [
|
|||||||
"winit",
|
"winit",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "egui_alignments"
|
||||||
|
version = "0.3.4"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "bf881b608a1a6050fa4f283834592bd814667de900acb4612a03b0da22f529b5"
|
||||||
|
dependencies = [
|
||||||
|
"egui",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "egui_glow"
|
name = "egui_glow"
|
||||||
version = "0.31.1"
|
version = "0.31.1"
|
||||||
@ -1654,6 +1708,12 @@ version = "1.70.1"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf"
|
checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "itoa"
|
||||||
|
version = "1.0.15"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "jiff"
|
name = "jiff"
|
||||||
version = "0.2.5"
|
version = "0.2.5"
|
||||||
@ -1879,30 +1939,6 @@ dependencies = [
|
|||||||
"simd-adler32",
|
"simd-adler32",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "mundy"
|
|
||||||
version = "0.1.8"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "a2831eeb1fbfc52f23d3a6bbc4a2f4457b57d016c9c9112cf6a2a4cffc3c4cc6"
|
|
||||||
dependencies = [
|
|
||||||
"async-io",
|
|
||||||
"beul",
|
|
||||||
"cfg-if",
|
|
||||||
"dispatch",
|
|
||||||
"futures-channel",
|
|
||||||
"futures-lite",
|
|
||||||
"objc2 0.6.0",
|
|
||||||
"objc2-app-kit 0.3.0",
|
|
||||||
"objc2-foundation 0.3.0",
|
|
||||||
"pin-project-lite",
|
|
||||||
"slab",
|
|
||||||
"wasm-bindgen",
|
|
||||||
"wasm-bindgen-futures",
|
|
||||||
"web-sys",
|
|
||||||
"windows 0.61.1",
|
|
||||||
"zbus 5.5.0",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "naga"
|
name = "naga"
|
||||||
version = "24.0.0"
|
version = "24.0.0"
|
||||||
@ -2057,10 +2093,10 @@ dependencies = [
|
|||||||
"block2 0.5.1",
|
"block2 0.5.1",
|
||||||
"libc",
|
"libc",
|
||||||
"objc2 0.5.2",
|
"objc2 0.5.2",
|
||||||
"objc2-core-data 0.2.2",
|
"objc2-core-data",
|
||||||
"objc2-core-image 0.2.2",
|
"objc2-core-image",
|
||||||
"objc2-foundation 0.2.2",
|
"objc2-foundation 0.2.2",
|
||||||
"objc2-quartz-core 0.2.2",
|
"objc2-quartz-core",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@ -2071,15 +2107,8 @@ checksum = "5906f93257178e2f7ae069efb89fbd6ee94f0592740b5f8a1512ca498814d0fb"
|
|||||||
dependencies = [
|
dependencies = [
|
||||||
"bitflags 2.9.0",
|
"bitflags 2.9.0",
|
||||||
"block2 0.6.0",
|
"block2 0.6.0",
|
||||||
"libc",
|
|
||||||
"objc2 0.6.0",
|
"objc2 0.6.0",
|
||||||
"objc2-cloud-kit 0.3.0",
|
|
||||||
"objc2-core-data 0.3.0",
|
|
||||||
"objc2-core-foundation",
|
|
||||||
"objc2-core-graphics",
|
|
||||||
"objc2-core-image 0.3.0",
|
|
||||||
"objc2-foundation 0.3.0",
|
"objc2-foundation 0.3.0",
|
||||||
"objc2-quartz-core 0.3.0",
|
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@ -2095,17 +2124,6 @@ dependencies = [
|
|||||||
"objc2-foundation 0.2.2",
|
"objc2-foundation 0.2.2",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "objc2-cloud-kit"
|
|
||||||
version = "0.3.0"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "6c1948a9be5f469deadbd6bcb86ad7ff9e47b4f632380139722f7d9840c0d42c"
|
|
||||||
dependencies = [
|
|
||||||
"bitflags 2.9.0",
|
|
||||||
"objc2 0.6.0",
|
|
||||||
"objc2-foundation 0.3.0",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "objc2-contacts"
|
name = "objc2-contacts"
|
||||||
version = "0.2.2"
|
version = "0.2.2"
|
||||||
@ -2129,17 +2147,6 @@ dependencies = [
|
|||||||
"objc2-foundation 0.2.2",
|
"objc2-foundation 0.2.2",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "objc2-core-data"
|
|
||||||
version = "0.3.0"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "1f860f8e841f6d32f754836f51e6bc7777cd7e7053cf18528233f6811d3eceb4"
|
|
||||||
dependencies = [
|
|
||||||
"bitflags 2.9.0",
|
|
||||||
"objc2 0.6.0",
|
|
||||||
"objc2-foundation 0.3.0",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "objc2-core-foundation"
|
name = "objc2-core-foundation"
|
||||||
version = "0.3.0"
|
version = "0.3.0"
|
||||||
@ -2150,18 +2157,6 @@ dependencies = [
|
|||||||
"objc2 0.6.0",
|
"objc2 0.6.0",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "objc2-core-graphics"
|
|
||||||
version = "0.3.0"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "f8dca602628b65356b6513290a21a6405b4d4027b8b250f0b98dddbb28b7de02"
|
|
||||||
dependencies = [
|
|
||||||
"bitflags 2.9.0",
|
|
||||||
"objc2 0.6.0",
|
|
||||||
"objc2-core-foundation",
|
|
||||||
"objc2-io-surface",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "objc2-core-image"
|
name = "objc2-core-image"
|
||||||
version = "0.2.2"
|
version = "0.2.2"
|
||||||
@ -2174,16 +2169,6 @@ dependencies = [
|
|||||||
"objc2-metal",
|
"objc2-metal",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "objc2-core-image"
|
|
||||||
version = "0.3.0"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "6ffa6bea72bf42c78b0b34e89c0bafac877d5f80bf91e159a5d96ea7f693ca56"
|
|
||||||
dependencies = [
|
|
||||||
"objc2 0.6.0",
|
|
||||||
"objc2-foundation 0.3.0",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "objc2-core-location"
|
name = "objc2-core-location"
|
||||||
version = "0.2.2"
|
version = "0.2.2"
|
||||||
@ -2220,19 +2205,6 @@ name = "objc2-foundation"
|
|||||||
version = "0.3.0"
|
version = "0.3.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "3a21c6c9014b82c39515db5b396f91645182611c97d24637cf56ac01e5f8d998"
|
checksum = "3a21c6c9014b82c39515db5b396f91645182611c97d24637cf56ac01e5f8d998"
|
||||||
dependencies = [
|
|
||||||
"bitflags 2.9.0",
|
|
||||||
"block2 0.6.0",
|
|
||||||
"libc",
|
|
||||||
"objc2 0.6.0",
|
|
||||||
"objc2-core-foundation",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "objc2-io-surface"
|
|
||||||
version = "0.3.0"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "161a8b87e32610086e1a7a9e9ec39f84459db7b3a0881c1f16ca5a2605581c19"
|
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bitflags 2.9.0",
|
"bitflags 2.9.0",
|
||||||
"objc2 0.6.0",
|
"objc2 0.6.0",
|
||||||
@ -2276,17 +2248,6 @@ dependencies = [
|
|||||||
"objc2-metal",
|
"objc2-metal",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "objc2-quartz-core"
|
|
||||||
version = "0.3.0"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "6fb3794501bb1bee12f08dcad8c61f2a5875791ad1c6f47faa71a0f033f20071"
|
|
||||||
dependencies = [
|
|
||||||
"bitflags 2.9.0",
|
|
||||||
"objc2 0.6.0",
|
|
||||||
"objc2-foundation 0.3.0",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "objc2-symbols"
|
name = "objc2-symbols"
|
||||||
version = "0.2.2"
|
version = "0.2.2"
|
||||||
@ -2306,13 +2267,13 @@ dependencies = [
|
|||||||
"bitflags 2.9.0",
|
"bitflags 2.9.0",
|
||||||
"block2 0.5.1",
|
"block2 0.5.1",
|
||||||
"objc2 0.5.2",
|
"objc2 0.5.2",
|
||||||
"objc2-cloud-kit 0.2.2",
|
"objc2-cloud-kit",
|
||||||
"objc2-core-data 0.2.2",
|
"objc2-core-data",
|
||||||
"objc2-core-image 0.2.2",
|
"objc2-core-image",
|
||||||
"objc2-core-location",
|
"objc2-core-location",
|
||||||
"objc2-foundation 0.2.2",
|
"objc2-foundation 0.2.2",
|
||||||
"objc2-link-presentation",
|
"objc2-link-presentation",
|
||||||
"objc2-quartz-core 0.2.2",
|
"objc2-quartz-core",
|
||||||
"objc2-symbols",
|
"objc2-symbols",
|
||||||
"objc2-uniform-type-identifiers",
|
"objc2-uniform-type-identifiers",
|
||||||
"objc2-user-notifications",
|
"objc2-user-notifications",
|
||||||
@ -2554,6 +2515,12 @@ dependencies = [
|
|||||||
"windows-sys 0.59.0",
|
"windows-sys 0.59.0",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "pollster"
|
||||||
|
version = "0.4.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "2f3a9f18d041e6d0e102a0a46750538147e5e8992d3b4873aaafee2520b00ce3"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "portable-atomic"
|
name = "portable-atomic"
|
||||||
version = "1.11.0"
|
version = "1.11.0"
|
||||||
@ -2643,8 +2610,19 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||||||
checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404"
|
checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"libc",
|
"libc",
|
||||||
"rand_chacha",
|
"rand_chacha 0.3.1",
|
||||||
"rand_core",
|
"rand_core 0.6.4",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "rand"
|
||||||
|
version = "0.9.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "3779b94aeb87e8bd4e834cee3650289ee9e0d5677f976ecdb6d219e5f4f6cd94"
|
||||||
|
dependencies = [
|
||||||
|
"rand_chacha 0.9.0",
|
||||||
|
"rand_core 0.9.3",
|
||||||
|
"zerocopy 0.8.24",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@ -2654,7 +2632,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||||||
checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88"
|
checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"ppv-lite86",
|
"ppv-lite86",
|
||||||
"rand_core",
|
"rand_core 0.6.4",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "rand_chacha"
|
||||||
|
version = "0.9.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "d3022b5f1df60f26e1ffddd6c66e8aa15de382ae63b3a0c1bfc0e4d3e3f325cb"
|
||||||
|
dependencies = [
|
||||||
|
"ppv-lite86",
|
||||||
|
"rand_core 0.9.3",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@ -2666,6 +2654,15 @@ dependencies = [
|
|||||||
"getrandom 0.2.15",
|
"getrandom 0.2.15",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "rand_core"
|
||||||
|
version = "0.9.3"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "99d9a13982dcf210057a8a78572b2217b667c3beacbf3a0d8b454f6f82837d38"
|
||||||
|
dependencies = [
|
||||||
|
"getrandom 0.3.2",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "raw-window-handle"
|
name = "raw-window-handle"
|
||||||
version = "0.6.2"
|
version = "0.6.2"
|
||||||
@ -2740,7 +2737,7 @@ dependencies = [
|
|||||||
"log",
|
"log",
|
||||||
"thiserror 1.0.69",
|
"thiserror 1.0.69",
|
||||||
"utfx",
|
"utfx",
|
||||||
"windows 0.58.0",
|
"windows",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@ -2749,6 +2746,30 @@ version = "1.1.0"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "19b30a45b0cd0bcca8037f3d0dc3421eaf95327a17cad11964fb8179b4fc4832"
|
checksum = "19b30a45b0cd0bcca8037f3d0dc3421eaf95327a17cad11964fb8179b4fc4832"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "rfd"
|
||||||
|
version = "0.15.3"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "80c844748fdc82aae252ee4594a89b6e7ebef1063de7951545564cbc4e57075d"
|
||||||
|
dependencies = [
|
||||||
|
"ashpd",
|
||||||
|
"block2 0.6.0",
|
||||||
|
"dispatch2",
|
||||||
|
"js-sys",
|
||||||
|
"log",
|
||||||
|
"objc2 0.6.0",
|
||||||
|
"objc2-app-kit 0.3.0",
|
||||||
|
"objc2-core-foundation",
|
||||||
|
"objc2-foundation 0.3.0",
|
||||||
|
"pollster",
|
||||||
|
"raw-window-handle",
|
||||||
|
"urlencoding",
|
||||||
|
"wasm-bindgen",
|
||||||
|
"wasm-bindgen-futures",
|
||||||
|
"web-sys",
|
||||||
|
"windows-sys 0.59.0",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "rustc-hash"
|
name = "rustc-hash"
|
||||||
version = "1.1.0"
|
version = "1.1.0"
|
||||||
@ -2787,6 +2808,12 @@ version = "1.0.20"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "eded382c5f5f786b989652c49544c4877d9f015cc22e145a5ea8ea66c2921cd2"
|
checksum = "eded382c5f5f786b989652c49544c4877d9f015cc22e145a5ea8ea66c2921cd2"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "ryu"
|
||||||
|
version = "1.0.20"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "28d3b2b1366ec20994f1fd18c3c594f05c5dd4bc44d8bb0c1c632c8d6829481f"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "same-file"
|
name = "same-file"
|
||||||
version = "1.0.6"
|
version = "1.0.6"
|
||||||
@ -2841,6 +2868,18 @@ dependencies = [
|
|||||||
"syn",
|
"syn",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "serde_json"
|
||||||
|
version = "1.0.140"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "20068b6e96dc6c9bd23e01df8827e6c7e1f2fddd43c21810382803c136b99373"
|
||||||
|
dependencies = [
|
||||||
|
"itoa",
|
||||||
|
"memchr",
|
||||||
|
"ryu",
|
||||||
|
"serde",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "serde_repr"
|
name = "serde_repr"
|
||||||
version = "0.1.20"
|
version = "0.1.20"
|
||||||
@ -3202,14 +3241,20 @@ name = "tundlebool"
|
|||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
|
"crossbeam-channel",
|
||||||
"dirs",
|
"dirs",
|
||||||
"eframe",
|
"eframe",
|
||||||
"egui",
|
"egui",
|
||||||
|
"egui_alignments",
|
||||||
"env_logger",
|
"env_logger",
|
||||||
|
"hex",
|
||||||
"keyvalues-parser",
|
"keyvalues-parser",
|
||||||
"mundy",
|
"regex",
|
||||||
"registry",
|
"registry",
|
||||||
|
"rfd",
|
||||||
"serde",
|
"serde",
|
||||||
|
"serde_json",
|
||||||
|
"sha2",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@ -3277,8 +3322,15 @@ dependencies = [
|
|||||||
"form_urlencoded",
|
"form_urlencoded",
|
||||||
"idna",
|
"idna",
|
||||||
"percent-encoding",
|
"percent-encoding",
|
||||||
|
"serde",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "urlencoding"
|
||||||
|
version = "2.1.3"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "daf8dba3b7eb870caf1ddeed7bc9d2a049f3cfdfae7cb521b087cc33ae4c49da"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "utf16_iter"
|
name = "utf16_iter"
|
||||||
version = "1.0.5"
|
version = "1.0.5"
|
||||||
@ -3645,7 +3697,7 @@ dependencies = [
|
|||||||
"wasm-bindgen",
|
"wasm-bindgen",
|
||||||
"web-sys",
|
"web-sys",
|
||||||
"wgpu-types",
|
"wgpu-types",
|
||||||
"windows 0.58.0",
|
"windows",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@ -3697,68 +3749,23 @@ version = "0.58.0"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "dd04d41d93c4992d421894c18c8b43496aa748dd4c081bac0dc93eb0489272b6"
|
checksum = "dd04d41d93c4992d421894c18c8b43496aa748dd4c081bac0dc93eb0489272b6"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"windows-core 0.58.0",
|
"windows-core",
|
||||||
"windows-targets 0.52.6",
|
"windows-targets 0.52.6",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "windows"
|
|
||||||
version = "0.61.1"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "c5ee8f3d025738cb02bad7868bbb5f8a6327501e870bf51f1b455b0a2454a419"
|
|
||||||
dependencies = [
|
|
||||||
"windows-collections",
|
|
||||||
"windows-core 0.61.0",
|
|
||||||
"windows-future",
|
|
||||||
"windows-link",
|
|
||||||
"windows-numerics",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "windows-collections"
|
|
||||||
version = "0.2.0"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "3beeceb5e5cfd9eb1d76b381630e82c4241ccd0d27f1a39ed41b2760b255c5e8"
|
|
||||||
dependencies = [
|
|
||||||
"windows-core 0.61.0",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "windows-core"
|
name = "windows-core"
|
||||||
version = "0.58.0"
|
version = "0.58.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "6ba6d44ec8c2591c134257ce647b7ea6b20335bf6379a27dac5f1641fcf59f99"
|
checksum = "6ba6d44ec8c2591c134257ce647b7ea6b20335bf6379a27dac5f1641fcf59f99"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"windows-implement 0.58.0",
|
"windows-implement",
|
||||||
"windows-interface 0.58.0",
|
"windows-interface",
|
||||||
"windows-result 0.2.0",
|
"windows-result",
|
||||||
"windows-strings 0.1.0",
|
"windows-strings",
|
||||||
"windows-targets 0.52.6",
|
"windows-targets 0.52.6",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "windows-core"
|
|
||||||
version = "0.61.0"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "4763c1de310c86d75a878046489e2e5ba02c649d185f21c67d4cf8a56d098980"
|
|
||||||
dependencies = [
|
|
||||||
"windows-implement 0.60.0",
|
|
||||||
"windows-interface 0.59.1",
|
|
||||||
"windows-link",
|
|
||||||
"windows-result 0.3.2",
|
|
||||||
"windows-strings 0.4.0",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "windows-future"
|
|
||||||
version = "0.2.0"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "7a1d6bbefcb7b60acd19828e1bc965da6fcf18a7e39490c5f8be71e54a19ba32"
|
|
||||||
dependencies = [
|
|
||||||
"windows-core 0.61.0",
|
|
||||||
"windows-link",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "windows-implement"
|
name = "windows-implement"
|
||||||
version = "0.58.0"
|
version = "0.58.0"
|
||||||
@ -3770,17 +3777,6 @@ dependencies = [
|
|||||||
"syn",
|
"syn",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "windows-implement"
|
|
||||||
version = "0.60.0"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "a47fddd13af08290e67f4acabf4b459f647552718f683a7b415d290ac744a836"
|
|
||||||
dependencies = [
|
|
||||||
"proc-macro2",
|
|
||||||
"quote",
|
|
||||||
"syn",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "windows-interface"
|
name = "windows-interface"
|
||||||
version = "0.58.0"
|
version = "0.58.0"
|
||||||
@ -3792,33 +3788,6 @@ dependencies = [
|
|||||||
"syn",
|
"syn",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "windows-interface"
|
|
||||||
version = "0.59.1"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "bd9211b69f8dcdfa817bfd14bf1c97c9188afa36f4750130fcdf3f400eca9fa8"
|
|
||||||
dependencies = [
|
|
||||||
"proc-macro2",
|
|
||||||
"quote",
|
|
||||||
"syn",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "windows-link"
|
|
||||||
version = "0.1.1"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "76840935b766e1b0a05c0066835fb9ec80071d4c09a16f6bd5f7e655e3c14c38"
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "windows-numerics"
|
|
||||||
version = "0.2.0"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "9150af68066c4c5c07ddc0ce30421554771e528bde427614c61038bc2c92c2b1"
|
|
||||||
dependencies = [
|
|
||||||
"windows-core 0.61.0",
|
|
||||||
"windows-link",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "windows-result"
|
name = "windows-result"
|
||||||
version = "0.2.0"
|
version = "0.2.0"
|
||||||
@ -3828,34 +3797,16 @@ dependencies = [
|
|||||||
"windows-targets 0.52.6",
|
"windows-targets 0.52.6",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "windows-result"
|
|
||||||
version = "0.3.2"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "c64fd11a4fd95df68efcfee5f44a294fe71b8bc6a91993e2791938abcc712252"
|
|
||||||
dependencies = [
|
|
||||||
"windows-link",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "windows-strings"
|
name = "windows-strings"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "4cd9b125c486025df0eabcb585e62173c6c9eddcec5d117d3b6e8c30e2ee4d10"
|
checksum = "4cd9b125c486025df0eabcb585e62173c6c9eddcec5d117d3b6e8c30e2ee4d10"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"windows-result 0.2.0",
|
"windows-result",
|
||||||
"windows-targets 0.52.6",
|
"windows-targets 0.52.6",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "windows-strings"
|
|
||||||
version = "0.4.0"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "7a2ba9642430ee452d5a7aa78d72907ebe8cfda358e8cb7918a2050581322f97"
|
|
||||||
dependencies = [
|
|
||||||
"windows-link",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "windows-sys"
|
name = "windows-sys"
|
||||||
version = "0.45.0"
|
version = "0.45.0"
|
||||||
@ -4273,7 +4224,7 @@ dependencies = [
|
|||||||
"hex",
|
"hex",
|
||||||
"nix",
|
"nix",
|
||||||
"ordered-stream",
|
"ordered-stream",
|
||||||
"rand",
|
"rand 0.8.5",
|
||||||
"serde",
|
"serde",
|
||||||
"serde_repr",
|
"serde_repr",
|
||||||
"sha1",
|
"sha1",
|
||||||
@ -4517,6 +4468,7 @@ dependencies = [
|
|||||||
"enumflags2",
|
"enumflags2",
|
||||||
"serde",
|
"serde",
|
||||||
"static_assertions",
|
"static_assertions",
|
||||||
|
"url",
|
||||||
"winnow",
|
"winnow",
|
||||||
"zvariant_derive 5.4.0",
|
"zvariant_derive 5.4.0",
|
||||||
"zvariant_utils 3.2.0",
|
"zvariant_utils 3.2.0",
|
||||||
|
@ -8,8 +8,15 @@ egui = "0.31.1"
|
|||||||
eframe = "0.31.1"
|
eframe = "0.31.1"
|
||||||
env_logger = "0.11.8"
|
env_logger = "0.11.8"
|
||||||
anyhow = "1.0.97"
|
anyhow = "1.0.97"
|
||||||
mundy = "0.1.8"
|
|
||||||
serde = { version = "1.0.219", features = ["derive"] }
|
serde = { version = "1.0.219", features = ["derive"] }
|
||||||
|
serde_json = "1.0.140"
|
||||||
registry = "1.3.0"
|
registry = "1.3.0"
|
||||||
dirs = "6.0.0"
|
dirs = "6.0.0"
|
||||||
keyvalues-parser = "0.2.0"
|
keyvalues-parser = "0.2.0"
|
||||||
|
crossbeam-channel = "0.5.14"
|
||||||
|
rfd = { version = "0.15.3", features = ["xdg-portal"] }
|
||||||
|
regex = "1.11.1"
|
||||||
|
sha2 = "0.10.8"
|
||||||
|
hex = "0.4.3"
|
||||||
|
egui_alignments = "0.3.4"
|
||||||
|
|
||||||
|
12
flake.lock
generated
12
flake.lock
generated
@ -19,11 +19,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1743568003,
|
"lastModified": 1744502386,
|
||||||
"narHash": "sha256-ZID5T65E8ruHqWRcdvZLsczWDOAWIE7om+vQOREwiX0=",
|
"narHash": "sha256-QAd1L37eU7ktL2WeLLLTmI6P9moz9+a/ONO8qNBYJgM=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "b7ba7f9f45c5cd0d8625e9e217c28f8eb6a19a76",
|
"rev": "f6db44a8daa59c40ae41ba6e5823ec77fe0d2124",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -61,11 +61,11 @@
|
|||||||
"nixpkgs": "nixpkgs_2"
|
"nixpkgs": "nixpkgs_2"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1743561237,
|
"lastModified": 1744513456,
|
||||||
"narHash": "sha256-dd97LXek202OWmUXvKYFdYWj0jHrn3p+L5Ojh1SEOqs=",
|
"narHash": "sha256-NLVluTmK8d01Iz+WyarQhwFcXpHEwU7m5hH3YQQFJS0=",
|
||||||
"owner": "oxalica",
|
"owner": "oxalica",
|
||||||
"repo": "rust-overlay",
|
"repo": "rust-overlay",
|
||||||
"rev": "1de27ae43712a971c1da100dcd84386356f03ec7",
|
"rev": "730fd8e82799219754418483fabe1844262fd1e2",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
26
flake.nix
26
flake.nix
@ -48,30 +48,4 @@
|
|||||||
] ++ native-deps;
|
] ++ native-deps;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
# flake-utils.lib.eachDefaultSystem (system:
|
|
||||||
# let
|
|
||||||
# overlays = [ (import rust-overlay) ];
|
|
||||||
# pkgs = import nixpkgs {
|
|
||||||
# inherit system overlays;
|
|
||||||
# };
|
|
||||||
# native-deps = with pkgs; [
|
|
||||||
# pkg-config pipewire lld clang libclang alsa-lib openssl zlib libxkbcommon libGL wayland mangohud
|
|
||||||
# ];
|
|
||||||
# in
|
|
||||||
# with pkgs;
|
|
||||||
# {
|
|
||||||
# devShells.default = mkShell {
|
|
||||||
# buildInputs = with pkgs; [
|
|
||||||
# (rust-bin.stable.latest.default.override {
|
|
||||||
# extensions = [ "rust-src" ];
|
|
||||||
# targets = ["x86_64-unknown-linux-gnu" "x86_64-pc-windows-gnu"];
|
|
||||||
# })
|
|
||||||
# cargo-bloat
|
|
||||||
# pkgs.pkgsCross.mingwW64.buildPackages.gcc
|
|
||||||
# ] ++ native-deps;
|
|
||||||
# LD_LIBRARY_PATH = (lib.makeLibraryPath native-deps);
|
|
||||||
# CARGO_TARGET_X86_64_PC_WINDOWS_GNU_RUSTFLAGS = "-L native=${pkgs.pkgsCross.mingwW64.windows.pthreads}/lib";
|
|
||||||
# };
|
|
||||||
# }
|
|
||||||
# );
|
|
||||||
}
|
}
|
||||||
|
70
src/app_logic.rs
Normal file
70
src/app_logic.rs
Normal file
@ -0,0 +1,70 @@
|
|||||||
|
use std::{sync::Arc, thread, time::Duration};
|
||||||
|
|
||||||
|
use crossbeam_channel::Receiver;
|
||||||
|
use egui::{mutex::Mutex};
|
||||||
|
|
||||||
|
use crate::omori_locator;
|
||||||
|
|
||||||
|
#[derive(Clone)]
|
||||||
|
pub enum UiState {
|
||||||
|
Loading,
|
||||||
|
KeyRequired(String)
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(Clone)]
|
||||||
|
pub struct UiStateHolder {
|
||||||
|
pub state: Arc<Mutex<UiState>>
|
||||||
|
}
|
||||||
|
|
||||||
|
pub enum UiEvent {
|
||||||
|
SetKey(Vec<u8>)
|
||||||
|
}
|
||||||
|
|
||||||
|
pub struct AppThread {
|
||||||
|
ui_state: UiStateHolder,
|
||||||
|
context: egui::Context,
|
||||||
|
ui_event_channel: Receiver<UiEvent>,
|
||||||
|
decryption_key: Vec<u8>
|
||||||
|
}
|
||||||
|
|
||||||
|
impl AppThread {
|
||||||
|
fn commit(&self, s: UiState) {
|
||||||
|
let mut state = self.ui_state.state.lock();
|
||||||
|
*state = s;
|
||||||
|
}
|
||||||
|
|
||||||
|
fn get_key(&mut self, reason: String) {
|
||||||
|
self.commit(UiState::KeyRequired(reason));
|
||||||
|
loop {
|
||||||
|
match self.ui_event_channel.recv().expect("The UI event channel was closed.") {
|
||||||
|
UiEvent::SetKey(key) => {
|
||||||
|
self.decryption_key = key;
|
||||||
|
break
|
||||||
|
}
|
||||||
|
_ => {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
self.commit(UiState::Loading);
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn create(state_holder: &UiStateHolder, context: &egui::Context, ui_event_channel: &Receiver<UiEvent>) -> AppThread {
|
||||||
|
AppThread {
|
||||||
|
ui_state: state_holder.clone(),
|
||||||
|
context: context.clone(),
|
||||||
|
ui_event_channel: ui_event_channel.clone(),
|
||||||
|
decryption_key: Vec::new()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn main(&mut self) {
|
||||||
|
self.commit(UiState::Loading);
|
||||||
|
|
||||||
|
match omori_locator::get_omori_key() {
|
||||||
|
Ok(key) => self.decryption_key = key,
|
||||||
|
Err(reason) => self.get_key(format!("{:?}", reason)),
|
||||||
|
}
|
||||||
|
|
||||||
|
println!("{:?}", self.decryption_key);
|
||||||
|
}
|
||||||
|
}
|
9
src/config.rs
Normal file
9
src/config.rs
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
struct Config {
|
||||||
|
key: Option<Vec<u8>>
|
||||||
|
}
|
||||||
|
|
||||||
|
impl Default for Config {
|
||||||
|
fn default() -> Self {
|
||||||
|
Self { key: Default::default() }
|
||||||
|
}
|
||||||
|
}
|
1
src/keyhash
Normal file
1
src/keyhash
Normal file
@ -0,0 +1 @@
|
|||||||
|
<EFBFBD><EFBFBD>
&<26>$<24>ē<EFBFBD>Ԑˈ<D490>u<EFBFBD><1C><>6<EFBFBD><36><EFBFBD><EFBFBD><EFBFBD><EFBFBD>61<36>
|
107
src/main.rs
107
src/main.rs
@ -1,10 +1,16 @@
|
|||||||
mod omori_locator;
|
mod omori_locator;
|
||||||
|
mod app_logic;
|
||||||
|
mod config;
|
||||||
|
|
||||||
use std::{thread, time::Duration};
|
use std::{sync::Arc, thread, time::Duration};
|
||||||
|
|
||||||
|
use app_logic::{AppThread, UiEvent, UiState, UiStateHolder};
|
||||||
|
use crossbeam_channel::{Receiver, Sender};
|
||||||
use eframe::egui;
|
use eframe::egui;
|
||||||
use egui::{RichText, ThemePreference};
|
use egui::{mutex::{Mutex, RwLock}, Align, Layout, RichText, ThemePreference};
|
||||||
use omori_locator::get_omori_path;
|
use egui_alignments::{center_horizontal, center_vertical, top_horizontal, Aligner};
|
||||||
|
use omori_locator::{get_omori_key, get_omori_path};
|
||||||
|
use sha2::Digest;
|
||||||
|
|
||||||
fn main() -> anyhow::Result<()> {
|
fn main() -> anyhow::Result<()> {
|
||||||
env_logger::init();
|
env_logger::init();
|
||||||
@ -15,13 +21,22 @@ fn main() -> anyhow::Result<()> {
|
|||||||
..Default::default()
|
..Default::default()
|
||||||
};
|
};
|
||||||
|
|
||||||
|
let app_state = UiStateHolder {
|
||||||
|
state: Arc::new(Mutex::new(UiState::Loading))
|
||||||
|
};
|
||||||
|
|
||||||
println!("{:?}", get_omori_path().unwrap());
|
let (sender, receiver): (Sender<UiEvent>, Receiver<UiEvent>) = crossbeam_channel::unbounded();
|
||||||
|
|
||||||
eframe::run_native("TundleBool", options, Box::new(|cc| {
|
eframe::run_native("TundleBool", options, Box::new(|cc| {
|
||||||
cc.egui_ctx.set_theme(ThemePreference::System);
|
cc.egui_ctx.set_theme(ThemePreference::System);
|
||||||
|
|
||||||
Ok(Box::<Application>::default())
|
let mut app_thread = AppThread::create(&app_state, &cc.egui_ctx, &receiver);
|
||||||
|
|
||||||
|
thread::spawn(move || {
|
||||||
|
app_thread.main();
|
||||||
|
});
|
||||||
|
|
||||||
|
Ok(Box::<Application>::new(Application::create(sender, app_state)))
|
||||||
})).unwrap();
|
})).unwrap();
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
@ -29,32 +44,78 @@ fn main() -> anyhow::Result<()> {
|
|||||||
|
|
||||||
|
|
||||||
struct Application {
|
struct Application {
|
||||||
updates: u32
|
state: UiStateHolder,
|
||||||
|
sender: Sender<UiEvent>,
|
||||||
|
key_input: String
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Default for Application {
|
impl Application {
|
||||||
fn default() -> Self {
|
fn create(sender: Sender<UiEvent>, state: UiStateHolder) -> Application {
|
||||||
Self {
|
Application {
|
||||||
updates: 0
|
sender,
|
||||||
|
state,
|
||||||
|
key_input: "".to_string()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const GAME_KEY_HASH: &[u8; 32] = include_bytes!("keyhash");
|
||||||
|
|
||||||
impl eframe::App for Application {
|
impl eframe::App for Application {
|
||||||
fn update(&mut self, ctx: &egui::Context, frame: &mut eframe::Frame) {
|
fn update(&mut self, ctx: &egui::Context, frame: &mut eframe::Frame) {
|
||||||
ctx.request_repaint();
|
let state = self.state.state.lock();
|
||||||
egui::CentralPanel::default().show(ctx, |ui| {
|
let state = state.clone();
|
||||||
ui.vertical_centered(|ui| {
|
|
||||||
ui.label(RichText::new("Welcome to BundleTool").size(32.0));
|
match state {
|
||||||
ui.label(RichText::new(format!("{}", self.updates)).size(32.0));
|
UiState::Loading => {
|
||||||
});
|
egui::CentralPanel::default().show(ctx, |ui| {
|
||||||
self.updates += 1;
|
center_vertical(ui,|ui| {
|
||||||
ui.separator();
|
ui.label(RichText::new("Loading").size(32.0));
|
||||||
egui::ScrollArea::vertical().max_width(300.0).auto_shrink(false).show(ui, |ui| {
|
});
|
||||||
for i in 1..3000 {
|
});
|
||||||
ui.add(egui::Label::new("Meow"));
|
},
|
||||||
|
UiState::KeyRequired(reason) => {
|
||||||
|
let mut is_valid = true;
|
||||||
|
let hash = sha2::Sha256::digest(&self.key_input.as_bytes());
|
||||||
|
for i in 0..32 {
|
||||||
|
if hash[i] != GAME_KEY_HASH[i] {
|
||||||
|
is_valid = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
|
||||||
});
|
egui::TopBottomPanel::top("key_prompt_title_bar").show(ctx, |ui| {
|
||||||
|
ui.with_layout(Layout::top_down(Align::Center), |ui| {
|
||||||
|
ui.label(RichText::new("Decryption key required").size(32.0));
|
||||||
|
ui.label(RichText::new(format!("Reason: {reason}")).size(24.0));
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
egui::CentralPanel::default().show(ctx, |ui| {
|
||||||
|
top_horizontal(ui, |ui| {
|
||||||
|
ui.horizontal(|ui| {
|
||||||
|
ui.label("Decryption key: ");
|
||||||
|
ui.text_edit_singleline(&mut self.key_input);
|
||||||
|
if is_valid {
|
||||||
|
ui.label("Valid");
|
||||||
|
} else {
|
||||||
|
ui.label(RichText::new("Invalid").color(ui.visuals().error_fg_color));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
egui::TopBottomPanel::bottom("key_prompt_button_bar").show(ctx, |ui| {
|
||||||
|
if !is_valid {
|
||||||
|
ui.disable();
|
||||||
|
}
|
||||||
|
|
||||||
|
ui.with_layout(Layout::top_down(Align::Max), |ui| {
|
||||||
|
if ui.button("Continue").clicked() {
|
||||||
|
self.sender.send(UiEvent::SetKey(self.key_input.as_bytes().to_vec())).expect("Failed to send");
|
||||||
|
}
|
||||||
|
})
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,4 +1,6 @@
|
|||||||
use anyhow::Context;
|
use anyhow::Context;
|
||||||
|
use regex::bytes::Regex;
|
||||||
|
use sha2::Digest;
|
||||||
use std::{fs::File, io::Read, path::PathBuf};
|
use std::{fs::File, io::Read, path::PathBuf};
|
||||||
|
|
||||||
#[cfg(any(target_os = "linux", target_os = "macos"))]
|
#[cfg(any(target_os = "linux", target_os = "macos"))]
|
||||||
@ -77,3 +79,37 @@ pub fn get_omori_path() -> anyhow::Result<PathBuf> {
|
|||||||
|
|
||||||
omori_path.with_context(|| "Failed to find omori")
|
omori_path.with_context(|| "Failed to find omori")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const GAME_KEY_HASH: &[u8; 32] = include_bytes!("keyhash");
|
||||||
|
|
||||||
|
pub fn get_omori_key() -> anyhow::Result<Vec<u8>> {
|
||||||
|
let mut base: PathBuf = get_steam_root()?;
|
||||||
|
|
||||||
|
base.push("appcache/appinfo.vdf");
|
||||||
|
|
||||||
|
let mut buffer = Vec::new();
|
||||||
|
|
||||||
|
let mut fd = File::open(base)?;
|
||||||
|
fd.read_to_end(&mut buffer)?;
|
||||||
|
drop(fd);
|
||||||
|
|
||||||
|
let re = Regex::new(r"--([0-9a-f]{32})")?;
|
||||||
|
|
||||||
|
for (_, [key]) in re.captures_iter(&buffer).map(|c| c.extract()) {
|
||||||
|
let hash = sha2::Sha256::digest(key);
|
||||||
|
|
||||||
|
let mut equal = true;
|
||||||
|
for i in 0..32 {
|
||||||
|
if hash[i] != GAME_KEY_HASH[i] {
|
||||||
|
equal = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if equal {
|
||||||
|
return Ok(key.to_vec())
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Err(anyhow::anyhow!("Couldn't find any valid decryption key for OMORI in your Steam installation."))
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user