Skip to content

[codex] bootstrap Linux AppImage adaptation baseline#8

Draft
LittleFool1022 wants to merge 1 commit into
ZMGID:mainfrom
LittleFool1022:codex/linux-appimage-adaptation
Draft

[codex] bootstrap Linux AppImage adaptation baseline#8
LittleFool1022 wants to merge 1 commit into
ZMGID:mainfrom
LittleFool1022:codex/linux-appimage-adaptation

Conversation

@LittleFool1022

Copy link
Copy Markdown

合并意见

这份提交不是想声明 Kivio 已经具备通用 Linux x86_64 AppImage 发布能力,也不希望以“完整 Linux 支持”作为合并前提。

它更像是一份本机 Linux 针对性移植基线:在 Ubuntu 22.04.5 / X11 环境下,把当前能落地的 Linux 编译、运行、打包、能力边界和验证证据整理成一个可 review、可继续拆分的起点。若主线暂不适合直接采纳,也希望它能帮助项目尽快开始 Linux 版本适配讨论。

改进概要

  • 新增 Linux 平台能力边界,显式区分支持、降级和不支持能力。
  • 将截图捕获与 OCR 调度拆到平台端口,避免 Linux 继续走隐式失败路径。
  • Linux 下保留 RapidOCR 本地路线,System OCR 明确降级。
  • Lens 前端根据后端能力禁用未实现的 Linux 捕获手势,并显示不可用提示。
  • 增加 Linux AppImage 配置和 release workflow 的 Linux lane。
  • 增加 AppImage smoke telemetry,用于检查热键、托盘、窗口、Skills 和 Pyodide 资源。
  • 修复 Linux AppDir 中 headless kivio-code 的 bundled skills 路径解析。
  • 保留 Windows NSIS 发布路径,仅补充 Linux AppImage,不扩大为 macOS CI 适配。

适配详情

本次适配重点不是“一步到位支持所有 Linux 桌面环境”,而是先让 Linux 路径变得可编译、可打包、可观测、可继续演进。

已处理内容包括:

  • tauri.linux.conf.json:Linux 默认 bundle target 指向 AppImage。
  • release.yml:workflow_dispatch 增加 linux/all,Linux runner 使用 ubuntu-22.04 并安装 WebKitGTK/AppIndicator/rsvg/patchelf 依赖。
  • platform_capabilities.rs:向前端暴露 Linux 能力状态。
  • capture_port.rs:Linux region/window capture 目前显式 unsupported。
  • ocr_port.rs:Linux 保留 RapidOCR,System OCR 不伪装支持。
  • Lens.tsx 与 Settings:按能力状态展示 Linux 降级边界。
  • lib.rs:Linux/X11 启动前调用 XInitThreads(),并扩展桌面 smoke 输出。
  • skills/discover.rs:支持 AppImage AppDir 的 usr/binusr/lib/Kivio/skills 路径解析。

已验证环境

  • Ubuntu 22.04.5 LTS
  • kernel 6.8.0-40-generic
  • X11 session
  • AppImage smoke:热键注册、托盘、chat 窗口、Skills、Pyodide 资源均有日志证据
  • 真实 Ctrl+Shift+G smoke:触发后出现 Kivio 窗口路径,未复现 xcb crash

验证命令

  • ruby -e 'require "yaml"; YAML.load_file(".github/workflows/release.yml"); puts "release.yml YAML OK"'
  • npm run typecheck
  • npm test
  • cargo test --manifest-path src-tauri/Cargo.toml
  • git diff --check HEAD~1 HEAD

当前 rebase 到 ZMGID/main 后的结果:

  • npm run typecheck:exit 0
  • npm test:21 files passed,104 tests passed
  • cargo test --manifest-path src-tauri/Cargo.toml:1142 passed,0 failed,9 ignored
  • release.yml YAML OK
  • git diff --check HEAD~1 HEAD:no output

明确边界

  • 不声明 Wayland 已支持。
  • 不声明通用 Linux x86_64 AppImage 已完成。
  • 不声明 Linux 截图捕获已实现。
  • 不声明 GUI/AppImage OCR 捕获链路已完整打通。
  • 当前验证只代表本机 Ubuntu 22.04.5 / X11 路线。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant