Something went wrong. Try again.
become more token aware with this one free trick! providers hate her
Something went wrong. Try again.
1.1 kB · 44 lines
Shell
at main
123456789101112131415161718192021222324252627282930313233343536373839404142434445#!/usr/bin/env bashset -euo pipefail
cd "$(dirname "$0")/.."
echo "Building release binary..."swift build -c release
APP_NAME="UsageTray.app"APP_DIR="dist/$APP_NAME"CONTENTS="$APP_DIR/Contents"MACOS="$CONTENTS/MacOS"RESOURCES="$CONTENTS/Resources"
echo "Creating bundle structure at $APP_DIR..."rm -rf "$APP_DIR"mkdir -p "$MACOS" "$RESOURCES"
cp ".build/release/UsageTray" "$MACOS/UsageTray"
cat << 'EOF' > "$CONTENTS/Info.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>UsageTray</string> <key>CFBundleIdentifier</key> <string>st.mm.UsageTray</string> <key>CFBundleName</key> <string>UsageTray</string> <key>CFBundlePackageType</key> <string>APPL</string> <key>CFBundleShortVersionString</key> <string>1.0.0</string> <key>LSUIElement</key> <true/> <key>NSHighResolutionCapable</key> <true/></dict></plist>EOF
echo "✓ Created $APP_DIR"