mirror of
https://github.com/Darkatse/TauriTavern.git
synced 2026-10-12 23:08:22 +00:00
The tauri, wry, tao and plugins forks merge Tauri 2.12.3, wry 0.57.0, tao 0.37.1 and the 2026-10-10 plugin releases, so they satisfy the versions the app declares again. Tao now comes from a fork as well: tauri-apps/tao has no OpenHarmony branch for 0.37. Pin the Darkatse branches until LeenHawk merges them. Validation: x86_64 debug HAP on the API 26 emulator, installed over the 2.11.6 build: storage survives the upgrade and a force stop; chat save beyond the frame budget, chunked upload and fs 2.7 reads, native and <input> file pickers, clipboard, opener, fullscreen and back, keyboard resize and system bar strips. Pending: aarch64 and devices. |
||
|---|---|---|
| .. | ||
| ci | ||
| guardrails | ||
| ohos | ||
| build-portable.mjs | ||
| check-first-party-ui-guardrails.mjs | ||
| check-frontend-guardrails.mjs | ||
| check-logging-boundaries.mjs | ||
| check-platform-identity.mjs | ||
| check-rust-crate-boundaries.mjs | ||
| export-sillytavern-migration.ps1 | ||
| export-sillytavern-migration.sh | ||
| generate-ios-app-icon-variants.swift | ||
| install-linux.sh | ||
| ios-opaque-app-icons.swift | ||
| ios-policy.mjs | ||
| README.md | ||
| tauri-app.mjs | ||
| tauri-before-build.mjs | ||
| tauri-dev-server.mjs | ||
| tauri-ios-xcode-script.sh | ||
Scripts
这个目录存放仓库内的开发、构建、迁移导出与 CI 辅助脚本。
Linux 一键安装
install-linux.sh 为 Debian 12+、Ubuntu 22.04 LTS+、Fedora 与 openSUSE Leap 16.0 配置签名软件源,并安装或更新 TauriTavern:
curl -fsSL https://get.tauritavern.com/linux.sh | sh
使用 Canary 渠道:
curl -fsSL https://get.tauritavern.com/linux.sh \
| sh -s -- --channel canary
NixOS 会自动使用项目 flake;其他已经安装 Nix 的 Linux 可显式选择 Nix:
curl -fsSL https://get.tauritavern.com/linux.sh \
| sh -s -- --method nix
Nix 安装进入当前用户 profile,不使用 sudo,也不修改 /etc/nix/nix.conf。脚本使用 POSIX sh 语法,可由 sh、Dash、Bash 或 Zsh 执行。运行前可先下载并检查内容,或使用 --dry-run 查看识别结果和执行计划:
curl -fsSL \
https://get.tauritavern.com/linux.sh \
-o install-tauritavern.sh
sh install-tauritavern.sh --dry-run
原生软件源安装会核对完整的 OpenPGP 主密钥和签名子密钥指纹。Nix 安装接受项目 flake 声明的 binary cache;multi-user Nix 仍要求 daemon 预先信任该 cache,否则可能回退到本地构建。
SillyTavern 迁移导出
这两个脚本会交互式生成一个可直接导入 TauriTavern data-migration 扩展的 zip:
- 自动检测当前目录是否为 SillyTavern 根目录
- 可选是否导出
data/default-user/backups - 自动将
public/scripts/extensions/third-party映射到data/extensions/third-party - 提供明显的压缩进度提示
一键执行
一键执行需要在可交互终端中运行;脚本通过终端读取选项,避免与 curl | sh 的脚本输入流冲突。
Unix / macOS / Linux / Termux:
curl -fsSL https://get.tauritavern.com/export.sh | sh
Windows PowerShell:
iex (iwr 'https://get.tauritavern.com/export.ps1').Content
本地执行
Unix / macOS / Linux / Termux:
sh scripts/export-sillytavern-migration.sh
Windows PowerShell:
powershell -ExecutionPolicy Bypass -File .\scripts\export-sillytavern-migration.ps1
目录说明
Flatpak 构建配方位于 packaging/flatpak/,软件源发布工具位于
distribution/。
install-linux.sh通过受支持的 APT/RPM 软件源或 Nix flake 安装 TauriTavern。export-sillytavern-migration.sh面向 Unix/macOS/Linux/Termux 的 SillyTavern 迁移导出脚本。export-sillytavern-migration.ps1面向 Windows PowerShell 的 SillyTavern 迁移导出脚本。build-portable.mjs构建 Tauri portable 二进制,并将产物复制到指定输出目录。对应pnpm run tauri:build:portable。tauri-before-build.mjs统一生成 Tauri 打包所需的前端 bundle;pnpm 启动入口也复用它以覆盖移动端 IDE 构建。tauri-dev-server.mjs为tauri dev提供轻量静态前端服务器、页面刷新通道与开发态 Service Worker 会话 bootstrap。静态文件通过@parcel/watcher的原生事件监听,Rspack 依赖在成功重编译后刷新。check-frontend-guardrails.mjs校验前端宿主层文件规模和依赖边界,避免 Host Kernel 持续膨胀。对应pnpm run check:frontend。tauri-ios-xcode-script.sh包装tauri ios xcode-script,补齐 Xcode GUI 构建环境中的 PATH / Node / pnpm,并在构建后处理 iOS 图标。generate-ios-app-icon-variants.swift从src-tauri/crates/tauritavern/icons/icon.png生成 iOSAny/Dark/Tinted三个 1024px App Icon 源图。ios-policy.mjsiOS Dev/Build 包装脚本:为构建过程注入TAURITAVERN_IOS_POLICY_PROFILE,并在ios_internal_full/ios_external_beta构建时自动使用--export-method app-store-connect。ios-opaque-app-icons.swift校验 iOS App Icon appearance 变体,并只将基础Any图标展平为不透明背景,供tauri-ios-xcode-script.sh调用。ci/setup-macos-signing.shGitHub Actions / CI 中的 macOS 签名初始化脚本,用于导入证书、创建 keychain 与写入 Apple API Key 路径。ci/verify-release-version.mjs校验 Stable Release tag 与前端、Cargo、Tauri、Cargo lock 和 Nix 包版本一致。ci/collect-release-assets.mjs校验必需的跨平台构建产物,并按 Stable 与 Canary 共用的用户可见命名契约收集 Release 资产。实验性的鸿蒙 HAP 是可选产物,存在时才收集。ci/distribute-testflight.mjs等待 App Store Connect 处理指定 iOS 构建,写入What to Test,关联公开外测组,并按当前状态提交 Beta App Review。ohos/鸿蒙实验构建:prepare.py在一次性 checkout 中准备钉住的框架栈,env.sh设置交叉编译环境,validate-hap.py校验 HAP。流程见docs/OpenHarmonyDevelopment.md§3。guardrails/frontend-lines-baseline.jsoncheck-frontend-guardrails.mjs使用的基线数据文件,文件行数硬性限制指标。
维护约定
- 面向最终用户的一次性脚本,优先保持交互友好、依赖少、失败直出。
- 面向仓库内部的脚本,优先通过
pnpmscript 或 CI 调用,不额外扩散入口。 - 如果修改迁移导出脚本涉及归档结构,请同步确认它仍符合当前
data-migration导入器的data/...契约。