pagetop/pagetop/build.rs

20 lines
651 B
Rust

use static_files::resource_dir;
use std::env;
use std::path::Path;
fn main() -> std::io::Result<()> {
build_resource_dir("./static/theme", "theme")?;
build_resource_dir("./static/aliner", "aliner")?;
build_resource_dir("./static/bootsier", "bootsier")?;
build_resource_dir("./static/bulmix", "bulmix")
}
fn build_resource_dir(dir: &str, name: &str) -> std::io::Result<()> {
let mut resource = resource_dir(dir);
resource.with_generated_filename(
Path::new(env::var("OUT_DIR").unwrap().as_str()).join(format!("{}.rs", name))
);
resource.with_module_name(format!("resources_{}", name));
resource.build()
}