Repository navigation
feat(windows): embed the MeshLLM icon in mesh-llm.exe - #3076
Conversation
Explorer, the taskbar and the Start menu entry install.ps1 adds showed the generic program icon. build.rs now writes a .res file from assets/mesh-llm.ico (the console's favicon: 16 to 128 px) and passes it to the MSVC linker, which takes compiled resources as input. No resource compiler and no new build dependency.
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
ndizazzo
left a comment
There was a problem hiding this comment.
The resource writer uses target-specific MSVC selection, writes only under OUT_DIR, and preserves the icon's five image entries with matching resource IDs. The icon matches the existing console asset. I found no blocking issue in the build and packaging paths. Static review and binary asset inspection only; Windows linking and Explorer rendering were not independently executed.
Why
mesh-llm.exehas no icon resource, so Explorer, the taskbar and the Start menu entry from #3045 show the generic program icon (screenshot 3 in #3045 (comment)).What
mesh/crates/mesh-llm/assets/mesh-llm.ico: a copy of the console favicon,mesh-llm-ui/public/meshllm-favicon.ico(same SHA-256), with 16, 32, 48, 64 and 128 px images. It lives in the crate socargo packagecarries it.build.rs, Windows MSVC only: writesmesh-llm-icon.resintoOUT_DIRfrom that file and passes it withcargo:rustc-link-arg-bins. The MSVC linker takes compiled resources as input, so there is no resource compiler call and no new build dependency. The.icodirectory becomes oneRT_GROUP_ICON(id 1, the first group, which Windows shows for the executable) pointing at oneRT_ICONper image. The GNU target keeps building without an icon, as before.Validation
Windows 11,
cargo build -p mesh-llm --bin mesh-llm --no-default-features --features dynamic-native-runtimeon 0deff3c:EnumResourceNameson the builtmesh-llm.exe: 1RT_GROUP_ICON, 5RT_ICON.System.Drawing.Icon.ExtractAssociatedIconreturns the MeshLLM jellyfish, not the generic icon.mesh-llm.exe --versionruns.cargo package -p mesh-llm --listincludesassets/mesh-llm.ico.cargo clippy -p mesh-llm --no-deps --no-default-features --features dynamic-native-runtime -- -D warnings: clean.Summary by CodeRabbit