-
Notifications
You must be signed in to change notification settings - Fork 19
/
Copy pathbuild.rs
35 lines (31 loc) · 1010 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
32
33
34
35
fn main() {
#[cfg(feature = "web")]
{
use static_files::NpmBuild;
NpmBuild::new("./fubuki-webui")
.install().unwrap() // runs npm install
.run("build").unwrap() // runs npm run build
.target("./fubuki-webui/dist/fubuki-webui")
.to_resource_dir()
.build().unwrap();
}
#[cfg(target_os = "windows")]
{
#[allow(unused_mut)]
let mut res = winres::WindowsResource::new();
#[cfg(feature = "gui")]
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>
"#);
res.compile()
.unwrap();
}
}