Compare commits
42 Commits
df3bd69141
...
3.0.4
Author | SHA1 | Date | |
---|---|---|---|
f7c2dc689a | |||
b778a5a369 | |||
084e006f06 | |||
9b3cb0bd26 | |||
c5649c3f8a | |||
fac54f3e59 | |||
b6f7f84955 | |||
aa52ff3b8c | |||
d72d2731d9 | |||
f3ac7cc684 | |||
b1b3de295c | |||
e76affaea1 | |||
700274d7d8 | |||
53b6c2e174 | |||
93ecea9083 | |||
2549b18e8c | |||
fd4d911075 | |||
5edd53eead | |||
ea6db9afd1 | |||
d56b375953 | |||
ec25d5d2bb | |||
13b90092b7 | |||
f214aa454e | |||
9d2599dd2f | |||
eddaaaaa2f | |||
a21abe86bb | |||
d685114bd7 | |||
4e4998671a | |||
5cae8bc63a | |||
409c8b0b04 | |||
c395662134 | |||
89d1bcbd86 | |||
c3c13b0e07 | |||
4e1f76a713 | |||
4fb2ab7bed | |||
bb90e28d92 | |||
a554c53f89 | |||
307e0c9747 | |||
86033e2d6a | |||
1a563e64d5 | |||
5aec2d8245 | |||
87742b66b7 |
@@ -7,3 +7,6 @@ bun.lockb
|
||||
|
||||
# Miscellaneous
|
||||
/static/
|
||||
|
||||
# Tauri
|
||||
/src-tauri/
|
||||
|
@@ -9,7 +9,7 @@
|
||||
"tabWidth": 2,
|
||||
"useTabs": false,
|
||||
"bracketSpacing": true,
|
||||
"plugins": ["prettier-plugin-svelte", "prettier-plugin-rust"],
|
||||
"plugins": ["prettier-plugin-svelte"],
|
||||
"overrides": [
|
||||
{
|
||||
"files": "*.svelte",
|
||||
|
3
.vscode/extensions.json
vendored
3
.vscode/extensions.json
vendored
@@ -7,6 +7,7 @@
|
||||
"fill-labs.dependi",
|
||||
"mylesmurphy.prettify-ts",
|
||||
"edwinhuish.better-comments-next",
|
||||
"dbaeumer.vscode-eslint"
|
||||
"dbaeumer.vscode-eslint",
|
||||
"bradlc.vscode-tailwindcss"
|
||||
]
|
||||
}
|
||||
|
10
README.md
10
README.md
@@ -20,20 +20,20 @@ It enhances the osu! experience with quality-of-life features and integration sp
|
||||
- [x] Shows the number of imported beatmapsets
|
||||
- [x] Shows the number of imported skins
|
||||
- [x] Displays ping to the EZPPFarm server
|
||||
- [ ] Discord Rich Presence (planned and in development)
|
||||
- [ ] Performance Display Overlay (planned)
|
||||
- [x] Discord Rich Presence
|
||||
- [x] Performance Display Overlay (currently in experimental patcher release stream)
|
||||
|
||||
---
|
||||
|
||||
## 💻 Supported Platforms
|
||||
|
||||
| Platform | Status |
|
||||
| -------- | ---------------- |
|
||||
| -------- | ---------------------------------------- |
|
||||
| Windows | ✅ Supported |
|
||||
| macOS | ❌ Not supported |
|
||||
| Linux | ❌ Not supported |
|
||||
| Linux | 🕧 Partially supported (via osu-winello) |
|
||||
|
||||
> Currently, only **Windows** is supported. Support for other platforms may be considered in the future.
|
||||
> Currently, only **Windows** is fully supported. Support for other platforms may be considered in the future.
|
||||
|
||||
---
|
||||
|
||||
|
35
bun.lock
35
bun.lock
@@ -7,21 +7,18 @@
|
||||
"@better-fetch/fetch": "^1.1.18",
|
||||
"@fontsource/sora": "^5.2.6",
|
||||
"@fontsource/space-mono": "^5.2.8",
|
||||
"@iarna/toml": "^3.0.0",
|
||||
"@iarna/toml": "2.2.5",
|
||||
"@number-flow/svelte": "^0.3.9",
|
||||
"@tailwindcss/typography": "0.5.16",
|
||||
"@tailwindcss/vite": "^4.1.11",
|
||||
"@tauri-apps/api": "2.6.0",
|
||||
"@tauri-apps/plugin-dialog": "2.3.0",
|
||||
"@tauri-apps/plugin-fs": "2.4.0",
|
||||
"@tauri-apps/plugin-dialog": "2.3.1",
|
||||
"@tauri-apps/plugin-fs": "2.4.1",
|
||||
"@tauri-apps/plugin-shell": "2.3.0",
|
||||
"@tauri-apps/plugin-sql": "2.3.0",
|
||||
"animejs": "^4.0.2",
|
||||
"buffer": "^6.0.3",
|
||||
"crypto-js": "^4.2.0",
|
||||
"lucide-svelte": "0.525.0",
|
||||
"osu-classes": "3.1.0",
|
||||
"osu-parsers": "4.1.7",
|
||||
"semver": "^7.7.2",
|
||||
"svelte-confetti": "^2.0.0",
|
||||
"tw-animate-css": "^1.3.0",
|
||||
@@ -32,7 +29,7 @@
|
||||
"@lucide/svelte": "^0.525.0",
|
||||
"@sveltejs/adapter-static": "3.0.8",
|
||||
"@sveltejs/kit": "2.22.2",
|
||||
"@sveltejs/vite-plugin-svelte": "5.1.0",
|
||||
"@sveltejs/vite-plugin-svelte": "^6.1.0",
|
||||
"@tauri-apps/cli": "2.6.1",
|
||||
"@types/bun": "^1.2.18",
|
||||
"@types/crypto-js": "^4.2.2",
|
||||
@@ -59,7 +56,7 @@
|
||||
"typescript": "5.8.3",
|
||||
"typescript-eslint": "^8.20.0",
|
||||
"vite": "7.0.0",
|
||||
"vite-plugin-devtools-json": "^0.2.0",
|
||||
"vite-plugin-devtools-json": "^0.3.0",
|
||||
},
|
||||
},
|
||||
},
|
||||
@@ -158,7 +155,7 @@
|
||||
|
||||
"@humanwhocodes/retry": ["@humanwhocodes/retry@0.4.3", "", {}, "sha512-bV0Tgo9K4hfPCek+aMAn81RppFKv2ySDQeMoSZuvTASywNTnVJCArCZE2FWqpvIatKu7VMRLWlR1EazvVhDyhQ=="],
|
||||
|
||||
"@iarna/toml": ["@iarna/toml@3.0.0", "", {}, "sha512-td6ZUkz2oS3VeleBcN+m//Q6HlCFCPrnI0FZhrt/h4XqLEdOyYp2u21nd8MdsR+WJy5r9PTDaHTDDfhf4H4l6Q=="],
|
||||
"@iarna/toml": ["@iarna/toml@2.2.5", "", {}, "sha512-trnsAYxU3xnS1gPHPyU961coFyLkh4gAD/0zQ5mymY4yOZ+CYvsPqUbOFSw0aDM4y0tV7tiFxL/1XfXPNC6IPg=="],
|
||||
|
||||
"@internationalized/date": ["@internationalized/date@3.8.2", "", { "dependencies": { "@swc/helpers": "^0.5.0" } }, "sha512-/wENk7CbvLbkUvX1tu0mwq49CVkkWpkXubGel6birjRPyo6uQ4nQpnq5xZu823zRCwwn82zgHrvgF1vZyvmVgA=="],
|
||||
|
||||
@@ -232,9 +229,9 @@
|
||||
|
||||
"@sveltejs/kit": ["@sveltejs/kit@2.22.2", "", { "dependencies": { "@sveltejs/acorn-typescript": "^1.0.5", "@types/cookie": "^0.6.0", "acorn": "^8.14.1", "cookie": "^0.6.0", "devalue": "^5.1.0", "esm-env": "^1.2.2", "kleur": "^4.1.5", "magic-string": "^0.30.5", "mrmime": "^2.0.0", "sade": "^1.8.1", "set-cookie-parser": "^2.6.0", "sirv": "^3.0.0", "vitefu": "^1.0.6" }, "peerDependencies": { "@sveltejs/vite-plugin-svelte": "^3.0.0 || ^4.0.0-next.1 || ^5.0.0 || ^6.0.0-next.0", "svelte": "^4.0.0 || ^5.0.0-next.0", "vite": "^5.0.3 || ^6.0.0 || ^7.0.0-beta.0" }, "bin": { "svelte-kit": "svelte-kit.js" } }, "sha512-2MvEpSYabUrsJAoq5qCOBGAlkICjfjunrnLcx3YAk2XV7TvAIhomlKsAgR4H/4uns5rAfYmj7Wet5KRtc8dPIg=="],
|
||||
|
||||
"@sveltejs/vite-plugin-svelte": ["@sveltejs/vite-plugin-svelte@5.1.0", "", { "dependencies": { "@sveltejs/vite-plugin-svelte-inspector": "^4.0.1", "debug": "^4.4.1", "deepmerge": "^4.3.1", "kleur": "^4.1.5", "magic-string": "^0.30.17", "vitefu": "^1.0.6" }, "peerDependencies": { "svelte": "^5.0.0", "vite": "^6.0.0" } }, "sha512-wojIS/7GYnJDYIg1higWj2ROA6sSRWvcR1PO/bqEyFr/5UZah26c8Cz4u0NaqjPeVltzsVpt2Tm8d2io0V+4Tw=="],
|
||||
"@sveltejs/vite-plugin-svelte": ["@sveltejs/vite-plugin-svelte@6.1.0", "", { "dependencies": { "@sveltejs/vite-plugin-svelte-inspector": "^5.0.0-next.1", "debug": "^4.4.1", "deepmerge": "^4.3.1", "kleur": "^4.1.5", "magic-string": "^0.30.17", "vitefu": "^1.1.1" }, "peerDependencies": { "svelte": "^5.0.0", "vite": "^6.3.0 || ^7.0.0" } }, "sha512-+U6lz1wvGEG/BvQyL4z/flyNdQ9xDNv5vrh+vWBWTHaebqT0c9RNggpZTo/XSPoHsSCWBlYaTlRX8pZ9GATXCw=="],
|
||||
|
||||
"@sveltejs/vite-plugin-svelte-inspector": ["@sveltejs/vite-plugin-svelte-inspector@4.0.1", "", { "dependencies": { "debug": "^4.3.7" }, "peerDependencies": { "@sveltejs/vite-plugin-svelte": "^5.0.0", "svelte": "^5.0.0", "vite": "^6.0.0" } }, "sha512-J/Nmb2Q2y7mck2hyCX4ckVHcR5tu2J+MtBEQqpDrrgELZ2uvraQcK/ioCV61AqkdXFgriksOKIceDcQmqnGhVw=="],
|
||||
"@sveltejs/vite-plugin-svelte-inspector": ["@sveltejs/vite-plugin-svelte-inspector@5.0.0", "", { "dependencies": { "debug": "^4.4.1" }, "peerDependencies": { "@sveltejs/vite-plugin-svelte": "^6.0.0-next.0", "svelte": "^5.0.0", "vite": "^6.3.0 || ^7.0.0" } }, "sha512-iwQ8Z4ET6ZFSt/gC+tVfcsSBHwsqc6RumSaiLUkAurW3BCpJam65cmHw0oOlDMTO0u+PZi9hilBRYN+LZNHTUQ=="],
|
||||
|
||||
"@swc/helpers": ["@swc/helpers@0.5.17", "", { "dependencies": { "tslib": "^2.8.0" } }, "sha512-5IKx/Y13RsYd+sauPb2x+U/xZikHjolzfuDgTAl/Tdf3Q8rslRvC19NKDLgAJQ6wsqADk10ntlv08nPFw/gO/A=="],
|
||||
|
||||
@@ -296,14 +293,12 @@
|
||||
|
||||
"@tauri-apps/cli-win32-x64-msvc": ["@tauri-apps/cli-win32-x64-msvc@2.6.1", "", { "os": "win32", "cpu": "x64" }, "sha512-fBsjPqIIHaaQt7tnjIGmPHu5p/BNBVD4JfOhO3QqIVBzAb+W2bDyIQPdoDMI943soLr/+N10xeTiPu+3L74+dQ=="],
|
||||
|
||||
"@tauri-apps/plugin-dialog": ["@tauri-apps/plugin-dialog@2.3.0", "", { "dependencies": { "@tauri-apps/api": "^2.6.0" } }, "sha512-ylSBvYYShpGlKKh732ZuaHyJ5Ie1JR71QCXewCtsRLqGdc8Is4xWdz6t43rzXyvkItM9syNPMvFVcvjgEy+/GA=="],
|
||||
"@tauri-apps/plugin-dialog": ["@tauri-apps/plugin-dialog@2.3.1", "", { "dependencies": { "@tauri-apps/api": "^2.6.0" } }, "sha512-B7jvyhycV8SI/WHzPjciwtYfdFM6/9EXuMjRgYWZwn8GPDmHxpT80aJdb/eDVN+NgoAFDh9bu4QPonYahoYnZQ=="],
|
||||
|
||||
"@tauri-apps/plugin-fs": ["@tauri-apps/plugin-fs@2.4.0", "", { "dependencies": { "@tauri-apps/api": "^2.6.0" } }, "sha512-Sp8AdDcbyXyk6LD6Pmdx44SH3LPeNAvxR2TFfq/8CwqzfO1yOyV+RzT8fov0NNN7d9nvW7O7MtMAptJ42YXA5g=="],
|
||||
"@tauri-apps/plugin-fs": ["@tauri-apps/plugin-fs@2.4.1", "", { "dependencies": { "@tauri-apps/api": "^2.6.0" } }, "sha512-vJlKZVGF3UAFGoIEVT6Oq5L4HGDCD78WmA4uhzitToqYiBKWAvZR61M6zAyQzHqLs0ADemkE4RSy/5sCmZm6ZQ=="],
|
||||
|
||||
"@tauri-apps/plugin-shell": ["@tauri-apps/plugin-shell@2.3.0", "", { "dependencies": { "@tauri-apps/api": "^2.6.0" } }, "sha512-6GIRxO2z64uxPX4CCTuhQzefvCC0ew7HjdBhMALiGw74vFBDY95VWueAHOHgNOMV4UOUAFupyidN9YulTe5xlA=="],
|
||||
|
||||
"@tauri-apps/plugin-sql": ["@tauri-apps/plugin-sql@2.3.0", "", { "dependencies": { "@tauri-apps/api": "^2.6.0" } }, "sha512-JYwIocfsLaDWa41LMiZWuzts7yCJR+EpZPRmgpO7Gd7XiAS9S67dKz306j/k/d9XntB0YopMRBol2OIWMschuA=="],
|
||||
|
||||
"@types/bun": ["@types/bun@1.2.18", "", { "dependencies": { "bun-types": "1.2.18" } }, "sha512-Xf6RaWVheyemaThV0kUfaAUvCNokFr+bH8Jxp+tTZfx7dAPA8z9ePnP9S9+Vspzuxxx9JRAXhnyccRj3GyCMdQ=="],
|
||||
|
||||
"@types/cookie": ["@types/cookie@0.6.0", "", {}, "sha512-4Kh9a6B2bQciAhf7FSuMRRkUWecJgJu9nPnx3yzpsfXX/c50REIqpHY4C82bXP90qrLtXtkDxTZosYO3UpOwlA=="],
|
||||
@@ -562,8 +557,6 @@
|
||||
|
||||
"lucide-svelte": ["lucide-svelte@0.525.0", "", { "peerDependencies": { "svelte": "^3 || ^4 || ^5.0.0-next.42" } }, "sha512-kfuN6JcCqTfCz2B76aXnyGLAzEBRSYw5GaUspM5RNHQZS5aI5yaKu06fbaofOk8cDvUtY0AUm/zAix7aUX6Q3A=="],
|
||||
|
||||
"lzma-js-simple-v2": ["lzma-js-simple-v2@1.2.3", "", { "dependencies": { "@types/node": "^20.12.7" } }, "sha512-6kgy86Q3YLolV6dOwCqdQXg3V07e3XJJ6wqfrN8/s65mvCfqkr+jMJkfiSZNvk+u2ig+G8rLdtaoW/g1oJiwow=="],
|
||||
|
||||
"magic-string": ["magic-string@0.30.17", "", { "dependencies": { "@jridgewell/sourcemap-codec": "^1.5.0" } }, "sha512-sNPKHvyjVf7gyjwS4xGTaW/mCnF8wnjtifKBEhxfZ7E/S8tQ0rssrwGNn6q8JH/ohItJfSQp9mBtQYuTlH5QnA=="],
|
||||
|
||||
"merge2": ["merge2@1.4.1", "", {}, "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg=="],
|
||||
@@ -598,10 +591,6 @@
|
||||
|
||||
"optionator": ["optionator@0.9.4", "", { "dependencies": { "deep-is": "^0.1.3", "fast-levenshtein": "^2.0.6", "levn": "^0.4.1", "prelude-ls": "^1.2.1", "type-check": "^0.4.0", "word-wrap": "^1.2.5" } }, "sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g=="],
|
||||
|
||||
"osu-classes": ["osu-classes@3.1.0", "", {}, "sha512-kz38FWMGnz5lr6ofovUrNaDAcs1gNpwlDc1qHjW86ILQZXG44w/+NflV7EyFomkI05XCADGfltE4FVoPwrkrmg=="],
|
||||
|
||||
"osu-parsers": ["osu-parsers@4.1.7", "", { "dependencies": { "lzma-js-simple-v2": "^1.2.3" }, "peerDependencies": { "osu-classes": "^3.1.0" } }, "sha512-b8aYJy9vK0Yk8zVbxVN+HSChGnXufSxePb3gABG8s5YGCY+31CKJTUHDAVRST0kX4lyeI4Z3iRxsCRftHFHEug=="],
|
||||
|
||||
"p-limit": ["p-limit@3.1.0", "", { "dependencies": { "yocto-queue": "^0.1.0" } }, "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ=="],
|
||||
|
||||
"p-locate": ["p-locate@5.0.0", "", { "dependencies": { "p-limit": "^3.0.2" } }, "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw=="],
|
||||
@@ -768,7 +757,7 @@
|
||||
|
||||
"vite": ["vite@7.0.0", "", { "dependencies": { "esbuild": "^0.25.0", "fdir": "^6.4.6", "picomatch": "^4.0.2", "postcss": "^8.5.6", "rollup": "^4.40.0", "tinyglobby": "^0.2.14" }, "optionalDependencies": { "fsevents": "~2.3.3" }, "peerDependencies": { "@types/node": "^20.19.0 || >=22.12.0", "jiti": ">=1.21.0", "less": "^4.0.0", "lightningcss": "^1.21.0", "sass": "^1.70.0", "sass-embedded": "^1.70.0", "stylus": ">=0.54.8", "sugarss": "^5.0.0", "terser": "^5.16.0", "tsx": "^4.8.1", "yaml": "^2.4.2" }, "optionalPeers": ["@types/node", "jiti", "less", "lightningcss", "sass", "sass-embedded", "stylus", "sugarss", "terser", "tsx", "yaml"], "bin": { "vite": "bin/vite.js" } }, "sha512-ixXJB1YRgDIw2OszKQS9WxGHKwLdCsbQNkpJN171udl6szi/rIySHL6/Os3s2+oE4P/FLD4dxg4mD7Wust+u5g=="],
|
||||
|
||||
"vite-plugin-devtools-json": ["vite-plugin-devtools-json@0.2.0", "", { "dependencies": { "uuid": "^11.1.0" }, "peerDependencies": { "vite": "^2.7.0 || ^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0" } }, "sha512-K7PoaWOEJECZ1n3VbhJXsUAX2PsO0xY7KFMM/Leh7tUev0M5zi+lz+vnVVdCK17IOK9Jp9rdzHXc08cnQirGbg=="],
|
||||
"vite-plugin-devtools-json": ["vite-plugin-devtools-json@0.3.0", "", { "dependencies": { "uuid": "^11.1.0" }, "peerDependencies": { "vite": "^2.7.0 || ^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0" } }, "sha512-y8QdN/uZNV0Jj96H9R3s7G9jtcSuyssk8EwSfWaY+NUAdy7976d7rjtXJzqmeCcgp4CZywcTyUc+k6zpPFHdeg=="],
|
||||
|
||||
"vitefu": ["vitefu@1.0.7", "", { "peerDependencies": { "vite": "^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0-beta.0" }, "optionalPeers": ["vite"] }, "sha512-eRWXLBbJjW3X5z5P5IHcSm2yYbYRPb2kQuc+oqsbAl99WB5kVsPbiiox+cymo8twTzifA6itvhr2CmjnaZZp0Q=="],
|
||||
|
||||
@@ -792,6 +781,8 @@
|
||||
|
||||
"@humanfs/node/@humanwhocodes/retry": ["@humanwhocodes/retry@0.3.1", "", {}, "sha512-JBxkERygn7Bv/GbN5Rv8Ul6LVknS+5Bp6RgDC/O8gEBU/yeH5Ui5C/OlWrTb6qct7LjjfT6Re2NxB0ln0yYybA=="],
|
||||
|
||||
"@sveltejs/vite-plugin-svelte/vitefu": ["vitefu@1.1.1", "", { "peerDependencies": { "vite": "^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0-beta.0" }, "optionalPeers": ["vite"] }, "sha512-B/Fegf3i8zh0yFbpzZ21amWzHmuNlLlmJT6n7bu5e+pCHUKQIfXSYokrqOBGEMMe9UG2sostKQF9mml/vYaWJQ=="],
|
||||
|
||||
"@tailwindcss/node/jiti": ["jiti@2.4.2", "", { "bin": { "jiti": "lib/jiti-cli.mjs" } }, "sha512-rg9zJN+G4n2nfJl5MW3BMygZX56zKPNVEYYqq7adpmMh4Jn2QNEwhvQlFy6jPVdcod7txZtKHWnyZiA3a0zP7A=="],
|
||||
|
||||
"@tailwindcss/oxide-wasm32-wasi/@emnapi/core": ["@emnapi/core@1.4.3", "", { "dependencies": { "@emnapi/wasi-threads": "1.0.2", "tslib": "^2.4.0" }, "bundled": true }, "sha512-4m62DuCE07lw01soJwPiBGC0nAww0Q+RY70VZ+n49yDIO13yyinhbWCeNnaob0lakDtWQzSdtNWzJeOJt2ma+g=="],
|
||||
|
13
package.json
13
package.json
@@ -21,21 +21,17 @@
|
||||
"@better-fetch/fetch": "^1.1.18",
|
||||
"@fontsource/sora": "^5.2.6",
|
||||
"@fontsource/space-mono": "^5.2.8",
|
||||
"@iarna/toml": "^3.0.0",
|
||||
"@number-flow/svelte": "^0.3.9",
|
||||
"@tailwindcss/typography": "0.5.16",
|
||||
"@tailwindcss/vite": "^4.1.11",
|
||||
"@tauri-apps/api": "2.6.0",
|
||||
"@tauri-apps/plugin-dialog": "2.3.0",
|
||||
"@tauri-apps/plugin-fs": "2.4.0",
|
||||
"@tauri-apps/plugin-dialog": "2.3.1",
|
||||
"@tauri-apps/plugin-fs": "2.4.1",
|
||||
"@tauri-apps/plugin-shell": "2.3.0",
|
||||
"@tauri-apps/plugin-sql": "2.3.0",
|
||||
"animejs": "^4.0.2",
|
||||
"buffer": "^6.0.3",
|
||||
"crypto-js": "^4.2.0",
|
||||
"lucide-svelte": "0.525.0",
|
||||
"osu-classes": "3.1.0",
|
||||
"osu-parsers": "4.1.7",
|
||||
"semver": "^7.7.2",
|
||||
"tw-animate-css": "^1.3.0",
|
||||
"svelte-confetti": "^2.0.0"
|
||||
@@ -43,10 +39,11 @@
|
||||
"devDependencies": {
|
||||
"@eslint/compat": "^1.2.5",
|
||||
"@eslint/js": "^9.18.0",
|
||||
"@iarna/toml": "2.2.5",
|
||||
"@lucide/svelte": "^0.525.0",
|
||||
"@sveltejs/adapter-static": "3.0.8",
|
||||
"@sveltejs/kit": "2.22.2",
|
||||
"@sveltejs/vite-plugin-svelte": "5.1.0",
|
||||
"@sveltejs/vite-plugin-svelte": "^6.1.0",
|
||||
"@tauri-apps/cli": "2.6.1",
|
||||
"@types/bun": "^1.2.18",
|
||||
"@types/crypto-js": "^4.2.2",
|
||||
@@ -73,6 +70,6 @@
|
||||
"typescript": "5.8.3",
|
||||
"typescript-eslint": "^8.20.0",
|
||||
"vite": "7.0.0",
|
||||
"vite-plugin-devtools-json": "^0.2.0"
|
||||
"vite-plugin-devtools-json": "^0.3.0"
|
||||
}
|
||||
}
|
||||
|
1085
src-tauri/Cargo.lock
generated
1085
src-tauri/Cargo.lock
generated
File diff suppressed because it is too large
Load Diff
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "ezpplauncher"
|
||||
version = "3.0.0-beta.3"
|
||||
version = "3.0.4"
|
||||
description = "EZPPLauncher redefined."
|
||||
authors = ["HorizonCode"]
|
||||
edition = "2024"
|
||||
@@ -15,20 +15,19 @@ name = "ezpplauncher_lib"
|
||||
crate-type = ["staticlib", "cdylib", "rlib"]
|
||||
|
||||
[build-dependencies]
|
||||
tauri-build = { version = "2.3.0", features = [] }
|
||||
tauri-build = { version = "2.3.1", features = [] }
|
||||
|
||||
[dependencies]
|
||||
tauri = { version = "2.6.2", features = [] }
|
||||
tauri = { version = "2.7.0", features = [] }
|
||||
tauri-plugin-shell = "2.3.0"
|
||||
serde = { version = "1.0.219", features = ["derive"] }
|
||||
serde_json = "1.0.140"
|
||||
serde_json = "1.0.141"
|
||||
serde_repr = "0.1.20"
|
||||
tauri-plugin-sql = "2.3.0"
|
||||
tauri-plugin-dialog = "2.3.0"
|
||||
tauri-plugin-fs = "2.4.0"
|
||||
tauri-plugin-dialog = "2.3.1"
|
||||
tauri-plugin-fs = "2.4.1"
|
||||
hardware-id = "0.3.0"
|
||||
tauri-plugin-cors-fetch = "4.1.0"
|
||||
sysinfo = "0.35.2"
|
||||
sysinfo = "0.36.1"
|
||||
reqwest = { version = "0.12.22", features = ["json", "stream"] }
|
||||
md5 = "0.8.0"
|
||||
tokio = { version = "1.46.1", features = ["full"] }
|
||||
@@ -39,8 +38,10 @@ once_cell = "1.21.3"
|
||||
|
||||
[target.'cfg(windows)'.dependencies]
|
||||
winreg = "0.55.0"
|
||||
winapi = { version = "0.3", features = ["winuser"] }
|
||||
winapi = { version = "0.3", features = ["winuser", "wincrypt", "memoryapi", "winbase", "dpapi"] }
|
||||
base64 = "0.22.1"
|
||||
widestring = "1.0"
|
||||
|
||||
[target.'cfg(not(any(target_os = "android", target_os = "ios")))'.dependencies]
|
||||
tauri-plugin-single-instance = "2.3.0"
|
||||
tauri-plugin-single-instance = "2.3.2"
|
||||
|
||||
|
6
src-tauri/nsis-hooks.nsh
Normal file
6
src-tauri/nsis-hooks.nsh
Normal file
@@ -0,0 +1,6 @@
|
||||
!macro NSIS_HOOK_POSTINSTALL
|
||||
${If} $PassiveMode = 1
|
||||
${OrIf} ${Silent}
|
||||
Exec '"$INSTDIR\${MAINBINARYNAME}.exe"'
|
||||
${EndIf}
|
||||
!macroend
|
@@ -6,6 +6,7 @@ use std::path::PathBuf;
|
||||
use sysinfo::System;
|
||||
use tauri::AppHandle;
|
||||
use tauri::Emitter;
|
||||
use tauri::Manager;
|
||||
use tokio::fs;
|
||||
use tokio::io::AsyncWriteExt;
|
||||
use tokio::process::Command;
|
||||
@@ -13,7 +14,8 @@ use tokio::time::{Duration, sleep};
|
||||
|
||||
use crate::presence;
|
||||
use crate::utils::{
|
||||
check_folder_completeness, get_osu_config, get_osu_user_config, get_window_title_by_pid,
|
||||
check_folder_completeness, encrypt_password, get_osu_config, get_osu_user_config,
|
||||
get_window_title_by_pid, is_net8_installed, is_osuwinello_available, is_wmctrl_available,
|
||||
set_osu_config_vals, set_osu_user_config_vals,
|
||||
};
|
||||
|
||||
@@ -282,8 +284,6 @@ pub fn set_osu_config_values(
|
||||
|
||||
#[tauri::command]
|
||||
pub async fn run_osu_updater(folder: String) -> Result<(), String> {
|
||||
let osu_exe_path = PathBuf::from(&folder).join("osu!.exe");
|
||||
|
||||
#[cfg(windows)]
|
||||
const DETACHED_PROCESS: u32 = 0x00000008;
|
||||
#[cfg(windows)]
|
||||
@@ -292,6 +292,7 @@ pub async fn run_osu_updater(folder: String) -> Result<(), String> {
|
||||
let mut updater_process = {
|
||||
#[cfg(windows)]
|
||||
{
|
||||
let osu_exe_path = PathBuf::from(&folder).join("osu!.exe");
|
||||
Command::new(&osu_exe_path)
|
||||
.arg("-repair")
|
||||
.creation_flags(DETACHED_PROCESS | CREATE_NEW_PROCESS_GROUP)
|
||||
@@ -301,7 +302,7 @@ pub async fn run_osu_updater(folder: String) -> Result<(), String> {
|
||||
|
||||
#[cfg(not(windows))]
|
||||
{
|
||||
Command::new(&osu_exe_path)
|
||||
Command::new("osu-wine")
|
||||
.arg("-repair")
|
||||
.spawn()
|
||||
.map_err(|e| format!("Failed to spawn updater: {}", e))?
|
||||
@@ -337,10 +338,8 @@ pub async fn run_osu_updater(folder: String) -> Result<(), String> {
|
||||
sleep(Duration::from_millis(500)).await;
|
||||
}
|
||||
|
||||
// Wait for updater process to fully exit
|
||||
let _ = updater_process.wait().await;
|
||||
|
||||
// Clean up update-related files
|
||||
let force_update_files = [".require_update", "help.txt", "_pending"];
|
||||
for update_file_name in &force_update_files {
|
||||
let path = PathBuf::from(&folder).join(update_file_name);
|
||||
@@ -372,8 +371,6 @@ pub async fn run_osu(folder: String, patch: bool) -> Result<(), String> {
|
||||
/* #[cfg(windows)]
|
||||
use std::os::windows::process::CommandExt; */
|
||||
|
||||
let osu_exe_path = PathBuf::from(&folder).join("osu!.exe");
|
||||
|
||||
#[cfg(windows)]
|
||||
const DETACHED_PROCESS: u32 = 0x00000008;
|
||||
#[cfg(windows)]
|
||||
@@ -382,6 +379,7 @@ pub async fn run_osu(folder: String, patch: bool) -> Result<(), String> {
|
||||
let mut game_process = {
|
||||
#[cfg(windows)]
|
||||
{
|
||||
let osu_exe_path = PathBuf::from(&folder).join("osu!.exe");
|
||||
Command::new(&osu_exe_path)
|
||||
.arg("-devserver")
|
||||
.arg("ez-pp.farm")
|
||||
@@ -392,8 +390,8 @@ pub async fn run_osu(folder: String, patch: bool) -> Result<(), String> {
|
||||
|
||||
#[cfg(not(windows))]
|
||||
{
|
||||
Command::new(&osu_exe_path)
|
||||
.arg("-devserver")
|
||||
Command::new("osu-wine")
|
||||
.arg("--devserver")
|
||||
.arg("ez-pp.farm")
|
||||
.spawn()
|
||||
.map_err(|e| format!("Failed to spawn updater: {}", e))?
|
||||
@@ -416,13 +414,6 @@ pub async fn run_osu(folder: String, patch: bool) -> Result<(), String> {
|
||||
.spawn()
|
||||
.map_err(|e| format!("Failed to run patcher: {e}"))?;
|
||||
}
|
||||
|
||||
#[cfg(not(windows))]
|
||||
{
|
||||
let _ = Command::new(&patcher_exe_path)
|
||||
.spawn()
|
||||
.map_err(|e| format!("Failed to run patcher: {e}"))?;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -444,6 +435,7 @@ pub struct UpdateFile {
|
||||
pub async fn get_ezpp_launcher_update_files(
|
||||
folder: String,
|
||||
update_url: String,
|
||||
update_stream: String,
|
||||
) -> Result<(Vec<UpdateFile>, Vec<UpdateFile>), String> {
|
||||
let osu_path = PathBuf::from(folder);
|
||||
let client = Client::new();
|
||||
@@ -451,6 +443,7 @@ pub async fn get_ezpp_launcher_update_files(
|
||||
let update_files = client
|
||||
.patch(update_url)
|
||||
.header("User-Agent", "EZPPLauncher")
|
||||
.query(&[("stream", update_stream)])
|
||||
.send()
|
||||
.await
|
||||
.map_err(|e| e.to_string())?
|
||||
@@ -543,7 +536,6 @@ pub async fn download_ezpp_launcher_update_files(
|
||||
.await
|
||||
.map_err(|e| e.to_string())?;
|
||||
|
||||
// Emit progress to frontend
|
||||
app.emit(
|
||||
"download-progress",
|
||||
UpdateStatus {
|
||||
@@ -713,3 +705,104 @@ pub async fn presence_update_user(user: PresenceUser) {
|
||||
pub async fn presence_is_connected() -> bool {
|
||||
presence::has_presence().await
|
||||
}
|
||||
|
||||
#[tauri::command]
|
||||
pub fn has_wmctrl() -> bool {
|
||||
is_wmctrl_available()
|
||||
}
|
||||
|
||||
#[tauri::command]
|
||||
pub fn has_osuwinello() -> bool {
|
||||
is_osuwinello_available()
|
||||
}
|
||||
|
||||
#[tauri::command]
|
||||
pub async fn has_net8() -> bool {
|
||||
is_net8_installed().await
|
||||
}
|
||||
|
||||
#[tauri::command]
|
||||
pub fn encrypt_string(string: String, entropy: String) -> String {
|
||||
let encrypted = encrypt_password(&string, &entropy);
|
||||
|
||||
match encrypted {
|
||||
Ok(encrypted_vec) => encrypted_vec,
|
||||
Err(_) => string,
|
||||
}
|
||||
}
|
||||
|
||||
#[tauri::command]
|
||||
pub async fn download_ezpp_launcher_update(app: AppHandle, url: String) -> Result<(), String> {
|
||||
let client = Client::new();
|
||||
|
||||
let mut response = client.get(&url).send().await.map_err(|e| e.to_string())?;
|
||||
|
||||
if !response.status().is_success() {
|
||||
return Err(format!("Failed to download update: {}", response.status()));
|
||||
}
|
||||
|
||||
let temp_dir = app.path().temp_dir().expect("Failed to get temp directory");
|
||||
let file_path = temp_dir.join("ezpplauncher_update.exe");
|
||||
|
||||
let mut file_out = fs::File::create(&file_path)
|
||||
.await
|
||||
.map_err(|e| e.to_string())?;
|
||||
let mut downloaded = 0u64;
|
||||
let size = response
|
||||
.content_length()
|
||||
.ok_or("Failed to get content length")? as usize;
|
||||
|
||||
while let Some(chunk) = response.chunk().await.map_err(|e| e.to_string())? {
|
||||
downloaded += chunk.len() as u64;
|
||||
file_out
|
||||
.write_all(&chunk)
|
||||
.await
|
||||
.map_err(|e| e.to_string())?;
|
||||
|
||||
app.emit(
|
||||
"download-progress",
|
||||
UpdateStatus {
|
||||
file_name: "Update".to_string(),
|
||||
downloaded,
|
||||
size: size,
|
||||
progress: ((downloaded as f64 / size as f64 * 100.0) * 100.0).trunc() / 100.0,
|
||||
},
|
||||
)
|
||||
.unwrap_or_default();
|
||||
}
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[cfg(windows)]
|
||||
#[tauri::command]
|
||||
pub async fn install_ezpp_launcher_update(app: AppHandle) -> Result<(), String> {
|
||||
let temp_dir = app.path().temp_dir().expect("Failed to get temp directory");
|
||||
let file_path = temp_dir.join("ezpplauncher_update.exe");
|
||||
if !file_path.exists() {
|
||||
return Err("Update file does not exist".to_string());
|
||||
}
|
||||
|
||||
// run this app detached and exit
|
||||
|
||||
const DETACHED_PROCESS: u32 = 0x00000008;
|
||||
const CREATE_NEW_PROCESS_GROUP: u32 = 0x00000200;
|
||||
|
||||
Command::new(&file_path)
|
||||
.arg("/S")
|
||||
.creation_flags(DETACHED_PROCESS | CREATE_NEW_PROCESS_GROUP)
|
||||
.spawn()
|
||||
.map_err(|e| format!("Failed to spawn updater: {}", e))?;
|
||||
|
||||
sleep(Duration::from_millis(250)).await;
|
||||
|
||||
app.exit(0x0100);
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[cfg(not(windows))]
|
||||
#[tauri::command]
|
||||
pub async fn install_ezpp_launcher_update(_app: AppHandle) -> Result<(), String> {
|
||||
Ok(())
|
||||
}
|
||||
|
@@ -5,17 +5,18 @@ pub mod commands;
|
||||
pub mod presence;
|
||||
pub mod utils;
|
||||
use crate::commands::{
|
||||
check_for_corruption, download_ezpp_launcher_update_files, exit, find_osu_installation,
|
||||
get_beatmapsets_count, get_ezpp_launcher_update_files, get_hwid, get_launcher_version,
|
||||
get_osu_release_stream, get_osu_skin, get_osu_version, get_platform, get_skins_count,
|
||||
is_osu_running, open_url_in_browser, presence_connect, presence_disconnect,
|
||||
presence_is_connected, presence_update_status, presence_update_user, replace_ui_files, run_osu,
|
||||
run_osu_updater, set_osu_config_values, set_osu_user_config_values, valid_osu_folder,
|
||||
check_for_corruption, download_ezpp_launcher_update, download_ezpp_launcher_update_files,
|
||||
encrypt_string, exit, find_osu_installation, get_beatmapsets_count,
|
||||
get_ezpp_launcher_update_files, get_hwid, get_launcher_version, get_osu_release_stream,
|
||||
get_osu_skin, get_osu_version, get_platform, get_skins_count, has_net8, has_osuwinello,
|
||||
has_wmctrl, install_ezpp_launcher_update, is_osu_running, open_url_in_browser,
|
||||
presence_connect, presence_disconnect, presence_is_connected, presence_update_status,
|
||||
presence_update_user, replace_ui_files, run_osu, run_osu_updater, set_osu_config_values,
|
||||
set_osu_user_config_values, valid_osu_folder,
|
||||
};
|
||||
|
||||
#[cfg_attr(mobile, tauri::mobile_entry_point)]
|
||||
pub fn run() {
|
||||
|
||||
#[cfg(target_os = "linux")]
|
||||
unsafe {
|
||||
std::env::set_var("WEBKIT_DISABLE_DMABUF_RENDERER", "1");
|
||||
@@ -26,9 +27,6 @@ pub fn run() {
|
||||
{
|
||||
builder = builder.plugin(tauri_plugin_single_instance::init(|app, _args, _cwd| {
|
||||
let app_window = app.get_webview_window("main").expect("no main window");
|
||||
app_window
|
||||
.set_always_on_top(true)
|
||||
.expect("failed to set always on top");
|
||||
app_window.set_focus().expect("failed to focus");
|
||||
}));
|
||||
}
|
||||
@@ -60,13 +58,18 @@ pub fn run() {
|
||||
presence_disconnect,
|
||||
presence_update_status,
|
||||
presence_update_user,
|
||||
presence_is_connected
|
||||
presence_is_connected,
|
||||
has_osuwinello,
|
||||
has_wmctrl,
|
||||
has_net8,
|
||||
encrypt_string,
|
||||
download_ezpp_launcher_update,
|
||||
install_ezpp_launcher_update
|
||||
])
|
||||
.plugin(tauri_plugin_fs::init())
|
||||
.plugin(tauri_plugin_dialog::init())
|
||||
.plugin(tauri_plugin_shell::init())
|
||||
.plugin(tauri_plugin_cors_fetch::init())
|
||||
.plugin(tauri_plugin_sql::Builder::default().build())
|
||||
.build(tauri::generate_context!())
|
||||
.expect("error while building tauri application");
|
||||
|
||||
|
@@ -144,7 +144,7 @@ impl PresenceActor {
|
||||
"Download the Launcher",
|
||||
"https://git.ez-pp.farm/EZPPFarm/EZPPLauncher/releases/latest",
|
||||
),
|
||||
Button::new("Join EZPZFarm", "https://ez-pp.farm/discord"),
|
||||
Button::new("Join EZPPFarm", "https://ez-pp.farm/discord"),
|
||||
]);
|
||||
|
||||
if let Err(e) = client.set_activity(activity).map_err(|e| e.to_string()) {
|
||||
|
@@ -71,7 +71,6 @@ pub fn set_osu_user_config_vals(
|
||||
}
|
||||
}
|
||||
|
||||
// Collect indices and keys to update to avoid borrow checker issues
|
||||
let mut updates = Vec::new();
|
||||
for (i, line) in lines.iter().enumerate() {
|
||||
if let Some((existing_key, _)) = line.split_once(" = ") {
|
||||
@@ -86,7 +85,6 @@ pub fn set_osu_user_config_vals(
|
||||
keys_to_add.remove(trimmed_key.as_str());
|
||||
}
|
||||
|
||||
// Add new keys that were not found
|
||||
for key in keys_to_add {
|
||||
if let Some(value) = keys_to_set.get(key) {
|
||||
lines.push(format!("{} = {}", key, value));
|
||||
@@ -139,7 +137,6 @@ pub fn set_osu_config_vals(
|
||||
keys_to_add.remove(trimmed_key.as_str());
|
||||
}
|
||||
|
||||
// Add new keys that were not found
|
||||
for key in keys_to_add {
|
||||
if let Some(value) = keys_to_set.get(key) {
|
||||
lines.push(format!("{} = {}", key, value));
|
||||
@@ -177,19 +174,78 @@ pub fn get_osu_config<P: AsRef<Path>>(
|
||||
}
|
||||
|
||||
#[cfg(not(windows))]
|
||||
pub fn get_window_title_by_pid(_pid: Pid) -> String {
|
||||
"".to_string()
|
||||
pub fn is_osuwinello_available() -> bool {
|
||||
use std::process::Command;
|
||||
Command::new("osu-wine")
|
||||
.arg("--info")
|
||||
.stdout(std::process::Stdio::null())
|
||||
.stderr(std::process::Stdio::null())
|
||||
.status()
|
||||
.is_ok()
|
||||
}
|
||||
|
||||
#[cfg(windows)]
|
||||
pub fn is_osuwinello_available() -> bool {
|
||||
false
|
||||
}
|
||||
|
||||
#[cfg(not(windows))]
|
||||
pub fn is_wmctrl_available() -> bool {
|
||||
use std::process::Command;
|
||||
Command::new("wmctrl")
|
||||
.arg("-V")
|
||||
.stdout(std::process::Stdio::null())
|
||||
.stderr(std::process::Stdio::null())
|
||||
.status()
|
||||
.is_ok()
|
||||
}
|
||||
|
||||
#[cfg(windows)]
|
||||
pub fn is_wmctrl_available() -> bool {
|
||||
false
|
||||
}
|
||||
|
||||
#[cfg(not(windows))]
|
||||
pub fn get_window_title_by_pid(target_pid: Pid) -> String {
|
||||
use std::process::Command;
|
||||
let find_title = || -> Option<String> {
|
||||
let output = Command::new("wmctrl").arg("-lp").output().ok()?;
|
||||
|
||||
if !output.status.success() {
|
||||
return None;
|
||||
}
|
||||
|
||||
let output_str = String::from_utf8(output.stdout).ok()?;
|
||||
|
||||
for line in output_str.lines() {
|
||||
let parts: Vec<&str> = line.split_whitespace().collect();
|
||||
if parts.len() < 4 {
|
||||
continue;
|
||||
}
|
||||
|
||||
if let Ok(pid) = parts[2].parse::<u32>() {
|
||||
if pid == target_pid.as_u32() {
|
||||
let title = parts[4..].join(" ");
|
||||
return Some(title);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
None
|
||||
};
|
||||
|
||||
find_title().unwrap_or_default()
|
||||
}
|
||||
|
||||
#[cfg(windows)]
|
||||
pub fn get_window_title_by_pid(pid: Pid) -> String {
|
||||
use std::ffi::OsString;
|
||||
use std::os::windows::ffi::OsStringExt;
|
||||
use std::sync::{Arc, Mutex};
|
||||
use winapi::shared::windef::HWND;
|
||||
use winapi::um::winuser::{
|
||||
EnumWindows, GetWindowTextW, GetWindowThreadProcessId, IsWindowVisible,
|
||||
};
|
||||
use std::ffi::OsString;
|
||||
use std::os::windows::ffi::OsStringExt;
|
||||
|
||||
extern "system" fn enum_windows_proc(
|
||||
hwnd: HWND,
|
||||
@@ -210,11 +266,11 @@ pub fn get_window_title_by_pid(pid: Pid) -> String {
|
||||
let title_str = title.to_string_lossy().into_owned();
|
||||
if !title_str.is_empty() {
|
||||
*result.lock().unwrap() = Some(title_str);
|
||||
return 0; // Stop enumeration
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
1 // Continue enumeration
|
||||
1
|
||||
}
|
||||
}
|
||||
|
||||
@@ -228,3 +284,97 @@ pub fn get_window_title_by_pid(pid: Pid) -> String {
|
||||
}
|
||||
result.lock().unwrap().clone().unwrap_or_default()
|
||||
}
|
||||
|
||||
pub async fn is_net8_installed() -> bool {
|
||||
use std::process::Command;
|
||||
let output_result = Command::new("dotnet").arg("--list-runtimes").output();
|
||||
match output_result {
|
||||
Ok(output) => {
|
||||
if !output.status.success() {
|
||||
eprintln!(
|
||||
"Error: `dotnet --list-runtimes` failed with status: {}",
|
||||
output.status
|
||||
);
|
||||
eprintln!("stderr: {}", String::from_utf8_lossy(&output.stderr));
|
||||
return false;
|
||||
}
|
||||
|
||||
let stdout_str = String::from_utf8_lossy(&output.stdout);
|
||||
stdout_str
|
||||
.lines()
|
||||
.any(|line| line.starts_with("Microsoft.WindowsDesktop.App 8."))
|
||||
}
|
||||
Err(_) => false,
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(not(windows))]
|
||||
pub fn encrypt_password(password: &str, _entropy: &str) -> Result<String, String> {
|
||||
Ok(password.to_string())
|
||||
}
|
||||
|
||||
#[cfg(windows)]
|
||||
pub fn encrypt_password(password: &str, entropy: &str) -> Result<String, String> {
|
||||
use base64::{Engine as _, engine::general_purpose};
|
||||
use std::ffi::OsStr;
|
||||
use std::os::windows::ffi::OsStrExt;
|
||||
use std::ptr;
|
||||
use std::slice;
|
||||
use winapi::shared::minwindef::{BYTE, DWORD, LPVOID};
|
||||
use winapi::shared::ntdef::LPCWSTR;
|
||||
use winapi::um::dpapi::{CRYPTPROTECT_UI_FORBIDDEN, CryptProtectData};
|
||||
use winapi::um::winbase::LocalFree;
|
||||
use winapi::um::wincrypt::DATA_BLOB;
|
||||
|
||||
let description = "Encrypted";
|
||||
|
||||
let password_bytes = password.as_bytes();
|
||||
let mut input_blob = DATA_BLOB {
|
||||
cbData: password_bytes.len() as DWORD,
|
||||
pbData: password_bytes.as_ptr() as *mut BYTE,
|
||||
};
|
||||
|
||||
let entropy_bytes = entropy.as_bytes();
|
||||
let mut entropy_blob = DATA_BLOB {
|
||||
cbData: entropy_bytes.len() as DWORD,
|
||||
pbData: entropy_bytes.as_ptr() as *mut BYTE,
|
||||
};
|
||||
|
||||
let mut output_blob = DATA_BLOB {
|
||||
cbData: 0,
|
||||
pbData: ptr::null_mut(),
|
||||
};
|
||||
|
||||
let wide_description: Vec<u16> = OsStrExt::encode_wide(OsStr::new(description))
|
||||
.chain(Some(0))
|
||||
.collect();
|
||||
|
||||
let p_description: LPCWSTR = wide_description.as_ptr();
|
||||
|
||||
let result = unsafe {
|
||||
CryptProtectData(
|
||||
&mut input_blob,
|
||||
p_description,
|
||||
&mut entropy_blob,
|
||||
ptr::null_mut(),
|
||||
ptr::null_mut(),
|
||||
CRYPTPROTECT_UI_FORBIDDEN,
|
||||
&mut output_blob,
|
||||
)
|
||||
};
|
||||
|
||||
if result == 0 {
|
||||
return Err("CryptProtectData failed".to_string());
|
||||
}
|
||||
|
||||
let encrypted_data =
|
||||
unsafe { slice::from_raw_parts(output_blob.pbData, output_blob.cbData as usize).to_vec() };
|
||||
|
||||
unsafe {
|
||||
LocalFree(output_blob.pbData as LPVOID);
|
||||
}
|
||||
|
||||
let base64_string = general_purpose::STANDARD.encode(&encrypted_data);
|
||||
|
||||
Ok(base64_string)
|
||||
}
|
@@ -1,8 +1,9 @@
|
||||
{
|
||||
"$schema": "https://schema.tauri.app/config/2",
|
||||
"productName": "ezpplauncher",
|
||||
"version": "3.0.0-beta.2",
|
||||
"identifier": "farm.ezpp.launcher",
|
||||
"productName": "EZPPLauncher",
|
||||
"version": "3.0.4",
|
||||
"identifier": "farm.EZPPFarm.Launcher",
|
||||
"mainBinaryName": "ezpplauncher",
|
||||
"build": {
|
||||
"beforeDevCommand": "bun run vite:dev",
|
||||
"devUrl": "http://localhost:1420",
|
||||
@@ -12,7 +13,7 @@
|
||||
"app": {
|
||||
"windows": [
|
||||
{
|
||||
"title": "ezpplauncher",
|
||||
"title": "EZPPLauncher",
|
||||
"width": 1000,
|
||||
"height": 700,
|
||||
"decorations": false,
|
||||
@@ -26,10 +27,26 @@
|
||||
}
|
||||
},
|
||||
"bundle": {
|
||||
"publisher": "EZPPFarm",
|
||||
"copyright": "EZPPFarm",
|
||||
"homepage": "https://ez-pp.farm",
|
||||
"license": "GPL-3.0",
|
||||
"active": true,
|
||||
"targets": [
|
||||
"app"
|
||||
"nsis",
|
||||
"appimage"
|
||||
],
|
||||
"windows": {
|
||||
"webviewInstallMode": {
|
||||
"silent": true,
|
||||
"type": "downloadBootstrapper"
|
||||
},
|
||||
"nsis": {
|
||||
"installMode": "currentUser",
|
||||
"compression": "lzma",
|
||||
"installerHooks": "./nsis-hooks.nsh"
|
||||
}
|
||||
},
|
||||
"icon": [
|
||||
"icons/32x32.png",
|
||||
"icons/128x128.png",
|
||||
|
@@ -18,11 +18,13 @@ export const osuapi = {
|
||||
},
|
||||
});
|
||||
if (request.error) {
|
||||
if (request.error.status >= 500 && request.error.status < 600)
|
||||
throw new Error('Server not reachable');
|
||||
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()
|
||||
|
@@ -1,150 +0,0 @@
|
||||
<script lang="ts">
|
||||
import ezppLogo from '../../../../assets/logo.png';
|
||||
import { osudirect } from '@/api/osudirect';
|
||||
import { gameSounds } from '@/utils';
|
||||
import { BeatmapDecoder } from 'osu-parsers';
|
||||
import { onMount } from 'svelte';
|
||||
|
||||
type logoProps = {
|
||||
beatmapId: number;
|
||||
extended: boolean;
|
||||
onclick: () => void;
|
||||
};
|
||||
|
||||
let { beatmapId, extended, onclick }: logoProps = $props();
|
||||
|
||||
let hovered = $state(false);
|
||||
let bpm = $state(150); // 1000 * 60 / bpm
|
||||
let lastTimeout: number | undefined = undefined;
|
||||
|
||||
onMount(async () => {
|
||||
gameSounds.preload();
|
||||
|
||||
const beatmapData = await osudirect.osu(beatmapId);
|
||||
if (beatmapData) {
|
||||
const decoder = new BeatmapDecoder();
|
||||
const beatmap = decoder.decodeFromString(beatmapData);
|
||||
console.log(beatmap);
|
||||
|
||||
const audio = new Audio(`https://osu.direct/api/media/audio/${beatmapId}`);
|
||||
audio.volume = 0.3;
|
||||
|
||||
// Function to play the heartbeat sound
|
||||
const playHeartbeat = () => {
|
||||
gameSounds.play('menuHeartbeat', {
|
||||
volume: hovered ? 1 : 0.3,
|
||||
});
|
||||
};
|
||||
|
||||
// Function to synchronize the heartbeat with the song
|
||||
const syncHeartbeat = () => {
|
||||
const currentTime = audio.currentTime * 1000 - 25; // Convert to milliseconds
|
||||
const timingPoint = beatmap.controlPoints.timingPointAt(currentTime);
|
||||
const timingPointTime = timingPoint.startTime;
|
||||
console.log(currentTime, timingPointTime);
|
||||
if (timingPoint && bpm !== timingPoint.bpm) {
|
||||
bpm = timingPoint.bpm;
|
||||
|
||||
if (lastTimeout) window.clearTimeout(lastTimeout);
|
||||
|
||||
const interval = (1000 * 60) / bpm; // Interval in milliseconds
|
||||
const nextBeat = currentTime % interval; // Invert: time since last beat
|
||||
|
||||
// Schedule the next heartbeat at the correct time
|
||||
lastTimeout = window.setTimeout(() => {
|
||||
playHeartbeat();
|
||||
// Clear any previous interval
|
||||
if (lastTimeout) {
|
||||
window.clearInterval(lastTimeout);
|
||||
lastTimeout = undefined;
|
||||
}
|
||||
if (!lastTimeout) lastTimeout = window.setInterval(playHeartbeat, interval);
|
||||
}, nextBeat);
|
||||
}
|
||||
// Continue syncing
|
||||
requestAnimationFrame(syncHeartbeat);
|
||||
};
|
||||
|
||||
// Wait for audio to be ready before starting playback and syncing
|
||||
audio.addEventListener('canplay', async () => {
|
||||
audio.addEventListener('play', syncHeartbeat);
|
||||
audio.addEventListener('ended', async () => await audio.play());
|
||||
await audio.play();
|
||||
syncHeartbeat();
|
||||
});
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<div
|
||||
class="w-screen {extended
|
||||
? hovered
|
||||
? '-translate-y-1 scale-100'
|
||||
: '-translate-y-1 scale-90'
|
||||
: hovered
|
||||
? 'translate-y-5 scale-150'
|
||||
: 'translate-y-5 scale-125'} transition-transform select-none"
|
||||
>
|
||||
<!-- svelte-ignore a11y_click_events_have_key_events -->
|
||||
<!-- svelte-ignore a11y_no_static_element_interactions -->
|
||||
<div
|
||||
class="logo-animation relative w-44 h-44 mx-auto cursor-pointer"
|
||||
onmouseenter={() => (hovered = true)}
|
||||
onmouseleave={() => (hovered = false)}
|
||||
onclick={() => {
|
||||
if (extended) {
|
||||
gameSounds.play('menuBack');
|
||||
} else {
|
||||
gameSounds.play('menuHit');
|
||||
}
|
||||
onclick();
|
||||
}}
|
||||
>
|
||||
<img
|
||||
class="absolute pulse-logo"
|
||||
style="animation-duration: {(1000 * 60) / bpm}ms;"
|
||||
src={ezppLogo}
|
||||
alt="logo-pulse"
|
||||
/>
|
||||
<img
|
||||
class="absolute main-logo"
|
||||
style="animation-duration: {(1000 * 60) / bpm}ms;"
|
||||
src={ezppLogo}
|
||||
alt="logo"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<style lang="scss">
|
||||
.logo-animation {
|
||||
.pulse-logo {
|
||||
animation: 0.5s 0.2s infinite forwards beat-pulse;
|
||||
}
|
||||
.main-logo {
|
||||
animation: 0.5s infinite forwards beat;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes beat {
|
||||
0%,
|
||||
100% {
|
||||
scale: 1;
|
||||
}
|
||||
90% {
|
||||
scale: 1.08;
|
||||
}
|
||||
}
|
||||
@keyframes beat-pulse {
|
||||
0%,
|
||||
10% {
|
||||
scale: 0.5;
|
||||
opacity: 0.5;
|
||||
filter: blur(0px);
|
||||
}
|
||||
100% {
|
||||
scale: 1.4;
|
||||
opacity: 0;
|
||||
filter: blur(2px);
|
||||
}
|
||||
}
|
||||
</style>
|
@@ -20,10 +20,14 @@
|
||||
</script>
|
||||
|
||||
<div data-tauri-drag-region class="titlebar z-[60] border-b border-theme-800/90">
|
||||
<div class="mr-auto ms-2 flex flex-row gap-2 items-center text-[1.05rem] font-semibold pointer-events-none">
|
||||
<div
|
||||
class="mr-auto ms-2 flex flex-row gap-2 items-center text-[1.05rem] font-semibold pointer-events-none"
|
||||
>
|
||||
<img src={Logo} alt="EZPP Launcher Logo" class="h-11 w-11 inline-block" />
|
||||
<span>EZPPLauncher</span>
|
||||
<Badge class="!text-[0.6rem] py-[0.5px] bg-primary-500 hover:bg-primary-500">{$launcherVersion}</Badge>
|
||||
<Badge class="!text-[0.6rem] py-[0.5px] bg-primary-500 hover:bg-primary-500"
|
||||
>{$launcherVersion}</Badge
|
||||
>
|
||||
</div>
|
||||
<div class="titlebar-button rounded-lg transition-colors duration-75" id="titlebar-minimize">
|
||||
<Minimize size={18} />
|
||||
|
@@ -1,14 +1,19 @@
|
||||
import { writable } from 'svelte/store';
|
||||
import { ezppfarm } from './api/ezpp';
|
||||
import type { Component } from 'svelte';
|
||||
import Loading from '../pages/Loading.svelte';
|
||||
import Loading from '../screens/Loading.svelte';
|
||||
import type { Release } from './types';
|
||||
|
||||
export const currentView = writable<Component>(Loading);
|
||||
|
||||
export const platform = writable<string>('');
|
||||
|
||||
export const launcherVersion = writable<string>('');
|
||||
export const newVersion = writable<Release | undefined>(undefined);
|
||||
|
||||
export const launcherStreams = writable<string[]>(['stable']);
|
||||
export const launcherStream = writable<string>('stable');
|
||||
|
||||
export const discordPresence = writable<boolean>(false);
|
||||
export const presenceLoading = writable<boolean>(false);
|
||||
|
||||
|
@@ -1,8 +1,9 @@
|
||||
import { invoke } from '@tauri-apps/api/core';
|
||||
import type { UpdateFile, UpdateStatus } from './types';
|
||||
import { listen } from '@tauri-apps/api/event';
|
||||
import { betterFetch } from '@better-fetch/fetch';
|
||||
|
||||
const updateUrl = 'https://ez-pp.farm/ezpplauncher';
|
||||
const updateUrl = 'https://next.ez-pp.farm/api/ezpplauncher';
|
||||
|
||||
export const getHWID = async () => {
|
||||
const hwid = await invoke('get_hwid');
|
||||
@@ -73,8 +74,24 @@ export const runUpdater = async (folder: string) => await invoke('run_osu_update
|
||||
export const runOsu = async (folder: string, patch: boolean) =>
|
||||
await invoke('run_osu', { folder, patch });
|
||||
|
||||
export const getEZPPLauncherUpdateFiles = async (folder: string) => {
|
||||
const result = await invoke('get_ezpp_launcher_update_files', { folder, updateUrl });
|
||||
export const getEZPPLauncherStreams = async () => {
|
||||
const resp = await betterFetch<{ streams: string[] }>(updateUrl, {
|
||||
method: 'POST',
|
||||
});
|
||||
|
||||
if (!resp.error) {
|
||||
return resp.data.streams;
|
||||
}
|
||||
|
||||
return undefined;
|
||||
};
|
||||
|
||||
export const getEZPPLauncherUpdateFiles = async (folder: string, updateStream: string) => {
|
||||
const result = await invoke('get_ezpp_launcher_update_files', {
|
||||
folder,
|
||||
updateUrl,
|
||||
updateStream,
|
||||
});
|
||||
if (typeof result === 'object') {
|
||||
const [filesToDownload, updateFiles] = result as [UpdateFile[], UpdateFile[]];
|
||||
return {
|
||||
@@ -116,3 +133,22 @@ export const exit = async () => await invoke('exit');
|
||||
export const getPlatform = async () => await invoke<string>('get_platform');
|
||||
export const isOsuCorrupted = async (folder: string) =>
|
||||
await invoke<boolean>('check_for_corruption', { folder });
|
||||
export const hasWMCTRL = async () => await invoke<boolean>('has_wmctrl');
|
||||
export const hasOsuWinello = async () => await invoke<boolean>('has_osuwinello');
|
||||
export const hasNet8 = async () => await invoke<boolean>('has_net8');
|
||||
export const encryptString = async (str: string, entropy: string) =>
|
||||
await invoke<string>('encrypt_string', { string: str, entropy });
|
||||
export const downloadUpdate = async (
|
||||
url: string,
|
||||
progressCallback: (file: UpdateStatus) => void
|
||||
) => {
|
||||
const downloadStatusListen = await listen('download-progress', (event) =>
|
||||
progressCallback(event.payload as UpdateStatus)
|
||||
);
|
||||
try {
|
||||
await invoke<string>('download_ezpp_launcher_update', { url });
|
||||
} finally {
|
||||
downloadStatusListen();
|
||||
}
|
||||
};
|
||||
export const installUpdate = async () => await invoke('install_ezpp_launcher_update');
|
||||
|
@@ -9,6 +9,7 @@
|
||||
discordPresence,
|
||||
firstStartup,
|
||||
launcherVersion,
|
||||
platform,
|
||||
presenceLoading,
|
||||
setupValues,
|
||||
} from '@/global';
|
||||
@@ -25,7 +26,7 @@
|
||||
import { Buffer } from 'buffer';
|
||||
import { Toaster } from '@/components/ui/sonner';
|
||||
import { userAuth } from '@/userAuthentication';
|
||||
import { exit, getLauncherVersion, getPlatform } from '@/osuUtil';
|
||||
import { encryptString, exit, getLauncherVersion, getPlatform } from '@/osuUtil';
|
||||
import Button from '@/components/ui/button/button.svelte';
|
||||
import * as presence from '@/presence';
|
||||
|
||||
@@ -90,7 +91,8 @@
|
||||
disableReload();
|
||||
setupValues();
|
||||
launcherVersion.set(await getLauncherVersion());
|
||||
if ((await getPlatform()) !== 'windows') unsupported_platform = true;
|
||||
platform.set(await getPlatform());
|
||||
if ($platform !== 'windows' && $platform !== 'linux') unsupported_platform = true;
|
||||
const isFirstStartup = await $userSettings.init();
|
||||
$userAuth.init();
|
||||
|
||||
|
@@ -9,11 +9,14 @@
|
||||
currentSkin,
|
||||
currentView,
|
||||
discordPresence,
|
||||
launcherStream,
|
||||
launcherStreams,
|
||||
launcherVersion,
|
||||
launching,
|
||||
newVersion,
|
||||
osuBuild,
|
||||
osuStream,
|
||||
platform,
|
||||
presenceLoading,
|
||||
serverConnectionFails,
|
||||
serverPing,
|
||||
@@ -80,6 +83,8 @@
|
||||
import { osuapi } from '@/api/osuapi';
|
||||
import {
|
||||
downloadEZPPLauncherUpdateFiles,
|
||||
downloadUpdate,
|
||||
encryptString,
|
||||
exit,
|
||||
getBeatmapSetsCount,
|
||||
getEZPPLauncherUpdateFiles,
|
||||
@@ -87,6 +92,10 @@
|
||||
getSkin,
|
||||
getSkinsCount,
|
||||
getVersion,
|
||||
hasNet8,
|
||||
hasOsuWinello,
|
||||
hasWMCTRL,
|
||||
installUpdate,
|
||||
isOsuCorrupted,
|
||||
isOsuRunning,
|
||||
isValidOsuFolder,
|
||||
@@ -107,6 +116,8 @@
|
||||
let launchInfo = $state('');
|
||||
let launchError = $state<Error | undefined>(undefined);
|
||||
|
||||
let downloadingUpdate = $state(false);
|
||||
|
||||
let selectedGamemode = $derived(
|
||||
getGamemodeInt(modeIntToStr($preferredMode), typeIntToStr($preferredType))
|
||||
);
|
||||
@@ -142,14 +153,11 @@
|
||||
toast.success('osu! installation path set successfully.');
|
||||
|
||||
const beatmapSetCount: number | null = await getBeatmapSetsCount(selectedPath);
|
||||
if (beatmapSetCount) {
|
||||
beatmapSets.set(beatmapSetCount);
|
||||
}
|
||||
if (beatmapSetCount) beatmapSets.set(beatmapSetCount);
|
||||
|
||||
const skinsCount: number | null = await getSkinsCount(selectedPath);
|
||||
if (skinsCount) {
|
||||
skins.set(skinsCount);
|
||||
}
|
||||
if (skinsCount !== null) skins.set(skinsCount);
|
||||
|
||||
const skin: string = await getSkin(selectedPath);
|
||||
currentSkin.set(skin);
|
||||
}
|
||||
@@ -184,9 +192,26 @@
|
||||
return;
|
||||
}
|
||||
|
||||
if ($platform === 'linux') {
|
||||
if (!(await hasWMCTRL())) {
|
||||
toast.error('Hmmm...', {
|
||||
description: 'wmctrl seems to be missing, please install via AUR.',
|
||||
});
|
||||
launching.set(false);
|
||||
return;
|
||||
}
|
||||
if (!(await hasOsuWinello())) {
|
||||
toast.error('Hmmm...', {
|
||||
description: 'osu-winello seems to be missing, please install it.',
|
||||
});
|
||||
launching.set(false);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
launchInfo = 'Looking for EZPPLauncher File updates...';
|
||||
const updateResult = await getEZPPLauncherUpdateFiles(osuPath);
|
||||
const updateResult = await getEZPPLauncherUpdateFiles(osuPath, $launcherStream);
|
||||
|
||||
if (updateResult) {
|
||||
if (updateResult.filesToDownload.length > 0) {
|
||||
@@ -220,13 +245,31 @@
|
||||
const streamInfo = await osuapi.latestBuildVersion('stable40');
|
||||
if (!streamInfo) {
|
||||
toast.error('Hmmm...', {
|
||||
description: 'Failed to check for updates.',
|
||||
description: 'Failed to check for updates, maybe osu! is down?',
|
||||
});
|
||||
launching.set(false);
|
||||
return;
|
||||
}
|
||||
|
||||
const releaseStream = await getReleaseStream(osuPath);
|
||||
|
||||
if (releaseStream === undefined) {
|
||||
toast.error('Hmmm...', {
|
||||
description: 'Failed to get osu! release stream.',
|
||||
});
|
||||
launching.set(false);
|
||||
return;
|
||||
}
|
||||
|
||||
// only stable osu! release streams are supported for now
|
||||
if (!releaseStream.toLowerCase().includes('stable')) {
|
||||
toast.error('Hmmm...', {
|
||||
description: 'You are not on the stable release stream, please switch to it.',
|
||||
});
|
||||
launching.set(false);
|
||||
return;
|
||||
}
|
||||
|
||||
const osuCorrupted = await isOsuCorrupted(osuPath);
|
||||
let forceUpdate =
|
||||
(releaseStream && releaseStream.toLowerCase() !== 'stable40') || osuCorrupted;
|
||||
@@ -273,7 +316,10 @@
|
||||
},
|
||||
{
|
||||
key: 'Password',
|
||||
value: password,
|
||||
value:
|
||||
$platform === 'windows'
|
||||
? await encryptString(password, 'cu24180ncjeiu0ci1nwui')
|
||||
: password,
|
||||
},
|
||||
{
|
||||
key: 'SaveUsername',
|
||||
@@ -454,7 +500,7 @@
|
||||
if (beatmapSetCount) beatmapSets.set(beatmapSetCount);
|
||||
|
||||
const skinCount = await getSkinsCount(osuPath);
|
||||
if (skinCount) skins.set(skinCount);
|
||||
if (skinCount !== null) skins.set(skinCount);
|
||||
|
||||
const skin = await getSkin(osuPath);
|
||||
currentSkin.set(skin);
|
||||
@@ -477,7 +523,7 @@
|
||||
</script>
|
||||
|
||||
<AlertDialog.Root open={launchError !== undefined}>
|
||||
<AlertDialog.Content class="bg-theme-950 border-theme-800 p-0">
|
||||
<AlertDialog.Content class="bg-theme-950 border-theme-800 p-0 max-w-[90vw]">
|
||||
<div
|
||||
class="flex flex-col items-center justify-center border-b border-theme-800 bg-black/40 rounded-t-lg p-3"
|
||||
>
|
||||
@@ -485,10 +531,10 @@
|
||||
<span class="font-semibold text-xl">Error on Launch!</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"
|
||||
class="flex flex-col items-center text-sm text-center bg-theme-900 border border-theme-800 rounded-lg mx-3 p-3 overflow-hidden"
|
||||
>
|
||||
{#if launchError}
|
||||
<pre class="text-wrap text-start">{JSON.stringify(
|
||||
<pre class="text-wrap text-start overflow-auto w-full">{JSON.stringify(
|
||||
launchError,
|
||||
Object.getOwnPropertyNames(launchError),
|
||||
2
|
||||
@@ -508,7 +554,11 @@
|
||||
</AlertDialog.Root>
|
||||
|
||||
<AlertDialog.Root open={$newVersion !== undefined}>
|
||||
<AlertDialog.Content class="bg-theme-950 border-theme-800 p-0">
|
||||
<AlertDialog.Content
|
||||
class="bg-theme-950 border-theme-800 p-0"
|
||||
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"
|
||||
>
|
||||
@@ -531,6 +581,36 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex items-center justify-center mb-3">
|
||||
{#if $platform === 'windows'}
|
||||
{#if downloadingUpdate}
|
||||
<div class="flex flex-col items-center justify-center gap-2 p-3 rounded-lg w-full">
|
||||
<Progress indeterminate={progress === -1} value={progress} />
|
||||
<span class="text-muted-foreground text-sm mt-4">{launchInfo}</span>
|
||||
</div>
|
||||
{:else}
|
||||
<Button
|
||||
onclick={async () => {
|
||||
const updateFile = $newVersion?.assets.find((asset) => asset.name.endsWith('.exe'));
|
||||
if (!updateFile) {
|
||||
toast.error('Hmmm...', {
|
||||
description: 'No update file found.',
|
||||
});
|
||||
$newVersion = undefined;
|
||||
return;
|
||||
}
|
||||
downloadingUpdate = true;
|
||||
launchInfo = 'Downloading Update...';
|
||||
await downloadUpdate(updateFile.browser_download_url, (file) => {
|
||||
progress = file.progress;
|
||||
launchInfo = `Downloading Update (${formatBytes(file.downloaded)}/${formatBytes(file.size)})...`;
|
||||
});
|
||||
progress = -1;
|
||||
launchInfo = 'Update downloaded, installing...';
|
||||
await installUpdate();
|
||||
}}>Install Update now</Button
|
||||
>
|
||||
{/if}
|
||||
{:else}
|
||||
<Button
|
||||
onclick={async () => {
|
||||
if ($newVersion) {
|
||||
@@ -539,12 +619,17 @@
|
||||
}
|
||||
}}>Update now</Button
|
||||
>
|
||||
{/if}
|
||||
</div>
|
||||
</AlertDialog.Content>
|
||||
</AlertDialog.Root>
|
||||
|
||||
<AlertDialog.Root bind:open={$launching}>
|
||||
<AlertDialog.Content class="bg-theme-950 border-theme-800 p-0">
|
||||
<AlertDialog.Content
|
||||
class="bg-theme-950 border-theme-800 p-0"
|
||||
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"
|
||||
>
|
||||
@@ -802,7 +887,7 @@
|
||||
</div>
|
||||
<div class="flex flex-col gap-6 w-full h-full bg-theme-900/40 p-6">
|
||||
<div
|
||||
class="flex flex-row flex-nowrap h-11 w-full bg-theme-800/50 border border-theme-800/90 rounded-lg p-[4px]"
|
||||
class="flex flex-row flex-nowrap h-11 gap-1 w-full bg-theme-800/50 border border-theme-800/90 rounded-lg p-[4px]"
|
||||
>
|
||||
<button
|
||||
class="w-full flex justify-center items-center font-semibold text-sm rounded-lg {selectedTab ===
|
||||
@@ -865,13 +950,17 @@
|
||||
</div>
|
||||
<div class="relative font-bold text-xl text-yellow-400">
|
||||
<div
|
||||
class="absolute top-1 left-1/2 -translate-x-1/2 {!$skins
|
||||
class="absolute top-1 left-1/2 -translate-x-1/2 {$skins === null
|
||||
? 'opacity-100'
|
||||
: 'opacity-0'} transition-opacity duration-1000"
|
||||
>
|
||||
<LoaderCircle class="animate-spin" />
|
||||
</div>
|
||||
<div class="{!$skins ? 'opacity-0' : 'opacity-100'} transition-opacity duration-1000">
|
||||
<div
|
||||
class="{$skins === null
|
||||
? 'opacity-0'
|
||||
: 'opacity-100'} transition-opacity duration-1000"
|
||||
>
|
||||
{#if $reduceAnimations}
|
||||
<span>{numberHumanReadable($skins ?? 0)}</span>
|
||||
{:else}
|
||||
@@ -1028,11 +1117,18 @@
|
||||
>
|
||||
<div class="flex flex-col">
|
||||
<Label class="text-sm" for="setting-custom-cursor">Patching</Label>
|
||||
<div class="text-muted-foreground text-xs">Shows misses in Relax and Autopilot</div>
|
||||
<div class="text-muted-foreground text-xs">
|
||||
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"
|
||||
>currently only on windows!</span
|
||||
>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
<Checkbox
|
||||
id="setting-custom-cursor"
|
||||
checked={$patch}
|
||||
checked={$platform === 'windows' ? $patch : false}
|
||||
disabled={$platform !== 'windows'}
|
||||
onCheckedChange={async (e) => {
|
||||
patch.set(e);
|
||||
$userSettings.save();
|
||||
@@ -1115,7 +1211,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
class="grid grid-cols-[0.7fr_auto] gap-y-5 items-center border-theme-800 pl-6 pr-5 pb-4"
|
||||
class="grid grid-cols-[0.7fr_auto] gap-y-1 items-center border-theme-800 pl-6 pr-5 pb-4"
|
||||
>
|
||||
<div class="flex flex-col">
|
||||
<Label class="text-sm" for="setting-custom-cursor">osu! installation path</Label>
|
||||
@@ -1135,6 +1231,54 @@
|
||||
onclick={browse_osu_installation}>Browse</Button
|
||||
>
|
||||
</div>
|
||||
|
||||
<div class="flex flex-col">
|
||||
<Label class="text-sm" for="setting-custom-cursor">patcher release stream</Label>
|
||||
<div class="text-muted-foreground text-xs">
|
||||
test different versions of the patcher
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex flex-row w-full">
|
||||
<Select.Root
|
||||
type="single"
|
||||
bind:value={$launcherStream}
|
||||
onValueChange={async (newStream) => {
|
||||
if (newStream === 'experimental' && !(await hasNet8())) {
|
||||
launcherStream.set('stable');
|
||||
toast.error('.NET 8.0 Desktop Runtime not found!', {
|
||||
action: {
|
||||
label: 'Download .NET 8.0',
|
||||
onClick: async () =>
|
||||
await openURL(
|
||||
'https://dotnet.microsoft.com/en-us/download/dotnet/thank-you/runtime-desktop-8.0.18-windows-x64-installer'
|
||||
),
|
||||
},
|
||||
});
|
||||
return;
|
||||
}
|
||||
$userSettings.value('patcherStream').set(newStream);
|
||||
launcherStream.set(newStream);
|
||||
await $userSettings.save();
|
||||
}}
|
||||
>
|
||||
<Select.Trigger
|
||||
class="border-theme-800 bg-theme-950 !text-muted-foreground font-semibold"
|
||||
>
|
||||
<div class="flex flex-row items-center gap-2 font-normal text-foreground">
|
||||
{$launcherStream}
|
||||
</div>
|
||||
</Select.Trigger>
|
||||
<Select.Content class="bg-theme-950 border border-theme-950 rounded-lg">
|
||||
{#each $launcherStreams as stream (stream)}
|
||||
<Select.Item value={stream}>
|
||||
<div class="flex flex-row gap-2 items-center">
|
||||
{stream}
|
||||
</div>
|
||||
</Select.Item>
|
||||
{/each}
|
||||
</Select.Content>
|
||||
</Select.Root>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
@@ -7,6 +7,8 @@
|
||||
currentSkin,
|
||||
currentView,
|
||||
firstStartup,
|
||||
launcherStream,
|
||||
launcherStreams,
|
||||
launcherVersion,
|
||||
newVersion,
|
||||
osuBuild,
|
||||
@@ -30,6 +32,7 @@
|
||||
import { currentUserInfo } from '@/data';
|
||||
import {
|
||||
getBeatmapSetsCount,
|
||||
getEZPPLauncherStreams,
|
||||
getReleaseStream,
|
||||
getSkin,
|
||||
getSkinsCount,
|
||||
@@ -132,11 +135,11 @@
|
||||
|
||||
currentLoadingInfo.set('Counting beatmapsets...');
|
||||
const beatmapSetCount = await getBeatmapSetsCount($osuInstallationPath);
|
||||
if (beatmapSetCount) beatmapSets.set(beatmapSetCount);
|
||||
if (beatmapSetCount !== null) beatmapSets.set(beatmapSetCount);
|
||||
|
||||
currentLoadingInfo.set('Counting skins...');
|
||||
const skinCount = await getSkinsCount($osuInstallationPath);
|
||||
if (skinCount) skins.set(skinCount);
|
||||
if (skinCount !== null) skins.set(skinCount);
|
||||
const skin: string = await getSkin($osuInstallationPath);
|
||||
currentSkin.set(skin);
|
||||
}
|
||||
@@ -148,6 +151,14 @@
|
||||
newVersion.set(launcherUpdate);
|
||||
}
|
||||
|
||||
const ezpplauncherStreams = await getEZPPLauncherStreams();
|
||||
if (ezpplauncherStreams) launcherStreams.set(ezpplauncherStreams);
|
||||
|
||||
const selectedLauncherStream = $userSettings.value('patcherStream').get('stable');
|
||||
if ($launcherStreams.includes(selectedLauncherStream)) {
|
||||
launcherStream.set(selectedLauncherStream);
|
||||
}
|
||||
|
||||
animate(ezppLogo, {
|
||||
opacity: [1, 0],
|
||||
scale: [1, 1.05],
|
Reference in New Issue
Block a user