Skip to content

Commit

Permalink
install nasm in build process
Browse files Browse the repository at this point in the history
  • Loading branch information
Arne91 committed May 30, 2024
1 parent ed5b2a8 commit dc268b4
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -596,6 +596,18 @@ fn nasm(file: &Path, arch: &str, include_dir: &Path, out_dir: &Path, c_root_dir:
_ => panic!("unsupported arch: {}", arch),
};

let ps_script_path = Path::new("mk/install-build-tools.ps1");

let status = Command::new("powershell")
.arg("-File")
.arg(ps_script_path)
.status()
.expect("Failed to execute PowerShell script");

if !status.success() {
panic!("PowerShell script execution failed");
}

// Nasm requires that the path end in a path separator.
let mut include_dir = include_dir.as_os_str().to_os_string();
include_dir.push(OsString::from(String::from(std::path::MAIN_SEPARATOR)));
Expand Down

0 comments on commit dc268b4

Please sign in to comment.