-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild_app.sh
More file actions
executable file
·72 lines (64 loc) · 1.86 KB
/
Copy pathbuild_app.sh
File metadata and controls
executable file
·72 lines (64 loc) · 1.86 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
#!/bin/bash
set -e
echo "🔨 Building SnapText.app bundle..."
APP_NAME="SnapText"
APP_DIR="$APP_NAME.app"
CONTENTS_DIR="$APP_DIR/Contents"
MACOS_DIR="$CONTENTS_DIR/MacOS"
RESOURCES_DIR="$CONTENTS_DIR/Resources"
# Clean old bundle
rm -rf "$APP_DIR"
# Create directory structure
mkdir -p "$MACOS_DIR"
mkdir -p "$RESOURCES_DIR"
# Copy binary
echo "📦 Copying binary..."
cp target/release/snaptext "$MACOS_DIR/$APP_NAME"
chmod +x "$MACOS_DIR/$APP_NAME"
# Copy icon
echo "🎨 Copying assets..."
cp assets/tray_icon.png "$RESOURCES_DIR/AppIcon.png"
# Create Info.plist
echo "📝 Creating Info.plist..."
cat > "$CONTENTS_DIR/Info.plist" << PLIST
<?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>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>$APP_NAME</string>
<key>CFBundleIdentifier</key>
<string>com.snaptext.app</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$APP_NAME</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>0.1.0</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>LSMinimumSystemVersion</key>
<string>10.15</string>
<key>LSUIElement</key>
<true/>
<key>NSHighResolutionCapable</key>
<true/>
</dict>
</plist>
PLIST
echo "✅ $APP_DIR created successfully!"
echo ""
echo "📍 Location: $(pwd)/$APP_DIR"
echo ""
echo "🚀 To use:"
echo " 1. Double-click $APP_DIR to launch"
echo " 2. Go to System Settings → Privacy & Security → Accessibility"
echo " 3. Click '+' and add '$APP_NAME'"
echo " 4. Toggle it ON"
echo ""
echo "Or move to Applications:"
echo " sudo mv $APP_DIR /Applications/"