Files
hms-mediaengine/HMS-Mac-Install.command
T
HMS MediaEngine Agent 34b1cb8cec FESTPLATTE: Kompakt-Installation (spart ca. 1-1,5 GB) + Cache-Aufräumen
Mac-Installer fragt jetzt nach dem Installationsumfang:
- VOLLSTÄNDIG: alle 21 Effekte, GStreamer belegt ca. 1,5-2,5 GB
- KOMPAKT: 15 Effekte, nur ca. 0,5-1 GB (verzichtet auf 6
  Effekte aus gst-plugins-bad/ugly: Blur/Schärfen, Solarize,
  Brennen, Dilate, Exclusion). Videowiedergabe (libav),
  Compositor und alle 15 restlichen Effekte voll nutzbar.
- Auswahl läuft über native macOS-Dialoge (osascript, 3 Buttons)
- Danach: Homebrew-Cache-Aufräumen anbieten (gibt 0,5-2 GB frei,
  Installation bleibt unverändert) - nativer Ja/Nein-Dialog,
  zusätzlich im GUI-Installer nach Mac-Installation
- GUI-Installer hat Variante als Combobox (wird an Worker durchgereicht)

Gesamt-Festplatte nach Installation (Kompakt): ca. 1-1,5 GB
statt ca. 2,5 GB. RAM unverändert ca. 42 MB Leerlauf (gemessen).

GUI-Smoke-Test: Variante vorhanden, Cleanup-Dialog existiert und
läuft mit gemockter Antwort durch, Fenster sauber beendet.
2026-09-11 23:29:01 +02:00

85 lines
4.2 KiB
Bash
Executable File
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#!/bin/bash
# HMS MediaEngine macOS-Installation per Doppelklick (Finder)
# Ablauf: Homebrew pruefen -> Installationsumfang waehlen (Festplatte!)
# -> installieren -> Cache-Aufraeumen anbieten -> GUI-Installer.
# Alle Abfragen kommen als native macOS-Fenster (Buttons), das
# Administrator-Passwort fragt macOS selbst ab - kein Terminal-Tippen.
cd "$(dirname "$0")"
echo "=================================================="
echo " HMS MediaEngine Installation"
echo " Fortschritt siehst du hier; alle Abfragen kommen als"
echo " eigene macOS-Fenster mit Klick-Buttons."
echo "=================================================="
echo ""
eingabe() {
local antwort
antwort=$(osascript -e 'display alert "'$1'" message "'$2'" buttons {"Abbrechen","Weiter"} default button "Weiter" as informational' 2>/dev/null)
echo "$antwort" | grep -q "Weiter"
}
# --- 1) Homebrew ---
BREW=""
for p in /opt/homebrew/bin/brew /usr/local/bin/brew; do
if [ -x "$p" ]; then BREW="$p"; break; fi
done
if [ -z "$BREW" ]; then
if eingabe "Homebrew installieren?" "HMS MediaEngine benoetigt Homebrew (Paketmanager fuer macOS). Die Installation dauert einige Minuten. Dein Administrator-Passwort wird im naechsten Fenster von macOS abgefragt."; then
echo ">> Installiere Homebrew (macOS fragt nach deinem Passwort)..."
if ! osascript -e 'do shell script "NONINTERACTIVE=1 /bin/bash -c \"$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)\"" with administrator privileges with prompt "Homebrew fuer HMS MediaEngine installieren"' >/dev/null 2>&1; then
osascript -e 'display alert "Homebrew-Installation fehlgeschlagen" message "Bitte erneut versuchen oder die Meldung an den Support schicken." as critical' >/dev/null 2>&1
exit 1
fi
BREW=/opt/homebrew/bin/brew
[ -x "$BREW" ] || BREW=/usr/local/bin/brew
else
osascript -e 'display alert "Abgebrochen" message "Ohne Homebrew kann HMS MediaEngine nicht installiert werden." as informational' >/dev/null 2>&1
exit 1
fi
fi
echo ">> Homebrew: $BREW"
# --- 2) Installationsumfang (Festplatte) waehlen ---
VARIANTE=$(osascript -e 'display alert "Welcher Installationsumfang?" message "Vollstaendig: alle 21 Effekte. GStreamer belegt dann ca. 1,5-2,5 GB." & linefeed & linefeed & "Kompakt: 15 Effekte, belegt nur ca. 0,5-1 GB. Verzichtet auf Blur/Schaerfen, Solarize, Brennen, Dilate und Exclusion." & linefeed & linefeed & "Beide Varianten spielen alle Videos und Bilder vollstaendig ab - der Unterschied liegt nur in 6 wenigen Effekten." buttons {"Abbrechen","Kompakt","Vollstaendig"} default button "Vollstaendig" as informational' 2>/dev/null)
case "$VARIANTE" in
*Kompakt*)
PKGS="python@3.12 python-tk gstreamer gst-plugins-base gst-plugins-good gst-libav pygobject"
echo ">> Gewaehlt: Kompakt (spart ca. 1-1,5 GB)"
;;
*Abbrechen*|"")
exit 1
;;
*)
PKGS="python@3.12 python-tk gstreamer gst-plugins-base gst-plugins-good gst-plugins-bad gst-plugins-ugly gst-libav pygobject"
echo ">> Gewaehlt: Vollstaendig (alle Effekte)"
;;
esac
# --- 3) Installation ---
echo ""
echo ">> Installiere Komponenten per Homebrew (dauert einige Minuten)..."
if ! "$BREW" install $PKGS; then
osascript -e 'display alert "Problem bei der Installation" message "Homebrew meldete einen Fehler. Der grafische Installer prueft jetzt, was trotzdem angekommen ist." as warning' >/dev/null 2>&1
fi
# --- 4) Homebrew-Cache aufräumen (optional, gibt 0,5-2 GB frei) ---
if osascript -e 'display alert "Homebrew-Cache aufraeumen?" message "Loescht die heruntergeladenen Installationspakete und gibt etwa 0,5-2 GB Festplatte frei. Die Installation selbst bleibt unveraendert." buttons {"Nein","Ja"} default button "Ja" as informational' 2>/dev/null | grep -q "Ja"; then
echo ">> Raeume Homebrew-Cache auf..."
"$BREW" cleanup --prune=all >/dev/null 2>&1
echo ">> Cache freigegeben."
fi
# --- 5) GUI-Installer starten (verifiziert und startet die App) ---
PY=/opt/homebrew/bin/python3
[ -x "$PY" ] || PY=/usr/local/bin/python3
[ -x "$PY" ] || PY=python3
echo ""
echo ">> Starte grafischen Installer (Fenster oeffnet sich)..."
"$PY" installer_gui.py
echo ""
echo "Fertig. Ab jetzt genuegt: HMS MediaEngine.app doppelklicken."