forked from akanyan/STARTLINER
fix: restore wine configuration
This commit is contained in:
@ -27,7 +27,7 @@ impl Network {
|
||||
if self.network_type == NetworkType::Artemis {
|
||||
let network_path = PathBuf::from(&self.local_path);
|
||||
let artemis_dir = network_path.parent()
|
||||
.ok_or_else(|| anyhow!("Invalid ARTEMiS path {}", &self.local_path))?;
|
||||
.ok_or_else(|| anyhow!("Invalid ARTEMiS path {:?}", &self.local_path))?;
|
||||
let cfg_path = artemis_dir.join("config").join("core.yaml");
|
||||
|
||||
let cfg = std::fs::read_to_string(&cfg_path)
|
||||
@ -41,15 +41,22 @@ impl Network {
|
||||
if let Some(hostname) = hostname {
|
||||
ini.with_section(Some("dns")).set("default", hostname);
|
||||
|
||||
#[cfg(target_os = "windows")]
|
||||
let mut cmd = Command::new("cmd.exe");
|
||||
|
||||
cmd.arg("/C");
|
||||
let mut cmd: Command;
|
||||
|
||||
if self.local_console == true {
|
||||
cmd.arg("start");
|
||||
if cfg!(target_os = "windows") {
|
||||
cmd = Command::new("cmd.exe");
|
||||
cmd.arg("/C");
|
||||
|
||||
if self.local_console == true {
|
||||
cmd.arg("start");
|
||||
}
|
||||
} else {
|
||||
cmd = Command::new("sh");
|
||||
}
|
||||
cmd.args(["python", &self.local_path]);
|
||||
|
||||
cmd.arg("python");
|
||||
cmd.arg(&self.local_path);
|
||||
cmd.current_dir(artemis_dir);
|
||||
cmd.spawn()
|
||||
.map_err(|e| anyhow!("Unable to spawn artemis: {}", e))?;
|
||||
|
Reference in New Issue
Block a user