Compare commits
2 Commits
ccb0c467f2
...
416067f2ea
| Author | SHA1 | Date | |
|---|---|---|---|
|
416067f2ea
|
|||
|
e58be09bdb
|
@@ -450,8 +450,6 @@ pub async fn run_osu(folder: String, patch: bool) -> Result<(), String> {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
#[cfg(windows)]
|
|
||||||
{
|
|
||||||
if patch {
|
if patch {
|
||||||
let patcher_exe_path = PathBuf::from(&folder)
|
let patcher_exe_path = PathBuf::from(&folder)
|
||||||
.join("EZPPLauncher")
|
.join("EZPPLauncher")
|
||||||
@@ -459,8 +457,6 @@ pub async fn run_osu(folder: String, patch: bool) -> Result<(), String> {
|
|||||||
.join("osu!.patcher.exe");
|
.join("osu!.patcher.exe");
|
||||||
|
|
||||||
if patcher_exe_path.exists() {
|
if patcher_exe_path.exists() {
|
||||||
#[cfg(windows)]
|
|
||||||
{
|
|
||||||
let mut sys = System::new_all();
|
let mut sys = System::new_all();
|
||||||
|
|
||||||
loop {
|
loop {
|
||||||
@@ -486,12 +482,20 @@ pub async fn run_osu(folder: String, patch: bool) -> Result<(), String> {
|
|||||||
|
|
||||||
sleep(Duration::from_millis(500)).await;
|
sleep(Duration::from_millis(500)).await;
|
||||||
}
|
}
|
||||||
|
#[cfg(windows)]
|
||||||
|
{
|
||||||
let _ = Command::new(&patcher_exe_path)
|
let _ = Command::new(&patcher_exe_path)
|
||||||
.creation_flags(DETACHED_PROCESS | CREATE_NEW_PROCESS_GROUP)
|
.creation_flags(DETACHED_PROCESS | CREATE_NEW_PROCESS_GROUP)
|
||||||
.spawn()
|
.spawn()
|
||||||
.map_err(|e| format!("Failed to run patcher: {e}"))?;
|
.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))?;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user