Replies: 2 comments 5 replies
-
no, it is not supported |
Beta Was this translation helpful? Give feedback.
0 replies
-
almost, use this diff, change the path to whatever you have since I have just hardcoded it diff --git a/async_ossl/Cargo.toml b/async_ossl/Cargo.toml
index bd7d81b..ad87ebe 100644
--- a/async_ossl/Cargo.toml
+++ b/async_ossl/Cargo.toml
@@ -15,5 +15,5 @@ async-io = "2.3"
openssl = "0.10"
[target.'cfg(any(windows, target_os="macos"))'.dependencies]
-openssl = { version = "0.10", features=["vendored"] }
+openssl = { version = "0.10" }
diff --git a/wezterm-mux-server/build.rs b/wezterm-mux-server/build.rs
index 44c7b12..abdbf43 100644
--- a/wezterm-mux-server/build.rs
+++ b/wezterm-mux-server/build.rs
@@ -25,14 +25,39 @@ fn main() {
.unwrap();
drop(rcfile);
- // Obtain MSVC environment so that the rc compiler can find the right headers.
- // https://github.com/nabijaczleweli/rust-embed-resource/issues/11#issuecomment-603655972
let target = std::env::var("TARGET").unwrap();
- if let Some(tool) = cc::windows_registry::find_tool(target.as_str(), "cl.exe") {
- for (key, value) in tool.env() {
- std::env::set_var(key, value);
+
+ if target.contains("msvc") {
+ // MSVC-specific setup
+ if let Some(tool) = cc::windows_registry::find_tool(target.as_str(), "cl.exe") {
+ for (key, value) in tool.env() {
+ std::env::set_var(key, value);
+ }
+ }
+ embed_resource::compile(rcfile_name);
+ } else if target.contains("windows-gnu") {
+ // MinGW/MSYS2 setup
+ println!("cargo:rustc-link-search=E:/msys64/ucrt64/lib");
+ println!("cargo:rustc-link-search=E:/msys64/ucrt64/lib");
+ println!("cargo:rustc-link-lib=static=ssh");
+
+ // Use windres for resource compilation in MinGW environment
+ use std::process::Command;
+ let out_dir = std::env::var("OUT_DIR").unwrap();
+ let status = Command::new("windres")
+ .args(&[
+ rcfile_name.to_str().unwrap(),
+ &format!("{}/resource.o", out_dir),
+ ])
+ .status()
+ .expect("Failed to execute windres");
+
+ if !status.success() {
+ panic!("windres failed to compile resource file");
}
+
+ println!("cargo:rustc-link-search=native={}", out_dir);
+ println!("cargo:rustc-link-arg={}/resource.o", out_dir);
}
- embed_resource::compile(rcfile_name);
}
}
diff --git a/wezterm-ssh/Cargo.toml b/wezterm-ssh/Cargo.toml
index bea299a..f526ace 100644
--- a/wezterm-ssh/Cargo.toml
+++ b/wezterm-ssh/Cargo.toml
@@ -30,8 +30,8 @@ log = "0.4"
portable-pty = { version="0.8", path = "../pty" }
regex = "1"
smol = "2.0"
-ssh2 = {version="0.9.3", features=["openssl-on-win32"], optional = true}
-libssh-rs = {version="0.3.2", features=["vendored"], optional = true}
+ssh2 = {version="0.9.3", optional = true}
+libssh-rs = {version="0.3.2" , optional = true}
#libssh-rs = {path="../../libssh-rs/libssh-rs", features=["vendored"], optional = true}
thiserror = "1.0"
socket2 = "0.5" update your msys2 dependencies, it compiles everything except it's vendored harbuzz :(((
|
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
What Operating System(s) are you running on?
Windows
Which Wayland compositor or X11 Window manager(s) are you using?
No response
WezTerm version
I just cloned the repo from git
Ask your question!
I tried to build the wezterm in windows with msys2. what i did so far:
But it failed:
error: could not compile libssh2-sys (lib) due to 1 previous error
I tried to run
./get-deps
, but:This is the content of my /etc/os-release:
Beta Was this translation helpful? Give feedback.
All reactions