Files
WhisperDictate/macos/Makefile
hariel1985 51438ea1bb Major update: bundled whisper-cli, model downloader, progress indicator
Features:
- whisper-cli and dependencies bundled in app (no brew required for users)
- Built-in model downloader with 5 model options (Tiny to Large)
- Download progress indicator (e.g., "45% Downloading Small")
- Model selection dropdown in Settings
- First-run wizard for initial model download

Security fixes:
- Input validation for language and model path
- Private temp directory for audio files
- Auto-cleanup of audio files after transcription
- Auto-detect whisper-cli path (ARM/Intel)

Bug fixes:
- Fixed Settings window crash (NSWindowController)
- Fixed model selection with tag-based indexing

Build:
- bundle-whisper.sh script for packaging whisper-cli
- Updated Makefile with Frameworks bundling

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-02 14:09:36 +01:00

56 sor
1.6 KiB
Makefile

# WhisperDictate macOS Build
APP_NAME = WhisperDictate
APP_BUNDLE = $(APP_NAME).app
VERSION = 1.1.0
# Directories
SRC_DIR = src
BUILD_DIR = build
BUNDLE_DIR = $(APP_BUNDLE)/Contents
# Compiler settings
SWIFT = swiftc
SWIFT_FLAGS = -O -framework Cocoa -framework AVFoundation -framework Carbon -framework CoreGraphics -framework ServiceManagement
.PHONY: all clean build bundle install run dmg
all: build
build: $(BUILD_DIR)/$(APP_NAME)
@echo "✓ Build complete"
$(BUILD_DIR)/$(APP_NAME): $(SRC_DIR)/main.swift
@mkdir -p $(BUILD_DIR)
@mkdir -p $(BUNDLE_DIR)/MacOS
@mkdir -p $(BUNDLE_DIR)/Resources
@mkdir -p $(BUNDLE_DIR)/Frameworks
$(SWIFT) $(SWIFT_FLAGS) -o $(BUNDLE_DIR)/MacOS/$(APP_NAME) $(SRC_DIR)/main.swift
@cp $(APP_BUNDLE)/Contents/Info.plist $(BUNDLE_DIR)/ 2>/dev/null || true
@./bundle-whisper.sh
@touch $(BUILD_DIR)/$(APP_NAME)
@echo "✓ Built $(APP_BUNDLE)"
clean:
rm -rf $(BUILD_DIR)
rm -rf $(BUNDLE_DIR)/MacOS/$(APP_NAME)
rm -rf $(BUNDLE_DIR)/MacOS/whisper-cli
rm -rf $(BUNDLE_DIR)/Frameworks/*.dylib
@echo "✓ Cleaned"
install: build
@rm -rf /Applications/$(APP_BUNDLE)
@cp -R $(APP_BUNDLE) /Applications/
@codesign --force --deep --sign - /Applications/$(APP_BUNDLE)
@echo "✓ Installed to /Applications/$(APP_BUNDLE)"
run: build
@./$(BUNDLE_DIR)/MacOS/$(APP_NAME) &
@echo "✓ Running $(APP_NAME)"
dmg: build
@rm -f $(APP_NAME)-$(VERSION).dmg
@codesign --force --deep --sign - $(APP_BUNDLE)
@hdiutil create -volname "$(APP_NAME)" -srcfolder $(APP_BUNDLE) -ov -format UDZO $(APP_NAME)-$(VERSION).dmg
@echo "✓ Created $(APP_NAME)-$(VERSION).dmg"