Change summary
crates/zed/build.rs | 11 ++++++++++-
crates/zed/resources/windows/manifest.xml | 8 ++++++++
2 files changed, 18 insertions(+), 1 deletion(-)
Detailed changes
@@ -44,8 +44,17 @@ fn main() {
}
}
- // todo!("windows"): This is to avoid stack overflow. Remove it when solved.
if std::env::var("CARGO_CFG_TARGET_ENV").ok() == Some("msvc".to_string()) {
+ // todo!("windows"): This is to avoid stack overflow. Remove it when solved.
println!("cargo:rustc-link-arg=/stack:{}", 8 * 1024 * 1024);
+
+ let manifest = std::path::Path::new("resources/windows/manifest.xml");
+ println!("cargo:rerun-if-changed={}", manifest.display());
+ println!("cargo:rustc-link-arg-bins=/MANIFEST:EMBED");
+
+ println!(
+ "cargo:rustc-link-arg-bins=/MANIFESTINPUT:{}",
+ manifest.canonicalize().unwrap().display()
+ );
}
}
@@ -0,0 +1,8 @@
+<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>
+</assembly>