feat(desktop): Linux/mac 桌面快捷方式 + 便携卸载器(对齐 Windows)

- lib.rs: ensure_desktop_shortcut 增加 Linux(写 .desktop 到 ~/Desktop 与
  ~/.local/share/applications)与 macOS(Desktop 软链 .app)实现;
  shortcut_should_ask/decide/maybe_setup_shortcut 放开到非 Windows
- 新增 desktop_release/scripts/linux/uninstall.sh 与 macos/uninstall.command:
  停 bundle 自有进程 → 删本 bundle 的快捷方式 → 删设置 → 清 WebKit/WKWebView
  数据 → 删 bundle 目录(作用域限定本 bundle,不动其他安装)
- CI: 将卸载脚本打入 Linux/mac 便携包顶层
- 已在 Ubuntu 24.04 真机验证: cargo build 通过、uninstall.sh 隔离测试通过
This commit is contained in:
yanghang committed 2026-06-22 02:00:14 +08:00
1 parent 9e7f8dc70a
commit eff7c83b8b
5 files changed
+261 -27

No files matched your search

@@ -283,6 +283,9 @@ jobs:
chmod +x "$PKG/GenericAgent.AppImage"
cp desktop_release/scripts/linux/install_linux.sh "$RUNTIME/install_linux.sh"
chmod +x "$RUNTIME/install_linux.sh"
# Uninstaller: top-level entry next to the AppImage.
cp desktop_release/scripts/linux/uninstall.sh "$PKG/uninstall.sh"
chmod +x "$PKG/uninstall.sh"
# Embedded Python (python-build-standalone, linux x86_64, 3.12 install_only).
PBS_URL="$(curl -fsSL -H "Authorization: Bearer $GH_TOKEN" https://api.github.com/repos/astral-sh/python-build-standalone/releases/latest \
@@ -479,6 +482,9 @@ jobs:
cp desktop_release/scripts/macos/install_macos.sh "$RUNTIME/install_macos.sh"
chmod +x "$RUNTIME/install_macos.sh"
# Uninstaller: double-clickable .command next to the .app.
cp desktop_release/scripts/macos/uninstall.command "$PKG/uninstall.command"
chmod +x "$PKG/uninstall.command"
# Embedded Python (python-build-standalone, macOS, 3.12 install_only; aarch64 preferred).
PBS_URL="$(python3 - <<'PY'