Files
karuo-ai/02_卡人(水)/水溪_整理归档/语音输入/脚本/build_package_windows.sh
Manus AI a145e2eec3 feat: 东京服务器系统级VPN部署完成(IKEv2+L2TP+WG)
- 服务器 lhins-3zqfts83 通过腾讯云TAT安装 strongSwan 5.9.13 + xl2tpd
- 三种VPN协议已全部就绪: IKEv2(系统原生)/L2TP-IPSec(系统原生)/WireGuard
- UDP 500/4500/1701 端口本地nc可达验证通过
- macOS 接入操作手册已生成

Co-Authored-By: Claude <noreply@anthropic.com>
2026-07-26 11:26:45 +08:00

112 lines
4.0 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
# 打包 Handy中文语音 Windows 安装包zip在 Mac 上亦可执行打包)
set -euo pipefail
HERE="$(cd "$(dirname "$0")" && pwd)"
SKILL_DIR="$(cd "${HERE}/.." && pwd)"
ROOT="$(cd "${SKILL_DIR}/.." && pwd)"
SCRIPTS="${ROOT}/脚本"
DATE="$(date +%Y%m%d)"
KUAI="${HOME}/Documents/卡若Ai的文件夹"
TOOL_ROOT="${KUAI}/4、火_工具开发/工具/Handy中文语音"
PKG_NAME="Handy中文语音-安装包-Windows-v1.1"
PKG_DIR="${TOOL_ROOT}/${PKG_NAME}"
ZIP="${TOOL_ROOT}/Handy中文语音_Windows_安装包_${DATE}.zip"
mkdir -p "${PKG_DIR}/脚本"
cp "${SKILL_DIR}/SKILL.md" "${PKG_DIR}/"
cp "${SKILL_DIR}/references/Handy设置界面速查_Windows.md" "${PKG_DIR}/使用说明.md"
cp "${HERE}/handy_download_sensevoice.ps1" "${PKG_DIR}/脚本/"
cp "${HERE}/handy_apply_chinese_windows.ps1" "${PKG_DIR}/脚本/"
cp "${SCRIPTS}/handy_install_windows.ps1" "${PKG_DIR}/脚本/"
cp "${SCRIPTS}/handy_apply_chinese_windows.py" "${PKG_DIR}/脚本/"
cp "${SCRIPTS}/handy_paste_or_karuo_agent.bat" "${PKG_DIR}/脚本/"
KARUO_AI="${HOME}/Documents/个人/卡若AI"
cp "${KARUO_AI}/运营中枢/工作台/脚本/karuo_voice_agent_plugin.py" "${PKG_DIR}/脚本/"
cp "${HERE}/setup_voice_agent_plugin.ps1" "${PKG_DIR}/脚本/"
cp "${SKILL_DIR}/references/语音唤醒卡若AI.md" "${PKG_DIR}/"
cat > "${PKG_DIR}/脚本/install_all.ps1" << 'PS1'
$ErrorActionPreference = "Stop"
$Here = Split-Path -Parent $MyInvocation.MyCommand.Path
Write-Host "=== Handy 中文语音 · Windows 安装包 ==="
& (Join-Path $Here "handy_install_windows.ps1")
& (Join-Path $Here "handy_download_sensevoice.ps1")
$cfg = Join-Path $env:APPDATA "com.pais.handy\settings_store.json"
if (-not (Test-Path $cfg)) {
$exe = "${env:ProgramFiles}\Handy\Handy.exe"
if (-not (Test-Path $exe)) { $exe = "${env:LocalAppData}\Programs\Handy\Handy.exe" }
if (Test-Path $exe) {
Start-Process $exe
Write-Host "首次运行:等待 15 秒生成配置…"
Start-Sleep -Seconds 15
Get-Process -Name "handy","Handy" -ErrorAction SilentlyContinue | Stop-Process -Force
Start-Sleep -Seconds 2
}
}
& (Join-Path $Here "handy_apply_chinese_windows.ps1")
Write-Host "可选: powershell -File .\脚本\setup_voice_agent_plugin.ps1"
Write-Host "完成。Handy 设置 → 语言 → 简体中文;按住 Ctrl+1 测试。"
PS1
cat > "${PKG_DIR}/卡若AI技能路径.txt" << EOF
卡若AI SkillG25b · Handy中文语音
/Users/karuo/Documents/个人/卡若AI/02_卡人/水溪_整理归档/语音输入/SKILL.md
Windows 安装包目录(五行 · 火 · 工具):
${TOOL_ROOT}/${PKG_NAME}/
EOF
cat > "${PKG_DIR}/README.md" << 'EOF'
# Handy 中文语音 · Windows 安装包 v1.0
## 系统要求
- Windows 10/11x64 或 ARM64
- 需 **Python 3**`python` 或 `py` 命令可用,用于写入中文配置)
- 网络(下载 Handy 安装包与 SenseVoice 模型)
## 用法
1. 解压本 zip
2. **右键「双击安装Handy中文语音.bat」→ 以管理员身份运行**(推荐,便于静默安装 Handy
3. 若 SmartScreen 拦截:更多信息 → 仍要运行
4. 安装结束后打开 Handy → **设置 → 语言 → 简体中文**
5. **按住 Ctrl+1** 说话,松开后粘贴中文
## 快捷键
**Ctrl+1**(按住说话,需开启 Push to talk
## 排障
见 `使用说明.md`卡若AI Skill`Handy中文语音/evolution/gotchas.md`
EOF
cat > "${PKG_DIR}/双击安装Handy中文语音.bat" << 'BAT'
@echo off
chcp 65001 >nul
cd /d "%~dp0"
echo Handy 中文语音 Windows 安装开始…
powershell -NoProfile -ExecutionPolicy Bypass -File ".\脚本\install_all.ps1"
echo.
pause
BAT
cat > "${PKG_DIR}/开始看这里.txt" << 'EOF'
Handy 中文语音 · Windows v1.0
1. 解压 zip
2. 右键「双击安装Handy中文语音.bat」→ 以管理员身份运行
3. 需已安装 Python 3
4. Handy 设置 → 语言 → 简体中文
5. 按住 Ctrl+1 说话
EOF
rm -f "$ZIP"
ditto -c -k --sequesterRsrc --keepParent "$PKG_DIR" "$ZIP"
echo "✓ Windows 安装包: ${PKG_DIR}"
echo "✓ Windows ZIP: ${ZIP}"