Intégration station d'impression photo (photostation)
- Icône discrète coin bas-gauche, visible seulement si photostation installée - Popup PIN (4 chiffres) avant lancement - Backend : /api/photostation/disponible + /api/photostation/lancer - kiosk-session.sh : Chromium attend le flag /tmp/photostation_running avant redémarrage - Script install-photostation.sh pour déploiement sur la Surface Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
37
scripts/install-photostation.sh
Normal file
37
scripts/install-photostation.sh
Normal file
@@ -0,0 +1,37 @@
|
||||
#!/bin/bash
|
||||
# Installe la photostation sur la Surface pour intégration photobooth
|
||||
set -e
|
||||
|
||||
DEST="/opt/photostation"
|
||||
REPO="https://git.copydev.fr/jules/photostation.git"
|
||||
|
||||
echo "=== Installation Photostation ==="
|
||||
|
||||
# Dépendances système
|
||||
sudo apt-get install -y \
|
||||
python3-pyqt6 python3-pyqt6.qtsvg \
|
||||
python3-pillow python3-flask \
|
||||
python3-qrcode python3-cups \
|
||||
libgl1 libglib2.0-0 2>&1 | grep -E 'Install|Upgrade|already'
|
||||
|
||||
# Cloner ou mettre à jour
|
||||
if [ -d "$DEST/.git" ]; then
|
||||
echo "Mise à jour du repo..."
|
||||
git -C "$DEST" pull
|
||||
else
|
||||
echo "Clonage du repo..."
|
||||
sudo git clone "$REPO" "$DEST"
|
||||
sudo chown -R jules:jules "$DEST"
|
||||
fi
|
||||
|
||||
# Venv avec accès aux paquets système (PyQt6 est en paquet système)
|
||||
if [ ! -d "$DEST/venv" ]; then
|
||||
python3 -m venv --system-site-packages "$DEST/venv"
|
||||
fi
|
||||
|
||||
# Dépendances Python supplémentaires
|
||||
"$DEST/venv/bin/pip" install --quiet qrcode[pil] 2>/dev/null || true
|
||||
|
||||
echo ""
|
||||
echo "=== Installation terminée ==="
|
||||
echo "Test : DISPLAY=:0 bash -c 'source $DEST/venv/bin/activate && python $DEST/src/main.py'"
|
||||
Reference in New Issue
Block a user