it starts at least
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
use std::{fs::read_dir, process::Command};
|
||||
|
||||
fn main() {
|
||||
//let mut output = std::fs::File::create("output.txt").unwrap();
|
||||
println!("cargo::rerun-if-changed=build.rs");
|
||||
println!("cargo::rerun-if-changed=Cargo.lock");
|
||||
println!("cargo::rerun-if-changed=compile_shaders.py");
|
||||
|
||||
let paths = read_dir("shaders/include")
|
||||
.unwrap()
|
||||
.chain(read_dir("shaders/replacement").unwrap());
|
||||
for path in paths {
|
||||
if let Ok(path) = path
|
||||
&& path
|
||||
.path()
|
||||
.extension()
|
||||
.map(|ext| ext == "glsl")
|
||||
.unwrap_or(false)
|
||||
{
|
||||
println!("cargo::rerun-if-changed={}", path.path().display());
|
||||
//writeln!(output, "cargo::rerun-if-changed={}",
|
||||
// path.path().display()).unwrap();
|
||||
}
|
||||
}
|
||||
|
||||
Command::new("python3")
|
||||
.arg("compile_shaders.py")
|
||||
.status()
|
||||
.expect("Failed to assemble header shaders");
|
||||
}
|
||||
Reference in New Issue
Block a user