1. Prototyp
This commit is contained in:
1 parent
e723eee440
commit
c24bc91768
37 files changed
+11610
No files matched your search
Executable
+63
@@ -0,0 +1,63 @@
|
||||
#!/bin/bash
|
||||
set -euo pipefail
|
||||
|
||||
CONFIG="${1:-debug}"
|
||||
ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
||||
cd "$ROOT"
|
||||
|
||||
echo "Baue LektorenPlan ($CONFIG)…"
|
||||
swift build -c "$CONFIG"
|
||||
|
||||
BIN_DIR="$(swift build -c "$CONFIG" --show-bin-path)"
|
||||
APP="$ROOT/build/LektorenPlan.app"
|
||||
CONTENTS="$APP/Contents"
|
||||
MACOS="$CONTENTS/MacOS"
|
||||
RESOURCES="$CONTENTS/Resources"
|
||||
|
||||
rm -rf "$APP"
|
||||
mkdir -p "$MACOS" "$RESOURCES"
|
||||
|
||||
cp "$BIN_DIR/LektorenPlan" "$MACOS/LektorenPlan"
|
||||
|
||||
# Copy SwiftPM resource bundles so Bundle.module keeps working inside the app.
|
||||
for bundle in "$BIN_DIR"/*.bundle; do
|
||||
[ -e "$bundle" ] || continue
|
||||
cp -R "$bundle" "$RESOURCES/"
|
||||
done
|
||||
|
||||
cat > "$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>CFBundleDevelopmentRegion</key>
|
||||
<string>de</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>LektorenPlan</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>de.badgodesberg.lektorenplan</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>LektorenPlan</string>
|
||||
<key>CFBundleDisplayName</key>
|
||||
<string>LektorenPlan</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>0.1</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1</string>
|
||||
<key>LSMinimumSystemVersion</key>
|
||||
<string>14.0</string>
|
||||
<key>NSHighResolutionCapable</key>
|
||||
<true/>
|
||||
<key>NSPrincipalClass</key>
|
||||
<string>NSApplication</string>
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
<string>LektorenPlan Prototyp · Pfarreiengemeinschaft Bad Godesberg</string>
|
||||
</dict>
|
||||
</plist>
|
||||
PLIST
|
||||
|
||||
echo "Fertig: $APP"
|
||||
Reference in new issue
Block a user