2020-09-11 04:45:32 +00:00
|
|
|
use anyhow::*;
|
|
|
|
use fs_extra::copy_items;
|
|
|
|
use fs_extra::dir::CopyOptions;
|
|
|
|
use std::env;
|
|
|
|
|
|
|
|
fn main() -> Result<()> {
|
|
|
|
// This tells cargo to rerun this script if something in /res/ changes.
|
|
|
|
println!("cargo:rerun-if-changed=res/*");
|
|
|
|
|
|
|
|
let out_dir = env::var("OUT_DIR")?;
|
|
|
|
let mut copy_options = CopyOptions::new();
|
|
|
|
copy_options.overwrite = true;
|
|
|
|
let mut paths_to_copy = Vec::new();
|
2020-12-21 20:33:42 +00:00
|
|
|
paths_to_copy.push("res/");
|
2020-09-11 04:45:32 +00:00
|
|
|
copy_items(&paths_to_copy, out_dir, ©_options)?;
|
|
|
|
|
|
|
|
Ok(())
|
2020-09-28 05:24:43 +00:00
|
|
|
}
|