2024-07-15 20:00:04 +01:00
|
|
|
#!/bin/sh -e
|
2024-07-13 02:57:34 +01:00
|
|
|
|
2024-08-15 07:13:56 +01:00
|
|
|
. ../common-script.sh
|
2024-07-28 16:32:05 +01:00
|
|
|
|
2024-07-13 02:57:34 +01:00
|
|
|
installDepend() {
|
2024-09-18 20:10:21 +01:00
|
|
|
# Check for dependencies
|
|
|
|
DEPENDENCIES='wine dbus'
|
2024-09-12 21:14:50 +01:00
|
|
|
printf "%b\n" "${YELLOW}Installing dependencies...${RC}"
|
2024-09-18 20:10:21 +01:00
|
|
|
case "$PACKAGER" in
|
|
|
|
pacman)
|
|
|
|
#Check for multilib
|
2024-09-28 19:47:48 +01:00
|
|
|
if ! grep -q "^\s*\[multilib\]" /etc/pacman.conf; then
|
2024-09-18 20:10:21 +01:00
|
|
|
echo "[multilib]" | "$ESCALATION_TOOL" tee -a /etc/pacman.conf
|
|
|
|
echo "Include = /etc/pacman.d/mirrorlist" | "$ESCALATION_TOOL" tee -a /etc/pacman.conf
|
|
|
|
"$ESCALATION_TOOL" "$PACKAGER" -Syu
|
|
|
|
else
|
|
|
|
printf "%b\n" "${GREEN}Multilib is already enabled.${RC}"
|
|
|
|
fi
|
|
|
|
|
|
|
|
DISTRO_DEPS="gnutls lib32-gnutls base-devel gtk2 gtk3 lib32-gtk2 lib32-gtk3 libpulse lib32-libpulse alsa-lib lib32-alsa-lib \
|
|
|
|
alsa-utils alsa-plugins lib32-alsa-plugins alsa-lib lib32-alsa-lib giflib lib32-giflib libpng lib32-libpng \
|
|
|
|
libldap lib32-libldap openal lib32-openal libxcomposite lib32-libxcomposite libxinerama lib32-libxinerama \
|
|
|
|
ncurses lib32-ncurses vulkan-icd-loader lib32-vulkan-icd-loader ocl-icd lib32-ocl-icd libva lib32-libva \
|
2024-11-05 19:41:53 +00:00
|
|
|
gst-plugins-base-libs lib32-gst-plugins-base-libs sdl2 lib32-sdl2 v4l-utils lib32-v4l-utils sqlite lib32-sqlite"
|
2024-09-18 20:10:21 +01:00
|
|
|
|
2024-09-30 10:06:49 +01:00
|
|
|
$AUR_HELPER -S --needed --noconfirm $DEPENDENCIES $DISTRO_DEPS
|
2024-09-18 20:10:21 +01:00
|
|
|
;;
|
|
|
|
apt-get|nala)
|
2024-11-05 19:41:53 +00:00
|
|
|
DISTRO_DEPS="libasound2-plugins:i386 libsdl2-2.0-0:i386 libdbus-1-3:i386 libsqlite3-0:i386 wine64 wine32"
|
2024-09-18 20:10:21 +01:00
|
|
|
|
|
|
|
"$ESCALATION_TOOL" "$PACKAGER" update
|
|
|
|
"$ESCALATION_TOOL" dpkg --add-architecture i386
|
|
|
|
"$ESCALATION_TOOL" "$PACKAGER" install -y software-properties-common
|
|
|
|
"$ESCALATION_TOOL" apt-add-repository contrib -y
|
|
|
|
"$ESCALATION_TOOL" "$PACKAGER" update
|
2024-09-30 10:06:49 +01:00
|
|
|
"$ESCALATION_TOOL" "$PACKAGER" install -y $DEPENDENCIES $DISTRO_DEPS
|
2024-09-18 20:10:21 +01:00
|
|
|
;;
|
|
|
|
dnf)
|
2024-11-05 19:41:53 +00:00
|
|
|
if [ "$(rpm -E %fedora)" -le 41 ]; then
|
2024-09-28 19:59:41 +01:00
|
|
|
"$ESCALATION_TOOL" "$PACKAGER" install ffmpeg ffmpeg-libs -y
|
2024-09-30 10:06:49 +01:00
|
|
|
"$ESCALATION_TOOL" "$PACKAGER" install -y $DEPENDENCIES
|
2024-09-28 19:59:41 +01:00
|
|
|
else
|
|
|
|
printf "%b\n" "${CYAN}Fedora < 41 detected. Installing rpmfusion repos.${RC}"
|
|
|
|
"$ESCALATION_TOOL" "$PACKAGER" install https://mirrors.rpmfusion.org/free/fedora/rpmfusion-free-release-"$(rpm -E %fedora)".noarch.rpm https://mirrors.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-"$(rpm -E %fedora)".noarch.rpm -y
|
|
|
|
"$ESCALATION_TOOL" "$PACKAGER" config-manager --enable fedora-cisco-openh264 -y
|
2024-09-30 10:06:49 +01:00
|
|
|
"$ESCALATION_TOOL" "$PACKAGER" install -y $DEPENDENCIES
|
2024-09-28 19:59:41 +01:00
|
|
|
fi
|
2024-09-18 20:10:21 +01:00
|
|
|
;;
|
|
|
|
zypper)
|
2024-09-30 10:06:49 +01:00
|
|
|
"$ESCALATION_TOOL" "$PACKAGER" -n install $DEPENDENCIES
|
2024-09-18 20:10:21 +01:00
|
|
|
;;
|
|
|
|
*)
|
2024-11-07 19:03:21 +00:00
|
|
|
printf "%b\n" "${RED}Unsupported package manager ${PACKAGER}${RC}"
|
|
|
|
exit 1
|
2024-09-18 20:10:21 +01:00
|
|
|
;;
|
|
|
|
esac
|
2024-07-13 02:57:34 +01:00
|
|
|
}
|
|
|
|
|
2024-09-18 20:10:21 +01:00
|
|
|
installAdditionalDepend() {
|
|
|
|
case "$PACKAGER" in
|
|
|
|
pacman)
|
|
|
|
DISTRO_DEPS='steam lutris goverlay'
|
2024-09-30 10:06:49 +01:00
|
|
|
"$ESCALATION_TOOL" "$PACKAGER" -S --needed --noconfirm $DISTRO_DEPS
|
2024-09-18 20:10:21 +01:00
|
|
|
;;
|
|
|
|
apt-get|nala)
|
2024-07-13 02:57:34 +01:00
|
|
|
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)
|
2024-09-12 21:02:00 +01:00
|
|
|
curl -sSLo "lutris_${version_no_v}_all.deb" "https://github.com/lutris/lutris/releases/download/${version}/lutris_${version_no_v}_all.deb"
|
2024-11-05 19:41:53 +00:00
|
|
|
|
2024-09-18 20:10:21 +01:00
|
|
|
printf "%b\n" "${YELLOW}Installing Lutris...${RC}"
|
2024-09-21 15:19:41 +01:00
|
|
|
"$ESCALATION_TOOL" "$PACKAGER" install ./lutris_"${version_no_v}"_all.deb
|
2024-07-13 02:57:34 +01:00
|
|
|
|
2024-09-21 15:19:41 +01:00
|
|
|
rm lutris_"${version_no_v}"_all.deb
|
2024-07-13 02:57:34 +01:00
|
|
|
|
2024-09-18 20:10:21 +01:00
|
|
|
printf "%b\n" "${GREEN}Lutris Installation complete.${RC}"
|
|
|
|
printf "%b\n" "${YELLOW}Installing steam...${RC}"
|
2024-07-25 20:10:31 +01:00
|
|
|
|
2024-09-18 20:10:21 +01:00
|
|
|
if lsb_release -i | grep -qi Debian; then
|
|
|
|
"$ESCALATION_TOOL" apt-add-repository non-free -y
|
|
|
|
"$ESCALATION_TOOL" "$PACKAGER" install steam-installer -y
|
2024-07-25 20:10:31 +01:00
|
|
|
else
|
2024-09-18 20:10:21 +01:00
|
|
|
"$ESCALATION_TOOL" "$PACKAGER" install -y steam
|
2024-07-25 20:10:31 +01:00
|
|
|
fi
|
2024-07-13 02:57:34 +01:00
|
|
|
;;
|
2024-09-18 20:10:21 +01:00
|
|
|
dnf)
|
|
|
|
DISTRO_DEPS='steam lutris'
|
|
|
|
"$ESCALATION_TOOL" "$PACKAGER" install -y $DISTRO_DEPS
|
2024-07-13 02:57:34 +01:00
|
|
|
;;
|
2024-09-18 20:10:21 +01:00
|
|
|
zypper)
|
|
|
|
# Flatpak
|
|
|
|
DISTRO_DEPS='lutris'
|
|
|
|
"$ESCALATION_TOOL" "$PACKAGER" -n install $DISTRO_DEPS
|
2024-07-13 02:57:34 +01:00
|
|
|
;;
|
|
|
|
*)
|
2024-11-07 19:03:21 +00:00
|
|
|
printf "%b\n" "${RED}Unsupported package manager ${PACKAGER}${RC}"
|
|
|
|
exit 1
|
2024-09-18 20:10:21 +01:00
|
|
|
;;
|
2024-07-13 02:57:34 +01:00
|
|
|
esac
|
|
|
|
}
|
|
|
|
|
|
|
|
checkEnv
|
2024-09-06 00:23:24 +01:00
|
|
|
checkAURHelper
|
2024-08-23 14:12:47 +01:00
|
|
|
checkEscalationTool
|
2024-07-13 02:57:34 +01:00
|
|
|
installDepend
|
2024-09-18 20:10:21 +01:00
|
|
|
installAdditionalDepend
|