From f7a98644fccdca97181e2af8334dc7cca6f91b7a Mon Sep 17 00:00:00 2001 From: Maik Klein Date: Mon, 24 Jun 2019 09:50:12 +0200 Subject: [PATCH] Output messages to the log every 30 seconds when building MoltenVK --- build.rs | 8 ++++++-- build_molten.sh | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/build.rs b/build.rs index d100a50..0c08f20 100644 --- a/build.rs +++ b/build.rs @@ -36,10 +36,14 @@ fn main() { } // The 'external' feature was not enabled. Molten will be built automaticaly. if !is_external_enabled() { - std::process::Command::new("bash") + let mut build = std::process::Command::new("bash") .arg("build_molten.sh") - .status() + .spawn() .expect("Unable to build molten"); + while build.try_wait().unwrap().is_none() { + println!("Still building MoltenVK"); + std::thread::sleep(std::time::Duration::from_secs(30)); + } let project_dir = PathBuf::from(std::env::var("CARGO_MANIFEST_DIR").unwrap()).join("native"); println!("cargo:rustc-link-search=native={}", project_dir.display()); diff --git a/build_molten.sh b/build_molten.sh index 7319cad..96bb6eb 100644 --- a/build_molten.sh +++ b/build_molten.sh @@ -1,5 +1,5 @@ git clone https://github.com/KhronosGroup/MoltenVK.git cd MoltenVK sh fetchDependencies -xcodebuild -project "$(XCODE_PROJ)" -scheme "$(XCODE_SCHEME_BASE) (macOS only)" +make macos cp Package/Release/MoltenVK/macOS/static/libMoltenVK.a ../native