Installer: RemminaMac.app-Bundle + Drag-and-drop-DMG (Programme-Link), Doku, Fehlerprotokoll

This commit is contained in:
x3
2026-09-21 22:49:13 +02:00
parent c5ecb273c2
commit 8fe8c4925e
7 changed files with 131 additions and 4 deletions
+32
View File
@@ -0,0 +1,32 @@
#!/bin/bash
# Baut RemminaMac.app (Drag-and-drop-fähiges Bundle) aus dem Release-Binary.
# Usage: ./scripts/build-app.sh [version]
set -euo pipefail
VERSION="${1:-0.1.0}"
ROOT="$(cd "$(dirname "$0")/.." && pwd)"
DIST="$ROOT/dist"
BIN="$ROOT/.build/release/RemminaMac"
APP="$DIST/RemminaMac.app"
echo "[build-app] Version: $VERSION"
if [ ! -x "$BIN" ]; then
echo "[build-app] Kein Release-Binary, baue..."
swift build -c release --package-path "$ROOT"
fi
rm -rf "$APP"
mkdir -p "$APP/Contents/MacOS" "$APP/Contents/Resources"
cp "$BIN" "$APP/Contents/MacOS/RemminaMac"
chmod +x "$APP/Contents/MacOS/RemminaMac"
# Info.plist mit Version versehen
sed "s|<string>0.1.0</string>|<string>$VERSION</string>|" "$ROOT/Resources/Info.plist" > "$APP/Contents/Info.plist"
echo -n "APPL????" > "$APP/Contents/PkgInfo"
# Ad-hoc-Signatur (nötig für Apple Silicon / Gatekeeper-Basis)
codesign --force --deep --sign - "$APP" 2>&1 | tail -n 3 || true
codesign --verify --verbose=2 "$APP" 2>&1 | tail -n 5 || true
echo "[build-app] Fertig:"
ls -ld "$APP"
du -sh "$APP"