-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathbuild.rs
31 lines (25 loc) · 963 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
26
27
28
29
30
31
#[cfg(feature = "wel")]
use std::path::PathBuf;
#[cfg(feature = "wel")]
use std::env;
#[cfg(feature = "wel")]
use embed_resource;
fn main() {
#[cfg(feature = "wel")]
if cfg!(feature = "wel") {
let out_dir = env::var_os("OUT_DIR").unwrap();
let mut bin_file = PathBuf::new();
bin_file.push(&out_dir);
bin_file.push("default_events_MSG00409.bin");
stumpless_sys::write_default_events_bin_file(&bin_file).expect("couldn't write bin file");
let mut resource_file = PathBuf::new();
resource_file.push(&out_dir);
resource_file.push("default_events.rc");
stumpless_sys::write_default_events_resource_file(&resource_file)
.expect("couldn't write resource file");
let mut compile_file = PathBuf::new();
compile_file.push(&out_dir);
compile_file.push("default_events.rc");
embed_resource::compile(&compile_file, embed_resource::NONE);
}
}