brand: 品牌统一为 TSP — 应用名/图标(浅色圆角卡, Windows/macOS 双平台)对齐 brand 资产, README 新增官网入口与标题行内嵌 logo

This commit is contained in:
shy3130
2026-10-05 18:45:09 +08:00
parent af63614610
commit b23db4ecd7
11 changed files with 92 additions and 208 deletions
+18 -29
View File
@@ -46,7 +46,7 @@ jobs:
# 2) 项目依赖 polars, 而 polars 自 1.33 起移除了 macOS x86_64 原生 wheel
# (改 py3-none-any), 在 arm64 runner 上经 Rosetta 无法产出可运行的 x64 包。
# runner 用 macos-26 (2026-02 GA, 免费, arm64 原生, SDK 更新)。
ALL='[{"os":"windows-latest","artifact":"TickFlowStockPanel-Setup-x64.exe","platform":"windows"},{"os":"macos-26","artifact":"TickFlowStockPanel-macos-arm64.dmg","platform":"macos","arch":"arm64"},{"os":"ubuntu-latest","artifact":"TickFlowStockPanel-linux-x64.tar.gz","platform":"linux"}]'
ALL='[{"os":"windows-latest","artifact":"TSP-Setup-x64.exe","platform":"windows"},{"os":"macos-26","artifact":"TSP-macos-arm64.dmg","platform":"macos","arch":"arm64"},{"os":"ubuntu-latest","artifact":"TSP-linux-x64.tar.gz","platform":"linux"}]'
# 按 input 过滤平台 (macos → arm64 单项)
python3 -c "
import json, sys
@@ -115,21 +115,10 @@ jobs:
working-directory: backend
run: uv pip install pyinstaller
- name: 生成 macOS 图标 (仅 macOS)
if: matrix.platform == 'macos'
# icon.ico 已入库 (Windows 直接用), 但 icon.icns 未入库 (macOS 专用产物)。
# 用 generate_icon.py 现场生成, 否则 spec 第 37 行 BUNDLE 会因找不到图标而崩。
# 注意: Pillow 不是 backend 的运行时依赖 (它属于 backtest 的 matplotlib 链),
# --no-dev --extra desktop 不装它, 故需在此显式安装 (仅图标生成需要)。
working-directory: backend
run: |
uv pip install pillow
uv run python ../packaging/generate_icon.py
- name: 打包 (PyInstaller)
# 在 backend 目录跑 (用该目录的 venv: pywebview/polars 等依赖)。
# 产物输出到 backend/dist/ (PyInstaller 默认路径), 与 packaging/tickflow.iss
# 第 78 行的 Source 路径 (..\backend\dist\TickFlowStockPanel\*) 保持一致。
# 第 78 行的 Source 路径 (..\backend\dist\TSP\*) 保持一致。
# SPECPATH 由 spec 文件位置决定 (packaging/tickflow.spec → 项目根),
# 与 cwd 无关, 故 frontend/dist、tiers.yaml 等相对路径仍正确。
working-directory: backend
@@ -139,7 +128,7 @@ jobs:
if: matrix.platform == 'windows'
shell: pwsh
run: |
$runtimeRoot = 'backend/dist/TickFlowStockPanel/_internal'
$runtimeRoot = 'backend/dist/TSP/_internal'
$required = @(
'_polars_runtime_32/_polars_runtime.pyd',
'_polars_runtime_compat/_polars_runtime.pyd'
@@ -164,7 +153,7 @@ jobs:
echo "版本号: $ver"
ISCC.exe "/DMyAppVersion=$ver" packaging/tickflow.iss
# 把生成的 Setup.exe 移到工作区根 (Release 上传用)
Move-Item packaging/Output/TickFlowStockPanel-Setup-$ver.exe ${{ matrix.artifact }} -Force
Move-Item packaging/Output/TSP-Setup-$ver.exe ${{ matrix.artifact }} -Force
shell: pwsh
- name: 生成 DMG (macOS)
@@ -183,19 +172,19 @@ jobs:
--window-pos 200 120 \
--window-size 600 400 \
--icon-size 100 \
--icon "TickFlowStockPanel.app" 175 190 \
--icon "TSP.app" 175 190 \
--app-drop-link 425 190 \
--hide-extension "TickFlowStockPanel.app" \
--hide-extension "TSP.app" \
--skip-jenkins \
--no-internet-enable \
"${{ matrix.artifact }}" \
backend/dist/TickFlowStockPanel.app
backend/dist/TSP.app
- name: 压缩产物 (Linux)
if: matrix.platform == 'linux'
run: |
cd backend/dist
tar -czf ../../${{ matrix.artifact }} TickFlowStockPanel
tar -czf ../../${{ matrix.artifact }} TSP
- name: 上传产物为构建产物 (备查)
uses: actions/upload-artifact@v4
@@ -218,16 +207,16 @@ jobs:
| 平台 | 文件 | 下载 |
| :--- | :--- | :--- |
| **Windows x64** | `TickFlowStockPanel-Setup-x64.exe` | [⬇️ 立即下载](https://github.com/${{ github.repository }}/releases/download/${{ github.event.inputs.version }}/TickFlowStockPanel-Setup-x64.exe) |
| **macOS (Apple Silicon / M 系列芯片)** | `TickFlowStockPanel-macos-arm64.dmg` | [⬇️ 立即下载](https://github.com/${{ github.repository }}/releases/download/${{ github.event.inputs.version }}/TickFlowStockPanel-macos-arm64.dmg) |
| **Linux** | `TickFlowStockPanel-linux-x64.tar.gz` | [⬇️ 立即下载](https://github.com/${{ github.repository }}/releases/download/${{ github.event.inputs.version }}/TickFlowStockPanel-linux-x64.tar.gz) |
| **Windows x64** | `TSP-Setup-x64.exe` | [⬇️ 立即下载](https://github.com/${{ github.repository }}/releases/download/${{ github.event.inputs.version }}/TSP-Setup-x64.exe) |
| **macOS (Apple Silicon / M 系列芯片)** | `TSP-macos-arm64.dmg` | [⬇️ 立即下载](https://github.com/${{ github.repository }}/releases/download/${{ github.event.inputs.version }}/TSP-macos-arm64.dmg) |
| **Linux** | `TSP-linux-x64.tar.gz` | [⬇️ 立即下载](https://github.com/${{ github.repository }}/releases/download/${{ github.event.inputs.version }}/TSP-linux-x64.tar.gz) |
> 💡 点击「立即下载」直接获取, 无需滚动到底部附件区。
> 🍎 **macOS 仅提供 Apple Silicon (M 系列芯片) 版本**: 点左上角 → "关于本机", 看"芯片"一项是否为 Apple; Intel 芯片 Mac 暂不支持 (上游 polars 已停止发布 Intel wheel)。
### 📋 使用说明
- **Windows**: 下载后双击运行, 按安装向导操作(无需管理员权限), 自动创建桌面/开始菜单快捷方式
- **macOS**: 双击 dmg 打开, 将 TickFlowStockPanel 拖入 Applications 文件夹; 首次启动需右键→打开(绕过 Gatekeeper)
- **macOS**: 双击 dmg 打开, 将 TSP 拖入 Applications 文件夹; 首次启动需右键→打开(绕过 Gatekeeper)
- **Linux**: 解压后运行可执行文件
- 数据存储在安装目录下的 `data/` 子文件夹, 卸载重装不丢数据
- 内置 Polars 兼容内核, 新老 CPU (无 AVX2) 均可运行
@@ -253,9 +242,9 @@ jobs:
mkdir -p assets && cd assets
# 只拉已知的三个安装包 (latest.json 自身等其他资产不进清单)
gh release download "$TAG" --repo "$GITHUB_REPOSITORY" \
--pattern 'TickFlowStockPanel-Setup-x64.exe' \
--pattern 'TickFlowStockPanel-macos-arm64.dmg' \
--pattern 'TickFlowStockPanel-linux-x64.tar.gz' \
--pattern 'TSP-Setup-x64.exe' \
--pattern 'TSP-macos-arm64.dmg' \
--pattern 'TSP-linux-x64.tar.gz' \
--clobber || true
cd ..
RELEASE_JSON=$(gh api "repos/$GITHUB_REPOSITORY/releases/tags/$TAG")
@@ -269,9 +258,9 @@ jobs:
# 资产文件名 → 渠道名 (客户端按渠道取下载地址)
channels_cfg = {
"TickFlowStockPanel-Setup-x64.exe": "windows",
"TickFlowStockPanel-macos-arm64.dmg": "macos-arm64",
"TickFlowStockPanel-linux-x64.tar.gz": "linux-x64",
"TSP-Setup-x64.exe": "windows",
"TSP-macos-arm64.dmg": "macos-arm64",
"TSP-linux-x64.tar.gz": "linux-x64",
}
by_name = {a["name"]: a for a in rel.get("assets", [])}