arst
This commit is contained in:
@@ -5,7 +5,7 @@ use crate::{
|
||||
use std::{fs::OpenOptions, io::Write, os::unix::fs::OpenOptionsExt, process::Command};
|
||||
|
||||
pub fn run() {
|
||||
if let Err(err) = windows() {
|
||||
if let Err(err) = linux() {
|
||||
println!("{err:?}");
|
||||
}
|
||||
}
|
||||
@@ -109,13 +109,13 @@ fn windows() -> Result<(), CompilerMsg> {
|
||||
let path = "./x86_64_test.exe";
|
||||
write(path, &binary);
|
||||
|
||||
// let mut cmd = Command::new("wine");
|
||||
// cmd.arg("x86_64_test");
|
||||
// let mut proc = cmd.spawn().expect("failed to run");
|
||||
// let status = proc.wait().expect("failed to wait");
|
||||
// if let Some(code) = status.code() {
|
||||
// std::process::exit(code);
|
||||
// }
|
||||
let mut cmd = Command::new("wine");
|
||||
cmd.arg("x86_64_test");
|
||||
let mut proc = cmd.spawn().expect("failed to run");
|
||||
let status = proc.wait().expect("failed to wait");
|
||||
if let Some(code) = status.code() {
|
||||
std::process::exit(code);
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user