-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathbuild.rs
38 lines (34 loc) · 1.06 KB
/
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
32
33
34
35
36
37
38
extern crate winres;
#[cfg(windows)]
use winres::WindowsResource;
fn main() {
static_vcruntime::metabuild();
let mut res = winres::WindowsResource::new();
res.set_manifest(
r#"
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
<security>
<requestedPrivileges>
<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
</requestedPrivileges>
</security>
</trustInfo>
</assembly>
"#,
);
#[cfg(windows)]
{
WindowsResource::new()
// This path can be absolute, or relative to your crate root.
.set_icon("src/icon/ICON1.ico")
.set_icon_with_id("src/icon/ICON1.ico", "appicon")
.compile()
.expect("set icon error");
}
// Build::new().compile("app.rc").unwrap();
// cc::Build::new()
// .file("src/hello.c")
// .compile("hello") ;
// pkg_config::Config::new().probe("libWxIkunPlus").unwrap();
}