Skip to content

Commit

Permalink
manifest
Browse files Browse the repository at this point in the history
  • Loading branch information
kennykerr committed Aug 27, 2024
1 parent 0fe87c9 commit 5999707
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 0 deletions.
16 changes: 16 additions & 0 deletions crates/samples/windows/file_dialogs/build.rs
Original file line number Diff line number Diff line change
@@ -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()
);
}
}
19 changes: 19 additions & 0 deletions crates/samples/windows/file_dialogs/manifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3">
<asmv3:application>
<asmv3:windowsSettings>
<dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true</dpiAware>
<dpiAwareness xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">PerMonitorV2</dpiAwareness>
</asmv3:windowsSettings>
</asmv3:application>
<dependency>
<dependentAssembly>
<assemblyIdentity
type="win32"
name="Microsoft.Windows.Common-Controls"
version="6.0.0.0"
processorArchitecture="*"
publicKeyToken="6595b64144ccf1df"
language="*"/>
</dependentAssembly>
</dependency>
</assembly>

0 comments on commit 5999707

Please sign in to comment.