chore(linux): fcitx5 插件打包注入 + 清理 rdev 残留 + 声明系统依赖#546
Conversation
- fcitx5 插件改为打包时注入系统路径(inject-fcitx5-plugin.sh),不再运行时复制 - ensure_plugin_installed 改为纯版本检查,不做文件 I/O - 清理 hotkey/permissions/unicode_keystroke 中 rdev 相关注释和日志 - tauri.linux.conf.json 声明 deb/rpm 运行时依赖及 fcitx5 推荐 - prebuild 脚本自动复制插件文件供 Tauri resources 打包 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
PR Reviewer Guide 🔍(Review updated until commit 28ef332)Here are some key observations to aid the review process:
|
The prebuild script used bash syntax (mkdir, for, [ -f ]) which fails on Windows. Replace with a Node.js script that checks platform() and skips non-Linux, keeping the plugin copy logic only where it's needed. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- Remove `resources` from tauri.linux.conf.json — the .so/.conf files don't exist on CI (plugin is built separately), causing cargo check to fail with "resource path doesn't exist" - Simplify ensure_plugin_installed to just check system paths exist, no bundled comparison needed - Remove prebuild script and copy-plugin.mjs (no longer needed) - Remove plugin entries from .gitignore Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Persistent review updated to latest commit 2bd733e |
- RPM: use /usr/lib64/fcitx5/ (RPM 64-bit standard) instead of Debian multiarch path - AppImage: only support AppDir directory input, remove .AppImage file extraction which couldn't repack and would lose changes Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Persistent review updated to latest commit 0e5f90b |
Debian uses /usr/lib/x86_64-linux-gnu/fcitx5, RPM uses /usr/lib64/fcitx5, and some distros use /usr/lib/fcitx5. Check all three to avoid false alarms on non-Debian systems. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Persistent review updated to latest commit 71a3634 |
…ally - AppImage cannot work for fcitx5 plugin injection: fcitx5 runs on the host system and loads addons from host paths (/usr/lib/.../fcitx5). Files placed inside the AppImage mount are invisible to fcitx5. - For Debian, use dpkg-architecture to detect the multiarch triplet (x86_64-linux-gnu, aarch64-linux-gnu, etc.) instead of hardcoding. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Persistent review updated to latest commit f5bf1ff |
AppImage 不支持的原因AppImage 是自包含便携格式,没有"安装"步骤。fcitx5 作为 host 系统输入法框架,从 AppImage 挂载点内部无法加载插件 |
exit 0 on rpmrebuild failure produced a broken RPM silently. Use exit 1 and print to stderr so the CI pipeline catches it. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Persistent review updated to latest commit 28ef332 |
|
如果插件出现错误,我觉得很可能是正常方式无法安装,应该让用户手动安装 |
|
appimage老年是便携,但是现在必须安装插件,不符合appimage的初衷,fcitx插件现在有一些问题,我打算等这个pr合并后,明天晚上再改一下,现在如果openless返回错误,那么必须重启输入法才可以消除提示否则一直跟随焦点 |
User description
变更
fcitx5 插件:运行时复制 → 打包时注入
ensure_plugin_installed精简为版本检查(比对 bundled 与系统安装的.so文件大小),不做任何文件 I/Oscripts/inject-fcitx5-plugin.sh,支持 deb/rpm/AppImage,在打包后将.so+.conf注入系统 fcitx5 路径Library=libopenless(CMake 生成),由 fcitx5 自行搜索库路径清理 rdev 残留
hotkey.rs:移除模块文档和 Linux adapter 中的 rdev 相关注释和日志permissions.rs:移除 rdev 引用unicode_keystroke.rs:移除feedback_rdev_macos_trap.md引用声明 Linux 系统依赖
tauri.linux.conf.json为 deb/rpm 添加depends(libasound2, libdbus-1-3, libssl3, webkit2gtk, libsoup3)和recommends: fcitx5构建辅助
package.json添加prebuild脚本,自动复制 fcitx5 插件文件到src-tauri/供 Tauri resources 打包.gitignore忽略打包用的.so和.conf副本🤖 Generated with Claude Code
PR Type
Enhancement, Bug fix
Description
Move fcitx5 plugin installation to packaging
Simplify Linux plugin checks to path validation
Declare Linux runtime dependencies for bundles
Remove stale
rdev-related comments and referencesDiagram Walkthrough
File Walkthrough
hotkey.rs
Remove Linux rdev hotkey referencesopenless-all/app/src-tauri/src/hotkey.rs
rdevcaveats.linux_fcitx.rs
Replace runtime plugin copying with checksopenless-all/app/src-tauri/src/linux_fcitx.rs
HOME-based plugin copy routine..sois missing.permissions.rs
Clean up rdev permission commentsopenless-all/app/src-tauri/src/permissions.rs
rdevfrom Windows permission documentation.wording.
unicode_keystroke.rs
Trim obsolete macOS trap referencesopenless-all/app/src-tauri/src/unicode_keystroke.rs
feedback_rdev_macos_trap.mdmention.inject-fcitx5-plugin.sh
Add package-time fcitx5 injection scriptopenless-all/scripts/inject-fcitx5-plugin.sh
.deband.rpm.libopenless.soandopenless.confinto system fcitx5 paths.tauri.linux.conf.json
Declare Linux bundle runtime dependenciesopenless-all/app/src-tauri/tauri.linux.conf.json
fcitx5as a recommended package for Linux bundles.