mirror of
https://github.com/italicsjenga/agb.git
synced 2025-01-11 09:31:34 +11:00
error on build fail of mgba
This commit is contained in:
parent
b63bc2d25c
commit
a8f67dacd3
|
@ -5,12 +5,18 @@ const MGBA_VERSION: &str = "0.9.1";
|
||||||
fn main() {
|
fn main() {
|
||||||
let out_path = PathBuf::from(env::var("OUT_DIR").unwrap());
|
let out_path = PathBuf::from(env::var("OUT_DIR").unwrap());
|
||||||
let mgba_directory = out_path.join(format!("mgba-{}", MGBA_VERSION));
|
let mgba_directory = out_path.join(format!("mgba-{}", MGBA_VERSION));
|
||||||
std::process::Command::new("bash")
|
let out = std::process::Command::new("bash")
|
||||||
.arg("build-mgba.sh")
|
.arg("build-mgba.sh")
|
||||||
.arg(MGBA_VERSION)
|
.arg(MGBA_VERSION)
|
||||||
.arg(&out_path)
|
.arg(&out_path)
|
||||||
.output()
|
.output()
|
||||||
.expect("should be able to build mgba");
|
.expect("should be able to build mgba");
|
||||||
|
if !out.status.success() {
|
||||||
|
panic!(
|
||||||
|
"failed to build mgba!\n{}",
|
||||||
|
String::from_utf8_lossy(&out.stderr),
|
||||||
|
);
|
||||||
|
}
|
||||||
println!("cargo:rustc-link-search={}", out_path.to_str().unwrap());
|
println!("cargo:rustc-link-search={}", out_path.to_str().unwrap());
|
||||||
println!("cargo:rustc-link-lib=static={}", "mgba-cycle");
|
println!("cargo:rustc-link-lib=static={}", "mgba-cycle");
|
||||||
println!("cargo:rustc-link-lib=elf");
|
println!("cargo:rustc-link-lib=elf");
|
||||||
|
|
Loading…
Reference in a new issue