#!/bin/bash INSTALL_DIR=$PWD PREVIOUS_DIR=$PWD echo "Welcome to the RetroDECK flatpak builder." echo "This script is helping the flatpak building in $INSTALL_DIR." read -n 1 -r -s -p $'Press enter to continue...\n' echo "Building RetroDECK, please stand by." sudo pacman -S flatpak-builder flatpak install org.kde.Sdk//5.15-21.08 org.kde.Platform//5.15-21.08 cd $INSTALL_DIR # To update change branch and update the manifest with the retroarch data here: # https://github.com/flathub/org.libretro.RetroArch/blob/master/org.libretro.RetroArch.json # must be converted with this: https://codebeautify.org/json-to-yaml git clone --recursive --branch update-v1.10.2 https://github.com/flathub/org.libretro.RetroArch.git # removing not needed and potentially dangerous files rm -f org.libretro.RetroArch/retroarch.cfg rm -f org.libretro.RetroArch/README.md rm -f org.libretro.RetroArch/org.libretro.RetroArch.json rm -f org.libretro.RetroArch/COPYING rm -f org.libretro.RetroArch/.* mv -n org.libretro.RetroArch/* $INSTALL_DIR cd $INSTALL_DIR flatpak-builder retrodeck-flatpak com.xargon.retrodeck.yml --force-clean # Useful commands: # flatpak-builder --user --install --force-clean retrodeck-flatpak com.xargon.retrodeck.yml # flatpak run com.xargon.retrodeck # # flatpak --user remote-add --no-gpg-verify xargon-dev repo # flatpak --user install xargon-dev com.xargon.retrodeck # # flatpak run --command=/bin/bash com.xargon.retrodeck # Cleaning up # do you want to remove the downloaded data? # if so: rm -rf org.libretro.RetroArch echo "Building terminated, you can install retrodeck by typing `flatpak run com.xargon.retrodeck`." cd $PREVIOUS_DIR