More verbose and manual aagl install for fedora

This commit is contained in:
2024-05-12 22:34:59 +02:00
parent 0b88bdc187
commit 6d815f91ca
4 changed files with 85 additions and 50 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 209 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 258 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 252 KiB

View File

@@ -17,6 +17,7 @@ compactbutton=black,green
button=black,red" button=black,red"
function getDistributionType() { function getDistributionType() {
echo "Detecting distribution..."
if [[ -e /etc/debian_version ]]; then if [[ -e /etc/debian_version ]]; then
source /etc/os-release source /etc/os-release
if [[ $ID == "debian" || $ID == "raspbian" ]]; then if [[ $ID == "debian" || $ID == "raspbian" ]]; then
@@ -36,6 +37,7 @@ function getDistributionType() {
} }
function checkWhiptail() { function checkWhiptail() {
echo "Checking whiptail..."
if ! command -v whiptail &>/dev/null; then if ! command -v whiptail &>/dev/null; then
if [[ $DISTRO =~ (debian|ubuntu) ]]; then if [[ $DISTRO =~ (debian|ubuntu) ]]; then
sudo apt install whiptail -y sudo apt install whiptail -y
@@ -45,6 +47,7 @@ function checkWhiptail() {
sudo pacman -S --needed --noconfirm newt sudo pacman -S --needed --noconfirm newt
fi fi
fi fi
echo "Whiptail installed."
} }
function updateSystem() { function updateSystem() {
@@ -62,6 +65,7 @@ function updateSystem() {
} }
function installBasicPackages() { function installBasicPackages() {
echo "Installing basic packages..."
if [[ $DISTRO =~ (debian|ubuntu) ]]; then if [[ $DISTRO =~ (debian|ubuntu) ]]; then
sudo apt install sudo nano bat git curl wget htop btop flatpak -y sudo apt install sudo nano bat git curl wget htop btop flatpak -y
elif [[ $DISTRO == "fedora" ]]; then elif [[ $DISTRO == "fedora" ]]; then
@@ -76,8 +80,11 @@ function installBasicPackages() {
} }
function setupRepositories() { function setupRepositories() {
echo "Setting up repositories..."
echo "Enabling flatpak..."
sudo flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo sudo flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo
sudo flatpak remote-add --if-not-exists launcher.moe https://gol.launcher.moe/gol.launcher.moe.flatpakrepo sudo flatpak remote-add --if-not-exists launcher.moe https://gol.launcher.moe/gol.launcher.moe.flatpakrepo
echo "Enabling third-party repositories..."
if [[ $DISTRO =~ (debian|ubuntu) ]]; then if [[ $DISTRO =~ (debian|ubuntu) ]]; then
sudo apt install ca-certificates software-properties-gtk gpg apt-transport-https firmware-misc-nonfree -y sudo apt install ca-certificates software-properties-gtk gpg apt-transport-https firmware-misc-nonfree -y
# Waydroid # Waydroid
@@ -97,7 +104,6 @@ function setupRepositories() {
elif [[ $DISTRO == "fedora" ]]; then elif [[ $DISTRO == "fedora" ]]; then
sudo dnf4 copr enable atim/heroic-games-launcher -y sudo dnf4 copr enable atim/heroic-games-launcher -y
if grep -q "Rawhide" /etc/fedora-release; then if grep -q "Rawhide" /etc/fedora-release; then
sudo dnf4 config-manager --add-repo https://download.opensuse.org/repositories/home:/Maroxy:/AAT-Apps/openSUSE_Tumbleweed/home:Maroxy:AAT-Apps.repo
sudo dnf4 config-manager --add-repo https://download.opensuse.org/repositories/hardware:/razer/Fedora_Rawhide/hardware:razer.repo -y sudo dnf4 config-manager --add-repo https://download.opensuse.org/repositories/hardware:/razer/Fedora_Rawhide/hardware:razer.repo -y
sudo dnf in -y 'https://mirrors.rpmfusion.org/free/fedora/rpmfusion-free-release-rawhide.noarch.rpm' 'https://mirrors.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-rawhide.noarch.rpm' sudo dnf in -y 'https://mirrors.rpmfusion.org/free/fedora/rpmfusion-free-release-rawhide.noarch.rpm' 'https://mirrors.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-rawhide.noarch.rpm'
else else
@@ -127,6 +133,7 @@ function setupRepositories() {
} }
function installDistroSpecificPackages() { function installDistroSpecificPackages() {
echo "Installing distribution specific packages..."
if [[ $DISTRO =~ (debian|ubuntu) ]]; then if [[ $DISTRO =~ (debian|ubuntu) ]]; then
echo "None for now" echo "None for now"
elif [[ $DISTRO == "fedora" ]]; then elif [[ $DISTRO == "fedora" ]]; then
@@ -148,57 +155,62 @@ function installDistroSpecificPackages() {
} }
function installGraphicsDrivers() { function installGraphicsDrivers() {
if [[ $DISTRO =~ (debian|ubuntu) ]]; then if (whiptail --title "Graphics Drivers" --yesno "Should we install graphics drivers?" 8 78); then
sudo apt install ffmpeg vlc mpv -y echo "Installing graphics drivers..."
if lspci | grep -i nvidia &>/dev/null; then if [[ $DISTRO =~ (debian|ubuntu) ]]; then
sudo apt install nvidia-driver nvidia-vdpau-driver nvidia-vaapi-driver libnvcuvid1 libnvidia-encode1 -y sudo apt install ffmpeg vlc mpv -y
fi if lspci | grep -i nvidia &>/dev/null; then
if lspci | grep -Ei "vga|3d|display" | grep -i amd &>/dev/null; then sudo apt install nvidia-driver nvidia-vdpau-driver nvidia-vaapi-driver libnvcuvid1 libnvidia-encode1 -y
sudo apt install mesa-va-drivers vdpau-driver-all -y fi
fi if lspci | grep -Ei "vga|3d|display" | grep -i amd &>/dev/null; then
if lspci | grep -Ei "vga|3d|display" | grep -i intel &>/dev/null; then sudo apt install mesa-va-drivers vdpau-driver-all -y
sudo apt install intel-media-va-driver-non-free vdpau-driver-all -y fi
fi if lspci | grep -Ei "vga|3d|display" | grep -i intel &>/dev/null; then
elif [[ $DISTRO == "fedora" ]]; then sudo apt install intel-media-va-driver-non-free vdpau-driver-all -y
sudo dnf swap ffmpeg-free ffmpeg --allowerasing -y fi
sudo dnf in vlc mpv -y elif [[ $DISTRO == "fedora" ]]; then
sudo dnf4 groupupdate multimedia --setopt="install_weak_deps=False" --exclude=PackageKit-gstreamer-plugin -y sudo dnf swap ffmpeg-free ffmpeg --allowerasing -y
sudo dnf4 groupupdate sound-and-video -y sudo dnf in vlc mpv -y
if lspci | grep -i nvidia &>/dev/null; then sudo dnf4 groupupdate multimedia --setopt="install_weak_deps=False" --exclude=PackageKit-gstreamer-plugin -y
sudo dnf install kmodtool akmods mokutil openssl -y sudo dnf4 groupupdate sound-and-video -y
sudo kmodgenca -a if lspci | grep -i nvidia &>/dev/null; then
sudo mokutil --import /etc/pki/akmods/certs/public_key.der sudo dnf install kmodtool akmods mokutil openssl -y
sudo dnf in akmod-nvidia xorg-x11-drv-nvidia-cuda nvidia-vaapi-driver -y sudo kmodgenca -a
fi sudo mokutil --import /etc/pki/akmods/certs/public_key.der
if lspci | grep -Ei "vga|3d|display" | grep -i amd &>/dev/null; then sudo dnf in akmod-nvidia xorg-x11-drv-nvidia-cuda nvidia-vaapi-driver -y
sudo dnf swap mesa-va-drivers mesa-va-drivers-freeworld -y fi
sudo dnf swap mesa-vdpau-drivers mesa-vdpau-drivers-freeworld -y if lspci | grep -Ei "vga|3d|display" | grep -i amd &>/dev/null; then
fi sudo dnf swap mesa-va-drivers mesa-va-drivers-freeworld -y
if lspci | grep -Ei "vga|3d|display" | grep -i intel &>/dev/null; then sudo dnf swap mesa-vdpau-drivers mesa-vdpau-drivers-freeworld -y
sudo dnf in -y intel-media-driver fi
fi if lspci | grep -Ei "vga|3d|display" | grep -i intel &>/dev/null; then
elif [[ $DISTRO == "arch" ]]; then sudo dnf in -y intel-media-driver
sudo pacman -S --needed ffmpeg vlc mpv --noconfirm fi
if lspci | grep -i nvidia &>/dev/null; then elif [[ $DISTRO == "arch" ]]; then
if uname -r | grep -q "cachyos"; then sudo pacman -S --needed ffmpeg vlc mpv --noconfirm
sudo pacman -S --needed --noconfirm linux-cachyos-nvidia opencl-nvidia libva-vdpau-driver libva-nvidia-driver if lspci | grep -i nvidia &>/dev/null; then
else if uname -r | grep -q "cachyos"; then
if pacman -Qs nvidia > /dev/null; then sudo pacman -S --needed --noconfirm linux-cachyos-nvidia opencl-nvidia libva-vdpau-driver libva-nvidia-driver
sudo pacman -R --noconfirm nvidia else
elif pacman -Qs nvidia-dkms > /dev/null; then if pacman -Qs nvidia > /dev/null; then
sudo pacman -R --noconfirm nvidia-dkms sudo pacman -R --noconfirm nvidia
elif pacman -Qs xf86-video-nouveau > /dev/null; then elif pacman -Qs nvidia-dkms > /dev/null; then
sudo pacman -R --noconfirm xf86-video-nouveau sudo pacman -R --noconfirm nvidia-dkms
elif pacman -Qs xf86-video-nouveau > /dev/null; then
sudo pacman -R --noconfirm xf86-video-nouveau
fi
sudo pacman -S --needed --noconfirm nvidia-open opencl-nvidia libva-vdpau-driver libva-nvidia-driver
fi fi
sudo pacman -S --needed --noconfirm nvidia-open opencl-nvidia libva-vdpau-driver libva-nvidia-driver fi
if lspci | grep -Ei "vga|3d|display" | grep -i amd &>/dev/null; then
sudo pacman -S --needed --noconfirm libva-mesa-driver vulkan-radeon mesa-vdpau
fi
if lspci | grep -Ei "vga|3d|display" | grep -i intel &>/dev/null; then
sudo pacman -S --needed --noconfirm intel-media-driver vulkan-intel
fi fi
fi fi
if lspci | grep -Ei "vga|3d|display" | grep -i amd &>/dev/null; then else
sudo pacman -S --needed --noconfirm libva-mesa-driver vulkan-radeon mesa-vdpau return
fi
if lspci | grep -Ei "vga|3d|display" | grep -i intel &>/dev/null; then
sudo pacman -S --needed --noconfirm intel-media-driver vulkan-intel
fi
fi fi
} }
@@ -248,7 +260,8 @@ function installGamingPackages() {
elif [[ $DISTRO == "fedora" ]]; then elif [[ $DISTRO == "fedora" ]]; then
sudo flatpak install flathub net.davidotek.pupgui2 -y --noninteractive --system sudo flatpak install flathub net.davidotek.pupgui2 -y --noninteractive --system
if grep -q "Rawhide" /etc/fedora-release; then if grep -q "Rawhide" /etc/fedora-release; then
sudo dnf in steam gamescope gamemode mangohud lutris discord heroic-games-launcher-bin an-anime-game-launcher honkers-launcher the-honkers-railway-launcher -y sudo dnf in steam gamescope gamemode mangohud lutris discord heroic-games-launcher-bin -y
installAAGL-on-fedora
else else
sudo dnf in steam gamescope gamemode mangohud lutris discord heroic-games-launcher-bin -y sudo dnf in steam gamescope gamemode mangohud lutris discord heroic-games-launcher-bin -y
sudo flatpak install launcher.moe moe.launcher.an-anime-game-launcher -y --noninteractive --system sudo flatpak install launcher.moe moe.launcher.an-anime-game-launcher -y --noninteractive --system
@@ -262,6 +275,28 @@ function installGamingPackages() {
fi fi
} }
function installAAGL-on-fedora() {
sudo mkdir /tmp/aagl/
sudo dnf in -y xdelta
sudo wget https://github.com/an-anime-team/honkers-launcher/releases/latest/download/honkers-launcher -O /tmp/aagl/honkers-launcher
sudo wget https://github.com/an-anime-team/an-anime-game-launcher/releases/latest/download/anime-game-launcher -O /tmp/aagl/anime-game-launcher
sudo wget https://github.com/an-anime-team/the-honkers-railway-launcher/releases/latest/download/honkers-railway-launcher -O /tmp/aagl/honkers-railway-launcher
sudo chown root:root /tmp/aagl/*
sudo chmod +x /tmp/aagl/*
sudo cp /tmp/aagl/honkers-launcher /bin/honkers-launcher
sudo cp /tmp/aagl/anime-game-launcher /bin/an-anime-game-launcher
sudo cp /tmp/aagl/honkers-railway-launcher /bin/the-honkers-railway-launcher
sudo touch /usr/share/applications/honkers-launcher.desktop
sudo touch /usr/share/applications/anime-game-launcher.desktop
sudo touch /usr/share/applications/the-honkers-railway-launcher.desktop
echo -e "[Desktop Entry]\nName=Honkers Launcher\nComment=A Launcher for honkers with auto-patching, discord rpc and time tracking\nExec=honkers-launcher\nTerminal=false\nType=Application\nIcon=honkers-launcher\nCategories=Game" | sudo tee /usr/share/applications/honkers-launcher.desktop
echo -e "[Desktop Entry]\nName=An Anime Game Launcher\nComment=A Launcher for a specific anime game with auto-patching, discord rpc and time tracking\nExec=an-anime-game-launcher\nTerminal=false\nType=Application\nIcon=an-anime-game-launcher\nCategories=Game" | sudo tee /usr/share/applications/anime-game-launcher.desktop
echo -e "[Desktop Entry]\nName=The Honkers Railway Launcher\nComment=A Launcher for honkers railway with auto-patching, discord rpc and time tracking\nExec=the-honkers-railway-launcher\nTerminal=false\nType=Application\nIcon=the-honkers-railway-launcher\nCategories=Game" | sudo tee /usr/share/applications/the-honkers-railway-launcher.desktop
sudo wget https://git.justw.tf/Lightemerald/linux-scripts/raw/branch/main/assets/moe.launcher.honkers-launcher -O /usr/share/icons/moe.launcher.honkers-launcher
sudo wget https://git.justw.tf/Lightemerald/linux-scripts/raw/branch/main/assets/moe.launcher.an-anime-game-launcher -O /usr/share/icons/moe.launcher.an-anime-game-launcher
sudo wget https://git.justw.tf/Lightemerald/linux-scripts/raw/branch/main/assets/moe.launcher.the-honkers-railway-launcher -O /usr/share/icons/moe.launcher.the-honkers-railway-launcher
}
function installSocialAndCommunicationPackages() { function installSocialAndCommunicationPackages() {
if (whiptail --title "Social and Communication" --yesno "Should we install social and communication packages?" 8 78); then if (whiptail --title "Social and Communication" --yesno "Should we install social and communication packages?" 8 78); then
echo "Installing social and communication packages..." echo "Installing social and communication packages..."