feat: 分发包改为字节码,并补上 MuMu 探测和下载列表滚动
This commit is contained in:
+10
-6
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user