diff --git a/Cargo.lock b/Cargo.lock index 952e5a0f89834..f58ac4ff0f09e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1075,7 +1075,7 @@ dependencies = [ "smallvec", "smartstring", "textwrap", - "toml 0.7.6", + "toml", "tree-sitter", "unicode-general-category", "unicode-segmentation", @@ -1119,7 +1119,7 @@ dependencies = [ "serde", "tempfile", "threadpool", - "toml 0.7.6", + "toml", "tree-sitter", "which", ] @@ -1187,10 +1187,9 @@ dependencies = [ "tempfile", "tokio", "tokio-stream", - "toml 0.7.6", + "toml", "url", "which", - "winres", ] [[package]] @@ -1253,7 +1252,7 @@ dependencies = [ "slotmap", "tokio", "tokio-stream", - "toml 0.7.6", + "toml", "url", "which", ] @@ -2141,15 +2140,6 @@ dependencies = [ "tokio", ] -[[package]] -name = "toml" -version = "0.5.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4f7f0dd8d50a853a531c426359045b1998f04219d88799810762cd4ad314234" -dependencies = [ - "serde", -] - [[package]] name = "toml" version = "0.7.6" @@ -2610,15 +2600,6 @@ dependencies = [ "memchr", ] -[[package]] -name = "winres" -version = "0.1.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b68db261ef59e9e52806f688020631e987592bd83619edccda9c47d42cde4f6c" -dependencies = [ - "toml 0.5.11", -] - [[package]] name = "xtask" version = "23.10.0" @@ -2627,7 +2608,7 @@ dependencies = [ "helix-loader", "helix-term", "helix-view", - "toml 0.7.6", + "toml", ] [[package]] diff --git a/contrib/helix-256p.ico b/contrib/helix-icon-windows.lib similarity index 98% rename from contrib/helix-256p.ico rename to contrib/helix-icon-windows.lib index f95d653c37aff..faaf44ee87054 100644 Binary files a/contrib/helix-256p.ico and b/contrib/helix-icon-windows.lib differ diff --git a/contrib/helix-windows.rc b/contrib/helix-windows.rc new file mode 100644 index 0000000000000..864aeba321fed --- /dev/null +++ b/contrib/helix-windows.rc @@ -0,0 +1 @@ +APPICON ICON helix256p.ico \ No newline at end of file diff --git a/helix-term/Cargo.toml b/helix-term/Cargo.toml index f9c2b9df03ba6..4ff7fc0b1798c 100644 --- a/helix-term/Cargo.toml +++ b/helix-term/Cargo.toml @@ -81,10 +81,6 @@ crossterm = { version = "0.27", features = ["event-stream", "use-dev-tty"] } [build-dependencies] helix-loader = { path = "../helix-loader" } -[target.'cfg(windows)'.build-dependencies] -# winres to inject icon into Windows binary -winres = "0.1.12" - [dev-dependencies] smallvec = "1.11" indoc = "2.0.4" diff --git a/helix-term/build.rs b/helix-term/build.rs index f805c6c345449..7986cf8260066 100644 --- a/helix-term/build.rs +++ b/helix-term/build.rs @@ -1,5 +1,3 @@ -extern crate winres; - use helix_loader::grammar::{build_grammars, fetch_grammars}; fn main() { @@ -9,8 +7,6 @@ fn main() { .expect("Failed to compile tree-sitter grammars"); } if cfg!(target_os = "windows") { - let mut res = winres::WindowsResource::new(); - res.set_icon("../contrib/helix-256p.ico"); - res.compile().unwrap(); + println!("cargo:rustc-link-lib=./contrib/helix-icon-windows"); } }