From 9d4c05fb1b6e5a0759556ce623bb926f16e2c8c8 Mon Sep 17 00:00:00 2001 From: Junkui Zhang <364772080@qq.com> Date: Wed, 6 Mar 2024 15:50:45 +0800 Subject: [PATCH 1/2] Setting the default DPI awareness for Zed --- crates/zed/build.rs | 11 ++++++++++- crates/zed/resources/windows/manifest.xml | 19 +++++++++++++++++++ 2 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 crates/zed/resources/windows/manifest.xml diff --git a/crates/zed/build.rs b/crates/zed/build.rs index daea199e21ac1..783995942f6ff 100644 --- a/crates/zed/build.rs +++ b/crates/zed/build.rs @@ -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() + ); } } diff --git a/crates/zed/resources/windows/manifest.xml b/crates/zed/resources/windows/manifest.xml new file mode 100644 index 0000000000000..a0d439e577e7b --- /dev/null +++ b/crates/zed/resources/windows/manifest.xml @@ -0,0 +1,19 @@ + + + + true + PerMonitorV2 + + + + + + + + From b74bc95889eaf19fd549e73ff90614531a687898 Mon Sep 17 00:00:00 2001 From: Junkui Zhang <364772080@qq.com> Date: Wed, 6 Mar 2024 20:40:56 +0800 Subject: [PATCH 2/2] move dep to GPUI --- crates/zed/resources/windows/manifest.xml | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/crates/zed/resources/windows/manifest.xml b/crates/zed/resources/windows/manifest.xml index a0d439e577e7b..a2276d35ca377 100644 --- a/crates/zed/resources/windows/manifest.xml +++ b/crates/zed/resources/windows/manifest.xml @@ -5,15 +5,4 @@ PerMonitorV2 - - - - -