feat(linux): 选区读取集成进 fcitx5 插件(clipboard addon),删除外部工具依赖 (#961)
* feat(linux): 选区读取集成进 fcitx5 插件(clipboard addon),删除外部工具依赖 - openless 插件新增 GetSelectionText DBus 方法:直读 fcitx clipboard addon 的 PRIMARY 选区缓存(X11 XFIXES / Wayland data-control 统一维护),与 fcitx 剪贴板模块来源一致,不触碰用户剪贴板 - CMake 增加 Fcitx5::Module::Clipboard 依赖 - Rust 侧 selection 改走插件 GetSelectionText,删除 wl-paste/xclip/xsel 外部工具路径及 linux_selection_tools_missing 提醒机制(前端 selection_warning 状态机、i18n、测试一并删除) - acceptQaSessionEvent 的 idle 分支不再依赖 selection_warning 字段, 一律视为新会话 token(事件保序,语义等价) - 打字提问路径(QA 面板 / less-computer)不再 emit Polishing capsule: 回答在面板内可见,避免 Linux 输入法 auxDown 闪「✨ 润色中...」 (cherry picked from commit 384f8876a490cb3e8e992af05cdad33f2af6a8ec) * fix(linux): bundle and sync fcitx5 selection plugin (cherry picked from commit 7e8bf825c08f5e935c7a25746c121136d92b7926) * fix(linux): use DBus selection reader during validation (cherry picked from commit d13403343b08fe1b4070e0f0d2f219a0a69d363e) * refactor(linux): 收尾 PR 961 审查发现的小毛病 - capsule 反馈参数从裸 bool 改为具名枚举 CapsuleFeedback(Show/Hide): 语音/听写路径 Show、打字路径 Hide,调用点自文档化,避免将来误传 - AppImage 插件子路径提取为 APPIMAGE_PLUGIN_SUBDIR 常量并注明与 CI bundle.resources 的契约,避免三处硬编码静默失配 - selection.rs 移除文件级 Linux 大赦(lib.rs 的 crate 级兜底仍在), Duration import 按平台限定,消除 Linux unused 隐患 --------- Co-authored-by: Chris233 <h-chris233@outlook.com>
This commit is contained in:
1 parent
789c82051e
commit
33467a36ea
21 files changed
+587
-238
No files matched your search
@@ -101,6 +101,7 @@ jobs:
|
||||
libxdo-dev \
|
||||
patchelf \
|
||||
rpm \
|
||||
squashfs-tools \
|
||||
wget
|
||||
|
||||
- name: Install npm deps
|
||||
@@ -439,6 +440,8 @@ jobs:
|
||||
mkdir -p "$GITHUB_WORKSPACE/openless-all/app/src-tauri/linux-fcitx5-plugin"
|
||||
cp libopenless.so "$GITHUB_WORKSPACE/openless-all/app/src-tauri/linux-fcitx5-plugin/"
|
||||
cp openless.conf "$GITHUB_WORKSPACE/openless-all/app/src-tauri/linux-fcitx5-plugin/"
|
||||
test -s "$GITHUB_WORKSPACE/openless-all/app/src-tauri/linux-fcitx5-plugin/libopenless.so"
|
||||
test -s "$GITHUB_WORKSPACE/openless-all/app/src-tauri/linux-fcitx5-plugin/openless.conf"
|
||||
|
||||
- name: Build (Linux)
|
||||
if: matrix.platform == 'ubuntu-22.04'
|
||||
@@ -453,10 +456,15 @@ jobs:
|
||||
# ensure_plugin_installed() 自动安装到 ~/.local/ 下。
|
||||
# 插件 .so + .conf 由上一步 Build fcitx5 plugin 生成并复制到
|
||||
# src-tauri/linux-fcitx5-plugin/ 下。
|
||||
test -s src-tauri/linux-fcitx5-plugin/libopenless.so
|
||||
test -s src-tauri/linux-fcitx5-plugin/openless.conf
|
||||
cat > /tmp/tauri-linux-config.json << CONFIG_EOF
|
||||
{
|
||||
"bundle": {
|
||||
"resources": ["linux-fcitx5-plugin/libopenless.so"],
|
||||
"resources": [
|
||||
"linux-fcitx5-plugin/libopenless.so",
|
||||
"linux-fcitx5-plugin/openless.conf"
|
||||
],
|
||||
"linux": {
|
||||
"deb": {
|
||||
"depends": ["fcitx5", "fcitx5-module-dbus", "libdbus-1-3"],
|
||||
@@ -484,6 +492,21 @@ jobs:
|
||||
fi
|
||||
npm run tauri -- build --bundles deb,rpm,appimage --config "$CONFIG_FILE"
|
||||
|
||||
APPIMAGE_PATH=$(find src-tauri/target/release/bundle/appimage -maxdepth 1 -name '*.AppImage' -print -quit)
|
||||
if [ -z "$APPIMAGE_PATH" ]; then
|
||||
echo "::error::AppImage bundle was not produced"
|
||||
exit 1
|
||||
fi
|
||||
APPIMAGE_CONTENTS=$(unsquashfs -l "$APPIMAGE_PATH")
|
||||
if ! grep -Eq '(^|/)usr/lib/OpenLess/linux-fcitx5-plugin/libopenless\.so$' <<< "$APPIMAGE_CONTENTS"; then
|
||||
echo "::error::AppImage is missing usr/lib/OpenLess/linux-fcitx5-plugin/libopenless.so"
|
||||
exit 1
|
||||
fi
|
||||
if ! grep -Eq '(^|/)usr/lib/OpenLess/linux-fcitx5-plugin/openless\.conf$' <<< "$APPIMAGE_CONTENTS"; then
|
||||
echo "::error::AppImage is missing usr/lib/OpenLess/linux-fcitx5-plugin/openless.conf"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
- name: Disambiguate macOS updater bundle filename
|
||||
if: startsWith(matrix.platform, 'macos') && env.TAURI_SIGNING_PRIVATE_KEY != ''
|
||||
shell: bash
|
||||
|
||||
Reference in new issue
Block a user