chore(release): bump version to 1.3.4-8 (Beta) + fcitx5 路径抓取/安装前缀修复

v1.3.4-7 显示:fcitx5 包名替换后构建本身已成功([100%] Built target openless),
但下一步立刻 exit 1。根因有两个:

1) cmake -LA 抓不到值
   fcitx5 5.0.14 把 FCITX_INSTALL_ADDONDIR / FCITX_INSTALL_PKGDATADIR
   设为普通变量而非 CACHE,cmake -LA 看不到 → grep 退码 1 → set -e -o pipefail
   触发整步退出。
   改从 configure 阶段 message(STATUS ...) 的输出抓(CMakeLists.txt 已经打印)。

2) CMAKE_INSTALL_PREFIX 默认 /usr/local 路径错
   fcitx5 在 Ubuntu 上运行时只扫 /usr/lib/<arch>/fcitx5/,默认 prefix=/usr/local
   会让 .deb 把插件安到 /usr/local/lib/fcitx5/,运行时找不到。
   显式 -DCMAKE_INSTALL_PREFIX=/usr 强制 Debian 系标准路径。
   历史 v1.3.4-3 其实也是这条 bug 路径,只是 cmake -LA 那行先挂掉没人意识到。

提取失败时打印 cmake-configure.log 末 50 行作为诊断。
This commit is contained in:
baiqing committed 2026-05-18 21:34:38 +08:00
1 parent 9bae92b4df
commit bd5dcb8a57
6 files changed
+24 -14

No files matched your search

+18 -8
View File
@@ -376,15 +376,25 @@ jobs:
exit 1
fi
mkdir -p build && cd build
cmake .. 2>&1
# 显式 CMAKE_INSTALL_PREFIX=/usr:fcitx5 在 Ubuntu 上的运行时插件搜索
# 路径是 /usr/lib/<arch>/fcitx5/,默认 prefix=/usr/local 会让 .deb 把
# 插件安到 /usr/local/lib/fcitx5/,fcitx5 永远找不到。
# 历史上 v1.3.4-3 也是这条 bug 路径,只是 cmake -LA 那行先挂掉,没人意识到。
cmake .. -DCMAKE_INSTALL_PREFIX=/usr 2>&1 | tee cmake-configure.log
make
# 从 cmake 缓存中读出 distro 实际的插件安装路径(multiarch 感知)。
FCITX_ADDON_DIR=$(cmake -LA . 2>/dev/null \
| grep "^FCITX_INSTALL_ADDONDIR:" \
| cut -d= -f2)
FCITX_PKGDATA_DIR=$(cmake -LA . 2>/dev/null \
| grep "^FCITX_INSTALL_PKGDATADIR:" \
| cut -d= -f2)
# v1.3.4-7 暴露:fcitx5 5.0.14 把 FCITX_INSTALL_* 设为普通变量而非 CACHE,
# `cmake -LA` 抓不到 → grep 退码 1 → set -e -o pipefail 整步退出。
# 改从 configure 阶段 message(STATUS ...) 的输出抓(CMakeLists.txt 已经打印)。
FCITX_ADDON_DIR=$(grep "FCITX_INSTALL_ADDONDIR:" cmake-configure.log \
| tail -1 | sed -E 's/^[^:]*: ([^ ]+).*/\1/')
FCITX_PKGDATA_DIR=$(grep "FCITX_INSTALL_PKGDATADIR:" cmake-configure.log \
| tail -1 | sed -E 's/^[^:]*: ([^ ]+).*/\1/')
if [ -z "$FCITX_ADDON_DIR" ] || [ -z "$FCITX_PKGDATA_DIR" ]; then
echo "::error::Failed to extract FCITX_INSTALL_* paths from cmake configure log"
echo "--- cmake-configure.log (last 50 lines) ---"
tail -50 cmake-configure.log
exit 1
fi
echo "Detected: addon=$FCITX_ADDON_DIR pkgdata=$FCITX_PKGDATA_DIR"
echo "FCITX_ADDON_DIR=$FCITX_ADDON_DIR" >> "$GITHUB_ENV"
echo "FCITX_ADDON_CONF_DIR=${FCITX_PKGDATA_DIR}/addon" >> "$GITHUB_ENV"
+2 -2
View File
@@ -1,12 +1,12 @@
{
"name": "openless-app",
"version": "1.3.4-7",
"version": "1.3.4-8",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "openless-app",
"version": "1.3.4-7",
"version": "1.3.4-8",
"dependencies": {
"@tauri-apps/api": "^2.1.1",
"@tauri-apps/plugin-autostart": "^2.5.1",
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "openless-app",
"private": true,
"version": "1.3.4-7",
"version": "1.3.4-8",
"type": "module",
"scripts": {
"dev": "vite",
+1 -1
View File
@@ -3666,7 +3666,7 @@ dependencies = [
[[package]]
name = "openless"
version = "1.3.4-7"
version = "1.3.4-8"
dependencies = [
"anyhow",
"arboard",
+1 -1
View File
@@ -1,6 +1,6 @@
[package]
name = "openless"
version = "1.3.4-7"
version = "1.3.4-8"
description = "OpenLess — local voice input that types where your cursor is"
authors = ["OpenLess"]
edition = "2021"
+1 -1
View File
@@ -1,7 +1,7 @@
{
"$schema": "https://schema.tauri.app/config/2",
"productName": "OpenLess",
"version": "1.3.4-7",
"version": "1.3.4-8",
"identifier": "com.openless.app",
"build": {
"beforeDevCommand": "npm run dev",