zed/crates/cli/Cargo.toml
Zyl0812 9155bf4e17
Some checks are pending
Congratsbot / check-author (push) Waiting to run
Congratsbot / congrats (push) Blocked by required conditions
deploy_nightly_docs / deploy_docs (push) Waiting to run
run_tests / orchestrate (push) Waiting to run
run_tests / check_style (push) Waiting to run
run_tests / clippy_windows (push) Blocked by required conditions
run_tests / clippy_linux (push) Blocked by required conditions
run_tests / clippy_mac (push) Blocked by required conditions
run_tests / clippy_mac_x86_64 (push) Blocked by required conditions
run_tests / run_tests_windows (push) Blocked by required conditions
run_tests / run_tests_linux (push) Blocked by required conditions
run_tests / run_tests_mac (push) Blocked by required conditions
run_tests / doctests (push) Blocked by required conditions
run_tests / check_workspace_binaries (push) Blocked by required conditions
run_tests / build_visual_tests_binary (push) Blocked by required conditions
run_tests / check_wasm (push) Blocked by required conditions
run_tests / check_dependencies (push) Blocked by required conditions
run_tests / check_docs (push) Blocked by required conditions
run_tests / check_licenses (push) Blocked by required conditions
run_tests / check_scripts (push) Blocked by required conditions
run_tests / check_postgres_and_protobuf_migrations (push) Blocked by required conditions
run_tests / extension_tests (push) Blocked by required conditions
run_tests / tests_pass (push) Blocked by required conditions
Fix Windows icon resource for bin zed.exe (#54738)
## Summary

Fixes the missing Windows icon and version resource metadata for the
executable installed as `bin\zed.exe`.

On Windows, the bundling process builds `cli.exe` and installs it as
`bin\zed.exe`. The root `Zed.exe` already embeds the Zed Windows icon
and version metadata through `crates/zed/build.rs`, but the CLI
executable did not embed equivalent Windows resources.

As a result, Windows integrations that discover or display Zed through
`bin\zed.exe` may show a missing/default application icon.

This change adds Windows resource embedding to the `cli` crate and uses
the same release-channel icon selection as the main Zed executable.

Fixes #51154

## Testing

- Built the Windows CLI executable:

  ```powershell
cargo build --release --package cli --target x86_64-pc-windows-msvc
--locked --offline
  ```

- Verified `target\x86_64-pc-windows-msvc\release\cli.exe` contains:

  - `FileDescription = Zed`
  - `ProductName = Zed`

- Verified the executable displays the Zed icon in Windows Explorer.

- Confirmed the Windows bundling script installs `cli.exe` as
`bin\zed.exe`.

- Started a full Windows bundle build and confirmed it passed license
generation and progressed into executable builds. The local full bundle
build could not be completed because the machine is missing the VS
Spectre-mitigated C++ libraries.

## Release Notes

- N/A

## Notes

This change is limited to Windows executable resource metadata for the
CLI binary. It does not change Zed runtime behavior.

---------

Co-authored-by: John Tur <john-tur@outlook.com>
2026-05-01 22:33:54 +00:00

57 lines
1.1 KiB
TOML

[package]
name = "cli"
version = "0.1.0"
edition.workspace = true
publish.workspace = true
license = "GPL-3.0-or-later"
[lints]
workspace = true
[lib]
path = "src/cli.rs"
doctest = false
[[bin]]
name = "cli"
path = "src/main.rs"
[features]
no-bundled-uninstall = []
default = []
[dependencies]
anyhow.workspace = true
askpass.workspace = true
clap.workspace = true
collections.workspace = true
console.workspace = true
dialoguer.workspace = true
ipc-channel = "0.19"
parking_lot.workspace = true
paths.workspace = true
release_channel.workspace = true
serde.workspace = true
util.workspace = true
tempfile.workspace = true
rayon.workspace = true
walkdir = "2.5"
[dev-dependencies]
serde_json.workspace = true
util = { workspace = true, features = ["test-support"] }
[target.'cfg(any(target_os = "linux", target_os = "freebsd"))'.dependencies]
exec.workspace = true
fork.workspace = true
[target.'cfg(target_os = "macos")'.dependencies]
core-foundation.workspace = true
core-services = "0.2"
plist = "1.3"
[target.'cfg(target_os = "windows")'.dependencies]
windows.workspace = true
[build-dependencies]
windows_resources = { path = "../windows_resources" }