Files
TalkBox/scripts/build-server.sh
T
Labyricorn b8815e94ea
CI / frontend-quality (push) Canceled after 0s
rebrand: rename VoiceBox to TalkBox throughout codebase
- All 'voicebox'/'Voicebox'/'VOICEBOX' strings replaced with 'talkbox'/'TalkBox'/'TALKBOX'
- Port changed from 17493 to 17494 (avoids conflict with upstream VoiceBox)
- MCP tool namespace: voicebox.* -> talkbox.*
- App bundle ID: sh.voicebox.app -> com.talkbox.app
- Binary names: voicebox-server -> talkbox-server, voicebox-mcp -> talkbox-mcp
- Docker user/group: voicebox -> talkbox
- Database: voicebox.db -> talkbox.db
- Env vars: VOICEBOX_* -> TALKBOX_*
- Asset files renamed: voicebox-logo.* -> talkbox-logo.*, etc.
- External binaries in tauri.conf.json updated to talkbox-server/talkbox-mcp
2026-08-24 19:45:56 -07:00

48 lines
1.3 KiB
Bash

#!/bin/bash
# Build Python server binary for all platforms
set -e
# Determine platform
PLATFORM=$(rustc --print host-tuple 2>/dev/null || echo "unknown")
echo "Building TalkBox sidecars for platform: $PLATFORM"
# Build Python binary
# Resolve PATH to absolute paths before changing directory
export PATH="$(cd "$(dirname "$0")/.." && pwd)/backend/venv/bin:$PATH"
cd backend
# Check if PyInstaller is installed
if ! python -c "import PyInstaller" 2>/dev/null; then
echo "Installing PyInstaller..."
python -m pip install pyinstaller
fi
# Create binaries directory if it doesn't exist
mkdir -p ../tauri/src-tauri/binaries
copy_sidecar() {
local name="$1"
if [ -f "dist/${name}" ]; then
cp "dist/${name}" "../tauri/src-tauri/binaries/${name}-${PLATFORM}"
chmod +x "../tauri/src-tauri/binaries/${name}-${PLATFORM}"
echo "Built ${name}-${PLATFORM}"
elif [ -f "dist/${name}.exe" ]; then
cp "dist/${name}.exe" "../tauri/src-tauri/binaries/${name}-${PLATFORM}.exe"
echo "Built ${name}-${PLATFORM}.exe"
else
echo "Error: ${name} binary not found in dist/"
exit 1
fi
}
python build_binary.py
copy_sidecar talkbox-server
python build_binary.py --shim
copy_sidecar talkbox-mcp
echo "Build complete!"