22 lines
826 B
Bash
Executable File
22 lines
826 B
Bash
Executable File
#!/bin/sh
|
|
set -eu
|
|
cd "$(dirname "$0")"
|
|
swift build -c release
|
|
APP_DIR="$PWD/build/DP-Link.app"
|
|
mkdir -p "$APP_DIR/Contents/MacOS"
|
|
cp .build/release/DPLink "$APP_DIR/Contents/MacOS/DPLink"
|
|
cat > "$APP_DIR/Contents/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>DPLink</string>
|
|
<key>CFBundleIdentifier</key><string>net.dp-link.macos</string>
|
|
<key>CFBundleName</key><string>DP-Link</string>
|
|
<key>CFBundlePackageType</key><string>APPL</string>
|
|
<key>CFBundleShortVersionString</key><string>0.1.0</string>
|
|
<key>LSMinimumSystemVersion</key><string>13.0</string>
|
|
<key>NSHighResolutionCapable</key><true/>
|
|
</dict></plist>
|
|
PLIST
|
|
printf '%s\n' "$APP_DIR"
|