fix: build-deb.sh 显示完整 CMake 错误并预检构建依赖

- 新增 run_step 辅助函数:成功时仅显示末尾 3 行,失败时打印完整输出,
  解决原 | tail -3 管道吞掉 find_package 关键错误、用户无法定位缺包问题
- 新增 [1/6] 构建依赖预检:用 dpkg -s 检查 qt6-base-dev /
  qt6-declarative-dev / libdtkcommon-dev / libdde-shell-dev,缺失时
  直接给出 sudo apt install 命令并退出,步骤编号顺延为 [1/6]~[6/6]
- README 新增「构建依赖」小节:完整 apt install 命令 + 依赖包与
  find_package 对照表 + 运行时无需 -dev 包说明,删除原一句话提示
This commit is contained in:
2026-07-20 20:12:53 +08:00
parent 959371c236
commit ef37fbbcbf
2 changed files with 66 additions and 9 deletions
+18 -1
View File
@@ -19,7 +19,24 @@ QML 前端渲染界面,实时显示当前网卡的上行/下行速率与累计
## 构建与安装
需要配置期存在 `DDEShell` CMake 包(来自 `dde-shell` 开发包)。
### 构建依赖
构建需要以下开发包:
```sh
sudo apt install build-essential cmake pkg-config qt6-base-dev qt6-declarative-dev libdtkcommon-dev libdde-shell-dev
```
各包与 CMake `find_package` 的对应关系:
| 依赖包 | 提供 | 对应 CMake find_package |
|---|---|---|
| qt6-base-dev | Qt6 Core / DBus / Network | Qt6 Core DBus Network |
| qt6-declarative-dev | Qt6 Quick | Qt6 Quick |
| libdtkcommon-dev | Dtk6 Core | Dtk6 Core |
| libdde-shell-dev | DDEShell | DDEShell |
> 运行时仅需 `dde-shell` 及 Qt6/Dtk6 运行库,上述 `-dev` 包仅构建时需要。
### 方式一:从源码安装