2024-07-15 20:00:04 +01:00
|
|
|
#!/bin/sh -e
|
2024-07-13 02:57:34 +01:00
|
|
|
|
2024-07-28 16:32:05 +01:00
|
|
|
. ./common-script.sh
|
|
|
|
|
2024-07-13 02:57:34 +01:00
|
|
|
installDepend() {
|
|
|
|
## Check for dependencies.
|
|
|
|
echo -e "${YELLOW}Installing dependencies...${RC}"
|
2024-07-14 03:16:02 +01:00
|
|
|
if [ "$PACKAGER" = "pacman" ]; then
|
2024-07-13 02:57:34 +01:00
|
|
|
if ! grep -q "^\s*\[multilib\]" /etc/pacman.conf; then
|
|
|
|
echo "[multilib]" | sudo tee -a /etc/pacman.conf
|
|
|
|
echo "Include = /etc/pacman.d/mirrorlist" | sudo tee -a /etc/pacman.conf
|
2024-08-12 15:46:48 +01:00
|
|
|
sudo ${PACKAGER} -Syu
|
2024-07-13 02:57:34 +01:00
|
|
|
else
|
|
|
|
echo "Multilib is already enabled."
|
|
|
|
fi
|
|
|
|
if ! command_exists yay && ! command_exists paru; then
|
|
|
|
echo "Installing yay as AUR helper..."
|
2024-08-12 15:46:48 +01:00
|
|
|
sudo ${PACKAGER} -S --needed --noconfirm base-devel
|
2024-07-13 02:57:34 +01:00
|
|
|
cd /opt && sudo git clone https://aur.archlinux.org/yay-git.git && sudo chown -R ${USER}:${USER} ./yay-git
|
|
|
|
cd yay-git && makepkg --noconfirm -si
|
|
|
|
else
|
|
|
|
echo "Aur helper already installed"
|
|
|
|
fi
|
|
|
|
if command_exists yay; then
|
|
|
|
AUR_HELPER="yay"
|
|
|
|
elif command_exists paru; then
|
|
|
|
AUR_HELPER="paru"
|
|
|
|
else
|
|
|
|
echo "No AUR helper found. Please install yay or paru."
|
|
|
|
exit 1
|
|
|
|
fi
|
2024-08-12 15:46:48 +01:00
|
|
|
${AUR_HELPER} -S --needed --noconfirm wine giflib lib32-giflib libpng lib32-libpng libldap lib32-libldap gnutls lib32-gnutls \
|
2024-07-13 02:57:34 +01:00
|
|
|
mpg123 lib32-mpg123 openal lib32-openal v4l-utils lib32-v4l-utils libpulse lib32-libpulse libgpg-error \
|
|
|
|
lib32-libgpg-error alsa-plugins lib32-alsa-plugins alsa-lib lib32-alsa-lib libjpeg-turbo lib32-libjpeg-turbo \
|
|
|
|
sqlite lib32-sqlite libxcomposite lib32-libxcomposite libxinerama lib32-libgcrypt libgcrypt lib32-libxinerama \
|
|
|
|
ncurses lib32-ncurses ocl-icd lib32-ocl-icd libxslt lib32-libxslt libva lib32-libva gtk3 \
|
|
|
|
lib32-gtk3 gst-plugins-base-libs lib32-gst-plugins-base-libs vulkan-icd-loader lib32-vulkan-icd-loader
|
2024-07-14 03:16:02 +01:00
|
|
|
elif [ "$PACKAGER" = "apt-get" ]; then
|
2024-07-13 02:57:34 +01:00
|
|
|
sudo ${PACKAGER} update
|
|
|
|
sudo ${PACKAGER} install -y wine64 wine32 libasound2-plugins:i386 libsdl2-2.0-0:i386 libdbus-1-3:i386 libsqlite3-0:i386
|
2024-07-14 03:16:02 +01:00
|
|
|
elif [ "$PACKAGER" = "dnf" ] || [ "$PACKAGER" = "zypper" ]; then
|
2024-07-13 02:57:34 +01:00
|
|
|
sudo ${PACKAGER} install -y wine
|
|
|
|
else
|
|
|
|
sudo ${PACKAGER} install -y ${DEPENDENCIES}
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
install_additional_dependencies() {
|
2024-07-14 03:16:02 +01:00
|
|
|
case $(which apt-get || which zypper || which dnf || which pacman) in
|
2024-07-13 02:57:34 +01:00
|
|
|
*apt-get)
|
|
|
|
version=$(git -c 'versionsort.suffix=-' ls-remote --tags --sort='v:refname' https://github.com/lutris/lutris |
|
|
|
|
grep -v 'beta' |
|
|
|
|
tail -n1 |
|
|
|
|
cut -d '/' --fields=3)
|
|
|
|
|
|
|
|
version_no_v=$(echo "$version" | tr -d v)
|
|
|
|
wget "https://github.com/lutris/lutris/releases/download/${version}/lutris_${version_no_v}_all.deb"
|
|
|
|
|
|
|
|
# Install the downloaded .deb package using apt-get
|
|
|
|
echo "Installing lutris_${version_no_v}_all.deb"
|
|
|
|
sudo apt-get update
|
|
|
|
sudo apt-get install ./lutris_${version_no_v}_all.deb
|
|
|
|
|
|
|
|
# Clean up the downloaded .deb file
|
|
|
|
rm lutris_${version_no_v}_all.deb
|
|
|
|
|
|
|
|
echo "Lutris Installation complete."
|
|
|
|
echo "Installing steam..."
|
2024-07-25 20:10:31 +01:00
|
|
|
|
2024-07-25 20:23:55 +01:00
|
|
|
#Install steam on Debian
|
2024-07-25 20:10:31 +01:00
|
|
|
if (lsb_release -i | grep -qi Debian); then
|
|
|
|
#Enable i386 repos
|
|
|
|
sudo dpkg --add-architecture i386
|
|
|
|
# Install software-properties-common to be able to add repos
|
|
|
|
sudo apt-get install -y software-properties-common
|
|
|
|
# Add repos necessary for installing steam
|
2024-07-25 20:39:45 +01:00
|
|
|
sudo apt-add-repository contrib -y
|
|
|
|
sudo apt-add-repository non-free -y
|
2024-07-25 20:10:31 +01:00
|
|
|
#Install steam
|
|
|
|
sudo apt-get install steam-installer -y
|
|
|
|
else
|
|
|
|
#Install steam on Ubuntu
|
|
|
|
sudo apt-get install -y steam
|
|
|
|
fi
|
2024-07-13 02:57:34 +01:00
|
|
|
;;
|
|
|
|
*zypper)
|
|
|
|
|
|
|
|
;;
|
|
|
|
*dnf)
|
|
|
|
|
|
|
|
;;
|
|
|
|
*pacman)
|
2024-08-17 19:04:19 +01:00
|
|
|
echo "Installing Steam for Arch Linux..."
|
2024-08-19 11:35:49 +01:00
|
|
|
sudo pacman -S steam
|
2024-08-17 19:04:19 +01:00
|
|
|
echo "Steam installation complete."
|
2024-07-13 02:57:34 +01:00
|
|
|
|
2024-08-17 19:04:19 +01:00
|
|
|
echo "Installing Lutris for Arch Linux..."
|
|
|
|
sudo pacman -S --noconfirm lutris
|
|
|
|
echo "Lutris installation complete."
|
|
|
|
|
|
|
|
echo "Installing GOverlay for Arch Linux..."
|
|
|
|
sudo pacman -S --noconfirm goverlay
|
|
|
|
echo "GOverlay installation complete."
|
2024-07-13 02:57:34 +01:00
|
|
|
;;
|
|
|
|
*)
|
|
|
|
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
}
|
|
|
|
|
|
|
|
checkEnv
|
|
|
|
installDepend
|
2024-07-15 22:26:03 +01:00
|
|
|
install_additional_dependencies
|