diff --git a/assets/moe.launcher.an-anime-game-launcher.png b/assets/moe.launcher.an-anime-game-launcher.png new file mode 100644 index 0000000..ab98821 Binary files /dev/null and b/assets/moe.launcher.an-anime-game-launcher.png differ diff --git a/assets/moe.launcher.honkers-launcher.png b/assets/moe.launcher.honkers-launcher.png new file mode 100644 index 0000000..5fb5864 Binary files /dev/null and b/assets/moe.launcher.honkers-launcher.png differ diff --git a/assets/moe.launcher.the-honkers-railway-launcher.png b/assets/moe.launcher.the-honkers-railway-launcher.png new file mode 100644 index 0000000..9e7e50b Binary files /dev/null and b/assets/moe.launcher.the-honkers-railway-launcher.png differ diff --git a/setup-linux.sh b/setup-linux.sh index fc5428d..e148c07 100755 --- a/setup-linux.sh +++ b/setup-linux.sh @@ -17,6 +17,7 @@ compactbutton=black,green button=black,red" function getDistributionType() { + echo "Detecting distribution..." if [[ -e /etc/debian_version ]]; then source /etc/os-release if [[ $ID == "debian" || $ID == "raspbian" ]]; then @@ -36,6 +37,7 @@ function getDistributionType() { } function checkWhiptail() { + echo "Checking whiptail..." if ! command -v whiptail &>/dev/null; then if [[ $DISTRO =~ (debian|ubuntu) ]]; then sudo apt install whiptail -y @@ -45,6 +47,7 @@ function checkWhiptail() { sudo pacman -S --needed --noconfirm newt fi fi + echo "Whiptail installed." } function updateSystem() { @@ -62,6 +65,7 @@ function updateSystem() { } function installBasicPackages() { + echo "Installing basic packages..." if [[ $DISTRO =~ (debian|ubuntu) ]]; then sudo apt install sudo nano bat git curl wget htop btop flatpak -y elif [[ $DISTRO == "fedora" ]]; then @@ -76,8 +80,11 @@ function installBasicPackages() { } 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 launcher.moe https://gol.launcher.moe/gol.launcher.moe.flatpakrepo + echo "Enabling third-party repositories..." if [[ $DISTRO =~ (debian|ubuntu) ]]; then sudo apt install ca-certificates software-properties-gtk gpg apt-transport-https firmware-misc-nonfree -y # Waydroid @@ -97,7 +104,6 @@ function setupRepositories() { elif [[ $DISTRO == "fedora" ]]; then sudo dnf4 copr enable atim/heroic-games-launcher -y 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 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 @@ -127,6 +133,7 @@ function setupRepositories() { } function installDistroSpecificPackages() { + echo "Installing distribution specific packages..." if [[ $DISTRO =~ (debian|ubuntu) ]]; then echo "None for now" elif [[ $DISTRO == "fedora" ]]; then @@ -148,57 +155,62 @@ function installDistroSpecificPackages() { } function installGraphicsDrivers() { - if [[ $DISTRO =~ (debian|ubuntu) ]]; then - sudo apt install ffmpeg vlc mpv -y - if lspci | grep -i nvidia &>/dev/null; then - sudo apt install nvidia-driver nvidia-vdpau-driver nvidia-vaapi-driver libnvcuvid1 libnvidia-encode1 -y - fi - if lspci | grep -Ei "vga|3d|display" | grep -i amd &>/dev/null; then - sudo apt install mesa-va-drivers vdpau-driver-all -y - fi - if lspci | grep -Ei "vga|3d|display" | grep -i intel &>/dev/null; then - sudo apt install intel-media-va-driver-non-free vdpau-driver-all -y - fi - elif [[ $DISTRO == "fedora" ]]; then - sudo dnf swap ffmpeg-free ffmpeg --allowerasing -y - sudo dnf in vlc mpv -y - sudo dnf4 groupupdate multimedia --setopt="install_weak_deps=False" --exclude=PackageKit-gstreamer-plugin -y - sudo dnf4 groupupdate sound-and-video -y - if lspci | grep -i nvidia &>/dev/null; then - sudo dnf install kmodtool akmods mokutil openssl -y - sudo kmodgenca -a - sudo mokutil --import /etc/pki/akmods/certs/public_key.der - sudo dnf in akmod-nvidia xorg-x11-drv-nvidia-cuda nvidia-vaapi-driver -y - fi - if lspci | grep -Ei "vga|3d|display" | grep -i amd &>/dev/null; then - sudo dnf swap mesa-va-drivers mesa-va-drivers-freeworld -y - sudo dnf swap mesa-vdpau-drivers mesa-vdpau-drivers-freeworld -y - fi - if lspci | grep -Ei "vga|3d|display" | grep -i intel &>/dev/null; then - sudo dnf in -y intel-media-driver - fi - elif [[ $DISTRO == "arch" ]]; then - sudo pacman -S --needed ffmpeg vlc mpv --noconfirm - if lspci | grep -i nvidia &>/dev/null; then - if uname -r | grep -q "cachyos"; then - sudo pacman -S --needed --noconfirm linux-cachyos-nvidia opencl-nvidia libva-vdpau-driver libva-nvidia-driver - else - if pacman -Qs nvidia > /dev/null; then - sudo pacman -R --noconfirm nvidia - elif pacman -Qs nvidia-dkms > /dev/null; then - sudo pacman -R --noconfirm nvidia-dkms - elif pacman -Qs xf86-video-nouveau > /dev/null; then - sudo pacman -R --noconfirm xf86-video-nouveau + if (whiptail --title "Graphics Drivers" --yesno "Should we install graphics drivers?" 8 78); then + echo "Installing graphics drivers..." + if [[ $DISTRO =~ (debian|ubuntu) ]]; then + sudo apt install ffmpeg vlc mpv -y + if lspci | grep -i nvidia &>/dev/null; then + sudo apt install nvidia-driver nvidia-vdpau-driver nvidia-vaapi-driver libnvcuvid1 libnvidia-encode1 -y + fi + if lspci | grep -Ei "vga|3d|display" | grep -i amd &>/dev/null; then + sudo apt install mesa-va-drivers vdpau-driver-all -y + fi + if lspci | grep -Ei "vga|3d|display" | grep -i intel &>/dev/null; then + sudo apt install intel-media-va-driver-non-free vdpau-driver-all -y + fi + elif [[ $DISTRO == "fedora" ]]; then + sudo dnf swap ffmpeg-free ffmpeg --allowerasing -y + sudo dnf in vlc mpv -y + sudo dnf4 groupupdate multimedia --setopt="install_weak_deps=False" --exclude=PackageKit-gstreamer-plugin -y + sudo dnf4 groupupdate sound-and-video -y + if lspci | grep -i nvidia &>/dev/null; then + sudo dnf install kmodtool akmods mokutil openssl -y + sudo kmodgenca -a + sudo mokutil --import /etc/pki/akmods/certs/public_key.der + sudo dnf in akmod-nvidia xorg-x11-drv-nvidia-cuda nvidia-vaapi-driver -y + fi + if lspci | grep -Ei "vga|3d|display" | grep -i amd &>/dev/null; then + sudo dnf swap mesa-va-drivers mesa-va-drivers-freeworld -y + sudo dnf swap mesa-vdpau-drivers mesa-vdpau-drivers-freeworld -y + fi + if lspci | grep -Ei "vga|3d|display" | grep -i intel &>/dev/null; then + sudo dnf in -y intel-media-driver + fi + elif [[ $DISTRO == "arch" ]]; then + sudo pacman -S --needed ffmpeg vlc mpv --noconfirm + if lspci | grep -i nvidia &>/dev/null; then + if uname -r | grep -q "cachyos"; then + sudo pacman -S --needed --noconfirm linux-cachyos-nvidia opencl-nvidia libva-vdpau-driver libva-nvidia-driver + else + if pacman -Qs nvidia > /dev/null; then + sudo pacman -R --noconfirm nvidia + elif pacman -Qs nvidia-dkms > /dev/null; then + 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 - 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 - 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 + else + return fi } @@ -248,7 +260,8 @@ function installGamingPackages() { elif [[ $DISTRO == "fedora" ]]; then sudo flatpak install flathub net.davidotek.pupgui2 -y --noninteractive --system 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 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 @@ -262,6 +275,28 @@ function installGamingPackages() { 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() { if (whiptail --title "Social and Communication" --yesno "Should we install social and communication packages?" 8 78); then echo "Installing social and communication packages..."