anshdadhich commited on
Commit
fceb3b2
·
verified ·
1 Parent(s): 33e200c

Upload build.rs

Browse files
Files changed (1) hide show
  1. build.rs +13 -0
build.rs ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ fn main() {
2
+ // Only embed resources when the feature is enabled
3
+ if std::env::var("CARGO_FEATURE_EMBED_RESOURCES").is_ok() {
4
+ #[cfg(target_os = "windows")]
5
+ {
6
+ let mut res = winres::WindowsResource::new();
7
+ res.set_manifest_file("manifest.xml");
8
+ if let Err(e) = res.compile() {
9
+ eprintln!("Warning: Failed to embed manifest: {}", e);
10
+ }
11
+ }
12
+ }
13
+ }