08232bda9b
- install.sh: one-time Linux Mint setup (apt, .venv, requirements, .desktop entry with absolute paths). Re-runnable. - run.sh: launches the app from .venv (called by the menu entry). - icon.png: bundled 256px red-cross launcher/window icon; app prefers it over the runtime-drawn fallback (data/icon.png). - requirements.txt: fully pinned incl. transitive deps, tested on Python 3.12; numpy held at 2.2.6 so it installs on Python 3.10 too. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
45 lines
1.2 KiB
Bash
Executable File
45 lines
1.2 KiB
Bash
Executable File
#!/usr/bin/env bash
|
||
# Einmalige Einrichtung auf einem Linux-Mint-Rechner:
|
||
# - benötigte System-Pakete
|
||
# - virtuelle Python-Umgebung + Abhängigkeiten
|
||
# - Eintrag im Startmenü
|
||
#
|
||
# Aufruf: ./install.sh
|
||
set -euo pipefail
|
||
cd "$(dirname "$(readlink -f "$0")")"
|
||
APPDIR="$(pwd)"
|
||
|
||
echo "==> System-Pakete (fragt nach dem Passwort)…"
|
||
sudo apt update
|
||
sudo apt install -y python3-tk python3-venv python3-pip git
|
||
|
||
echo
|
||
echo "==> Virtuelle Umgebung unter .venv …"
|
||
python3 -m venv .venv
|
||
.venv/bin/pip install --upgrade pip
|
||
.venv/bin/pip install -r requirements.txt
|
||
|
||
echo
|
||
echo "==> Startmenü-Eintrag …"
|
||
DESKTOP_DIR="$HOME/.local/share/applications"
|
||
mkdir -p "$DESKTOP_DIR"
|
||
cat > "$DESKTOP_DIR/drk-blutspende-orte.desktop" <<EOF
|
||
[Desktop Entry]
|
||
Type=Application
|
||
Name=DRK Blutspende – Arbeitsorte
|
||
Comment=Einsatzorte protokollieren und auf der Karte anzeigen
|
||
Exec=$APPDIR/run.sh
|
||
Icon=$APPDIR/icon.png
|
||
Terminal=false
|
||
Categories=Utility;
|
||
StartupWMClass=DRK Blutspende – Arbeitsorte
|
||
EOF
|
||
chmod +x "$APPDIR/run.sh"
|
||
update-desktop-database "$DESKTOP_DIR" 2>/dev/null || true
|
||
|
||
echo
|
||
echo "Fertig."
|
||
echo "Die App ist jetzt im Menü als \"DRK Blutspende – Arbeitsorte\" zu finden"
|
||
echo "(ggf. einmal ab- und wieder anmelden, damit sie auftaucht)."
|
||
echo "Direkt testen: ./run.sh"
|