mirror of
https://github.com/jamiepine/voicebox.git
synced 2026-09-18 06:10:43 -07:00
fix(mcp): bundle stdio shim sidecar
This commit is contained in:
+22
-16
@@ -6,7 +6,7 @@ set -e
|
||||
# Determine platform
|
||||
PLATFORM=$(rustc --print host-tuple 2>/dev/null || echo "unknown")
|
||||
|
||||
echo "Building voicebox-server for platform: $PLATFORM"
|
||||
echo "Building Voicebox sidecars for platform: $PLATFORM"
|
||||
|
||||
# Build Python binary
|
||||
# Resolve PATH to absolute paths before changing directory
|
||||
@@ -19,23 +19,29 @@ if ! python -c "import PyInstaller" 2>/dev/null; then
|
||||
python -m pip install pyinstaller
|
||||
fi
|
||||
|
||||
# Build binary
|
||||
python build_binary.py
|
||||
|
||||
# Create binaries directory if it doesn't exist
|
||||
mkdir -p ../tauri/src-tauri/binaries
|
||||
|
||||
# Copy binary with platform suffix
|
||||
if [ -f dist/voicebox-server ]; then
|
||||
cp dist/voicebox-server ../tauri/src-tauri/binaries/voicebox-server-${PLATFORM}
|
||||
chmod +x ../tauri/src-tauri/binaries/voicebox-server-${PLATFORM}
|
||||
echo "Built voicebox-server-${PLATFORM}"
|
||||
elif [ -f dist/voicebox-server.exe ]; then
|
||||
cp dist/voicebox-server.exe ../tauri/src-tauri/binaries/voicebox-server-${PLATFORM}.exe
|
||||
echo "Built voicebox-server-${PLATFORM}.exe"
|
||||
else
|
||||
echo "Error: Binary not found in dist/"
|
||||
exit 1
|
||||
fi
|
||||
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 voicebox-server
|
||||
|
||||
python build_binary.py --shim
|
||||
copy_sidecar voicebox-mcp
|
||||
|
||||
echo "Build complete!"
|
||||
|
||||
Reference in New Issue
Block a user