Files
qingjian/apps/linux/scripts/package-install.sh
T
yenharvey 26c613c8ae feat(release): Linux 预编译包、三平台共用一个 Release、网盘链接
- Linux:apps/linux/scripts/package.sh 在 Ubuntu 26.04 上打 qingjian-<版本>-linux-x86_64.tar.gz(Server、Fcitx5 插件、产品数据、install.sh),与源码安装共用 files.py 的清单与校验;Linux 版本号对齐 0.1.4-dev
- release.yml:v<版本> 标签发三个平台,prepare 建草稿 → 各平台并行打包上传 → publish 合并摘要与构建信息后转正;有平台失败就停在草稿;单平台补丁仍可用 macos-v / windows-v / linux-v 标签
- CHANGELOG 版本标题下的「网盘:」行进 releases.json 的 mirrors 字段,GitHub Release 说明放在最前
2026-09-24 10:10:02 +08:00

29 lines
1.5 KiB
Bash
Executable File
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#!/usr/bin/env bash
# //! 预编译包的安装脚本(package.sh 放到包根目录的 install.sh):解开产品数据,装到用户目录;Server 由用户手动启动。
set -euo pipefail
here=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)
install_prefix="$HOME/.local"
while (($#)); do
case "$1" in
--prefix) install_prefix=${2:?--prefix 需要路径}; shift 2 ;;
--help) echo '用法:install.sh [--prefix 绝对用户目录]'; exit 0 ;;
*) echo "未知参数:$1" >&2; exit 2 ;;
esac
done
[[ "$install_prefix" = /* && "$install_prefix" != / ]] || { echo '需要非根绝对安装路径' >&2; exit 2; }
missing=()
for tool in python3 fcitx5; do
command -v "$tool" >/dev/null 2>&1 || missing+=("$tool")
done
if ((${#missing[@]})); then
echo "缺少依赖:${missing[*]}" >&2
echo 'Debian / Ubuntu:sudo apt install python3 fcitx5 fcitx5-frontend-gtk3 fcitx5-frontend-gtk4 fcitx5-frontend-qt6 fcitx5-config-qt' >&2
exit 1
fi
install_prefix=$(realpath -m -- "$install_prefix")
mkdir -p "$here/data/generated"
# 数据包在 macOS 上打,带 LIBARCHIVE.xattr 扩展头,GNU tar 会逐个警告
tar --warning=no-unknown-keyword -xzf "$here/target/release-data/qingjian-data.tar.gz" -C "$here/data/generated"
python3 "$here/files.py" install "$install_prefix" "$here" "$here/bin/qingjian-linux-server" "$here/lib/qingjian.so" false
printf '已安装。手动启动:%s/bin/qingjian-linux-server\n重启 Fcitx5,在配置工具取消“仅显示当前语言”后添加“青简”。\n' "$install_prefix"