-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.sh
More file actions
57 lines (48 loc) · 1.65 KB
/
Copy pathinstall.sh
File metadata and controls
57 lines (48 loc) · 1.65 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#!/bin/bash
# Install LangAutoSwitcher as a macOS Input Method
#
# Input Methods live in ~/Library/Input Methods/
# After installing, log out and back in (or restart) for it to appear.
set -e
APP_NAME="LangAutoSwitcher.app"
BUILD_DIR="build/Debug"
INSTALL_DIR="$HOME/Library/Input Methods"
echo "=== LangAutoSwitcher Installer ==="
echo ""
# Check if built
if [ ! -d "$BUILD_DIR/$APP_NAME" ]; then
echo "App not found at $BUILD_DIR/$APP_NAME"
echo "Building first..."
xcodebuild -project LangAutoSwitcher.xcodeproj \
-target LangAutoSwitcher \
-configuration Debug \
-quiet build
fi
# Kill existing instance if running
echo "Stopping existing instance (if any)..."
killall LangAutoSwitcher 2>/dev/null || true
# Create install directory if needed
mkdir -p "$INSTALL_DIR"
# Remove old version
if [ -d "$INSTALL_DIR/$APP_NAME" ]; then
echo "Removing previous version..."
rm -rf "$INSTALL_DIR/$APP_NAME"
fi
# Copy new version
echo "Installing to $INSTALL_DIR/$APP_NAME ..."
cp -R "$BUILD_DIR/$APP_NAME" "$INSTALL_DIR/$APP_NAME"
echo ""
echo "Installed successfully!"
echo ""
echo "=== Next steps ==="
echo "1. Log out and log back in (or restart your Mac)"
echo " This is needed for macOS to discover the new input source."
echo ""
echo "2. Go to: System Settings → Keyboard → Input Sources → Edit..."
echo " Click '+', find 'LangAutoSwitcher' and add it."
echo ""
echo "3. Switch to it from the input menu in your menu bar (🌐 or flag icon)."
echo ""
echo "4. Start typing! English stays English, Bulgarian auto-converts to Cyrillic."
echo ""
echo "To uninstall: rm -rf '$INSTALL_DIR/$APP_NAME' and restart."