在 macOS 上安装 Liu Terminal。下载适用于 Apple Silicon 或 Intel 的 DMG,或通过 Homebrew 安装。
在 macOS 或 Linux 上安装 Liu — 从下载菜单获取打包版本,或在一分钟内从源代码编译。
从下载菜单获取打包版本(Apple Silicon / Intel 的 macOS .dmg、Linux .tar.gz),或使用包管理器:
# macOS (Homebrew)
brew install --cask calculusteam/liu/liu
# Arch (AUR)
paru -S liu-bin
# Debian/Ubuntu (PPA)
sudo add-apt-repository ppa:calculusteam/liu && sudo apt update && sudo apt install liu
# Fedora (COPR)
sudo dnf copr enable calculusteam/liu && sudo dnf install liu
这些包管理器命令对应的仓库可能并非每个版本都已发布。下面的可复现源码构建路径不依赖这些仓库。
macOS 版本已使用 Developer ID 签名并经 Apple 公证 — 打开 Liu.app 时不会出现 Gatekeeper 提示。
或通过脚本安装最新的签名版本(备用):
curl -fsSL https://raw.githubusercontent.com/calculusteam/liu/main/scripts/install.sh | bash
在仓库根目录中,构建辅助脚本会检测平台并默认选择 Release 基线:
./scripts/build.sh --yes # recommended non-interactive build
./scripts/build.sh --debug # Debug build
./scripts/build.sh --native # host CPU tuning
./scripts/build.sh --package # Release build + macOS DMG/Linux tarball
直接使用 CMake 的路径是:
cmake -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build -j$(sysctl -n hw.ncpu 2>/dev/null || nproc)
./build/Liu
libssh2 (由 CMake 选择系统库或内置构建)SQLite3、stb_truetype、stb_image 和 cJSON 已内置于 third_party/ 中 — 您无需单独安装它们。
brew install libssh2
git clone https://github.com/calculusteam/liu.git && cd liu
cmake -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build -j$(sysctl -n hw.ncpu)
./build/Liu
Release 构建添加 LTO 和 -O3。默认为可移植基线;若要在 x86_64 上使用 -march=native,向 cmake 传入 -DLIU_NATIVE_ARCH=ON(Apple arm64 使用 -mcpu=apple-m1)。调试构建请将 Release 换为 Debug。
sudo apt install cmake build-essential libssh2-1-dev
git clone https://github.com/calculusteam/liu.git && cd liu
cmake -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build -j$(nproc)
./build/Liu
Metal 后端在非 macOS 系统上会被跳过,您将获得 OpenGL 3.3 核心渲染器。如果要在 macOS 上强制使用 OpenGL,也可传递 -DUSE_METAL=OFF。
cmake -B build -DUSE_ASM=OFF # 跳过 SIMD 汇编
cmake -B build -DUSE_METAL=OFF # 在 macOS 上强制使用 OpenGL
cmake -B build -DUSE_LIBFUZZER=ON # 启用 libFuzzer 测试框架
cmake -B build -DLIU_NATIVE_ARCH=ON # tune Release for this CPU
cmake -B build -DLIU_BROWSER=OFF # disable the macOS WebKit browser
cmake -B build -DUSE_VENDORED_SSH_DEPS=OFF # use system SSH/crypto deps
cmake -B build -DAUTO_DOWNLOAD_SSH_DEPS=OFF # do not bootstrap missing macOS deps
单次顶层构建会在主应用旁边生成两个同级二进制文件:
cmake --build build --target liu-notify # 通知守护进程 + CLI
cmake --build build --target liu-history # 独立的代理历史 CLI
./scripts/build_macos_compat_deps.sh # 内置 libssh2 + OpenSSL
./scripts/package_macos_dmg.sh # 签名的 .app + DMG
Liu 自带终端条目,以便远程 Shell 能声明正确的功能 —— 真彩色、鼠标模式、括号粘贴、Mode 2026 同步输出、OSC 7/8/133。
tic -x liu.terminfo
English · Türkçe · 한국어 · Español · Deutsch · Italiano · Français · 日本語 · العربية