feat: 分发包改为字节码,并补上 MuMu 探测和下载列表滚动

This commit is contained in:
Nixevol
2026-09-28 02:35:46 +08:00
parent 68d27a5caf
commit fe37a84971
6 changed files with 167 additions and 21 deletions
+10 -6
View File
@@ -11,6 +11,7 @@ struct Backend {
child: Mutex<Option<Child>>,
}
#[cfg(debug_assertions)]
fn repo_root() -> PathBuf {
PathBuf::from(env!("CARGO_MANIFEST_DIR"))
.join("..")
@@ -19,14 +20,17 @@ fn repo_root() -> PathBuf {
}
fn app_root() -> PathBuf {
if cfg!(debug_assertions) {
#[cfg(debug_assertions)]
{
return repo_root();
}
std::env::current_exe()
.ok()
.and_then(|path| path.parent().map(Path::to_path_buf))
.filter(|path| path.join("server").is_dir())
.unwrap_or_else(repo_root)
#[cfg(not(debug_assertions))]
{
std::env::current_exe()
.ok()
.and_then(|path| path.parent().map(Path::to_path_buf))
.unwrap_or_else(|| PathBuf::from("."))
}
}
fn python_command(root: &Path) -> PathBuf {