Initial MacTaskManager release
This commit is contained in:
Executable
+27
@@ -0,0 +1,27 @@
|
||||
#!/bin/zsh
|
||||
set -euo pipefail
|
||||
|
||||
PROJECT_DIR="${0:A:h:h}"
|
||||
APP_DIR="$PROJECT_DIR/dist/Task Manager.app"
|
||||
CONTENTS_DIR="$APP_DIR/Contents"
|
||||
ICON_SOURCE="$PROJECT_DIR/mactaskmanager.icon"
|
||||
|
||||
cd "$PROJECT_DIR"
|
||||
swift build -c release
|
||||
|
||||
mkdir -p "$CONTENTS_DIR/MacOS" "$CONTENTS_DIR/Resources"
|
||||
cp "$PROJECT_DIR/.build/release/MacTaskManager" "$CONTENTS_DIR/MacOS/MacTaskManager"
|
||||
cp "$PROJECT_DIR/Resources/Info.plist" "$CONTENTS_DIR/Info.plist"
|
||||
chmod +x "$CONTENTS_DIR/MacOS/MacTaskManager"
|
||||
|
||||
if [[ -d "$ICON_SOURCE" ]]; then
|
||||
xcrun actool "$ICON_SOURCE" \
|
||||
--compile "$CONTENTS_DIR/Resources" \
|
||||
--platform macosx \
|
||||
--minimum-deployment-target 14.0 \
|
||||
--app-icon mactaskmanager \
|
||||
--output-partial-info-plist "$CONTENTS_DIR/Resources/IconInfo.plist" >/dev/null
|
||||
fi
|
||||
|
||||
codesign --force --deep --sign - "$APP_DIR" >/dev/null
|
||||
print "Built $APP_DIR"
|
||||
Reference in New Issue
Block a user