Диктовка: нативный подчёркнутый черновик

This commit is contained in:
2026-07-29 15:09:17 +06:00
parent 5751743277
commit 81dc5db6e4
11 changed files with 607 additions and 21 deletions
+10
View File
@@ -3,6 +3,7 @@ set -euo pipefail
PROJECT_DIR=${0:A:h:h}
APP_DIR="$PROJECT_DIR/dist/WhisperKey.app"
INPUT_APP_DIR="$PROJECT_DIR/dist/WhisperKeyInput.app"
cd "$PROJECT_DIR"
swift build -c release
@@ -13,4 +14,13 @@ cp "$PROJECT_DIR/.build/release/WhisperKey" "$APP_DIR/Contents/MacOS/WhisperKey"
cp "$PROJECT_DIR/Resources/Info.plist" "$APP_DIR/Contents/Info.plist"
codesign --force --deep --sign - "$APP_DIR"
rm -rf "$INPUT_APP_DIR"
mkdir -p "$INPUT_APP_DIR/Contents/MacOS" "$INPUT_APP_DIR/Contents/Resources"
cp "$PROJECT_DIR/.build/release/WhisperKeyInput" "$INPUT_APP_DIR/Contents/MacOS/WhisperKeyInput"
cp "$PROJECT_DIR/Resources/InputMethod-Info.plist" "$INPUT_APP_DIR/Contents/Info.plist"
sips -s format tiff "$PROJECT_DIR/Resources/WhisperKeyInput.pbm" \
--out "$INPUT_APP_DIR/Contents/Resources/WhisperKeyInput.tiff" >/dev/null
codesign --force --deep --sign - "$INPUT_APP_DIR"
echo "$APP_DIR"
echo "$INPUT_APP_DIR"
+7
View File
@@ -6,6 +6,12 @@ PROJECT_DIR=${0:A:h:h}
ditto "$PROJECT_DIR/dist/WhisperKey.app" "/Applications/WhisperKey.app"
INPUT_METHOD_DIR="$HOME/Library/Input Methods"
mkdir -p "$INPUT_METHOD_DIR"
pkill -x WhisperKeyInput 2>/dev/null || true
ditto "$PROJECT_DIR/dist/WhisperKeyInput.app" "$INPUT_METHOD_DIR/WhisperKeyInput.app"
open -gja "$INPUT_METHOD_DIR/WhisperKeyInput.app"
LOGIN_AGENT_DIR="$HOME/Library/LaunchAgents"
LOGIN_AGENT="$LOGIN_AGENT_DIR/com.romanv.WhisperKey.plist"
mkdir -p "$LOGIN_AGENT_DIR"
@@ -16,3 +22,4 @@ launchctl bootstrap "gui/$(id -u)" "$LOGIN_AGENT"
open "/Applications/WhisperKey.app"
echo "Installed: /Applications/WhisperKey.app"
echo "Installed: $INPUT_METHOD_DIR/WhisperKeyInput.app"