-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.sh
More file actions
executable file
·32 lines (28 loc) · 1.16 KB
/
Copy pathbuild.sh
File metadata and controls
executable file
·32 lines (28 loc) · 1.16 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
#!/usr/bin/env bash
set -e
echo "🔨 Building MacFileRelay (Mac 文件中转站) native binary..."
swiftc -O -target arm64-apple-macos13.0 \
-framework Cocoa \
-framework QuartzCore \
-framework QuickLookUI \
-framework QuickLookThumbnailing \
Sources/*.swift \
-o MacFileRelay
echo "📦 Packaging /Applications/MacFileRelay.app..."
mkdir -p /Applications/MacFileRelay.app/Contents/MacOS
mkdir -p /Applications/MacFileRelay.app/Contents/Resources
cp MacFileRelay /Applications/MacFileRelay.app/Contents/MacOS/
cp Resources/Info.plist /Applications/MacFileRelay.app/Contents/
if [ -f Resources/AppIcon.icns ]; then
cp Resources/AppIcon.icns /Applications/MacFileRelay.app/Contents/Resources/
fi
chmod +x /Applications/MacFileRelay.app/Contents/MacOS/MacFileRelay
# Refresh macOS Finder icon cache for the app
touch /Applications/MacFileRelay.app
echo "✅ Build and install complete!"
echo "🚀 Launching MacFileRelay.app..."
killall -9 MacFileRelay 2>/dev/null || true
killall -9 ShakeDrop 2>/dev/null || true
killall -9 NotchDrop 2>/dev/null || true
rm -rf /Applications/ShakeDrop.app /Applications/NotchDrop.app 2>/dev/null || true
open /Applications/MacFileRelay.app