Files
mqttx/gpui-app/build.rs
T
JoeAllen a9c92e0974 feat: 任务栏图标嵌入、窗口置顶钉子与进程资源采样
- build.rs + embed-resource 嵌入 icon.ico:gpui 从 exe 资源 ID 1
  加载窗口类图标,此前缺失导致任务栏显示系统默认图标
- 标题栏新增钉子按钮:sysmon::set_topmost 经 raw-window-handle
  取 HWND 调 SetWindowPos(HWND_TOPMOST),Pin/PinOff 图标随状态切换
- sysmon 模块:CPU 时间差分、工作集/峰值/提交内存、线程/句柄采样
  与运行时长基准(Windows 实现,其余平台返回空采样)
2026-09-29 17:00:59 +08:00

16 lines
651 B
Rust
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
//! 构建脚本:向 exe 嵌入窗口图标资源。
//!
//! gpui-pre-windows 注册窗口类时从 exe 资源 ID 1 加载图标
//! (`LoadImageW(module, MAKEINTRESOURCE(1), IMAGE_ICON, ...)`),
//! 缺失时任务栏与资源管理器显示系统默认图标。
fn main() {
if std::env::var("CARGO_CFG_TARGET_OS").as_deref() == Ok("windows") {
println!("cargo:rerun-if-changed=resources/app.rc");
println!("cargo:rerun-if-changed=resources/icon.ico");
embed_resource::compile("resources/app.rc", embed_resource::NONE)
.manifest_required()
.expect("嵌入窗口图标资源失败");
}
}