Altstand nach old_version/ eingefroren (untracked). Monolith ersetzt durch main.py + Paket loader_game/. Neu: run.sh/run.command mit venv+requirements, .gitignore, docs/ANALYSE.md, 35 Tests. Secrets entfernt. Gelöscht: loader_game.py, qr_scan*.py, INSTALL_README.txt.

This commit is contained in:
Project Bridge committed 2026-11-01 10:25:13 +00:00
1 parent 6a2c891c3e
commit de550e1d4d
24 files changed
+2269 -1008

No files matched your search

Executable
+37
View File
@@ -0,0 +1,37 @@
#!/usr/bin/env bash
# Startet das Habegger Loader Game.
#
# Beim ersten Start wird eine lokale virtuelle Umgebung (.venv) angelegt und
# requirements.txt installiert. Ändert sich requirements.txt, wird neu
# installiert. Alle Argumente werden an main.py weitergegeben, z. B.:
#
# ./run.sh --windowed
# ./run.sh --name "Anna" --seed 42
#
# Getestet auf macOS (arm64) und Linux.
set -euo pipefail
cd "$(dirname "$0")"
VENV=".venv"
PYTHON="${PYTHON:-python3}"
STAMP="$VENV/.requirements.sha256"
if [ ! -x "$VENV/bin/python" ]; then
echo "→ Lege virtuelle Umgebung an ($("$PYTHON" --version 2>&1))"
"$PYTHON" -m venv "$VENV"
fi
if command -v shasum >/dev/null 2>&1; then
REQ_HASH="$(shasum -a 256 requirements.txt | cut -d' ' -f1)"
else
REQ_HASH="$(sha256sum requirements.txt | cut -d' ' -f1)"
fi
if [ ! -f "$STAMP" ] || [ "$(cat "$STAMP")" != "$REQ_HASH" ]; then
echo "→ Installiere Abhängigkeiten aus requirements.txt"
"$VENV/bin/python" -m pip install --quiet --upgrade pip
"$VENV/bin/python" -m pip install --quiet -r requirements.txt
echo "$REQ_HASH" >"$STAMP"
fi
exec "$VENV/bin/python" main.py "$@"