Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
110 changes: 110 additions & 0 deletions .github/workflows/release-macos.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
name: Release macOS DMG

# 在 GitHub 的 Apple Silicon runner 上打 CommTool_v<版本>.dmg,并挂到已有的
# comm-v<版本> Release(Release 由 Windows 发版脚本先建好)。
# 幂等:Release 上已有同名 DMG 时直接跳过,不会 clobber,避免已写入
# latest.json 的 sha256_mac / size_mac 失效。latest.json 回写仍走人工提交。
on:
workflow_dispatch:
push:
paths:
- .github/workflows/release-macos.yml

permissions:
contents: write

concurrency:
group: release-macos
cancel-in-progress: false

jobs:
build-dmg:
name: Build + upload macOS DMG
runs-on: macos-14
timeout-minutes: 45
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v4

- name: Resolve version / release state
id: meta
run: |
VER=$(python3 -c "import re;print(re.search(r'__version__\s*=\s*\"([^\"]+)\"', open('src/version.py',encoding='utf-8').read()).group(1))")
TAG="comm-v$VER"
DMG="CommTool_v$VER.dmg"
echo "version=$VER" >> "$GITHUB_OUTPUT"
echo "tag=$TAG" >> "$GITHUB_OUTPUT"
echo "dmg=$DMG" >> "$GITHUB_OUTPUT"
if ! gh release view "$TAG" --repo "$GITHUB_REPOSITORY" --json tagName >/dev/null; then
echo "::error::Release $TAG 不存在;先跑 Windows 发版建 Release"
exit 1
fi
if gh release view "$TAG" --repo "$GITHUB_REPOSITORY" --json assets \
--jq '.assets[].name' | grep -Fxq "$DMG"; then
echo "::notice::$TAG 已有 $DMG,跳过打包与上传"
echo "skip=true" >> "$GITHUB_OUTPUT"
else
echo "skip=false" >> "$GITHUB_OUTPUT"
fi

- uses: actions/setup-python@v5
if: steps.meta.outputs.skip != 'true'
id: py
with:
python-version: "3.13"

- name: Build .app + .dmg
if: steps.meta.outputs.skip != 'true'
env:
COMMTOOL_BUILD_PYTHON: ${{ steps.py.outputs.python-path }}
PIP_INDEX: https://pypi.org/simple
run: bash scripts/build_macos.sh --dmg

- name: Smoke launch (offscreen)
if: steps.meta.outputs.skip != 'true'
env:
QT_QPA_PLATFORM: offscreen
run: |
file dist/CommTool.app/Contents/MacOS/CommTool
dist/CommTool.app/Contents/MacOS/CommTool > smoke.log 2>&1 &
PID=$!
sleep 20
if ! kill -0 "$PID" 2>/dev/null; then
echo "::error::CommTool 启动 20 s 内退出"
cat smoke.log
exit 1
fi
kill "$PID" || true
wait "$PID" 2>/dev/null || true
cat smoke.log

- name: Upload DMG to release
if: steps.meta.outputs.skip != 'true'
run: |
cp dist/CommTool.dmg "dist/${{ steps.meta.outputs.dmg }}"
shasum -a 256 "dist/${{ steps.meta.outputs.dmg }}"
stat -f '%z bytes' "dist/${{ steps.meta.outputs.dmg }}"
gh release upload "${{ steps.meta.outputs.tag }}" \
"dist/${{ steps.meta.outputs.dmg }}" --repo "$GITHUB_REPOSITORY"
python3 scripts/check_mac_asset.py "${{ steps.meta.outputs.version }}" \
--repo "$GITHUB_REPOSITORY"

# Release 正文与 release.ps1 同源:docs/RELEASE_NOTES.md 全文。DMG 挂上后正文里的
# macOS 行随之变成下载文件名;只在发行说明确属当前版本时才同步。
- name: Sync release notes
run: |
if ! grep -Fq "${{ steps.meta.outputs.dmg }}" docs/RELEASE_NOTES.md; then
echo "::notice::docs/RELEASE_NOTES.md 未列出 ${{ steps.meta.outputs.dmg }},不改 Release 正文"
exit 0
fi
gh release edit "${{ steps.meta.outputs.tag }}" --repo "$GITHUB_REPOSITORY" \
--notes-file docs/RELEASE_NOTES.md

- name: Keep DMG as workflow artifact
if: steps.meta.outputs.skip != 'true'
uses: actions/upload-artifact@v4
with:
name: ${{ steps.meta.outputs.dmg }}
path: dist/${{ steps.meta.outputs.dmg }}
retention-days: 14
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -670,7 +670,7 @@ python -c "import base64, textwrap; b64 = '\n'.join(textwrap.wrap(base64.b64enco
- **v68 (v1.8.0)**: **正式版** — **SEGGER J-Link RTT**(器件目录选择窗、SWD/JTAG、速度/通道/控制块搜索、可选复位、探针 SN 选择与安全自动回退);DLL 访问串行化、控制块等待提示、RTT 运行期错误反馈;三语文档与示例工程同步。Windows / macOS / Linux x86_64 已发。
- **v69 (v1.8.1)**: 侧栏图钉自动隐藏、悬停浮层与布局记忆;修复快速扫过误展开和切换工作台后浮层回弹。Windows Setup / onefile 发布,macOS / Linux 新版待补包。
- **v70 (v1.8.2)**: **正式版** — **弹窗全面主题化**(删除预设确认、帧构造器/Modbus 主机/脚本控制台命名输入、8 窗口上限提示全部换主题化对话框,跟随语言与主题);**发送框粘贴只取纯文本**(不再带入网页/Word 的富文本格式)。Windows Setup / onefile 发布,macOS / Linux 新版待补包。1807 collected 全量通过。
- **v71 (v1.8.3)**: **正式版** — **启动提速**(启动按已存主题只应用一次样式、全局事件过滤器对无关事件直接放行、RTT 器件表枚举推迟到主窗口首帧之后);安装版启动到首帧约 1.35 s → 1.03 s(上次停在 RTT 约 1.69 s → 1.03 s),界面外观不变。Windows Setup / onefile 与 Linux x86_64 已发,macOS 新版待补包。1815 collected 全量通过。
- **v71 (v1.8.3)**: **正式版** — **启动提速**(启动按已存主题只应用一次样式、全局事件过滤器对无关事件直接放行、RTT 器件表枚举推迟到主窗口首帧之后);安装版启动到首帧约 1.35 s → 1.03 s(上次停在 RTT 约 1.69 s → 1.03 s),界面外观不变。Windows / macOS / Linux x86_64 已发。1815 collected 全量通过。

---

Expand Down
5 changes: 2 additions & 3 deletions docs/RELEASE_NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,15 @@

### 发布范围

- **Windows** 安装版、单文件版与 **Linux x86_64** 安装包已发布,tag 为 `comm-v1.8.3`。
- macOS(Apple Silicon)本版本待补包,更新清单暂不提供该平台的新版本自动下载地址。
- **Windows** 安装版、单文件版、**macOS(Apple Silicon)** DMG 与 **Linux x86_64** 安装包均已发布,tag 为 `comm-v1.8.3`。

## 下载

| 形式 | 文件 | 说明 |
|------|------|------|
| Windows 安装版 | `CommTool_Setup_v1.8.3.exe` | 推荐,向导安装 + 桌面快捷方式 |
| Windows 单文件版 | `CommTool_v1.8.3.exe` | 免安装,首次启动需要自解压 |
| macOS(Apple Silicon) | 待补包 | 本版本尚未提供 |
| macOS(Apple Silicon) | `CommTool_v1.8.3.dmg` | arm64 `.dmg`,拖入“应用程序”安装 |
| Linux(x86_64) | `CommTool_Setup_v1.8.3_linux_x86_64.run` | 免 sudo,默认 `~/.local/opt/CommTool`;glibc ≥ 2.27(Ubuntu 18.04+ / 多数麒麟) |

> Windows 10/11(64 位)无需安装 Python。旧版用户可通过「帮助 → 关于 → 检查更新」升级(国内优先走 Gitee,海外回退 GitHub)。RTT 功能仍需额外安装 SEGGER J-Link 驱动。
2 changes: 1 addition & 1 deletion docs/SCHEDULE.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

| 指标 | 数值 | 备注 |
|---|---|---|
| 发布版 | `comm-v1.8.3` | Windows Setup/onefile 与 Linux x86_64 `.run` 已发布;macOS 新版待补包;清单带 Windows / Linux `sha256` / `size` |
| 发布版 | `comm-v1.8.3` | Windows Setup/onefile、macOS DMG 与 Linux x86_64 `.run` 均已发布;清单带各平台 `sha256` / `size` |
| 测试 | **1815 collected** | 全量执行通过;Ruff 与编译检查通过 |
| `main_window.py` | ~13600 行 | S-2 55 knives **已收口**;壳层有意保留 |
| 最长函数 | `__init__` / 连接侧 | `apply_style` / `_apply_language` 已薄拆到 `app_style` / `i18n_ui` |
Expand Down
6 changes: 3 additions & 3 deletions docs/USAGE.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ On an empty terminal, use the **Quick start** bar for a Virtual loopback, a bund
- **RTT catalog after first paint** — when the last session was on RTT, the J-Link device catalog is enumerated only after the main window's first frame is drawn. If startup does not end on RTT, it is not enumerated; clicking **…** or changing the driver folder still enumerates immediately.
- **Measured** — installed build, launch to first frame drawn: about 1.35 s → 1.03 s typically, 1.69 s → 1.03 s when the last session was on RTT.
- **Compatibility** — the UI looks the same; no changes to connection protocols, RX/TX behavior, or the configuration format; no new dependencies.
- Windows Setup, onefile, and the Linux x86_64 `.run` are published; the macOS package for this version is pending.
- Windows Setup, onefile, the macOS Apple Silicon DMG, and the Linux x86_64 `.run` are all published.

## What's New in v1.8.2

Expand Down Expand Up @@ -1078,7 +1078,7 @@ A: Writes are append-only — even hundreds of MB stay smooth. **Max Lines** onl

## Install (Windows / macOS / Linux)

Download from [GitHub Releases](https://github.com/heropml/SerialTool/releases). Current Windows and Linux release is **v1.8.3**. Windows Setup is also on [Gitee](https://gitee.com/heropml/SerialTool/releases/tag/comm-v1.8.3); Gitee does not host the Mac or Linux packages. macOS remains on v1.8.0 until a new package is published.
Download from [GitHub Releases](https://github.com/heropml/SerialTool/releases). Current Windows, macOS, and Linux release is **v1.8.3**. Windows Setup is also on [Gitee](https://gitee.com/heropml/SerialTool/releases/tag/comm-v1.8.3); Gitee does not host the Mac or Linux packages.

### Windows

Expand All @@ -1088,7 +1088,7 @@ Download from [GitHub Releases](https://github.com/heropml/SerialTool/releases).

### macOS

- **Apple Silicon** (arm64) only: download `CommTool_v1.8.0.dmg` from `comm-v1.8.0`
- **Apple Silicon** (arm64) only: download `CommTool_v1.8.3.dmg` from `comm-v1.8.3`
- Open the DMG and drag CommTool into **Applications**
- If macOS says the app is damaged (not notarized), run once:

Expand Down
6 changes: 3 additions & 3 deletions docs/使用說明.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@
- **RTT 器件表延後** — 上次停在 RTT 時,J-Link 器件表等主視窗首幀畫完再列舉;啟動結束時沒停在 RTT 則不列舉,點「…」或更換驅動目錄仍立即列舉。
- **實測效果** — 安裝版啟動到首幀畫完:一般約 1.35 s → 1.03 s,上次停在 RTT 約 1.69 s → 1.03 s。
- **相容性** — 介面外觀不變;不涉及連線協定、收發行為與設定格式;無新相依。
- **發布範圍** — Windows 安裝版、單檔版與 Linux x86_64 `.run` 已發布;macOS 新版待補包。
- **發布範圍** — Windows 安裝版、單檔版、macOS Apple Silicon DMG 與 Linux x86_64 `.run` 均已發布。

## ⭐ CommTool v1.8.2 彈窗主題化與貼上修復

Expand Down Expand Up @@ -1106,7 +1106,7 @@ A:寫入是追加模式,幾十 MB / 幾百 MB 都不會卡。「最大行數

## 6. 安裝與系統需求

安裝包從 [GitHub Releases](https://github.com/heropml/SerialTool/releases) 下載。目前 Windows 與 Linux 正式版 **v1.8.3**。國內也可從 [Gitee Release](https://gitee.com/heropml/SerialTool/releases/tag/comm-v1.8.3) 取 **Windows Setup**(Gitee 不放 Mac / Linux 包)。macOS 暫沿用 v1.8.0,新版待補包。
安裝包從 [GitHub Releases](https://github.com/heropml/SerialTool/releases) 下載。目前 Windows / macOS / Linux 正式版 **v1.8.3**。國內也可從 [Gitee Release](https://gitee.com/heropml/SerialTool/releases/tag/comm-v1.8.3) 取 **Windows Setup**(Gitee 不放 Mac / Linux 包)。

### Windows

Expand All @@ -1116,7 +1116,7 @@ A:寫入是追加模式,幾十 MB / 幾百 MB 都不會卡。「最大行數

### macOS

- 僅 **Apple Silicon**(arm64):從 `comm-v1.8.0` 下載 `CommTool_v1.8.0.dmg`
- 僅 **Apple Silicon**(arm64):從 `comm-v1.8.3` 下載 `CommTool_v1.8.3.dmg`
- 開啟 DMG,把 CommTool 拖進「應用程式」
- 若提示「已損壞,無法打開」(未公證),在終端執行一次:

Expand Down
6 changes: 3 additions & 3 deletions docs/使用说明.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@
- **RTT 器件表延后** — 上次停在 RTT 时,J-Link 器件表等主窗口首帧画完再枚举;启动结束时没停在 RTT 则不枚举,点「…」或更换驱动目录仍立即枚举。
- **实测效果** — 安装版启动到首帧画完:常规约 1.35 s → 1.03 s,上次停在 RTT 约 1.69 s → 1.03 s。
- **兼容性** — 界面外观不变;不涉及连接协议、收发行为与配置格式;无新依赖。
- **发布范围** — Windows 安装版、单文件版与 Linux x86_64 `.run` 已发布;macOS 新版待补包。
- **发布范围** — Windows 安装版、单文件版、macOS Apple Silicon DMG 与 Linux x86_64 `.run` 均已发布。

## ⭐ CommTool v1.8.2 弹窗主题化与粘贴修复

Expand Down Expand Up @@ -1138,7 +1138,7 @@ A:说明当前没有命中的行。先在「关键字高亮」里配好关键

## 9. 安装与系统要求

安装包从 [GitHub Releases](https://github.com/heropml/SerialTool/releases) 下载。当前 Windows 与 Linux 正式版 **v1.8.3**。国内也可从 [Gitee Release](https://gitee.com/heropml/SerialTool/releases/tag/comm-v1.8.3) 取 **Windows Setup**(Gitee 不放 Mac / Linux 包)。macOS 暂沿用 v1.8.0,新版待补包。
安装包从 [GitHub Releases](https://github.com/heropml/SerialTool/releases) 下载。当前 Windows / macOS / Linux 正式版 **v1.8.3**。国内也可从 [Gitee Release](https://gitee.com/heropml/SerialTool/releases/tag/comm-v1.8.3) 取 **Windows Setup**(Gitee 不放 Mac / Linux 包)。

### Windows

Expand All @@ -1148,7 +1148,7 @@ A:说明当前没有命中的行。先在「关键字高亮」里配好关键

### macOS

- 仅 **Apple Silicon**(arm64):从 `comm-v1.8.0` 下载 `CommTool_v1.8.0.dmg`
- 仅 **Apple Silicon**(arm64):从 `comm-v1.8.3` 下载 `CommTool_v1.8.3.dmg`
- 打开 DMG,把 CommTool 拖进「应用程序」
- 若提示「已损坏,无法打开」(未公证),在终端执行一次:

Expand Down
8 changes: 5 additions & 3 deletions latest.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
{
"version": "1.8.3",
"url": "https://gitee.com/heropml/SerialTool/releases/download/comm-v1.8.3/CommTool_Setup_v1.8.3.exe",
"url_mac": [],
"url_mac": [
"https://github.com/heropml/SerialTool/releases/download/comm-v1.8.3/CommTool_v1.8.3.dmg"
],
"url_linux": [
"https://github.com/heropml/SerialTool/releases/download/comm-v1.8.3/CommTool_Setup_v1.8.3_linux_x86_64.run"
],
"sha256": "8e0a5957ed2a4b584788b2e2a648d9482ac77632bdac3c0471439f080954d717",
"size": 48744602,
"sha256_mac": "",
"size_mac": 0,
"sha256_mac": "6b46baa6ab9ca8d7b5cf351234a4b4cc34468f06c97396264e7f74166a2cb49d",
"size_mac": 50024267,
"sha256_linux": "2a0c87ec5f7e6cfbb263965b7fb4afa748774400c160ff83ac7e08ed886d0c39",
"size_linux": 130058405,
"notes": "串口调试助手 / 网络调试工具:启动提速,窗口首帧更快画出"
Expand Down
Loading