2026-09-11 09:42:51 +02:00
|
|
|
# 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
|
|
|
|
|
}
|
|
|
|
|
|
2026-09-11 13:34:43 +02:00
|
|
|
Write-Host "[1/2] GStreamer 1.28.4 MSVC..." -ForegroundColor Yellow
|
2026-09-11 09:42:51 +02:00
|
|
|
$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" }
|
|
|
|
|
|
2026-09-11 13:34:43 +02:00
|
|
|
Write-Host "[2/2] Python 3.13 (falls fehlt) mit tkinter..." -ForegroundColor Yellow
|
2026-09-11 09:42:51 +02:00
|
|
|
$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"
|
2026-09-11 13:34:43 +02:00
|
|
|
Write-Host ""
|
2026-09-11 09:42:51 +02:00
|
|
|
Write-Host "=== Fertig ===" -ForegroundColor Green
|
2026-09-11 13:34:43 +02:00
|
|
|
Write-Host "Start: python run.py"
|
|
|
|
|
Write-Host "Dialog: python run.py --setup"
|
|
|
|
|
Write-Host "Media-Verwaltung, Layer und Einstellungen: Web-UI im Browser"
|