Installer: RemminaMac.app-Bundle + Drag-and-drop-DMG (Programme-Link), Doku, Fehlerprotokoll
This commit is contained in:
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