-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.rs
More file actions
42 lines (42 loc) · 1.87 KB
/
build.rs
File metadata and controls
42 lines (42 loc) · 1.87 KB
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
39
40
41
42
fn main() {
if cfg!(target_os = "windows") {
// Add MinGW to PATH for windres
if let Ok(current) = std::env::var("PATH") {
let mingw = r"C:\dev\tools\mingw\mingw64\bin";
std::env::set_var("PATH", format!("{};{}", mingw, current));
}
let mut res = winres::WindowsResource::new();
res.set_icon("assets/icon.ico");
res.set("ProductName", "LockNote");
res.set("FileDescription", "LockNote — Encrypted notepad for Windows");
res.set("CompanyName", "uitguard.com");
res.set("LegalCopyright", "\u{00A9} 2026 Chris Tardy — uitguard.com");
res.set("OriginalFilename", "LockNote.exe");
res.set_manifest(r#"<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<dependency>
<dependentAssembly>
<assemblyIdentity type="win32" name="Microsoft.Windows.Common-Controls" version="6.0.0.0" processorArchitecture="*" publicKeyToken="6595b64144ccf1df" language="*"/>
</dependentAssembly>
</dependency>
<application xmlns="urn:schemas-microsoft-com:asm.v3">
<windowsSettings>
<dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true/pm</dpiAware>
</windowsSettings>
</application>
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
<application>
<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}"/>
<supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"/>
<supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"/>
<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>
<supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"/>
</application>
</compatibility>
</assembly>
"#);
if let Err(e) = res.compile() {
eprintln!("Warning: could not compile Windows resources: {}", e);
}
}
}