# HMS MediaEngine - Windows Setup (einmalig ausfuehren) $ErrorActionPreference = "Stop" Write-Host "=== HMS MediaEngine Windows Setup ===" -ForegroundColor Cyan $isAdmin = ([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator) if (-not $isAdmin) { Write-Host "Als Administrator ausfuehren (Rechtsklick -> Als Administrator ausfuehren)" -ForegroundColor Red exit 1 } Write-Host "[1/2] GStreamer 1.28.4 MSVC..." -ForegroundColor Yellow $gstRoot = [Environment]::GetEnvironmentVariable("GSTREAMER_1_0_ROOT_MSVC_X86_64", "Machine") if (-not $gstRoot) { $url = "https://gstreamer.freedesktop.org/data/pkg/windows/1.28.4/msvc/gstreamer-1.0-msvc-x86_64-1.28.4.msi" $msi = "$env:TEMP\gstreamer.msi" Invoke-WebRequest -Uri $url -OutFile $msi Start-Process msiexec.exe -ArgumentList "/i `"$msi`" /quiet ADDLOCAL=ALL" -Wait Write-Host " GStreamer installiert" } else { Write-Host " bereits vorhanden" } Write-Host "[2/2] Python 3.13 (falls fehlt) mit tkinter..." -ForegroundColor Yellow $py = Get-Command python -ErrorAction SilentlyContinue if (-not $py) { $pyUrl = "https://www.python.org/ftp/python/3.13.2/python-3.13.2-amd64.exe" $exe = "$env:TEMP\python-installer.exe" Invoke-WebRequest -Uri $pyUrl -OutFile $exe Start-Process $exe -ArgumentList "/quiet InstallAllUsers=1 PrependPath=1 Include_tcltk=1" -Wait Write-Host " Python installiert" } else { Write-Host " bereits vorhanden" } $env:Path = [System.Environment]::GetEnvironmentVariable("Path", "Machine") + ";$env:Path" Write-Host "" Write-Host "=== Fertig ===" -ForegroundColor Green Write-Host "Start: python run.py" Write-Host "Dialog: python run.py --setup" Write-Host "Media-Verwaltung, Layer und Einstellungen: Web-UI im Browser"