Compare commits
26 Commits
3.2.2
..
195eae4980
| Author | SHA1 | Date | |
|---|---|---|---|
| 195eae4980 | |||
| 8c70c00ebd | |||
| 6dc1f4f703 | |||
| 21710d0e02 | |||
| b478e7ba95 | |||
| bd368adfe5 | |||
| 85ea4167ab | |||
| adf7e487b9 | |||
|
22d97a0068
|
|||
| 992127ecb6 | |||
| 0f53057897 | |||
| 03b326e142 | |||
| 2ec8b08983 | |||
| 344f15b8da | |||
| 554f07412b | |||
| f8f53c4236 | |||
| 64f76d95a6 | |||
| 02fecd237c | |||
| eaffc35288 | |||
| 78c7fdb756 | |||
| ec7ce53016 | |||
| 0610d4beef | |||
|
416067f2ea
|
|||
|
e58be09bdb
|
|||
| ccb0c467f2 | |||
|
67bc968497
|
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "ezpplauncher",
|
||||
"version": "3.2.2",
|
||||
"version": "3.2.5",
|
||||
"description": "",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
|
||||
@@ -34,4 +34,7 @@ function run(cmd: string, args: string[]): Promise<void> {
|
||||
|
||||
await run('bun', ['./scripts/sync-version.ts']);
|
||||
await runVite();
|
||||
|
||||
//set NO_STRIP=1 in env for linux to prevent stripping of debug symbols in tauri builds, which causes issues with source maps
|
||||
if (process.platform === 'linux') process.env.NO_STRIP = '1';
|
||||
await run('bunx', ['tauri', 'build']);
|
||||
|
||||
Generated
+75
-101
@@ -10,23 +10,12 @@ checksum = "320119579fcad9c21884f5c4861d16174d0e06250625266f50fe6898340abefa"
|
||||
|
||||
[[package]]
|
||||
name = "aead"
|
||||
version = "0.5.2"
|
||||
version = "0.6.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d122413f284cf2d62fb1b7db97e02edb8cda96d769b16e443a4f6195e35662b0"
|
||||
checksum = "1973cfbc1a2daf9cf550e74e1f088c28e7f7d8c1e1418fb6c9dc5184b7e84c99"
|
||||
dependencies = [
|
||||
"crypto-common 0.1.7",
|
||||
"generic-array",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "aes"
|
||||
version = "0.8.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b169f7a6d4742236a0a00c541b845991d0ac43e546831af1249753ab4c3aa3a0"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"cipher 0.4.4",
|
||||
"cpufeatures 0.2.17",
|
||||
"crypto-common 0.2.2",
|
||||
"inout",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -35,20 +24,20 @@ version = "0.9.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "66bd29a732b644c0431c6140f370d097879203d79b80c94a6747ba0872adaef8"
|
||||
dependencies = [
|
||||
"cipher 0.5.2",
|
||||
"cipher",
|
||||
"cpubits",
|
||||
"cpufeatures 0.3.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "aes-gcm"
|
||||
version = "0.10.3"
|
||||
version = "0.11.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "831010a0f742e1209b3bcea8fab6a8e149051ba6099432c8cb2cc117dec3ead1"
|
||||
checksum = "fdf011db2e21ce0d575593d749db5554b47fed37aff429e4dc50bc91ac93a028"
|
||||
dependencies = [
|
||||
"aead",
|
||||
"aes 0.8.4",
|
||||
"cipher 0.4.4",
|
||||
"aes",
|
||||
"cipher",
|
||||
"ctr",
|
||||
"ghash",
|
||||
"subtle",
|
||||
@@ -89,9 +78,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "anyhow"
|
||||
version = "1.0.102"
|
||||
version = "1.0.103"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7f202df86484c868dbad7eaa557ef785d5c66295e41b460ef922eca0723b842c"
|
||||
checksum = "2a4385e2e34eb35d6b3efe798b9eb88096925d87726c0798709bf56d9ed84af3"
|
||||
|
||||
[[package]]
|
||||
name = "async-broadcast"
|
||||
@@ -560,24 +549,15 @@ dependencies = [
|
||||
"windows-link 0.2.1",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "cipher"
|
||||
version = "0.4.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad"
|
||||
dependencies = [
|
||||
"crypto-common 0.1.7",
|
||||
"inout 0.1.4",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "cipher"
|
||||
version = "0.5.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e8cf2a2c93cd704877c0858356ed03480ff301ee950b43f1cbe4573b088bfa6c"
|
||||
dependencies = [
|
||||
"block-buffer 0.12.0",
|
||||
"crypto-common 0.2.2",
|
||||
"inout 0.2.2",
|
||||
"inout",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -779,7 +759,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "78c8292055d1c1df0cce5d180393dc8cce0abec0a7102adb6c7b1eef6016d60a"
|
||||
dependencies = [
|
||||
"generic-array",
|
||||
"rand_core 0.6.4",
|
||||
"typenum",
|
||||
]
|
||||
|
||||
@@ -789,7 +768,9 @@ version = "0.2.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ce6e4c961d6cd6c9a86db418387425e8bdeaf05b3c8bc1411e6dca4c252f1453"
|
||||
dependencies = [
|
||||
"getrandom 0.4.2",
|
||||
"hybrid-array",
|
||||
"rand_core 0.10.1",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -850,11 +831,11 @@ checksum = "52560adf09603e58c9a7ee1fe1dcb95a16927b17c127f0ac02d6e768a0e25bc1"
|
||||
|
||||
[[package]]
|
||||
name = "ctr"
|
||||
version = "0.9.2"
|
||||
version = "0.10.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0369ee1ad671834580515889b80f2ea915f23b8be8d0daa4bbaf2ac5c7590835"
|
||||
checksum = "baaca1c4b237092596f64d571e9db6ce4109c4ef9742e27590f1709594461f21"
|
||||
dependencies = [
|
||||
"cipher 0.4.4",
|
||||
"cipher",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -1239,7 +1220,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "ezpplauncher"
|
||||
version = "3.2.2"
|
||||
version = "3.2.5"
|
||||
dependencies = [
|
||||
"aes-gcm",
|
||||
"anyhow",
|
||||
@@ -1272,6 +1253,7 @@ dependencies = [
|
||||
"url",
|
||||
"widestring",
|
||||
"winapi",
|
||||
"windows 0.62.2",
|
||||
"windows-sys 0.61.2",
|
||||
"winreg 0.56.0",
|
||||
"zip",
|
||||
@@ -1668,6 +1650,7 @@ dependencies = [
|
||||
"js-sys",
|
||||
"libc",
|
||||
"r-efi 6.0.0",
|
||||
"rand_core 0.10.1",
|
||||
"wasip2",
|
||||
"wasip3",
|
||||
"wasm-bindgen",
|
||||
@@ -1675,11 +1658,10 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "ghash"
|
||||
version = "0.5.1"
|
||||
version = "0.6.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f0d8a4362ccb29cb0b265253fb0a2728f592895ee6854fd9bc13f2ffda266ff1"
|
||||
checksum = "2eecf2d5dc9b66b732b97707a0210906b1d30523eb773193ab777c0c84b3e8d5"
|
||||
dependencies = [
|
||||
"opaque-debug",
|
||||
"polyval",
|
||||
]
|
||||
|
||||
@@ -1885,12 +1867,21 @@ dependencies = [
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "hashlink"
|
||||
version = "0.11.0"
|
||||
name = "hashbrown"
|
||||
version = "0.17.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ea0b22561a9c04a7cb1a302c013e0259cd3b4bb619f145b32f72b8b4bcbed230"
|
||||
checksum = "ed5909b6e89a2db4456e54cd5f673791d7eca6732202bbf2a9cc504fe2f9b84a"
|
||||
dependencies = [
|
||||
"hashbrown 0.16.1",
|
||||
"foldhash 0.2.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "hashlink"
|
||||
version = "0.12.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a5081f264ed7adee96ea4b4778b6bb9da0a7228b084587aa3bd3ff05da7c5a3b"
|
||||
dependencies = [
|
||||
"hashbrown 0.17.1",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -2246,15 +2237,6 @@ dependencies = [
|
||||
"cfb",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "inout"
|
||||
version = "0.1.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "879f10e63c20629ecabbb64a8010319738c66a5cd0c29b02d63d272b03751d01"
|
||||
dependencies = [
|
||||
"generic-array",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "inout"
|
||||
version = "0.2.2"
|
||||
@@ -2488,9 +2470,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "libsqlite3-sys"
|
||||
version = "0.38.0"
|
||||
version = "0.38.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a76001fb4daed01e5f2b518aac0b4dc592e7c734da63dbffcf0c64fa612a8d0c"
|
||||
checksum = "f6c19a05435c21ac299d71b6a9c13db3e3f47c520517d58990a462a1397a61db"
|
||||
dependencies = [
|
||||
"cc",
|
||||
"pkg-config",
|
||||
@@ -3029,22 +3011,15 @@ version = "1.21.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50"
|
||||
|
||||
[[package]]
|
||||
name = "opaque-debug"
|
||||
version = "0.3.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381"
|
||||
|
||||
[[package]]
|
||||
name = "open"
|
||||
version = "5.3.5"
|
||||
version = "5.3.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2fbaa89d2ddc8473c78a3adf69eea8cffa28c483b8e02a971ef31527cd0fc92c"
|
||||
checksum = "cd8d3b65c44123a56e0133d2cd06ce4361bd3ca99d41198b2f25e3c3db9b8b4a"
|
||||
dependencies = [
|
||||
"dunce",
|
||||
"is-wsl",
|
||||
"libc",
|
||||
"pathdiff",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -3133,12 +3108,6 @@ dependencies = [
|
||||
"windows-link 0.2.1",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "pathdiff"
|
||||
version = "0.2.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "df94ce210e5bc13cb6651479fa48d14f601d9858cfe0467f43ae157023b938d3"
|
||||
|
||||
[[package]]
|
||||
name = "pbkdf2"
|
||||
version = "0.13.0"
|
||||
@@ -3412,13 +3381,12 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "polyval"
|
||||
version = "0.6.2"
|
||||
version = "0.7.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9d1fe60d06143b2430aa532c94cfe9e29783047f06c0d7fd359a9a51b729fa25"
|
||||
checksum = "7dfc63250416fea14f5749b90725916a6c903f599d51cb635aa7a52bfd03eede"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"cpufeatures 0.2.17",
|
||||
"opaque-debug",
|
||||
"cpubits",
|
||||
"cpufeatures 0.3.0",
|
||||
"universal-hash",
|
||||
]
|
||||
|
||||
@@ -3748,6 +3716,12 @@ dependencies = [
|
||||
"getrandom 0.3.4",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rand_core"
|
||||
version = "0.10.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "63b8176103e19a2643978565ca18b50549f6101881c443590420e4dc998a3c69"
|
||||
|
||||
[[package]]
|
||||
name = "rand_hc"
|
||||
version = "0.2.0"
|
||||
@@ -3937,9 +3911,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "rusqlite"
|
||||
version = "0.40.0"
|
||||
version = "0.40.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1b3492ea85308705c3a5cc24fb9b9cf77273d30590349070db42991202b214c4"
|
||||
checksum = "11438310b19e3109b6446c33d1ed5e889428cf2e278407bc7896bc4aaea43323"
|
||||
dependencies = [
|
||||
"bitflags 2.10.0",
|
||||
"fallible-iterator",
|
||||
@@ -4698,9 +4672,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "sysinfo"
|
||||
version = "0.39.2"
|
||||
version = "0.39.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "14311e7e9a03114cd4b65eedd54e8fed2945e17f08586ae97ef53bc0669f9581"
|
||||
checksum = "2c8bd2130a9b60bee2581bf82cfe89ee836424d1f37dcfa4ce21509611684673"
|
||||
dependencies = [
|
||||
"libc",
|
||||
"memchr",
|
||||
@@ -4804,9 +4778,9 @@ checksum = "61c41af27dd6d1e27b1b16b489db798443478cef1f06a660c96db617ba5de3b1"
|
||||
|
||||
[[package]]
|
||||
name = "tauri"
|
||||
version = "2.11.2"
|
||||
version = "2.11.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "437404997acf375d85f1177afa7e11bb971f274ed6a7b83a2a3e339015f4cc28"
|
||||
checksum = "667b20e2726d572dea2de7370da16e188eb06008faf9a92fab7cdc46791190b5"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"bytes",
|
||||
@@ -4856,9 +4830,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "tauri-build"
|
||||
version = "2.6.2"
|
||||
version = "2.6.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "4aa1f9055fc23919a54e4e125052bed16ed04aef0487086e758fe01a67b451c7"
|
||||
checksum = "bc9ce40b16101cb6ea63d3e221567affd1c3a9205f95d7bc574941a10636b632"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"cargo_toml",
|
||||
@@ -4877,9 +4851,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "tauri-codegen"
|
||||
version = "2.6.2"
|
||||
version = "2.6.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e4a0319528a025a38c4078e7dae2c446f4e63620ddb0659a643ede1cb38f90e9"
|
||||
checksum = "08279169ff42f8fc45a1dbc9dcae888893ba95288142e5880c59b93a26d2cfc5"
|
||||
dependencies = [
|
||||
"base64 0.22.1",
|
||||
"brotli",
|
||||
@@ -4904,9 +4878,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "tauri-macros"
|
||||
version = "2.6.2"
|
||||
version = "2.6.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ae6cb4e3896c21d2f6da5b31251d2faea0153bba56ed0e970f918115dbee4924"
|
||||
checksum = "e8b394794f399a421811d06966343e7933fcae92d59f5180b9388d1174497a45"
|
||||
dependencies = [
|
||||
"heck 0.5.0",
|
||||
"proc-macro2",
|
||||
@@ -5033,9 +5007,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "tauri-runtime"
|
||||
version = "2.11.2"
|
||||
version = "2.11.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "48222d7116c8807eaa6fe2f372e023fae125084e61e6eca6d70b7961cdf129ef"
|
||||
checksum = "b0b4bc95aed361b0019067d189a1174a603d460d0f6c72606512d59fc9c12ec8"
|
||||
dependencies = [
|
||||
"cookie",
|
||||
"dpi",
|
||||
@@ -5058,9 +5032,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "tauri-runtime-wry"
|
||||
version = "2.11.2"
|
||||
version = "2.11.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b83849ee63ecb27a8e8d0fe51915ca215076914aca43f96db1179f0f415f6cd9"
|
||||
checksum = "4e6fac707727b7a2f48e4ded90976324267371073edbb415ffb73bb0458d203f"
|
||||
dependencies = [
|
||||
"gtk",
|
||||
"http",
|
||||
@@ -5084,9 +5058,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "tauri-utils"
|
||||
version = "2.9.2"
|
||||
version = "2.9.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "092379df9a707631978e6c56b1bc2401d387f01e2d4a3c123360d167bbb9aa95"
|
||||
checksum = "3e176a18e67764923c4f1ce66f25ae4abe5f688384d5eb1a0fa6c77f3d90f887"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"brotli",
|
||||
@@ -5513,9 +5487,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "tray-icon"
|
||||
version = "0.23.1"
|
||||
version = "0.24.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "15edbb0d80583e85ee8df283410038e17314df5cba30da2087a54a85216c0773"
|
||||
checksum = "65ba1e5f6b9ef9fd87e21b9c6f351554dbd717960089168fcfdef854686961dc"
|
||||
dependencies = [
|
||||
"crossbeam-channel",
|
||||
"dirs",
|
||||
@@ -5629,12 +5603,12 @@ checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853"
|
||||
|
||||
[[package]]
|
||||
name = "universal-hash"
|
||||
version = "0.5.1"
|
||||
version = "0.6.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "fc1de2c688dc15305988b563c3854064043356019f97a4b46276fe734c4f07ea"
|
||||
checksum = "f4987bdc12753382e0bec4a65c50738ffaabc998b9cdd1f952fb5f39b0048a96"
|
||||
dependencies = [
|
||||
"crypto-common 0.1.7",
|
||||
"subtle",
|
||||
"crypto-common 0.2.2",
|
||||
"ctutils",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -6896,7 +6870,7 @@ version = "8.6.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2d04a6b5381502aa6087c94c669499eb1602eb9c5e8198e534de571f7154809b"
|
||||
dependencies = [
|
||||
"aes 0.9.0",
|
||||
"aes",
|
||||
"bzip2",
|
||||
"constant_time_eq",
|
||||
"crc32fast",
|
||||
|
||||
+15
-8
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "ezpplauncher"
|
||||
version = "3.2.2"
|
||||
version = "3.2.5"
|
||||
description = "EZPPLauncher redefined."
|
||||
authors = ["HorizonCode"]
|
||||
edition = "2024"
|
||||
@@ -25,10 +25,10 @@ name = "ezpplauncher_lib"
|
||||
crate-type = ["staticlib", "cdylib", "rlib"]
|
||||
|
||||
[build-dependencies]
|
||||
tauri-build = { version = "2.6.2", features = [] }
|
||||
tauri-build = { version = "2.6.3", features = [] }
|
||||
|
||||
[dependencies]
|
||||
tauri = { version = "2.11.2", features = ["protocol-asset"] }
|
||||
tauri = { version = "2.11.5", features = ["protocol-asset"] }
|
||||
tauri-plugin-shell = "2.3.5"
|
||||
serde = { version = "1.0.228", features = ["derive"] }
|
||||
serde_json = "1.0.150"
|
||||
@@ -37,22 +37,22 @@ tauri-plugin-dialog = "2.7.1"
|
||||
tauri-plugin-fs = "2.5.1"
|
||||
hardware-id = "0.3.0"
|
||||
tauri-plugin-cors-fetch = "5.0.0"
|
||||
sysinfo = "0.39.2"
|
||||
sysinfo = "0.39.5"
|
||||
reqwest = { version = "0.13.4", features = ["json", "stream", "query"] }
|
||||
md5 = "0.8.0"
|
||||
tokio = { version = "1.52.3", features = ["full"] }
|
||||
open = "5.3.5"
|
||||
open = "5.3.6"
|
||||
presenceforge = { version = "0.2.1", features = ["tokio-runtime"] }
|
||||
once_cell = "1.21.4"
|
||||
futures-util = "0.3.32"
|
||||
byteorder = "1.5.0"
|
||||
anyhow = "1.0.102"
|
||||
anyhow = "1.0.103"
|
||||
url = "2.5.8"
|
||||
zip = "8.6.0"
|
||||
sha1 = "0.11.0"
|
||||
hex = "0.4.3"
|
||||
rusqlite = { version = "0.40.0", features = ["bundled"] }
|
||||
aes-gcm = "0.10.3"
|
||||
rusqlite = { version = "0.40.1", features = ["bundled"] }
|
||||
aes-gcm = "0.11.0"
|
||||
base64 = "0.22.1"
|
||||
sha2 = "0.11.0"
|
||||
thiserror = "2.0.18"
|
||||
@@ -62,6 +62,13 @@ winreg = "0.56.0"
|
||||
winapi = { version = "0.3.9", features = ["winuser", "wincrypt", "memoryapi", "winbase", "dpapi"] }
|
||||
widestring = "1.2.1"
|
||||
windows-sys = "0.61.2"
|
||||
windows = { version = "0.62.2", features = [
|
||||
"Win32_System_Diagnostics_ToolHelp",
|
||||
"Win32_System_Memory",
|
||||
"Win32_System_Threading",
|
||||
"Win32_System_Diagnostics_Debug",
|
||||
"Win32_Foundation"
|
||||
] }
|
||||
|
||||
[target.'cfg(not(any(target_os = "android", target_os = "ios")))'.dependencies]
|
||||
tauri-plugin-single-instance = "2.4.2"
|
||||
|
||||
+14
-11
@@ -36,14 +36,15 @@ pub fn opened_urls(app: tauri::AppHandle) -> Vec<PathBuf> {
|
||||
}
|
||||
|
||||
#[tauri::command]
|
||||
pub fn get_launcher_version() -> String {
|
||||
env!("CARGO_PKG_VERSION").to_string()
|
||||
pub fn get_launcher_version(app: tauri::AppHandle) -> String {
|
||||
app.package_info().version.to_string()
|
||||
}
|
||||
|
||||
#[tauri::command]
|
||||
pub fn get_hwid() -> String {
|
||||
let hwid = get_id().unwrap();
|
||||
hwid.into()
|
||||
get_id()
|
||||
.unwrap_or("recorderinsandybridge".to_string())
|
||||
.into()
|
||||
}
|
||||
|
||||
#[tauri::command(rename_all = "snake_case")]
|
||||
@@ -79,7 +80,6 @@ pub fn valid_osu_folder(folder: String) -> bool {
|
||||
check_folder_completeness(path, &osu_folder_files) >= 70.0
|
||||
}
|
||||
|
||||
#[cfg(windows)]
|
||||
#[tauri::command]
|
||||
pub fn find_osu_installation() -> Option<String> {
|
||||
#[cfg(windows)]
|
||||
@@ -450,8 +450,6 @@ pub async fn run_osu(folder: String, patch: bool) -> Result<(), String> {
|
||||
}
|
||||
};
|
||||
|
||||
#[cfg(windows)]
|
||||
{
|
||||
if patch {
|
||||
let patcher_exe_path = PathBuf::from(&folder)
|
||||
.join("EZPPLauncher")
|
||||
@@ -459,8 +457,6 @@ pub async fn run_osu(folder: String, patch: bool) -> Result<(), String> {
|
||||
.join("osu!.patcher.exe");
|
||||
|
||||
if patcher_exe_path.exists() {
|
||||
#[cfg(windows)]
|
||||
{
|
||||
let mut sys = System::new_all();
|
||||
|
||||
loop {
|
||||
@@ -486,12 +482,20 @@ pub async fn run_osu(folder: String, patch: bool) -> Result<(), String> {
|
||||
|
||||
sleep(Duration::from_millis(500)).await;
|
||||
}
|
||||
|
||||
#[cfg(windows)]
|
||||
{
|
||||
let _ = Command::new(&patcher_exe_path)
|
||||
.creation_flags(DETACHED_PROCESS | CREATE_NEW_PROCESS_GROUP)
|
||||
.spawn()
|
||||
.map_err(|e| format!("Failed to run patcher: {e}"))?;
|
||||
}
|
||||
#[cfg(not(windows))]
|
||||
{
|
||||
let _ = Command::new("osu-wine")
|
||||
.arg("--wine")
|
||||
.arg(&patcher_exe_path)
|
||||
.spawn()
|
||||
.map_err(|e| format!("Failed to run patcher: {}", e))?;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -958,7 +962,6 @@ pub async fn download_ezpp_launcher_update(app: AppHandle, url: String) -> Resul
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[cfg(windows)]
|
||||
#[tauri::command]
|
||||
pub async fn install_ezpp_launcher_update(app: AppHandle) -> Result<(), String> {
|
||||
#[cfg(windows)]
|
||||
|
||||
@@ -7,6 +7,7 @@ use tauri_plugin_fs::FsExt;
|
||||
|
||||
pub mod commands;
|
||||
pub mod config;
|
||||
pub mod memory_reader;
|
||||
pub mod osudb;
|
||||
pub mod presence;
|
||||
pub mod state;
|
||||
|
||||
@@ -0,0 +1,519 @@
|
||||
//! osu_memory_reader.rs
|
||||
//!
|
||||
//! External, read-only memory reader for the osu! stable client, structured
|
||||
//! the same way community tools like tosu / gosumemory work:
|
||||
//!
|
||||
//! 1. Open the osu process with PROCESS_VM_READ.
|
||||
//! 2. Enumerate its committed memory regions.
|
||||
//! 3. Scan those regions for known byte-pattern "signatures".
|
||||
//! 4. Walk a short pointer chain from each signature to the real struct.
|
||||
//! 5. Parse out the fields you care about (username, mods, combo, etc).
|
||||
//!
|
||||
//! IMPORTANT: The actual signature bytes below are PLACEHOLDERS. osu!
|
||||
//! updates its binary regularly, which shifts/breaks raw byte signatures.
|
||||
//! Community tools maintain live, current signatures — pull up-to-date
|
||||
//! ones from tosu's open-source repo (github.com/KotRikD/tosu, see its
|
||||
//! `packages/tosu/src/memory/` signature definitions) and drop them into
|
||||
//! the `SIGNATURES` table below. This file gives you the engine; you keep
|
||||
//! the signature table current.
|
||||
//!
|
||||
//! This is entirely read-only (ReadProcessMemory only, never Write) and
|
||||
//! only targets your own launched osu! process — no injection involved.
|
||||
//!
|
||||
//! ---------------------------------------------------------------------
|
||||
//! Cargo.toml additions (on top of the ones from osu_scanner.rs):
|
||||
//!
|
||||
//! [dependencies]
|
||||
//! windows = { version = "0.58", features = [
|
||||
//! "Win32_System_Diagnostics_ToolHelp",
|
||||
//! "Win32_System_Memory",
|
||||
//! "Win32_System_Threading",
|
||||
//! "Win32_System_Diagnostics_Debug",
|
||||
//! "Win32_Foundation"
|
||||
//! ] }
|
||||
//! ---------------------------------------------------------------------
|
||||
|
||||
use serde::Serialize;
|
||||
use std::collections::HashMap;
|
||||
use windows::Win32::Foundation::{CloseHandle, HANDLE};
|
||||
use windows::Win32::System::Diagnostics::Debug::ReadProcessMemory;
|
||||
use windows::Win32::System::Memory::{
|
||||
MEM_COMMIT, MEMORY_BASIC_INFORMATION, PAGE_GUARD, PAGE_NOACCESS, VirtualQueryEx,
|
||||
};
|
||||
use windows::Win32::System::Threading::{OpenProcess, PROCESS_QUERY_INFORMATION, PROCESS_VM_READ};
|
||||
|
||||
// =========================================================================
|
||||
// Signature table — REPLACE with current values, see module doc comment.
|
||||
// =========================================================================
|
||||
|
||||
/// A byte pattern to search for in process memory. `None` = wildcard byte.
|
||||
#[derive(Clone)]
|
||||
pub struct Signature {
|
||||
pub name: &'static str,
|
||||
pub pattern: &'static [Option<u8>],
|
||||
/// Byte offset from the START of the matched pattern to the address
|
||||
/// (or start of a pointer chain) you actually want to read.
|
||||
pub offset: isize,
|
||||
}
|
||||
|
||||
/// Helper macro so signatures can be written like Cheat Engine AOB strings,
|
||||
/// e.g. sig!("F8 01 74 04 ?? ?? ?? ??", offset = 5).
|
||||
macro_rules! sig {
|
||||
($bytes:expr) => {{ parse_aob($bytes) }};
|
||||
}
|
||||
|
||||
fn parse_aob(s: &str) -> Vec<Option<u8>> {
|
||||
s.split_whitespace()
|
||||
.map(|tok| {
|
||||
if tok == "??" || tok == "?" {
|
||||
None
|
||||
} else {
|
||||
Some(u8::from_str_radix(tok, 16).expect("bad AOB byte"))
|
||||
}
|
||||
})
|
||||
.collect()
|
||||
}
|
||||
|
||||
/// NOTE: These are PLACEHOLDER patterns illustrating the *shape* tosu-style
|
||||
/// signatures take (short, somewhat unique byte runs with wildcards around
|
||||
/// the volatile parts). Do not expect these exact bytes to match a real
|
||||
/// osu! binary — swap them for current ones before using this for real.
|
||||
pub fn build_signature_table() -> HashMap<&'static str, Signature> {
|
||||
let mut map = HashMap::new();
|
||||
|
||||
map.insert(
|
||||
"username_ptr",
|
||||
Signature {
|
||||
name: "username_ptr",
|
||||
pattern: Box::leak(sig!("75 04 33 C0 EB 0A A1 ?? ?? ?? ??").into_boxed_slice()),
|
||||
offset: 7, // offset to the 4-byte address embedded in the instruction
|
||||
},
|
||||
);
|
||||
|
||||
map.insert(
|
||||
"game_mode_ptr",
|
||||
Signature {
|
||||
name: "game_mode_ptr",
|
||||
pattern: Box::leak(sig!("83 F8 08 7D 05 ?? ?? ?? ?? ??").into_boxed_slice()),
|
||||
offset: 5,
|
||||
},
|
||||
);
|
||||
|
||||
map.insert(
|
||||
"current_beatmap_ptr",
|
||||
Signature {
|
||||
name: "current_beatmap_ptr",
|
||||
pattern: Box::leak(sig!("6A 01 6A 00 A1 ?? ?? ?? ?? 8B 00").into_boxed_slice()),
|
||||
offset: 4,
|
||||
},
|
||||
);
|
||||
|
||||
map.insert(
|
||||
"combo_ptr",
|
||||
Signature {
|
||||
name: "combo_ptr",
|
||||
pattern: Box::leak(
|
||||
sig!("83 3D ?? ?? ?? ?? 00 7E 34 A1 ?? ?? ?? ??").into_boxed_slice(),
|
||||
),
|
||||
offset: 9,
|
||||
},
|
||||
);
|
||||
|
||||
// userId typically lives on the same "player info" object as username,
|
||||
// just at a different field offset — but tosu-style tools usually give
|
||||
// it its own independent signature since it's read even when the
|
||||
// username string hasn't been touched yet (e.g. right after login).
|
||||
map.insert(
|
||||
"user_id_ptr",
|
||||
Signature {
|
||||
name: "user_id_ptr",
|
||||
pattern: Box::leak(sig!("A1 ?? ?? ?? ?? 89 45 ?? 8B 45 ?? 8B 0D").into_boxed_slice()),
|
||||
offset: 1,
|
||||
},
|
||||
);
|
||||
|
||||
map
|
||||
}
|
||||
|
||||
// =========================================================================
|
||||
// Process handle + raw memory access
|
||||
// =========================================================================
|
||||
|
||||
pub struct MemoryReader {
|
||||
handle: HANDLE,
|
||||
pid: u32,
|
||||
/// Cached list of readable committed memory regions.
|
||||
regions: Vec<(usize, usize)>, // (base_address, size)
|
||||
}
|
||||
|
||||
impl MemoryReader {
|
||||
/// Opens the given PID for reading. Returns None if the process can't
|
||||
/// be opened (e.g. insufficient privileges, process exited).
|
||||
pub fn open(pid: u32) -> Option<Self> {
|
||||
let handle =
|
||||
unsafe { OpenProcess(PROCESS_VM_READ | PROCESS_QUERY_INFORMATION, false, pid).ok()? };
|
||||
Some(Self {
|
||||
handle,
|
||||
pid,
|
||||
regions: Vec::new(),
|
||||
})
|
||||
}
|
||||
|
||||
/// Re-enumerates committed, readable memory regions. Call once after
|
||||
/// open() and periodically after (e.g. once per scan cycle), since the
|
||||
/// process's memory layout can change.
|
||||
pub fn refresh_regions(&mut self) {
|
||||
self.regions.clear();
|
||||
let mut address: usize = 0;
|
||||
|
||||
loop {
|
||||
let mut mbi = MEMORY_BASIC_INFORMATION::default();
|
||||
let result = unsafe {
|
||||
VirtualQueryEx(
|
||||
self.handle,
|
||||
Some(address as *const _),
|
||||
&mut mbi,
|
||||
std::mem::size_of::<MEMORY_BASIC_INFORMATION>(),
|
||||
)
|
||||
};
|
||||
|
||||
if result == 0 {
|
||||
break; // no more regions
|
||||
}
|
||||
|
||||
let region_size = mbi.RegionSize;
|
||||
let is_committed = mbi.State == MEM_COMMIT;
|
||||
let is_guarded = (mbi.Protect & PAGE_GUARD).0 != 0;
|
||||
let is_no_access = mbi.Protect == PAGE_NOACCESS;
|
||||
|
||||
if is_committed && !is_guarded && !is_no_access && region_size > 0 {
|
||||
self.regions.push((mbi.BaseAddress as usize, region_size));
|
||||
}
|
||||
|
||||
address = (mbi.BaseAddress as usize).saturating_add(region_size);
|
||||
if address == 0 {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Reads `size` bytes starting at `address`. Returns None on failure
|
||||
/// (unmapped page, access denied, process exited mid-read, etc).
|
||||
pub fn read_bytes(&self, address: usize, size: usize) -> Option<Vec<u8>> {
|
||||
let mut buffer = vec![0u8; size];
|
||||
let mut bytes_read = 0usize;
|
||||
|
||||
unsafe {
|
||||
ReadProcessMemory(
|
||||
self.handle,
|
||||
address as *const _,
|
||||
buffer.as_mut_ptr() as *mut _,
|
||||
size,
|
||||
Some(&mut bytes_read),
|
||||
)
|
||||
.ok()?;
|
||||
}
|
||||
|
||||
buffer.truncate(bytes_read);
|
||||
if buffer.is_empty() {
|
||||
None
|
||||
} else {
|
||||
Some(buffer)
|
||||
}
|
||||
}
|
||||
|
||||
pub fn read_i32(&self, address: usize) -> Option<i32> {
|
||||
let bytes = self.read_bytes(address, 4)?;
|
||||
Some(i32::from_le_bytes(bytes.try_into().ok()?))
|
||||
}
|
||||
|
||||
pub fn read_u32(&self, address: usize) -> Option<u32> {
|
||||
let bytes = self.read_bytes(address, 4)?;
|
||||
Some(u32::from_le_bytes(bytes.try_into().ok()?))
|
||||
}
|
||||
|
||||
pub fn read_u16(&self, address: usize) -> Option<u16> {
|
||||
let bytes = self.read_bytes(address, 2)?;
|
||||
Some(u16::from_le_bytes(bytes.try_into().ok()?))
|
||||
}
|
||||
|
||||
pub fn read_f64(&self, address: usize) -> Option<f64> {
|
||||
let bytes = self.read_bytes(address, 8)?;
|
||||
Some(f64::from_le_bytes(bytes.try_into().ok()?))
|
||||
}
|
||||
|
||||
/// Reads a pointer-sized value (4 bytes for the 32-bit osu! stable
|
||||
/// client). Change to 8 bytes if you ever target a 64-bit build.
|
||||
pub fn read_ptr(&self, address: usize) -> Option<usize> {
|
||||
self.read_u32(address).map(|v| v as usize)
|
||||
}
|
||||
|
||||
/// Reads a .NET-style string: [object header][length: i32][utf16 chars].
|
||||
/// `base` should point at the object header; the classic offset for
|
||||
/// .NET string length is +0x4 and chars start at +0x8, but verify
|
||||
/// against your target since layouts can differ.
|
||||
pub fn read_dotnet_string(&self, base: usize, max_len: usize) -> Option<String> {
|
||||
let len = self.read_i32(base + 0x4)? as usize;
|
||||
let len = len.min(max_len);
|
||||
if len == 0 {
|
||||
return Some(String::new());
|
||||
}
|
||||
|
||||
let bytes = self.read_bytes(base + 0x8, len * 2)?;
|
||||
let utf16: Vec<u16> = bytes
|
||||
.chunks_exact(2)
|
||||
.map(|b| u16::from_le_bytes([b[0], b[1]]))
|
||||
.collect();
|
||||
|
||||
String::from_utf16(&utf16).ok()
|
||||
}
|
||||
|
||||
/// Scans all cached regions for `signature.pattern`, returning the
|
||||
/// absolute address where the pattern begins (before applying offset).
|
||||
pub fn find_signature(&self, signature: &Signature) -> Option<usize> {
|
||||
for &(base, size) in &self.regions {
|
||||
// Read in chunks to avoid gigantic single allocations on huge
|
||||
// regions; 1MB chunks with overlap so patterns aren't missed
|
||||
// across a chunk boundary.
|
||||
const CHUNK: usize = 1 << 20;
|
||||
let overlap = signature.pattern.len().saturating_sub(1);
|
||||
let mut offset = 0;
|
||||
|
||||
while offset < size {
|
||||
let read_size = CHUNK.min(size - offset);
|
||||
let Some(mem) = self.read_bytes(base + offset, read_size) else {
|
||||
offset += CHUNK;
|
||||
continue;
|
||||
};
|
||||
|
||||
if let Some(pos) = find_pattern(&mem, signature.pattern) {
|
||||
return Some(base + offset + pos);
|
||||
}
|
||||
|
||||
offset += CHUNK.saturating_sub(overlap).max(1);
|
||||
}
|
||||
}
|
||||
None
|
||||
}
|
||||
|
||||
pub fn pid(&self) -> u32 {
|
||||
self.pid
|
||||
}
|
||||
}
|
||||
|
||||
impl Drop for MemoryReader {
|
||||
fn drop(&mut self) {
|
||||
unsafe {
|
||||
let _ = CloseHandle(self.handle);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Naive substring search over a byte pattern with wildcards. Fine for
|
||||
/// per-scan-cycle use; swap for a Boyer-Moore-style skip table if you need
|
||||
/// to scan very large regions many times per second.
|
||||
fn find_pattern(haystack: &[u8], pattern: &[Option<u8>]) -> Option<usize> {
|
||||
if pattern.is_empty() || haystack.len() < pattern.len() {
|
||||
return None;
|
||||
}
|
||||
|
||||
haystack.windows(pattern.len()).position(|window| {
|
||||
window
|
||||
.iter()
|
||||
.zip(pattern.iter())
|
||||
.all(|(b, p)| p.map_or(true, |expected| *b == expected))
|
||||
})
|
||||
}
|
||||
|
||||
// =========================================================================
|
||||
// High-level "osu state" reader
|
||||
// =========================================================================
|
||||
|
||||
#[derive(Serialize, Debug, Default, Clone)]
|
||||
pub struct OsuState {
|
||||
pub username: Option<String>,
|
||||
pub user_id: Option<i32>,
|
||||
pub game_mode: Option<i32>,
|
||||
pub combo: Option<i32>,
|
||||
pub beatmap_id: Option<i32>,
|
||||
}
|
||||
|
||||
pub struct OsuMemoryClient {
|
||||
reader: MemoryReader,
|
||||
signatures: HashMap<&'static str, Signature>,
|
||||
/// Cached resolved addresses so we don't re-scan the whole memory space
|
||||
/// every single read — only re-resolve if a read at the cached address
|
||||
/// stops making sense (e.g. after an osu update / restart).
|
||||
resolved: HashMap<&'static str, usize>,
|
||||
/// When true, prints signature resolution + read results to stderr.
|
||||
/// Toggle via `new_with_debug`, or flip at runtime with `set_debug`.
|
||||
debug: bool,
|
||||
}
|
||||
|
||||
impl OsuMemoryClient {
|
||||
pub fn new(pid: u32) -> Option<Self> {
|
||||
Self::new_with_debug(pid, false)
|
||||
}
|
||||
|
||||
/// Same as `new`, but with debug logging to stderr enabled/disabled
|
||||
/// explicitly. Handy to wire up to a `--debug` CLI flag or a Tauri
|
||||
/// dev-mode check (`cfg!(debug_assertions)`).
|
||||
pub fn new_with_debug(pid: u32, debug: bool) -> Option<Self> {
|
||||
let mut reader = MemoryReader::open(pid)?;
|
||||
if debug {
|
||||
eprintln!("[osu_memory] opening pid {pid} for reading");
|
||||
}
|
||||
reader.refresh_regions();
|
||||
if debug {
|
||||
eprintln!(
|
||||
"[osu_memory] found {} readable regions",
|
||||
reader.regions.len()
|
||||
);
|
||||
}
|
||||
Some(Self {
|
||||
reader,
|
||||
signatures: build_signature_table(),
|
||||
resolved: HashMap::new(),
|
||||
debug,
|
||||
})
|
||||
}
|
||||
|
||||
pub fn set_debug(&mut self, debug: bool) {
|
||||
self.debug = debug;
|
||||
}
|
||||
|
||||
/// Call periodically (e.g. every few seconds, or whenever osu restarts)
|
||||
/// to pick up new memory layout / re-find signatures.
|
||||
pub fn refresh(&mut self) {
|
||||
if self.debug {
|
||||
eprintln!(
|
||||
"[osu_memory] refreshing regions + clearing {} cached signature(s)",
|
||||
self.resolved.len()
|
||||
);
|
||||
}
|
||||
self.reader.refresh_regions();
|
||||
self.resolved.clear();
|
||||
if self.debug {
|
||||
eprintln!(
|
||||
"[osu_memory] {} readable regions after refresh",
|
||||
self.reader.regions.len()
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
fn resolve(&mut self, key: &'static str) -> Option<usize> {
|
||||
if let Some(addr) = self.resolved.get(key) {
|
||||
if self.debug {
|
||||
eprintln!("[osu_memory] {key} -> 0x{addr:X} (cached)");
|
||||
}
|
||||
return Some(*addr);
|
||||
}
|
||||
|
||||
let sig = self.signatures.get(key)?.clone();
|
||||
let Some(found) = self.reader.find_signature(&sig) else {
|
||||
if self.debug {
|
||||
eprintln!("[osu_memory] {key}: signature NOT FOUND in any scanned region");
|
||||
}
|
||||
return None;
|
||||
};
|
||||
let target = (found as isize + sig.offset) as usize;
|
||||
|
||||
if self.debug {
|
||||
eprintln!(
|
||||
"[osu_memory] {key}: signature matched at 0x{found:X}, target (offset {}) -> 0x{target:X}",
|
||||
sig.offset
|
||||
);
|
||||
}
|
||||
|
||||
self.resolved.insert(key, target);
|
||||
Some(target)
|
||||
}
|
||||
|
||||
pub fn read_username(&mut self) -> Option<String> {
|
||||
let addr = self.resolve("username_ptr")?;
|
||||
let ptr = self.reader.read_ptr(addr)?;
|
||||
let value = self.reader.read_dotnet_string(ptr, 64);
|
||||
if self.debug {
|
||||
eprintln!("[osu_memory] username -> {value:?}");
|
||||
}
|
||||
value
|
||||
}
|
||||
|
||||
pub fn read_user_id(&mut self) -> Option<i32> {
|
||||
let addr = self.resolve("user_id_ptr")?;
|
||||
// Unlike username/combo/beatmap, this signature usually points
|
||||
// straight at a static int slot rather than through an extra
|
||||
// object pointer — verify against whatever real signature you use,
|
||||
// some variants do need an extra self.reader.read_ptr() hop first.
|
||||
let value = self.reader.read_i32(addr);
|
||||
if self.debug {
|
||||
eprintln!("[osu_memory] user_id -> {value:?}");
|
||||
}
|
||||
value
|
||||
}
|
||||
|
||||
pub fn read_game_mode(&mut self) -> Option<i32> {
|
||||
let addr = self.resolve("game_mode_ptr")?;
|
||||
let ptr = self.reader.read_ptr(addr)?;
|
||||
let value = self.reader.read_i32(ptr);
|
||||
if self.debug {
|
||||
eprintln!("[osu_memory] game_mode -> {value:?}");
|
||||
}
|
||||
value
|
||||
}
|
||||
|
||||
pub fn read_combo(&mut self) -> Option<i32> {
|
||||
let addr = self.resolve("combo_ptr")?;
|
||||
let ptr = self.reader.read_ptr(addr)?;
|
||||
let value = self.reader.read_i32(ptr);
|
||||
if self.debug {
|
||||
eprintln!("[osu_memory] combo -> {value:?}");
|
||||
}
|
||||
value
|
||||
}
|
||||
|
||||
pub fn read_beatmap_id(&mut self) -> Option<i32> {
|
||||
let addr = self.resolve("current_beatmap_ptr")?;
|
||||
let ptr = self.reader.read_ptr(addr)?;
|
||||
let value = self.reader.read_i32(ptr + 0xC); // example nested offset into the beatmap struct
|
||||
if self.debug {
|
||||
eprintln!("[osu_memory] beatmap_id -> {value:?}");
|
||||
}
|
||||
value
|
||||
}
|
||||
|
||||
/// Convenience: read everything at once into a single struct, suitable
|
||||
/// for bundling into your existing scan payload / emitting to the
|
||||
/// frontend.
|
||||
pub fn read_state(&mut self) -> OsuState {
|
||||
if self.debug {
|
||||
eprintln!(
|
||||
"[osu_memory] --- reading full state (pid {}) ---",
|
||||
self.reader.pid()
|
||||
);
|
||||
}
|
||||
let state = OsuState {
|
||||
username: self.read_username(),
|
||||
user_id: self.read_user_id(),
|
||||
game_mode: self.read_game_mode(),
|
||||
combo: self.read_combo(),
|
||||
beatmap_id: self.read_beatmap_id(),
|
||||
};
|
||||
if self.debug {
|
||||
eprintln!("[osu_memory] state = {state:?}");
|
||||
}
|
||||
state
|
||||
}
|
||||
}
|
||||
|
||||
// =========================================================================
|
||||
// Example wiring into your existing watcher loop
|
||||
// =========================================================================
|
||||
//
|
||||
// let mut mem_client = OsuMemoryClient::new(osu_pid)?;
|
||||
// loop {
|
||||
// let state = mem_client.read_state();
|
||||
// // attach `state` to your ScanPayload before POSTing to the server
|
||||
// // if a read silently comes back all-None a few cycles in a row,
|
||||
// // call mem_client.refresh() in case osu updated/restarted.
|
||||
// }
|
||||
+10
-3
@@ -24,10 +24,13 @@ pub fn get_osu_user_config<P: AsRef<Path>>(
|
||||
return None;
|
||||
}
|
||||
|
||||
let current_user = std::env::var("USERNAME").unwrap_or_else(|_| "Admin".to_string());
|
||||
let current_user = std::env::var("USERNAME")
|
||||
.or_else(|_| std::env::var("USER"))
|
||||
.unwrap_or_else(|_| "Admin".to_string());
|
||||
let osu_config_path = osu_folder_path
|
||||
.as_ref()
|
||||
.join(format!("osu!.{}.cfg", current_user));
|
||||
println!("Looking for user config at: {:?}", osu_config_path);
|
||||
if !osu_config_path.exists() {
|
||||
return None;
|
||||
}
|
||||
@@ -48,7 +51,9 @@ pub fn set_osu_user_config_vals(
|
||||
osu_folder_path: &str,
|
||||
key_values: &[(&str, Option<&str>)],
|
||||
) -> Result<bool, String> {
|
||||
let current_user = std::env::var("USERNAME").unwrap_or_else(|_| "Admin".to_string());
|
||||
let current_user = std::env::var("USERNAME")
|
||||
.or_else(|_| std::env::var("USER"))
|
||||
.unwrap_or_else(|_| "Admin".to_string());
|
||||
let osu_config_path = Path::new(osu_folder_path).join(format!("osu!.{}.cfg", current_user));
|
||||
|
||||
if !osu_config_path.exists() {
|
||||
@@ -310,7 +315,9 @@ pub async fn is_net8_installed() -> bool {
|
||||
}
|
||||
|
||||
let stdout_str = String::from_utf8_lossy(&output.stdout);
|
||||
stdout_str.lines().any(|line| line.starts_with("Microsoft.WindowsDesktop.App 8."))
|
||||
stdout_str
|
||||
.lines()
|
||||
.any(|line| line.starts_with("Microsoft.WindowsDesktop.App 8."))
|
||||
}
|
||||
Err(_) => false,
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"$schema": "https://schema.tauri.app/config/2",
|
||||
"productName": "EZPPLauncher",
|
||||
"version": "3.2.2",
|
||||
"version": "3.2.5",
|
||||
"identifier": "farm.EZPPFarm.Launcher",
|
||||
"mainBinaryName": "ezpplauncher",
|
||||
"build": {
|
||||
|
||||
@@ -3,9 +3,11 @@ import type {
|
||||
EZPPUserInfoResponse,
|
||||
EZPPUserResponse,
|
||||
EZPPUSerStatusResponse,
|
||||
StreamsResult,
|
||||
} from '$lib/types';
|
||||
import { betterFetch } from '@better-fetch/fetch';
|
||||
|
||||
const VERSION_ENDPOINT = 'https://version.ez-pp.farm/';
|
||||
const BANCHO_ENDPOINT = 'https://c.ez-pp.farm/';
|
||||
const API_ENDPOINT = 'https://api.ez-pp.farm/';
|
||||
const ENDPOINT = 'https://ez-pp.farm/';
|
||||
@@ -89,4 +91,31 @@ export const ezppfarm = {
|
||||
);
|
||||
return request.error ? undefined : request.data;
|
||||
},
|
||||
latestBuildVersion: async (releaseStream: string): Promise<string | undefined> => {
|
||||
const request = await betterFetch<StreamsResult>(`${VERSION_ENDPOINT}api/changelog`, {
|
||||
timeout,
|
||||
query: {
|
||||
stream: 'none',
|
||||
},
|
||||
headers: {
|
||||
Accept: 'application/json',
|
||||
'Content-Type': 'application/json',
|
||||
'User-Agent': 'EZPPLauncher',
|
||||
},
|
||||
});
|
||||
if (request.error) {
|
||||
return undefined;
|
||||
}
|
||||
const releaseData = request.data;
|
||||
if (!releaseData || !releaseData.streams) {
|
||||
return undefined;
|
||||
}
|
||||
if (releaseData.streams.length === 0) return undefined;
|
||||
const selectedRelease = releaseData.streams.find(
|
||||
(releaseBuild) =>
|
||||
releaseBuild.name.toLowerCase() === releaseStream.replaceAll(' ', '').toLowerCase()
|
||||
);
|
||||
if (!selectedRelease) return undefined;
|
||||
return selectedRelease.latest_build.display_version;
|
||||
},
|
||||
};
|
||||
|
||||
@@ -1,35 +0,0 @@
|
||||
import type { StreamsResult } from '$lib/types';
|
||||
import { betterFetch } from '@better-fetch/fetch';
|
||||
|
||||
const API_ENDPOINT = 'https://osu.ppy.sh/api/';
|
||||
|
||||
const timeout = 5000; // 5 seconds;
|
||||
|
||||
export const osuapi = {
|
||||
latestBuildVersion: async (releaseStream: string): Promise<string | undefined> => {
|
||||
const request = await betterFetch<StreamsResult>(`${API_ENDPOINT}v2/changelog`, {
|
||||
timeout,
|
||||
query: {
|
||||
stream: 'none',
|
||||
},
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
'User-Agent': 'EZPPLauncher',
|
||||
},
|
||||
});
|
||||
if (request.error) {
|
||||
return undefined;
|
||||
}
|
||||
const releaseData = request.data;
|
||||
if (!releaseData || !releaseData.streams) {
|
||||
return undefined;
|
||||
}
|
||||
if (releaseData.streams.length === 0) return undefined;
|
||||
const selectedRelease = releaseData.streams.find(
|
||||
(releaseBuild) =>
|
||||
releaseBuild.name.toLowerCase() === releaseStream.replaceAll(' ', '').toLowerCase()
|
||||
);
|
||||
if (!selectedRelease) return undefined;
|
||||
return selectedRelease.latest_build.display_version;
|
||||
},
|
||||
};
|
||||
+51
-6
@@ -9,6 +9,11 @@ export enum Gamemodes {
|
||||
RELAX_CATCH = 6,
|
||||
|
||||
AUTOPILOT_OSU = 8,
|
||||
|
||||
SCOREV2_OSU = 12,
|
||||
SCOREV2_TAIKO = 13,
|
||||
SCOREV2_CATCH = 14,
|
||||
SCOREV2_MANIA = 15,
|
||||
}
|
||||
|
||||
export enum Mode {
|
||||
@@ -22,12 +27,39 @@ export enum Type {
|
||||
VANILLA = 0,
|
||||
RELAX = 4,
|
||||
AUTOPILOT = 8,
|
||||
SCOREV2 = 12,
|
||||
}
|
||||
|
||||
export const validModes = [Mode.OSU, Mode.TAIKO, Mode.CATCH, Mode.MANIA];
|
||||
export const validTypes = [Type.VANILLA, Type.RELAX, Type.AUTOPILOT];
|
||||
export const validModeTypeCombinations = [0, 1, 2, 3, 4, 5, 6, 8];
|
||||
export const validModeTypeCombinationsSorted = [0, 4, 8, 1, 5, 2, 6, 3];
|
||||
export const validTypes = [Type.VANILLA, Type.RELAX, Type.AUTOPILOT, Type.SCOREV2];
|
||||
export const validModeTypeCombinations = [
|
||||
Gamemodes.VANILLA_OSU,
|
||||
Gamemodes.VANILLA_TAIKO,
|
||||
Gamemodes.VANILLA_CATCH,
|
||||
Gamemodes.VANILLA_MANIA,
|
||||
Gamemodes.RELAX_OSU,
|
||||
Gamemodes.RELAX_TAIKO,
|
||||
Gamemodes.RELAX_CATCH,
|
||||
Gamemodes.AUTOPILOT_OSU,
|
||||
Gamemodes.SCOREV2_OSU,
|
||||
Gamemodes.SCOREV2_TAIKO,
|
||||
Gamemodes.SCOREV2_CATCH,
|
||||
Gamemodes.SCOREV2_MANIA,
|
||||
];
|
||||
export const validModeTypeCombinationsSorted = [
|
||||
Gamemodes.VANILLA_OSU,
|
||||
Gamemodes.RELAX_OSU,
|
||||
Gamemodes.AUTOPILOT_OSU,
|
||||
Gamemodes.SCOREV2_OSU,
|
||||
Gamemodes.VANILLA_TAIKO,
|
||||
Gamemodes.RELAX_TAIKO,
|
||||
Gamemodes.SCOREV2_TAIKO,
|
||||
Gamemodes.VANILLA_CATCH,
|
||||
Gamemodes.RELAX_CATCH,
|
||||
Gamemodes.SCOREV2_CATCH,
|
||||
Gamemodes.VANILLA_MANIA,
|
||||
Gamemodes.SCOREV2_MANIA,
|
||||
];
|
||||
|
||||
export const validMode = (modeStr: string) => modeStrToInt(modeStr) !== undefined;
|
||||
export const validType = (typeStr: string) => typeStrToInt(typeStr) !== undefined;
|
||||
@@ -60,7 +92,7 @@ export const modeIntToStr = (modeInt: number) => {
|
||||
return undefined;
|
||||
};
|
||||
|
||||
export const typeStrToInt = (typeStr: 'vanilla' | 'relax' | 'autopilot' | string) => {
|
||||
export const typeStrToInt = (typeStr: 'vanilla' | 'relax' | 'autopilot' | 'v2' | string) => {
|
||||
switch (typeStr) {
|
||||
case 'relax':
|
||||
return Type.RELAX;
|
||||
@@ -68,6 +100,8 @@ export const typeStrToInt = (typeStr: 'vanilla' | 'relax' | 'autopilot' | string
|
||||
return Type.AUTOPILOT;
|
||||
case 'vanilla':
|
||||
return Type.VANILLA;
|
||||
case 'scorev2':
|
||||
return Type.SCOREV2;
|
||||
}
|
||||
return undefined;
|
||||
};
|
||||
@@ -80,13 +114,15 @@ export const typeIntToStr = (typeInt: number) => {
|
||||
return 'autopilot';
|
||||
case Type.VANILLA:
|
||||
return 'vanilla';
|
||||
case Type.SCOREV2:
|
||||
return 'scorev2';
|
||||
}
|
||||
return undefined;
|
||||
};
|
||||
|
||||
export const getGamemodeInt = (
|
||||
mode: 'osu' | 'taiko' | 'catch' | 'mania' | string | undefined,
|
||||
type: 'vanilla' | 'relax' | 'autopilot' | string | undefined
|
||||
type: 'vanilla' | 'relax' | 'autopilot' | 'scorev2' | string | undefined
|
||||
) => {
|
||||
let modee = 0;
|
||||
switch (mode) {
|
||||
@@ -108,6 +144,9 @@ export const getGamemodeInt = (
|
||||
case 'autopilot':
|
||||
modee += Type.AUTOPILOT;
|
||||
break;
|
||||
case 'scorev2':
|
||||
modee += Type.SCOREV2;
|
||||
break;
|
||||
}
|
||||
|
||||
return modee;
|
||||
@@ -115,7 +154,7 @@ export const getGamemodeInt = (
|
||||
|
||||
export const getGamemodeName = (
|
||||
mode: 'osu' | 'taiko' | 'catch' | 'mania' | string | undefined,
|
||||
type: 'vanilla' | 'relax' | 'autopilot' | string | undefined
|
||||
type: 'vanilla' | 'relax' | 'autopilot' | 'scorev2' | string | undefined
|
||||
) => {
|
||||
let modeStr = '';
|
||||
switch (mode) {
|
||||
@@ -140,6 +179,9 @@ export const getGamemodeName = (
|
||||
case 'autopilot':
|
||||
modeStr += 'ap';
|
||||
break;
|
||||
case 'scorev2':
|
||||
modeStr += 'v2';
|
||||
break;
|
||||
default:
|
||||
modeStr += 'vn';
|
||||
break;
|
||||
@@ -173,6 +215,9 @@ export const getModeAndTypeFromGamemode = (gamemode: number) => {
|
||||
case Type.AUTOPILOT:
|
||||
type = Type.AUTOPILOT;
|
||||
break;
|
||||
case Type.SCOREV2:
|
||||
type = Type.SCOREV2;
|
||||
break;
|
||||
}
|
||||
|
||||
return {
|
||||
|
||||
+2
-1
@@ -1,5 +1,5 @@
|
||||
import { active_custom_theme, custom_themes } from './global';
|
||||
import { setGlobalVolume } from './utils';
|
||||
import { disableMediaControls, setGlobalVolume } from './utils';
|
||||
import { betterFetch } from '@better-fetch/fetch';
|
||||
import { convertFileSrc } from '@tauri-apps/api/core';
|
||||
import { invoke } from '@tauri-apps/api/core';
|
||||
@@ -268,6 +268,7 @@ export const loadTheme = async (theme: Theme, themeContainer: HTMLElement, volum
|
||||
themeScript.mountTheme(themeContainer, { assets: theme.assets });
|
||||
}
|
||||
setGlobalVolume(volume);
|
||||
disableMediaControls();
|
||||
};
|
||||
|
||||
export const deleteTheme = async (themeToUninstall: Theme) => {
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
export type LaunchView = 'HOME' | 'LOGIN' | 'SETTINGS' | 'THEMES';
|
||||
|
||||
export type EZPPUserResponse = {
|
||||
code: number;
|
||||
message: string;
|
||||
|
||||
@@ -203,6 +203,43 @@ export function trackMediaContainer(node: HTMLElement) {
|
||||
};
|
||||
}
|
||||
|
||||
const MEDIA_ACTIONS: MediaSessionAction[] = [
|
||||
'play',
|
||||
'pause',
|
||||
'stop',
|
||||
'previoustrack',
|
||||
'nexttrack',
|
||||
'seekbackward',
|
||||
'seekforward',
|
||||
];
|
||||
|
||||
export function disableMediaControls() {
|
||||
const mediaElements: NodeListOf<HTMLMediaElement> = document.querySelectorAll('audio, video');
|
||||
|
||||
if ('mediaSession' in navigator) {
|
||||
MEDIA_ACTIONS.forEach((action) => {
|
||||
try {
|
||||
navigator.mediaSession.setActionHandler(action, () => {});
|
||||
} catch {}
|
||||
});
|
||||
}
|
||||
|
||||
document.addEventListener(
|
||||
'keydown',
|
||||
(e: KeyboardEvent) => {
|
||||
if (e.key.startsWith('Media')) {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
}
|
||||
},
|
||||
true
|
||||
);
|
||||
|
||||
mediaElements.forEach((el) => {
|
||||
el.disableRemotePlayback = true;
|
||||
});
|
||||
}
|
||||
|
||||
export function calculateGitBlobSha(fileBuffer: Buffer): string {
|
||||
const header = Buffer.from(`blob ${fileBuffer.length}\0`);
|
||||
const store = Buffer.concat([header, fileBuffer]);
|
||||
|
||||
@@ -135,7 +135,7 @@
|
||||
const localThemes = await getThemes();
|
||||
const lastThemeName = await config_theme.get('Default');
|
||||
const last_theme = localThemes.find((t) => t.name === lastThemeName);
|
||||
if (!last_theme) {
|
||||
if (!last_theme || $platform === 'linux') {
|
||||
await config.value<string>('theme').set('Default');
|
||||
loadTheme(localThemes[0], $custom_theme_container!, await config_theme_volume.get(0.15));
|
||||
} else {
|
||||
|
||||
+103
-28
@@ -2,7 +2,6 @@
|
||||
import DefaultThemePreview from '$assets/default_preview.png';
|
||||
import Logo from '$assets/logo.png';
|
||||
import { ezppfarm } from '$lib/api/ezpp';
|
||||
import { osuapi } from '$lib/api/osuapi';
|
||||
import * as AlertDialog from '$lib/components/ui/alert-dialog';
|
||||
import * as Avatar from '$lib/components/ui/avatar';
|
||||
import Badge from '$lib/components/ui/badge/badge.svelte';
|
||||
@@ -88,7 +87,7 @@
|
||||
loadTheme,
|
||||
type ThemeInfo,
|
||||
} from '$lib/themes';
|
||||
import { EZPPActionStatus } from '$lib/types';
|
||||
import { EZPPActionStatus, type LaunchView } from '$lib/types';
|
||||
import { currentUser } from '$lib/userAuthentication';
|
||||
import {
|
||||
cursorSmoothening,
|
||||
@@ -141,7 +140,7 @@
|
||||
import { onMount } from 'svelte';
|
||||
import { fade, fly, scale } from 'svelte/transition';
|
||||
|
||||
let selectedView = $state('home');
|
||||
let selectedView = $state<LaunchView>('HOME');
|
||||
let progress = $state(-1);
|
||||
let launchInfo = $state('');
|
||||
let launchError = $state<Error | undefined>(undefined);
|
||||
@@ -151,6 +150,8 @@
|
||||
|
||||
let downloadingUpdate = $state(false);
|
||||
|
||||
let updateCheckFailed = $state(false);
|
||||
|
||||
let dragAndDrop = useDropZone({
|
||||
onDrop: async (file) => {
|
||||
const firstFile = file[0];
|
||||
@@ -245,7 +246,7 @@
|
||||
}
|
||||
};
|
||||
|
||||
const launch = async () => {
|
||||
const launch = async (skipUpdateCheck = false) => {
|
||||
if ($launching) return;
|
||||
launchInfo = 'Checking if osu! is already running...';
|
||||
launching.set(true);
|
||||
@@ -302,9 +303,12 @@
|
||||
}
|
||||
}
|
||||
|
||||
if (!skipUpdateCheck) {
|
||||
try {
|
||||
launchInfo = 'Looking for file updates...';
|
||||
const updateResult = await getEZPPLauncherUpdateFiles(osuPath, $launcherStream);
|
||||
let launchStream = $launcherStream;
|
||||
if ($platform !== 'windows') launchStream = 'stable'; //fallback to stable for non windows systems
|
||||
const updateResult = await getEZPPLauncherUpdateFiles(osuPath, launchStream);
|
||||
|
||||
if (updateResult) {
|
||||
if (updateResult.filesToDownload.length > 0) {
|
||||
@@ -334,15 +338,18 @@
|
||||
launching.set(false);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
const streamInfo = await osuapi.latestBuildVersion('stable40');
|
||||
if (!skipUpdateCheck) {
|
||||
const streamInfo = await ezppfarm.latestBuildVersion('stable40');
|
||||
if (!streamInfo) {
|
||||
sileo.error({
|
||||
title: 'Hmmm...',
|
||||
description: 'Failed to check for updates, maybe osu! is down?',
|
||||
});
|
||||
launching.set(false);
|
||||
updateCheckFailed = true;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -402,6 +409,7 @@
|
||||
} else {
|
||||
launchInfo = 'You are up to date!';
|
||||
}
|
||||
}
|
||||
if ($currentUser) {
|
||||
const [username, password] = await Promise.all([
|
||||
config.value<string>('username').get(''),
|
||||
@@ -573,6 +581,7 @@
|
||||
const beatmapCoverImage = `https://assets.ppy.sh/beatmaps/${userStatus.player_status.status.beatmap.set_id}/covers/list@2x.jpg`;
|
||||
const isValidImage = await urlIsValidImage(beatmapCoverImage);
|
||||
if (isValidImage) largeImageKey = beatmapCoverImage;
|
||||
if (userStatus.player_status.status.action !== EZPPActionStatus.DIRECT)
|
||||
customButton = {
|
||||
text: 'View Beatmap',
|
||||
url: `https://ez-pp.farm/beatmapsets/${userStatus.player_status.status.beatmap.set_id}/${userStatus.player_status.status.beatmap.id}`,
|
||||
@@ -710,7 +719,7 @@
|
||||
]);
|
||||
|
||||
currentUser.set(loginResult.user);
|
||||
selectedView = 'home';
|
||||
selectedView = 'HOME';
|
||||
} else {
|
||||
sileo.error({
|
||||
title: 'Login failed!',
|
||||
@@ -1025,6 +1034,47 @@
|
||||
</AlertDialog.Content>
|
||||
</AlertDialog.Root>
|
||||
|
||||
<AlertDialog.Root open={updateCheckFailed}>
|
||||
<AlertDialog.Content
|
||||
class="bg-theme-950 border-theme-800 p-0 max-w-2xl"
|
||||
escapeKeydownBehavior="ignore"
|
||||
interactOutsideBehavior="ignore"
|
||||
>
|
||||
<div
|
||||
class="flex flex-col items-center justify-center border-b border-theme-800 bg-black/40 rounded-t-lg p-3"
|
||||
>
|
||||
<Import size={40} />
|
||||
<span class="font-semibold text-xl">Update check failed</span>
|
||||
</div>
|
||||
|
||||
<div
|
||||
class="flex flex-col items-center text-sm text-center bg-theme-900 border border-theme-800 rounded-lg mx-3 p-3"
|
||||
>
|
||||
<p class="mb-4">Failed to check for updates.</p>
|
||||
<p>Do you want to launch anyway?</p>
|
||||
</div>
|
||||
<div class="flex items-center justify-center mb-3 gap-4 mt-4">
|
||||
<Button
|
||||
class="min-w-28"
|
||||
onclick={async () => {
|
||||
await launch(true);
|
||||
updateCheckFailed = false;
|
||||
}}
|
||||
>
|
||||
Launch anyways
|
||||
</Button>
|
||||
<Button
|
||||
variant="outline"
|
||||
onclick={async () => {
|
||||
updateCheckFailed = false;
|
||||
}}
|
||||
>
|
||||
Abort
|
||||
</Button>
|
||||
</div>
|
||||
</AlertDialog.Content>
|
||||
</AlertDialog.Root>
|
||||
|
||||
<AlertDialog.Root open={$newVersion === undefined && !!droppedTheme && !themeInstalling}>
|
||||
<AlertDialog.Content
|
||||
class="bg-theme-950 border-theme-800 p-0 max-w-2xl"
|
||||
@@ -1149,36 +1199,36 @@
|
||||
<Badge class="text-[0.5rem] py-0 px-2">{$launcherVersion || 'dev'}</Badge>
|
||||
<Button
|
||||
class="flex size-12 items-center gap-2 ring-1 ring-inset ring-white/15 {selectedView ===
|
||||
'home'
|
||||
'HOME'
|
||||
? 'bg-primary/50'
|
||||
: 'bg-black/20 border-black/20'} hover:bg-primary/50 rounded-[0.85rem] p-3 mt-3"
|
||||
disabled={$launching}
|
||||
onclick={() => {
|
||||
if (!$launching) selectedView = 'home';
|
||||
if (!$launching) selectedView = 'HOME';
|
||||
}}
|
||||
>
|
||||
<House class="text-theme-200 size-5!" />
|
||||
</Button>
|
||||
<Button
|
||||
class="flex size-12 items-center gap-2 ring-1 ring-inset ring-white/15 {selectedView ===
|
||||
'themes'
|
||||
'THEMES'
|
||||
? 'bg-primary/50'
|
||||
: 'bg-black/20 border-black/20'} hover:bg-primary/50 rounded-[0.85rem] p-3 mt-3"
|
||||
disabled={$launching}
|
||||
onclick={() => {
|
||||
if (!$launching) selectedView = 'themes';
|
||||
if (!$launching) selectedView = 'THEMES';
|
||||
}}
|
||||
>
|
||||
<Paintbrush class="text-theme-200 size-5!" />
|
||||
</Button>
|
||||
<Button
|
||||
class="flex size-12 items-center gap-2 ring-1 ring-inset ring-white/15 {selectedView ===
|
||||
'settings'
|
||||
'SETTINGS'
|
||||
? 'bg-primary/50'
|
||||
: 'bg-black/20 border-black/20'} hover:bg-primary/50 rounded-[0.85rem] p-3 mt-3"
|
||||
disabled={$launching}
|
||||
onclick={() => {
|
||||
if (!$launching) selectedView = 'settings';
|
||||
if (!$launching) selectedView = 'SETTINGS';
|
||||
}}
|
||||
>
|
||||
<Settings class="text-theme-200 size-5!" />
|
||||
@@ -1209,14 +1259,14 @@
|
||||
});
|
||||
currentUser.set(undefined);
|
||||
currentUserInfo.set(undefined);
|
||||
selectedView = 'home';
|
||||
selectedView = 'HOME';
|
||||
}}
|
||||
>
|
||||
<LogOut class="size-3.5 mr-2" />
|
||||
Logout
|
||||
</DropdownMenu.Item>
|
||||
{:else}
|
||||
<DropdownMenu.Item class="text-xs" onclick={() => (selectedView = 'login')}>
|
||||
<DropdownMenu.Item class="text-xs" onclick={() => (selectedView = 'LOGIN')}>
|
||||
<LogIn class="size-3.5 mr-2" />
|
||||
Login
|
||||
</DropdownMenu.Item>
|
||||
@@ -1226,7 +1276,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="z-10 h-full overflow-hidden">
|
||||
{#if selectedView === 'home'}
|
||||
{#if selectedView === 'HOME'}
|
||||
<div
|
||||
class="flex flex-col-reverse h-full"
|
||||
in:fly={{
|
||||
@@ -1351,7 +1401,7 @@
|
||||
? 'No connection...'
|
||||
: undefined}
|
||||
disabled={$osuInstallationPath === '' || $serverConnectionFails > 1}
|
||||
onClick={launch}
|
||||
onClick={async () => await launch()}
|
||||
/>
|
||||
</div>
|
||||
<div class="relative h-50">
|
||||
@@ -1382,7 +1432,7 @@
|
||||
{getGamemodeName(modeIntToStr(selectedMode), typeIntToStr(selectedType))}
|
||||
</div>
|
||||
</Select.Trigger>
|
||||
<Select.Content class="bg-theme-950 border border-theme-900 rounded-lg">
|
||||
<Select.Content class="bg-theme-950 border border-theme-900 rounded-lg max-h-72">
|
||||
{#each validModeTypeCombinationsSorted as gamemode (gamemode)}
|
||||
{@const gamemod = getModeAndTypeFromGamemode(gamemode)}
|
||||
<Select.Item value={gamemode.toFixed()}>
|
||||
@@ -1522,7 +1572,7 @@
|
||||
<Button
|
||||
class="flex-1 h-7 text-xs"
|
||||
onclick={() => {
|
||||
selectedView = 'login';
|
||||
selectedView = 'LOGIN';
|
||||
}}>Log In</Button
|
||||
>
|
||||
<Button
|
||||
@@ -1543,7 +1593,7 @@
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
{:else if selectedView === 'settings'}
|
||||
{:else if selectedView === 'SETTINGS'}
|
||||
<div
|
||||
class="h-screen w-full flex flex-col items-center justify-center bg-black/20 backdrop-blur-sm"
|
||||
in:fly={{
|
||||
@@ -1558,17 +1608,16 @@
|
||||
<div class="flex flex-col">
|
||||
<Label class="text-sm" for="setting-patch">Patching</Label>
|
||||
<div class="text-muted-foreground text-xs">
|
||||
Shows misses in Relax and Autopilot {#if $platform !== 'windows'}<span
|
||||
Shows misses in Relax and Autopilot {#if $platform !== 'windows'}<!-- <span
|
||||
class="text-red-500 bg-red-800/20 border border-red-600/20 p-0.5 mx-1 px-2 rounded-lg text-[0.55rem]!"
|
||||
>currently only on windows!</span
|
||||
>
|
||||
> -->
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
<Checkbox
|
||||
id="setting-patch"
|
||||
checked={$platform === 'windows' ? $patch : false}
|
||||
disabled={$platform !== 'windows'}
|
||||
checked={$patch}
|
||||
onCheckedChange={async (e) => {
|
||||
patch.set(e);
|
||||
}}
|
||||
@@ -1717,6 +1766,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex flex-row w-full">
|
||||
<!-- only stable release stream for linux -->
|
||||
<Select.Root
|
||||
type="single"
|
||||
bind:value={$launcherStream}
|
||||
@@ -1762,7 +1812,7 @@
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
{:else if selectedView === 'login'}
|
||||
{:else if selectedView === 'LOGIN'}
|
||||
<div
|
||||
class="h-screen w-full flex flex-col items-center justify-center bg-black/20 backdrop-blur-sm"
|
||||
in:fly={{
|
||||
@@ -1813,7 +1863,7 @@
|
||||
</Button>
|
||||
</form>
|
||||
</div>
|
||||
{:else if selectedView === 'themes'}
|
||||
{:else if selectedView === 'THEMES'}
|
||||
<div
|
||||
class="h-screen w-full flex flex-col items-center bg-black/20 backdrop-blur-sm"
|
||||
in:fly={{
|
||||
@@ -1824,6 +1874,23 @@
|
||||
}}
|
||||
out:fly={{ duration: $reduceAnimations ? 0 : 400, y: -5, opacity: 0 }}
|
||||
>
|
||||
{#if $platform === 'linux'}
|
||||
<div
|
||||
class="flex flex-col items-center gap-4 mt-12 px-6 text-center h-full justify-center"
|
||||
>
|
||||
<!-- currently there is a bug when applying themes on Linux, the Launcher freezes, also when trying to load assets via the assetProtocol it fails because it says the asset was loaded insecurely -->
|
||||
<span class="text-2xl font-bold drop-shadow-lg"
|
||||
>Custom themes are not supported on Linux yet(we are working on it!)</span
|
||||
>
|
||||
<span class="text-muted-foreground font-semibold drop-shadow-lg"
|
||||
>Due to technical limitations on Linux, custom themes are currently not supported.
|
||||
</span>
|
||||
<span class="text-muted-foreground font-semibold drop-shadow-lg"
|
||||
>We are working on a solution to bring custom themes to Linux in a future update, but
|
||||
we don't have an ETA yet. Stay tuned!</span
|
||||
>
|
||||
</div>
|
||||
{:else}
|
||||
<ScrollContainer class="pt-8" topOffset={45}>
|
||||
<div class="grid w-full gap-1 grid-cols-3 p-3 pr-5">
|
||||
{#each $custom_themes as theme (theme.folder_name)}
|
||||
@@ -1868,7 +1935,10 @@
|
||||
} else {
|
||||
const downloadThemeResult = await downloadTheme(theme);
|
||||
if (!downloadThemeResult.success) {
|
||||
if (downloadThemeResult.error && downloadThemeResult.error.length > 0) {
|
||||
if (
|
||||
downloadThemeResult.error &&
|
||||
downloadThemeResult.error.length > 0
|
||||
) {
|
||||
sileo.error({
|
||||
title: 'Uhhm..',
|
||||
description: downloadThemeResult.error,
|
||||
@@ -1909,7 +1979,11 @@
|
||||
onclick={async () => {
|
||||
const defaultTheme = $custom_themes.find((t) => t.name === 'Default');
|
||||
if (defaultTheme) {
|
||||
loadTheme(defaultTheme, $custom_theme_container!, $custom_theme_volume);
|
||||
loadTheme(
|
||||
defaultTheme,
|
||||
$custom_theme_container!,
|
||||
$custom_theme_volume
|
||||
);
|
||||
await config.value<string>('theme').set(defaultTheme.name);
|
||||
|
||||
if (!(await downloadTheme(theme, true))) {
|
||||
@@ -1966,6 +2040,7 @@
|
||||
{/each}
|
||||
</div>
|
||||
</ScrollContainer>
|
||||
{/if}
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
@@ -13,7 +13,6 @@
|
||||
discordPresence,
|
||||
osuBuild,
|
||||
osuStream,
|
||||
platform,
|
||||
presenceLoading,
|
||||
skins,
|
||||
skinsCount,
|
||||
@@ -266,17 +265,16 @@
|
||||
<div class="flex flex-col">
|
||||
<Label class="text-sm" for="setting-patch">Patching</Label>
|
||||
<div class="text-muted-foreground text-xs">
|
||||
Shows misses in Relax and Autopilot {#if $platform !== 'windows'}<span
|
||||
Shows misses in Relax and Autopilot <!-- {#if $platform !== 'windows'}<span
|
||||
class="text-red-500 bg-red-800/20 border border-red-600/20 p-0.5 mx-1 px-2 rounded-lg text-[0.55rem]!"
|
||||
>currently only on windows!</span
|
||||
>
|
||||
{/if}
|
||||
{/if} -->
|
||||
</div>
|
||||
</div>
|
||||
<Checkbox
|
||||
id="setting-patch"
|
||||
checked={$platform === 'windows' ? $patch : false}
|
||||
disabled={$platform !== 'windows'}
|
||||
checked={$patch}
|
||||
onCheckedChange={async (e) => {
|
||||
patch.set(e);
|
||||
}}
|
||||
|
||||
Reference in New Issue
Block a user