fix: WebSocket connection, global shortcut, and accessibility
- Add model query param to WebSocket URL (was causing handshake failure) - Suppress "connection lost" error on intentional disconnect - Fix shortcut recording with NSEvent local monitor - Add proper keycode-to-string mapping for shortcut display - Move app lifecycle to NSApplicationDelegate for reliable window management - Prompt for Accessibility permission on first launch - Add build-app.sh for proper .app bundle creation Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
602f97253c
commit
b57bec4273
7 changed files with 184 additions and 50 deletions
29
MyVoxtral/build-app.sh
Executable file
29
MyVoxtral/build-app.sh
Executable file
|
|
@ -0,0 +1,29 @@
|
|||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
APP_NAME="MyVoxtral"
|
||||
BUILD_DIR=".build/arm64-apple-macosx/debug"
|
||||
APP_BUNDLE="$BUILD_DIR/$APP_NAME.app"
|
||||
|
||||
# Build
|
||||
swift build
|
||||
|
||||
# Create .app bundle structure
|
||||
rm -rf "$APP_BUNDLE"
|
||||
mkdir -p "$APP_BUNDLE/Contents/MacOS"
|
||||
mkdir -p "$APP_BUNDLE/Contents/Resources"
|
||||
|
||||
# Copy binary
|
||||
cp "$BUILD_DIR/$APP_NAME" "$APP_BUNDLE/Contents/MacOS/$APP_NAME"
|
||||
|
||||
# Copy Info.plist
|
||||
cp "$APP_NAME/Info.plist" "$APP_BUNDLE/Contents/Info.plist"
|
||||
|
||||
# Add CFBundleExecutable to Info.plist
|
||||
/usr/libexec/PlistBuddy -c "Add :CFBundleExecutable string $APP_NAME" "$APP_BUNDLE/Contents/Info.plist" 2>/dev/null || true
|
||||
/usr/libexec/PlistBuddy -c "Add :CFBundleIdentifier string com.myvoxtral.app" "$APP_BUNDLE/Contents/Info.plist" 2>/dev/null || true
|
||||
/usr/libexec/PlistBuddy -c "Add :CFBundleName string $APP_NAME" "$APP_BUNDLE/Contents/Info.plist" 2>/dev/null || true
|
||||
/usr/libexec/PlistBuddy -c "Add :CFBundlePackageType string APPL" "$APP_BUNDLE/Contents/Info.plist" 2>/dev/null || true
|
||||
|
||||
echo "Built: $APP_BUNDLE"
|
||||
echo "Run with: open $APP_BUNDLE"
|
||||
Loading…
Add table
Add a link
Reference in a new issue