-
Notifications
You must be signed in to change notification settings - Fork 1
/
macapp.sh
executable file
·25 lines (24 loc) · 1023 Bytes
/
macapp.sh
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
#!/bin/sh
APP="FileShare.app"
mkdir -p $APP/Contents/{MacOS,Resources}
go build -o $APP/Contents/MacOS/fileshare
cat > $APP/Contents/Info.plist << EOF
<?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>FileShare</string>
<key>CFBundleGetInfoString</key><string>share files internally</string>
<key>CFBundleIconFile</key><string>Archive</string>
<key>CFBundleIdentifier</key><string>sharefile.geekland.cc</string>
<key>CFBundlePackageType</key><string>APPL</string>
<key>CFBundleSignature</key><string>????</string>
<key>LSMinimumSystemVersion</key><string>10.13</string>
<key>NOTE</key><string>share files internally</string>
<key>NSPrincipalClass</key><string>NSApplication</string>
<key>LSUIElement</key><true/><key>NSSupportsAutomaticGraphicsSwitching</key><true/>
</dict>
</plist>
EOF
cp icon/Archive.png $APP/Contents/Resources/Archive.png
find $APP