-
Notifications
You must be signed in to change notification settings - Fork 19
Expand file tree
/
Copy pathcreate-installer.sh
More file actions
executable file
·102 lines (82 loc) · 2.89 KB
/
create-installer.sh
File metadata and controls
executable file
·102 lines (82 loc) · 2.89 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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
#!/bin/bash
# ClipPocket Installer Creation Script
# This script builds the app and creates a DMG installer
set -e # Exit on error
echo "🚀 Building ClipPocket..."
echo ""
# Check GitHub release status first (optional, but recommended)
if [ -f "./check-github-release.sh" ]; then
echo "🔍 Checking GitHub release status..."
if ./check-github-release.sh; then
echo ""
else
echo ""
echo "⚠️ Warning: GitHub release check failed"
echo " The update checker may not work properly"
echo ""
read -p "Continue anyway? (y/N): " -n 1 -r
echo ""
if [[ ! $REPLY =~ ^[Yy]$ ]]; then
echo "❌ Build cancelled"
exit 1
fi
fi
fi
# Clean build folder
rm -rf build
rm -rf ClipPocket-Installer.dmg
# Build the app in Release mode
xcodebuild -scheme ClipPocket \
-configuration Release \
-derivedDataPath build \
clean build
echo "✅ Build completed successfully!"
# Find the built app
APP_PATH="build/Build/Products/Release/ClipPocket.app"
if [ ! -d "$APP_PATH" ]; then
echo "❌ Error: Could not find built app at $APP_PATH"
exit 1
fi
echo "📦 Creating DMG installer..."
# Create a temporary directory for DMG contents
DMG_DIR="build/dmg"
mkdir -p "$DMG_DIR"
# Copy the app to the DMG directory
cp -R "$APP_PATH" "$DMG_DIR/"
# Create Applications symlink
ln -s /Applications "$DMG_DIR/Applications"
# Create a README file
cat > "$DMG_DIR/README.txt" << 'EOF'
ClipPocket - Your Smart Clipboard Manager
Installation:
1. Drag ClipPocket.app to the Applications folder
2. Open ClipPocket from your Applications folder
3. Follow the onboarding wizard to grant necessary permissions
4. Use ⌘⇧V (Cmd+Shift+V) to open ClipPocket anytime
Features:
• Smart clipboard history - Automatically saves everything you copy
• Type detection - Recognizes URLs, colors, code, files, images, JSON, and more
• File copying - Copy and paste file references directly from Finder
• Pin favorites - Keep frequently used items at your fingertips
• Quick search - Find anything instantly with powerful search
• Privacy first - All data stays local on your Mac, with incognito mode
• Keyboard shortcuts - Access with ⌘⇧V (Cmd+Shift+V)
• Auto updates - Automatic update checking with one-click installation
• Text transformations and quick actions
• Export/import clipboard history
For support, contact: shaneendhahd@gmail.com
EOF
# Create the DMG
echo "Creating DMG file..."
hdiutil create -volname "ClipPocket Installer" \
-srcfolder "$DMG_DIR" \
-ov -format UDZO \
"ClipPocket-Installer.dmg"
# Clean up
rm -rf "$DMG_DIR"
echo "✅ DMG created successfully: ClipPocket-Installer.dmg"
echo ""
echo "📦 Installer location: $(pwd)/ClipPocket-Installer.dmg"
echo "📏 File size: $(du -h ClipPocket-Installer.dmg | cut -f1)"
echo ""
echo "🎉 Done! You can now distribute ClipPocket-Installer.dmg"