This commit is contained in:
2026-05-28 11:41:26 +02:00
6 changed files with 86 additions and 20 deletions
+1
View File
@@ -14,6 +14,7 @@ It enhances the osu! experience with quality-of-life features and integration sp
## 🚀 Features
- [x] Automatically updates osu! before launching
- [x] Automatically start/stop the OpenTabletDriver Daemon
- [x] Automatic ingame login
- [x] Patches the osu! client to show misses in Relax and Autopilot
- [x] Displays your EZPPFarm stats in the launcher
+22 -3
View File
@@ -6,6 +6,7 @@ use serde_json::Value;
use std::collections::HashSet;
use std::io::Read;
use std::path::PathBuf;
use std::process::Stdio;
use sysinfo::System;
use tauri::AppHandle;
use tauri::Emitter;
@@ -996,10 +997,13 @@ pub async fn run_open_tablet_driver(path: String) -> Result<(), String> {
#[cfg(windows)]
{
const DETACHED_PROCESS: u32 = 0x00000008;
const CREATE_NEW_PROCESS_GROUP: u32 = 0x00000200;
const CREATE_NO_WINDOW: u32 = 0x08000000;
Command::new(&otd_path)
.creation_flags(DETACHED_PROCESS | CREATE_NEW_PROCESS_GROUP)
.creation_flags(CREATE_NO_WINDOW)
.stdin(Stdio::null())
.stdout(Stdio::null())
.stderr(Stdio::null())
.spawn()
.map_err(|e| format!("Failed to start OpenTabletDriver: {}", e))?;
}
@@ -1044,6 +1048,21 @@ pub fn is_open_tablet_driver_running() -> bool {
}
}
#[tauri::command]
pub async fn is_open_tablet_driver_path_valid(app: AppHandle, path: String) -> bool {
#[cfg(windows)]
{
app.fs_scope().allow_file(&path).ok();
let otd_path = PathBuf::from(&path);
otd_path.exists()
}
#[cfg(not(windows))]
{
true
}
}
#[derive(Serialize, Clone)]
pub struct ExtractProgress {
pub theme_name: String,
+9 -3
View File
@@ -19,10 +19,12 @@ use crate::{
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, get_skins_count, has_net8, has_osuwinello, has_wmctrl,
install_ezpp_launcher_update, is_osu_running, open_url_in_browser, opened_urls,
install_ezpp_launcher_update, is_open_tablet_driver_path_valid,
is_open_tablet_driver_running, is_osu_running, open_url_in_browser, opened_urls,
presence_connect, presence_disconnect, presence_is_connected, presence_update_button,
presence_update_status, presence_update_user, read_theme_info, replace_ui_files, run_osu,
run_osu_updater, set_osu_config_values, set_osu_user_config_values, valid_osu_folder,
presence_update_status, presence_update_user, read_theme_info, replace_ui_files,
run_open_tablet_driver, run_osu, run_osu_updater, set_osu_config_values,
set_osu_user_config_values, stop_open_tablet_driver, valid_osu_folder,
},
state::AppState,
};
@@ -144,6 +146,10 @@ pub fn run() {
config_delete,
config_clear,
config_all,
run_open_tablet_driver,
stop_open_tablet_driver,
is_open_tablet_driver_running,
is_open_tablet_driver_path_valid
])
.plugin(tauri_plugin_fs::init())
.plugin(tauri_plugin_dialog::init())
+14 -1
View File
@@ -26,7 +26,20 @@
],
"withGlobalTauri": true,
"security": {
"csp": "default-src 'self' tauri: asset:; script-src 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline'; img-src 'self' asset: data: blob: https://assets.ppy.sh https://a.ez-pp.farm https://git.ez-pp.farm https://osu.direct; connect-src 'self' https://ez-pp.farm https://api.ez-pp.farm https://c.ez-pp.farm https://analytics.ez-pp.farm https://git.ez-pp.farm https://osu.direct; media-src 'self' asset: blob:;",
"csp": {
"default-src": "'self' tauri: customprotocol: asset:",
"script-src": "'self' 'unsafe-inline' asset: http://asset.localhost https://asset.localhost https://analytics.ez-pp.farm",
"style-src": "'self' 'unsafe-inline' asset: http://asset.localhost https://asset.localhost",
"img-src": "'self' asset: http://asset.localhost https://asset.localhost blob: data: https://assets.ppy.sh https://a.ez-pp.farm https://git.ez-pp.farm https://osu.direct",
"connect-src": "'self' ipc: http://ipc.localhost https://ez-pp.farm https://api.ez-pp.farm https://c.ez-pp.farm https://analytics.ez-pp.farm https://git.ez-pp.farm https://osu.direct https://osu.ppy.sh",
"media-src": "'self' asset: http://asset.localhost https://asset.localhost blob:",
"font-src": [
"'self'",
"asset:",
"http://asset.localhost",
"https://asset.localhost"
]
},
"assetProtocol": {
"enable": true,
"scope": [
+3
View File
@@ -149,3 +149,6 @@ export const getSkins = async (folder: string) =>
export const startOpenTabletDriver = async (otdDaemonPath: string) =>
await invoke('run_open_tablet_driver', { path: otdDaemonPath });
export const stopOpenTabletDriver = async () => await invoke('stop_open_tablet_driver');
export const isOpenTabletDriverRunning = async () => await invoke('is_open_tablet_driver_running');
export const isOpenTabletDriverPathValid = async (path: string) =>
await invoke('is_open_tablet_driver_path_valid', { path });
+37 -13
View File
@@ -66,6 +66,8 @@
hasOsuWinello,
hasWMCTRL,
installUpdate,
isOpenTabletDriverPathValid,
isOpenTabletDriverRunning,
isOsuCorrupted,
isOsuRunning,
isValidOsuFolder,
@@ -200,6 +202,8 @@
directory: true,
multiple: false,
title: 'Select osu! Installation Folder',
canCreateDirectories: false,
defaultPath: $osuInstallationPath ?? undefined,
});
if (typeof selectedPath === 'string') {
@@ -454,6 +458,35 @@
},
]);
}
let otd_run = false;
if ($openTabletDriverEnabled && $openTabletDriverPath.length > 0) {
const otdRunning = await isOpenTabletDriverRunning();
if (!otdRunning) {
launchInfo = 'Starting OpenTabletDriver...';
const validDaemon = await isOpenTabletDriverPathValid($openTabletDriverPath);
if (!validDaemon) {
sileo.error({
title: 'Hmmm...',
description: 'Failed to start OpenTabletDriver, executable not found.',
});
launching.set(false);
return;
}
try {
await startOpenTabletDriver($openTabletDriverPath);
otd_run = true;
} catch (err) {
console.log('Failed to start OpenTabletDriver:', err);
sileo.error({
title: 'Hmmm...',
description: 'Failed to start OpenTabletDriver.',
});
launching.set(false);
return;
}
}
}
await new Promise((res) => setTimeout(res, 1500));
launchInfo = 'Launching osu!...';
@@ -575,17 +608,6 @@
}, 1000 * 2);
}
let otd_run = false;
if ($openTabletDriverEnabled && $openTabletDriverPath.length > 0) {
try {
await startOpenTabletDriver($openTabletDriverPath);
otd_run = true;
} catch (err) {
console.log('Failed to start OpenTabletDriver:', err);
}
}
await runOsu(osuPath, true);
if ($trackingEnabled) umami.track('app_exit_osu');
cleanup = true;
@@ -793,12 +815,14 @@
const selectedPath = await open({
directory: false,
multiple: false,
title: 'Select OpenTabletDriver Executable',
title: 'Select OpenTabletDriver.Daemon Executable',
defaultPath: $openTabletDriverPath ?? undefined,
canCreateDirectories: false,
filters:
$platform === 'windows'
? [
{
name: 'OpenTabletDriver',
name: 'OpenTabletDriver.Daemon.exe',
extensions: ['exe'],
},
]