From bff5d85ff45007597efc543ce638018346537671 Mon Sep 17 00:00:00 2001 From: Sunli Date: Tue, 1 Jul 2025 19:00:14 +0800 Subject: [PATCH] gpui: Add the `windows-manifest` feature to embed manifest, enable by default (#32440) Gpui's build.rs will embed a manifest file into the Windows binary, but sometimes we want to customize it, so I added a feature called `no-windows-manifest` to disable this behavior. Release Notes: - N/A --- crates/gpui/Cargo.toml | 4 ++-- crates/gpui/build.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/crates/gpui/Cargo.toml b/crates/gpui/Cargo.toml index fb99f71744..418b7729f4 100644 --- a/crates/gpui/Cargo.toml +++ b/crates/gpui/Cargo.toml @@ -12,7 +12,7 @@ license = "Apache-2.0" workspace = true [features] -default = ["http_client", "font-kit", "wayland", "x11"] +default = ["http_client", "font-kit", "wayland", "x11", "windows-manifest"] test-support = [ "leak-detection", "collections/test-support", @@ -69,7 +69,7 @@ x11 = [ "open", "scap", ] - +windows-manifest = [] [lib] path = "src/gpui.rs" diff --git a/crates/gpui/build.rs b/crates/gpui/build.rs index c0ee603760..aed4397440 100644 --- a/crates/gpui/build.rs +++ b/crates/gpui/build.rs @@ -17,7 +17,7 @@ fn main() { #[cfg(target_os = "macos")] macos::build(); } - #[cfg(target_os = "windows")] + #[cfg(all(target_os = "windows", feature = "windows-manifest"))] Ok("windows") => { let manifest = std::path::Path::new("resources/windows/gpui.manifest.xml"); let rc_file = std::path::Path::new("resources/windows/gpui.rc");