Skip to content

Commit

Permalink
Citra: Fedora support
Browse files Browse the repository at this point in the history
  • Loading branch information
cobalt2727 committed Jun 26, 2023
1 parent 3b78fbf commit 0c31e36
Showing 1 changed file with 28 additions and 19 deletions.
47 changes: 28 additions & 19 deletions scripts/games_and_emulators/citra.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,30 +13,44 @@ sleep 3

echo "Cleaning up unneeded files from old versions, if found..."
# https://github.com/citra-emu/citra/issues/6397
sudo rm -rf /usr/local/include/Zydis/ /usr/local/include/dynarmic/ /usr/local/include/fmt/ /usr/local/include/mcl/ /usr/local/include/tsl/ /usr/local/include/xbyak/ /usr/local/lib/cmake/ /usr/local/lib/libZydis.a /usr/local/lib/libdynarmic.a /usr/local/lib/libfmt.a /usr/local/lib/libmcl.a /usr/local/lib/pkgconfig/fmt.pc /usr/local/share/cmake/tsl-robin-map/
sudo rm -rf /usr/local/include/Zydis/ /usr/local/include/dynarmic/ /usr/local/include/fmt/ /usr/local/include/mcl/ /usr/local/include/tsl/ /usr/local/include/xbyak/ /usr/local/lib/cmake/ /usr/local/lib/libZydis.a /usr/local/lib/libdynarmic.a /usr/local/lib/libfmt.a /usr/local/lib/libmcl.a /usr/local/lib/pkgconfig/fmt.pc /usr/local/share/cmake/tsl-robin-map/

echo "Installing dependencies..."
sleep 1

case "$__os_codename" in
bionic | focal)
echo "Adding GCC/G++ 11 repo..."
ppa_name="ubuntu-toolchain-r/test" && ppa_installer
echo "Adding QT6 repo..."
#it's not redneck if it works.
#TODO: get https://github.com/oskirby/qt6-packaging/issues/2 resolved, or just build QT6 ourselves
ppa_name="okirby/qt6-backports" && ppa_installer
ppa_name="okirby/qt6-testing" && ppa_installer
case "$__os_id" in
Raspbian | Debian | LinuxMint | Linuxmint | Ubuntu | [Nn]eon | Pop | Zorin | [eE]lementary | [jJ]ing[Oo][sS])

case "$__os_codename" in
bionic | focal)
echo "Adding GCC/G++ 11 repo..."
ppa_name="ubuntu-toolchain-r/test" && ppa_installer
echo "Adding QT6 repo..."
#it's not redneck if it works.
#TODO: get https://github.com/oskirby/qt6-packaging/issues/2 resolved, or just build QT6 ourselves
ppa_name="okirby/qt6-backports" && ppa_installer
ppa_name="okirby/qt6-testing" && ppa_installer

sudo apt install -y gcc-11 g++-11 || error "Could not install dependencies"
;;
*)
sudo apt install -y gcc g++ || error "Could not install dependencies"
;;
esac

sudo apt-get install git libsdl2-2.0-0 libsdl2-dev qt6-base-dev qt6-base-private-dev libqt6opengl6-dev qt6-multimedia-dev libqt6multimedia6 qt6-l10n-tools libfdk-aac-dev build-essential cmake libc++-dev libswscale-dev libavdevice* libavformat-dev libavcodec-dev libssl-dev glslang-tools -y || error "Could not install dependencies"

sudo apt install -y gcc-11 g++-11 || error "Could not install dependencies"
;;

Fedora)
sudo dnf install -y cmake SDL2-devel openssl-devel qt6-qtbase-devel qt6-qtbase-private-devel qt6-qtmultimedia-devel gcc-c++
;;
*)
sudo apt install -y gcc g++ || error "Could not install dependencies"
echo -e "\\e[91mUnknown distro detected - this script should work, but please press Ctrl+C now and install necessary dependencies yourself following https://wiki.dolphin-emu.org/index.php?title=Building_Dolphin_on_Linux if you haven't already...\\e[39m"
sleep 5
;;
esac

sudo apt-get install git libsdl2-2.0-0 libsdl2-dev qt6-base-dev qt6-base-private-dev libqt6opengl6-dev qt6-multimedia-dev libqt6multimedia6 qt6-l10n-tools libfdk-aac-dev build-essential cmake libc++-dev ffmpeg libswscale-dev libavdevice* libavformat-dev libavcodec-dev libssl-dev glslang-tools -y || error "Could not install dependencies"

echo "Building Citra..."
sleep 1
cd ~
Expand Down Expand Up @@ -66,11 +80,6 @@ esac
make -j$(nproc) || error "Compilation failed"
sudo make install || error "Make install failed"

##echo "Removing build files..."
##sleep 1
##cd ~
##sudo rm -rf citra

echo "Done!"
echo "Sending you back to the main menu..."
sleep 5

0 comments on commit 0c31e36

Please sign in to comment.