diff --git a/crates/samples/windows/file_dialogs/build.rs b/crates/samples/windows/file_dialogs/build.rs new file mode 100644 index 0000000000..00f1a307ad --- /dev/null +++ b/crates/samples/windows/file_dialogs/build.rs @@ -0,0 +1,16 @@ +fn main() { + println!("cargo:rerun-if-changed=build.rs"); + + if std::env::var("CARGO_CFG_TARGET_ENV").unwrap() == "msvc" { + println!("cargo:rerun-if-changed=manifest.xml"); + println!("cargo:rustc-link-arg-bins=/MANIFEST:EMBED"); + + println!( + "cargo:rustc-link-arg-bins=/MANIFESTINPUT:{}", + std::path::Path::new("manifest.xml") + .canonicalize() + .unwrap() + .display() + ); + } +} diff --git a/crates/samples/windows/file_dialogs/manifest.xml b/crates/samples/windows/file_dialogs/manifest.xml new file mode 100644 index 0000000000..a35c4d237f --- /dev/null +++ b/crates/samples/windows/file_dialogs/manifest.xml @@ -0,0 +1,19 @@ + + + + true + PerMonitorV2 + + + + + + + +