36 lines
795 B
Bash
Executable File
36 lines
795 B
Bash
Executable File
#!/bin/bash
|
|
# Launch script for the tkinter signage player
|
|
|
|
# Get script directory and navigate there
|
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
cd "$SCRIPT_DIR"
|
|
|
|
echo "=== Tkinter Signage Player Launcher ==="
|
|
echo "Working directory: $SCRIPT_DIR"
|
|
|
|
# Activate virtual environment
|
|
if [ -d ".venv" ]; then
|
|
echo "Activating virtual environment..."
|
|
source .venv/bin/activate
|
|
echo "Virtual environment activated"
|
|
else
|
|
echo "Warning: No virtual environment found"
|
|
fi
|
|
|
|
# Set display environment
|
|
export DISPLAY=${DISPLAY:-:0.0}
|
|
|
|
# Create directories if needed
|
|
mkdir -p signage_player/main_data
|
|
|
|
# Change to signage_player directory
|
|
cd signage_player
|
|
|
|
echo "Starting application..."
|
|
python main.py
|
|
|
|
# Deactivate venv when done
|
|
if [ -d "../.venv" ]; then
|
|
deactivate
|
|
fi
|