Installer: RemminaMac.app-Bundle + Drag-and-drop-DMG (Programme-Link), Doku, Fehlerprotokoll
This commit is contained in:
Executable
+32
@@ -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"
|
||||
Executable
+44
@@ -0,0 +1,44 @@
|
||||
#!/bin/bash
|
||||
# Baut ein Drag-and-drop-DMG: RemminaMac.app + Programme-Symlink.
|
||||
# Nur Bordmittel (hdiutil). Usage: ./scripts/build-dmg.sh [version]
|
||||
set -euo pipefail
|
||||
VERSION="${1:-0.1.0}"
|
||||
ROOT="$(cd "$(dirname "$0")/.." && pwd)"
|
||||
DIST="$ROOT/dist"
|
||||
APP="$DIST/RemminaMac.app"
|
||||
VOL="RemminaMac $VERSION"
|
||||
RW_DMG="$DIST/.rw.RemminaMac-$VERSION.dmg"
|
||||
FINAL_DMG="$DIST/RemminaMac-$VERSION-macos-arm64.dmg"
|
||||
|
||||
echo "[build-dmg] Version: $VERSION"
|
||||
[ -d "$APP" ] || { echo "[build-dmg] $APP fehlt — erst ./scripts/build-app.sh $VERSION"; exit 1; }
|
||||
|
||||
rm -f "$RW_DMG" "$FINAL_DMG"
|
||||
# 1. Beschreibbares DMG mit App + Programme-Link erzeugen
|
||||
hdiutil create -volname "$VOL" -srcfolder "$APP" -ov -format UDRW "$RW_DMG" > /dev/null
|
||||
MOUNT="$(hdiutil attach -readwrite -nobrowse "$RW_DMG" | grep -E '/Volumes/' | sed 's/.*\/Volumes\//\/Volumes\//')"
|
||||
echo "[build-dmg] Gemountet: $MOUNT"
|
||||
ln -s /Applications "$MOUNT/Programme" || true
|
||||
ln -s /Applications "$MOUNT/Applications" || true
|
||||
# Optionales Fenster-Layout (schlägt headless ggf. fehl — nicht fatal)
|
||||
osascript <<OSA || true
|
||||
tell application "Finder"
|
||||
tell disk "$VOL"
|
||||
open
|
||||
set current view of container window to icon view
|
||||
set toolbar visible of container window to false
|
||||
set the bounds of container window to {100, 100, 640, 420}
|
||||
delay 1
|
||||
end tell
|
||||
end tell
|
||||
OSA
|
||||
hdiutil detach "$MOUNT" > /dev/null
|
||||
# 2. Komprimieren + Checksumme
|
||||
hdiutil convert "$RW_DMG" -format UDZO -imagekey zlib-level=9 -o "$FINAL_DMG" > /dev/null
|
||||
rm -f "$RW_DMG"
|
||||
shasum -a 256 "$FINAL_DMG" > "$FINAL_DMG.sha256"
|
||||
|
||||
echo "[build-dmg] Fertig:"
|
||||
ls -lh "$FINAL_DMG" "$FINAL_DMG.sha256"
|
||||
cat "$FINAL_DMG.sha256"
|
||||
hdiutil imageinfo "$FINAL_DMG" 2>/dev/null | grep -E 'Format|Size' | head -n 4 || true
|
||||
Reference in New Issue
Block a user