Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
windows: Bundle new conpty.dll/OpenConsole.exe and use it for local builds on x86_64 (#43059)
Lukas Wirth3125e789041b
diff --git a/crates/zed/build.rs b/crates/zed/build.rsindex be420defa3a..f37996b644c 100644--- a/crates/zed/build.rs+++ b/crates/zed/build.rs@@ -37,7 +37,7 @@ fn main() {{// This is currently the best way to make `cargo build ...`'s build script// to print something to stdout without extra verbosity.- println!("cargo:warning=Info: using '{git_sha}' hash for ZED_COMMIT_SHA env var");+ println!("cargo::warning=Info: using '{git_sha}' hash for ZED_COMMIT_SHA env var");}}@@ -49,6 +49,25 @@ fn main() {println!("cargo:rustc-link-arg=/stack:{}", 8 * 1024 * 1024);}+ if cfg!(target_arch = "x86_64") {+ println!("cargo::rerun-if-changed=\\..\\..\\..\\conpty.dll");+ println!("cargo::rerun-if-changed=\\..\\..\\..\\OpenConsole.exe");+ let conpty_target = std::env::var("OUT_DIR").unwrap() + "\\..\\..\\..\\conpty.dll";+ match std::fs::copy("resources/windows/bin/x64/conpty.dll", &conpty_target) {+ Ok(_) => println!("Copied conpty.dll to {conpty_target}"),+ Err(e) => println!("cargo::warning=Failed to copy conpty.dll: {}", e),+ }+ let open_console_target =+ std::env::var("OUT_DIR").unwrap() + "\\..\\..\\..\\OpenConsole.exe";+ match std::fs::copy(+ "resources/windows/bin/x64/OpenConsole.exe",+ &open_console_target,+ ) {+ Ok(_) => println!("Copied OpenConsole.exe to {open_console_target}"),+ Err(e) => println!("cargo::warning=Failed to copy OpenConsole.exe: {}", e),+ }+ }+let release_channel = option_env!("RELEASE_CHANNEL").unwrap_or("dev");let icon = match release_channel {"stable" => "resources/windows/app-icon.ico",diff --git a/crates/zed/resources/windows/bin/x64/OpenConsole.exe b/crates/zed/resources/windows/bin/x64/OpenConsole.exenew file mode 100644index 00000000000..8bb6ab2188fBinary files /dev/null and b/crates/zed/resources/windows/bin/x64/OpenConsole.exe differdiff --git a/crates/zed/resources/windows/bin/x64/conpty.dll b/crates/zed/resources/windows/bin/x64/conpty.dllnew file mode 100644index 00000000000..555d6bf655aBinary files /dev/null and b/crates/zed/resources/windows/bin/x64/conpty.dll differ