linux shader building, complete side renaming, esc to quit

This commit is contained in:
steffen 2024-12-22 11:13:05 +01:00
parent c733c0519f
commit 57e862832a
5 changed files with 160 additions and 122 deletions

View file

@ -39,6 +39,28 @@ fn main() {
io::stderr().write_all(&output.stderr).unwrap();
assert!(output.status.success());
} else if std::env::consts::OS == "linux" {
#[allow(unused_must_use)]
std::fs::remove_file("shaders/geo_cube.spv");
#[allow(unused_must_use)]
std::fs::remove_file("shaders/frag_cube.spv");
#[allow(unused_must_use)]
std::fs::remove_file("shaders/vert_cube.spv");
#[allow(unused_must_use)]
std::fs::remove_file("shaders/geo_cuboid.spv");
#[allow(unused_must_use)]
std::fs::remove_file("shaders/frag_cuboid.spv");
#[allow(unused_must_use)]
std::fs::remove_file("shaders/vert_cuboid.spv");
#[warn(unused_must_use)]
// probably need to check the os and have different versions
let mut command = Command::new("./shaders/compile.sh");
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());