-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.sh
More file actions
executable file
·59 lines (53 loc) · 1.63 KB
/
build.sh
File metadata and controls
executable file
·59 lines (53 loc) · 1.63 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
#!/bin/bash
set -e
cd "$(dirname "$0")"
echo "Building ThumbnailMaker..."
swift build
# Find the built binary
BINARY=$(find .build -path "*/debug/ThumbnailMaker" -not -path "*.dSYM*" -type f | head -1)
if [ -z "$BINARY" ]; then
echo "Error: Build binary not found"
exit 1
fi
echo "Creating .app bundle..."
APP_DIR="ThumbnailMaker.app/Contents"
mkdir -p "$APP_DIR/MacOS"
mkdir -p "$APP_DIR/Resources"
cp "$BINARY" "$APP_DIR/MacOS/ThumbnailMaker"
cp docs/AppIcon.icns "$APP_DIR/Resources/AppIcon.icns"
cat > "$APP_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>CFBundleExecutable</key>
<string>ThumbnailMaker</string>
<key>CFBundleIdentifier</key>
<string>com.nozium.thumbnail-maker</string>
<key>CFBundleName</key>
<string>Thumbnail Maker</string>
<key>CFBundleDisplayName</key>
<string>Thumbnail Maker</string>
<key>CFBundleIconFile</key>
<string>AppIcon</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>LSMinimumSystemVersion</key>
<string>14.0</string>
<key>NSHighResolutionCapable</key>
<true/>
<key>LSApplicationCategoryType</key>
<string>public.app-category.graphics-design</string>
</dict>
</plist>
PLIST
echo ""
echo "Build complete!"
echo " App: $(pwd)/ThumbnailMaker.app"
echo ""
echo "To run: open ThumbnailMaker.app"
echo "To install: cp -r ThumbnailMaker.app /Applications/"