34 lines
1.3 KiB
Bash
34 lines
1.3 KiB
Bash
|
|
#!/bin/bash
|
||
|
|
# HMS MediaEngine - macOS Setup (Apple Silicon & Intel, einmalig ausfuehren)
|
||
|
|
set -e
|
||
|
|
echo "=== HMS MediaEngine macOS Setup ==="
|
||
|
|
echo "Architektur: $(uname -m)"
|
||
|
|
|
||
|
|
if ! command -v brew >/dev/null; then
|
||
|
|
echo "Homebrew fehlt. Zunaechst installieren:"
|
||
|
|
echo ' /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"'
|
||
|
|
echo "Dann dieses Skript erneut ausfuehren."
|
||
|
|
exit 1
|
||
|
|
fi
|
||
|
|
|
||
|
|
echo "[1/2] Installiere GStreamer, PyGObject und tkinter (brew)..."
|
||
|
|
brew install python@3.12 python-tk gstreamer gst-plugins-base \
|
||
|
|
gst-plugins-good gst-plugins-bad gst-plugins-ugly gst-libav pygobject
|
||
|
|
|
||
|
|
echo "[2/2] Umgebung pruefen..."
|
||
|
|
if [ "$(uname -m)" = "arm64" ] && [ -f /opt/homebrew/bin/brew ]; then
|
||
|
|
echo "Apple Silicon: Homebrew-Umgebung einbinden mit:"
|
||
|
|
echo ' eval "$(/opt/homebrew/bin/brew shellenv)"'
|
||
|
|
fi
|
||
|
|
echo "Pruefung:"
|
||
|
|
python3 -c "import gi; gi.require_version('Gst','1.0'); from gi.repository import Gst; Gst.init(None); print('GStreamer OK:', Gst.version_string())" || \
|
||
|
|
{ echo "PyGObject fehlt noch -> brew python3 verwenden (PATH!)"; exit 1; }
|
||
|
|
|
||
|
|
echo ""
|
||
|
|
echo "Hinweis: Die .pkg-Pakete von gstreamer.freedesktop.org/data/pkg/macos/"
|
||
|
|
echo "enthalten KEINE PyGObject-Bindings - Homebrew ist der empfohlene Weg."
|
||
|
|
echo ""
|
||
|
|
echo "=== Fertig ==="
|
||
|
|
echo "Start: python3 run.py"
|
||
|
|
echo "Dialog: python3 run.py --setup"
|