Updated SH file
This commit is contained in:
57
Install.sh
Normal file
57
Install.sh
Normal file
@@ -0,0 +1,57 @@
|
||||
#!/bin/bash
|
||||
|
||||
# filepath: /home/pi/Desktop/signage-player/install.sh
|
||||
|
||||
# Define variables
|
||||
REPO_URL="https://gitea.moto-adv.com/ske087/signage-player.git"
|
||||
INSTALL_DIR="/home/pi/signage-player"
|
||||
|
||||
# Update system packages
|
||||
echo "Updating system packages..."
|
||||
sudo apt update && sudo apt upgrade -y
|
||||
# Install SDL2 and related libraries
|
||||
sudo apt install -y libsdl2-dev libsdl2-image-dev libsdl2-mixer-dev libsdl2-ttf-dev
|
||||
|
||||
# Install OpenGL ES and EGL libraries
|
||||
sudo apt install -y libgles2-mesa-dev libegl1-mesa-dev
|
||||
|
||||
# Install GStreamer and related plugins
|
||||
sudo apt install -y libgstreamer1.0-dev gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly gstreamer1.0-libav
|
||||
|
||||
# Install X11 libraries
|
||||
sudo apt install -y libx11-dev libxrandr-dev libxinerama-dev libxcursor-dev
|
||||
|
||||
# Install framebuffer support
|
||||
sudo apt install -y libmtdev-dev
|
||||
|
||||
# install Python3
|
||||
sudo apt install -y python3
|
||||
|
||||
# Install required system packages
|
||||
echo "Installing required system packages..."
|
||||
sudo apt install -y python3 python3-pip git
|
||||
|
||||
# Clone the repository
|
||||
echo "Cloning the repository..."
|
||||
if [ -d "$INSTALL_DIR" ]; then
|
||||
echo "Directory $INSTALL_DIR already exists. Removing it..."
|
||||
sudo rm -rf "$INSTALL_DIR"
|
||||
fi
|
||||
git clone "$REPO_URL" "$INSTALL_DIR"
|
||||
|
||||
# Navigate to the cloned repository
|
||||
cd "$INSTALL_DIR" || exit
|
||||
|
||||
# Install Python dependencies
|
||||
echo "Installing Python dependencies..."
|
||||
pip3 install -r requirements.txt --break-system-packages
|
||||
|
||||
# Set permissions for the run_app.sh script
|
||||
echo "Setting permissions for run_app.sh..."
|
||||
chmod +x "$INSTALL_DIR/run_app.sh"
|
||||
|
||||
# Run the application
|
||||
echo "Launching the application..."
|
||||
"$INSTALL_DIR/run_app.sh --verbose"
|
||||
|
||||
echo "Installation and setup complete!"
|
||||
Reference in New Issue
Block a user