tellme/Scripts/dev-build.sh
Felipe M. 7ba5895406
Complete Phase 3: Text injection with permissions management
- Implement text injection with paste method (NSPasteboard + ⌘V)
- Add typing fallback with Unicode support and keyboard layout respect
- Integrate secure input detection using IsSecureEventInputEnabled()
- Add comprehensive permission checking and management
- Create Permissions tab in preferences with status indicators
- Add permission onboarding flow for new users
- Implement automatic fallback between injection methods
- Add deep links to System Settings for permission grants
- Remove duplicate preferences menu item
- Create development build script for easier testing
- Update Phase 3 tasks as completed in TODO.md
2025-09-19 09:04:38 +02:00

66 lines
No EOL
2 KiB
Bash
Executable file

#!/bin/bash
# Development build script that creates a proper .app bundle for easier permission management
set -e
PROJECT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
BUILD_DIR="$PROJECT_DIR/.build"
DEV_APP_DIR="$BUILD_DIR/MenuWhisper-Dev.app"
echo "🔨 Building MenuWhisper for development..."
# Clean previous dev build
rm -rf "$DEV_APP_DIR"
# Build the executable
swift build -c debug
# Create app bundle structure
mkdir -p "$DEV_APP_DIR/Contents/MacOS"
mkdir -p "$DEV_APP_DIR/Contents/Resources"
# Copy executable
cp "$BUILD_DIR/arm64-apple-macosx/debug/MenuWhisper" "$DEV_APP_DIR/Contents/MacOS/MenuWhisper"
# Create Info.plist
cat > "$DEV_APP_DIR/Contents/Info.plist" << EOF
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleExecutable</key>
<string>MenuWhisper</string>
<key>CFBundleIdentifier</key>
<string>com.menuwhisper.dev</string>
<key>CFBundleName</key>
<string>MenuWhisper Dev</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleVersion</key>
<string>1.0.0-dev</string>
<key>CFBundleShortVersionString</key>
<string>1.0.0-dev</string>
<key>NSHighResolutionCapable</key>
<true/>
<key>LSUIElement</key>
<true/>
<key>NSMicrophoneUsageDescription</key>
<string>MenuWhisper needs microphone access to capture speech for transcription.</string>
</dict>
</plist>
EOF
# Copy resources if they exist
if [ -d "$PROJECT_DIR/Sources/App/Resources" ]; then
cp -r "$PROJECT_DIR/Sources/App/Resources/"* "$DEV_APP_DIR/Contents/Resources/" 2>/dev/null || true
fi
echo "✅ Development app bundle created at: $DEV_APP_DIR"
echo ""
echo "To run with proper permissions:"
echo "1. open '$DEV_APP_DIR'"
echo "2. Grant permissions in System Settings"
echo "3. Or run: '$DEV_APP_DIR/Contents/MacOS/MenuWhisper'"
echo ""
echo "The app bundle makes it easier to grant permissions in System Settings."