-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.rs
25 lines (21 loc) · 910 Bytes
/
build.rs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
fn main() {
println!("cargo:rerun-if-changed=target/debug/assetchunk.dll");
if !std::path::Path::new("target/debug/assetchunk.dll").exists() {
eprintln!("[-] DLL Not Found In Target Directory");
eprintln!("[-] Build Failed");
return;
}
if !std::path::Path::new("ctest").exists() {
std::fs::create_dir("ctest")
.expect("[-] Failed To Create CTest Directory");
}
eprintln!("[-] Checking For Old DLL In CTest Directory");
if std::path::Path::new("ctest/assetchunk.dll").exists() {
std::fs::remove_file("ctest/assetchunk.dll")
.expect("[-] Failed To Remove Old DLL From CTest Directory");
}
eprintln!("[+] Copying DLL To CTest Directory");
std::fs::copy("target/debug/assetchunk.dll", "ctest/assetchunk.dll")
.expect("[-] Failed To Copy DLL To CTest Directory");
eprintln!("[+] Build Complete");
}