aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src-tauri/src/core/forge.rs
diff options
context:
space:
mode:
authorBegonia, HE <163421589+BegoniaHe@users.noreply.github.com>2026-01-16 08:05:51 +0100
committerGitHub <noreply@github.com>2026-01-16 08:05:51 +0100
commit46ea4d96c205276ecfb84928736ef02df8c104ff (patch)
treee759a5ea7b1c3cb2b0dc3823a166b758398bfc96 /src-tauri/src/core/forge.rs
parent76ab8c504c3d094b3c9d3b2034a4c16384220926 (diff)
parentddf10db485ea125df92d87955f110f46c0c1e7a0 (diff)
downloadDropOut-46ea4d96c205276ecfb84928736ef02df8c104ff.tar.gz
DropOut-46ea4d96c205276ecfb84928736ef02df8c104ff.zip
Merge branch 'HsiangNianian:main' into fix/windows-java-path
Diffstat (limited to 'src-tauri/src/core/forge.rs')
-rw-r--r--src-tauri/src/core/forge.rs15
1 files changed, 10 insertions, 5 deletions
diff --git a/src-tauri/src/core/forge.rs b/src-tauri/src/core/forge.rs
index c8bd6e4..0528b76 100644
--- a/src-tauri/src/core/forge.rs
+++ b/src-tauri/src/core/forge.rs
@@ -9,6 +9,8 @@
use serde::{Deserialize, Serialize};
use std::error::Error;
+#[cfg(target_os = "windows")]
+use std::os::windows::process::CommandExt;
use std::path::PathBuf;
const FORGE_PROMOTIONS_URL: &str =
@@ -293,13 +295,16 @@ pub async fn run_forge_installer(
// Run the installer in headless mode
// The installer accepts --installClient <path> to install to a specific directory
- let output = tokio::process::Command::new(java_path)
- .arg("-jar")
+ let mut cmd = tokio::process::Command::new(java_path);
+ cmd.arg("-jar")
.arg(&installer_path)
.arg("--installClient")
- .arg(game_dir)
- .output()
- .await?;
+ .arg(game_dir);
+
+ #[cfg(target_os = "windows")]
+ cmd.creation_flags(0x08000000);
+
+ let output = cmd.output().await?;
// Clean up installer
let _ = tokio::fs::remove_file(&installer_path).await;