mirror of
https://github.com/arabianq/build_msp.git
synced 2026-04-28 06:21:24 +00:00
added build.rs
This commit is contained in:
@@ -7,6 +7,7 @@ description = "A tool that helps to build .msp file mod"
|
||||
readme = "README.md"
|
||||
license = "MIT"
|
||||
keywords = ["switch", "nintendo", "mod", "mods", "msp"]
|
||||
build = "build.rs"
|
||||
|
||||
[dependencies]
|
||||
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
use std::process::Command;
|
||||
use std::path::Path;
|
||||
|
||||
|
||||
fn main() {
|
||||
let switch_tools_dir = Path::new("switch-tools");
|
||||
|
||||
let autogen_status = Command::new("./autogen.sh")
|
||||
.current_dir(switch_tools_dir)
|
||||
.status()
|
||||
.expect("Couldn't run autogen.sh");
|
||||
|
||||
let conf_status = Command::new("./configure")
|
||||
.current_dir(switch_tools_dir)
|
||||
.status().
|
||||
expect("Couldn't run configure");
|
||||
|
||||
let make_status = Command::new("make")
|
||||
.current_dir(switch_tools_dir)
|
||||
.status()
|
||||
.expect("Couldn't run make");
|
||||
|
||||
if !autogen_status.success() || !conf_status.success() || !make_status.success() {
|
||||
panic!("Something went wrong trying to build switch-tools");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user