#!/usr/bin/bash echo " ██ ██ ██ ███████ ██████ ██████ ██ ██ ██ ██ ██ ██ ██ ██ ██ █ ██ ██ ███████ ██ ██ ██████ ██ ███ ██ ██ ██ ██ ██ ██ ██ ███ ███ ██ ███████ ██████ ██ ██ Let's expand the horizons of XR. " set -e base_dir_name="wisor" venv_name="venv" echo "Updating package list..." sudo apt-get update echo "Backing up config.txt as config.txt.backup" sudo cp /boot/config.txt /boot/config.txt.backup echo "Downloading and overwriting config.txt..." sudo wget -O /boot/config.txt https://raw.githubusercontent.com/egemenertugrul/Wisor/core/config/config.txt echo "Updating pip..." python3 -m pip install --user --upgrade pip echo "Creating base directory for Wisor..." if [ ! -d ~/$base_dir_name ]; then mkdir ~/$base_dir_name fi cd ~/$base_dir_name echo "Installing GStreamer dependencies..." sudo apt-get -y install libx264-dev libjpeg-dev sudo apt-get -y install libgstreamer1.0-dev \ libgstreamer-plugins-base1.0-dev \ libgstreamer-plugins-bad1.0-dev \ gstreamer1.0-plugins-ugly \ gstreamer1.0-tools \ gstreamer1.0-gl \ gstreamer1.0-gtk3 echo "Installing omxplayer..." sudo wget http://archive.raspberrypi.org/debian/pool/main/o/omxplayer/omxplayer_20190723+gitf543a0d-1_armhf.deb # http://archive.raspberrypi.org/debian/pool/main/o/omxplayer/ sudo apt -y install ./omxplayer_20190723+gitf543a0d-1_armhf.deb cd /usr/lib/arm-linux-gnueabihf sudo curl -sSfLO 'https://raw.githubusercontent.com/raspberrypi/firmware/master/hardfp/opt/vc/lib/libbrcmEGL.so' sudo curl -sSfLO 'https://raw.githubusercontent.com/raspberrypi/firmware/master/hardfp/opt/vc/lib/libbrcmGLESv2.so' sudo curl -sSfLO 'https://raw.githubusercontent.com/raspberrypi/firmware/master/hardfp/opt/vc/lib/libopenmaxil.so' cd # Virtual environment echo "Creating virtual environment..." python3 -m venv ~/$base_dir_name/$venv_name # or change 'venv_name' to your desired location to create the virtual environment echo "Activating virtual environment..." source ~/$base_dir_name/$venv_name/bin/activate # Install dependencies echo "Installing additional dependencies..." sudo apt install libopenjp2-7 sense-hat libopenblas-dev # libcamera echo "Installing libcamera pivariety packages..." wget -O install_pivariety_pkgs.sh https://github.com/ArduCAM/Arducam-Pivariety-V4L2-Driver/releases/download/install_script/install_pivariety_pkgs.sh chmod +x install_pivariety_pkgs.sh ./install_pivariety_pkgs.sh -p libcamera_dev ./install_pivariety_pkgs.sh -p libcamera_apps # picamera echo "Installing picamera dependencies..." sudo apt install -y python3-kms++ sudo apt install -y python3-pyqt5 python3-prctl libatlas-base-dev ffmpeg python3-pip pip install numpy --upgrade pip install picamera2 --upgrade # Download Core & Renderer echo "Downloading Wisor Core & Renderer..." git clone --branch core --single-branch https://github.com/egemenertugrul/Wisor.git core git clone --recurse-submodules --branch renderer --single-branch https://github.com/egemenertugrul/Wisor.git renderer # Install Core echo "Installing Core..." cd core python3 -m pip install -r requirements.txt cd .. # Install Renderer echo "Installing Renderer..." cd renderer make all PLATFORM=PLATFORM_DESKTOP GRAPHICS=GRAPHICS_API_OPENGL_21 cd .. echo "Installation complete. Do you want to reboot now? (y/n)" read -r answer if [ "$answer" = "y" ] || [ "$answer" = "Y" ]; then sudo reboot else echo "You chose not to reboot. Please reboot manually when convenient." fi