From ee50d22add8bf303185bea812e824d20c5fea844 Mon Sep 17 00:00:00 2001 From: Ezekiel Warren Date: Mon, 18 Mar 2024 07:14:01 -0700 Subject: [PATCH] windows: Add manifest for storybook (#9453) allows `cargo run -p storybook` to work on Windows Release Notes: - N/A --- crates/storybook/build.rs | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/crates/storybook/build.rs b/crates/storybook/build.rs index 94602ec073d16237ec80531aa62a194cc8fb4c3f..4a713e4c1aa7df84e343a98f70affb81db51ee59 100644 --- a/crates/storybook/build.rs +++ b/crates/storybook/build.rs @@ -2,4 +2,17 @@ fn main() { // Find WebRTC.framework as a sibling of the executable when running outside of an application bundle. // TODO: We shouldn't depend on WebRTC in editor println!("cargo:rustc-link-arg=-Wl,-rpath,@executable_path"); + + if std::env::var("CARGO_CFG_TARGET_ENV").ok() == Some("msvc".to_string()) { + println!("cargo:rustc-link-arg=/stack:{}", 8 * 1024 * 1024); + + let manifest = std::path::Path::new("../zed/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() + ); + } }