disables windows shader build on linux
This commit is contained in:
parent
7fe7015774
commit
f16eab798d
1 changed files with 23 additions and 16 deletions
39
build.rs
39
build.rs
|
@ -17,22 +17,29 @@ fn main() {
|
||||||
println!("cargo::rerun-if-changed=shaders/frag_cuboid.spv");
|
println!("cargo::rerun-if-changed=shaders/frag_cuboid.spv");
|
||||||
println!("cargo::rerun-if-changed=shaders/vert_cuboid.spv");
|
println!("cargo::rerun-if-changed=shaders/vert_cuboid.spv");
|
||||||
|
|
||||||
#[allow(unused_must_use)]
|
if std::env::consts::OS == "windows" {
|
||||||
std::fs::remove_file("shaders/geo_cube.spv");
|
#[allow(unused_must_use)]
|
||||||
std::fs::remove_file("shaders/frag_cube.spv");
|
std::fs::remove_file("shaders/geo_cube.spv");
|
||||||
std::fs::remove_file("shaders/vert_cube.spv");
|
#[allow(unused_must_use)]
|
||||||
std::fs::remove_file("shaders/geo_cuboid.spv");
|
std::fs::remove_file("shaders/frag_cube.spv");
|
||||||
std::fs::remove_file("shaders/frag_cuboid.spv");
|
#[allow(unused_must_use)]
|
||||||
std::fs::remove_file("shaders/vert_cuboid.spv");
|
std::fs::remove_file("shaders/vert_cube.spv");
|
||||||
#[warn(unused_must_use)]
|
#[allow(unused_must_use)]
|
||||||
// probably need to check the os and have different versions
|
std::fs::remove_file("shaders/geo_cuboid.spv");
|
||||||
let mut command = Command::new("./shaders/compile.bat");
|
#[allow(unused_must_use)]
|
||||||
let output = command.output().expect("Failed to execute command");
|
std::fs::remove_file("shaders/frag_cuboid.spv");
|
||||||
println!("status: {}", output.status);
|
#[allow(unused_must_use)]
|
||||||
io::stdout().write_all(&output.stdout).unwrap();
|
std::fs::remove_file("shaders/vert_cuboid.spv");
|
||||||
io::stderr().write_all(&output.stderr).unwrap();
|
#[warn(unused_must_use)]
|
||||||
|
// probably need to check the os and have different versions
|
||||||
assert!(output.status.success());
|
let mut command = Command::new("./shaders/compile.bat");
|
||||||
|
let output = command.output().expect("Failed to execute command");
|
||||||
|
println!("status: {}", output.status);
|
||||||
|
io::stdout().write_all(&output.stdout).unwrap();
|
||||||
|
io::stderr().write_all(&output.stderr).unwrap();
|
||||||
|
|
||||||
|
assert!(output.status.success());
|
||||||
|
}
|
||||||
|
|
||||||
assert!(Path::new("shaders/geo_cube.spv").exists());
|
assert!(Path::new("shaders/geo_cube.spv").exists());
|
||||||
assert!(Path::new("shaders/frag_cube.spv").exists());
|
assert!(Path::new("shaders/frag_cube.spv").exists());
|
||||||
|
|
Loading…
Add table
Reference in a new issue