362e089be0
Der Nutzer hat recht: Der Ordner war voller Entwicklungs-Muell. Jetzt ist sauber getrennt: ROOT (was der Nutzer sieht und braucht): - run.py = das Programm - hms_app/ = der Anwendungscode - HMS MediaEngine.app = macOS Doppelklick-Starter - HMS-Start.vbs = Windows Doppelklick-Starter - HMS-Install.vbs = Windows Erst-Installation - HMS-Mac-Install.command = macOS Homebrew-Installation - HMS-Portable-Install.command = macOS Portable-Installation (16GB-Fix) - installer_gui.py = grafischer Installer - launcher.pyw + launcher_core.py = interne Start-Logik - LIESMICH.txt = 10-Zeilen-Kurzanleitung - .gitignore _entwicklung/ (alles andere, NICHT benoetigt): - packages/ apps/ native/ plugins/ tools/ schemas/ tests/ docs/ build/ fixture_profiles/ - PLAN.md STATUS.md ERRORS.md TEST_REPORT.md CHANGELOG.md README.md - pyproject.toml uv.lock setup_*.sh/ps1 make_mac_app.py Diese Trennung gilt ab sofort fuer alle Commits. Der Nutzer kann _entwicklung/ loeschen wenn er Platz braucht - die App laeuft ohne. Verifiziert: App startet nach Aufraeumen unveraendert (Health 200).
129 lines
4.3 KiB
Bash
129 lines
4.3 KiB
Bash
#!/bin/bash
|
||
# HMS MediaEngine – Windows Portable Build (§30.2, ADR-0005: Nuitka Onefolder)
|
||
# Läuft auf Windows mit Python 3.13 und Nuitka installiert.
|
||
|
||
set -euo pipefail
|
||
|
||
VERSION="0.1.0"
|
||
OUT_DIR="build/windows/HMS-MediaEngine-Portable-$VERSION"
|
||
|
||
echo "=== HMS MediaEngine Windows Build v$VERSION ==="
|
||
|
||
# 1. Python-Abhängigkeiten installieren
|
||
echo "[1/5] Installiere Python-Abhängigkeiten..."
|
||
uv sync
|
||
|
||
# 2. Frontend bauen (statische Assets)
|
||
echo "[2/5] Baue Web-Frontend..."
|
||
cd apps/web
|
||
corepack enable pnpm 2>/dev/null || true
|
||
pnpm install --frozen-lockfile
|
||
pnpm build
|
||
cd ../..
|
||
|
||
# 3. Rust-Renderkern bauen (nur wenn cargo verfügbar; sonst Überspringen)
|
||
echo "[3/5] Baue Rust-Renderkern..."
|
||
if command -v cargo >/dev/null 2>&1; then
|
||
cd native/render_bridge
|
||
cargo build --release
|
||
cd ../..
|
||
RENDERER_DLL="native/render_bridge/target/release/hms_render_bridge.dll"
|
||
if [ -f "$RENDERER_DLL" ]; then
|
||
echo " Render-Bridge DLL gefunden: $RENDERER_DLL"
|
||
fi
|
||
else
|
||
echo " WARNUNG: cargo nicht gefunden; Rust-Renderkern wird nicht gebaut"
|
||
echo " (Wird im Windows-Durchlauf nachgeholt, ADR-0004)"
|
||
fi
|
||
|
||
# 4. Nuitka Onefolder-Build
|
||
echo "[4/5] Baue portable Onefolder-Ausgabe (Nuitka)..."
|
||
rm -rf "$OUT_DIR"
|
||
mkdir -p "$OUT_DIR"
|
||
|
||
python -m nuitka \
|
||
--standalone \
|
||
--onefile=False \
|
||
--output-dir="$OUT_DIR" \
|
||
--include-package=hms_protocol \
|
||
--include-package=hms_domain \
|
||
--include-package=hms_parameter \
|
||
--include-package=hms_artnet \
|
||
--include-package=hms_cluster \
|
||
--include-package=hms_persistence \
|
||
--include-package=hms_plugin_sdk \
|
||
--include-package=hms_media \
|
||
--include-package=hms_audio \
|
||
--include-package=hms_content_sync \
|
||
--include-package=hms_capabilities \
|
||
--include-package=hms_adaptive \
|
||
--include-package=hms_renderer \
|
||
--include-package=hms_control_server \
|
||
--include-package=hms_launcher \
|
||
--include-data-dir=apps/web/dist=web \
|
||
--windows-console-mode=disable \
|
||
--company-name="HMS" \
|
||
--product-name="HMS MediaEngine" \
|
||
--file-version="$VERSION" \
|
||
--product-version="$VERSION" \
|
||
apps/launcher/hms_launcher/__main__.py
|
||
|
||
# 5. GStreamer-Runtime und portable Struktur
|
||
echo "[5/5] Kopiere GStreamer-Runtime und portable Struktur..."
|
||
|
||
# PORTABLE_MODE Markierung (§9)
|
||
touch "$OUT_DIR/PORTABLE_MODE"
|
||
|
||
# GStreamer (MSVC 1.28.6, ADR-0002)
|
||
# Erwartet: GStreamer-MSVC-Installationspfad oder GSTREAMER_1_0_ROOT_MSVC_X86_64
|
||
if [ -n "${GSTREAMER_1_0_ROOT_MSVC_X86_64:-}" ]; then
|
||
mkdir -p "$OUT_DIR/runtime/gstreamer"
|
||
cp -r "$GSTREAMER_1_0_ROOT_MSVC_X86_64/bin" "$OUT_DIR/runtime/gstreamer/bin"
|
||
cp -r "$GSTREAMER_1_0_ROOT_MSVC_X86_64/lib/gstreamer-1.0" "$OUT_DIR/runtime/gstreamer/lib/"
|
||
echo " GStreamer 1.28.6 gebündelt (ADR-0002)"
|
||
else
|
||
echo " WARNUNG: GSTREAMER_1_0_ROOT_MSVC_X86_64 nicht gesetzt"
|
||
echo " GStreamer wird nicht gebündelt; im Windows-Durchlauf ergänzen"
|
||
fi
|
||
|
||
# Portable Verzeichnisstruktur (§9)
|
||
mkdir -p "$OUT_DIR/plugins/builtin" "$OUT_DIR/plugins/user"
|
||
mkdir -p "$OUT_DIR/projects" "$OUT_DIR/media" "$OUT_DIR/logs"
|
||
mkdir -p "$OUT_DIR/userdata/database" "$OUT_DIR/userdata/cache" \
|
||
"$OUT_DIR/userdata/identity" "$OUT_DIR/userdata/sync-staging" \
|
||
"$OUT_DIR/userdata/thumbnails" "$OUT_DIR/userdata/plugin-cache"
|
||
mkdir -p "$OUT_DIR/config" "$OUT_DIR/licenses"
|
||
|
||
# Plugin-Dateien kopieren
|
||
cp -r plugins/builtin/generators "$OUT_DIR/plugins/builtin/"
|
||
cp -r plugins/builtin/filters "$OUT_DIR/plugins/builtin/"
|
||
|
||
# Standardkonfiguration
|
||
cat > "$OUT_DIR/config/app.toml" << 'EOF'
|
||
[hms]
|
||
bind_host = "127.0.0.1"
|
||
default_port = 8000
|
||
open_browser = true
|
||
EOF
|
||
|
||
# SHA-256-Prüfsumme
|
||
echo "Erzeuge SHA-256-Prüfsumme..."
|
||
cd "build/windows"
|
||
if command -v sha256sum >/dev/null 2>&1; then
|
||
find "HMS-MediaEngine-Portable-$VERSION" -type f -exec sha256sum {} + > "HMS-MediaEngine-Portable-$VERSION.sha256"
|
||
echo " Prüfsumme: HMS-MediaEngine-Portable-$VERSION.sha256"
|
||
fi
|
||
|
||
# ZIP erstellen
|
||
echo "Erstelle Release-ZIP..."
|
||
if command -v zip >/dev/null 2>&1; then
|
||
zip -r "HMS-MediaEngine-Portable-$VERSION.zip" "HMS-MediaEngine-Portable-$VERSION"
|
||
echo " Release: build/windows/HMS-MediaEngine-Portable-$VERSION.zip"
|
||
fi
|
||
|
||
echo "=== Build abgeschlossen ==="
|
||
echo "Ausgabe: $OUT_DIR"
|
||
echo ""
|
||
echo "Hinweis: Dieser Build ist ein Dev-Build ohne GPU-Validierung (ADR-0008)."
|
||
echo "Gate-0-Messungen (D3D11, Framezeiten, DMX-Latenz) laufen auf echter Hardware."
|