From 5f3445ca96f8e3ab7c609f31e9401a107e42a4da Mon Sep 17 00:00:00 2001 From: Storm Dragon Date: Fri, 25 Nov 2022 10:55:22 -0500 Subject: [PATCH] Move the installer script from the fossil repository into here, under the wine directory. --- wine/install-dependencies.sh | 99 ++++++++++++++++++++++++++++++++++++ 1 file changed, 99 insertions(+) create mode 100755 wine/install-dependencies.sh diff --git a/wine/install-dependencies.sh b/wine/install-dependencies.sh new file mode 100755 index 0000000..9d6b7fc --- /dev/null +++ b/wine/install-dependencies.sh @@ -0,0 +1,99 @@ +#!/bin/bash + +# Immediately exit if errors are encountered. +set -e + +# Installer/configuration tool for wine +# If this fails on your system, please contact storm_dragon@linux-a11y.org + +is_function() { + LC_ALL=C type "$1" 2> /dev/null | grep -q "$1 is a function" +} + +configure_arch() { + packageList=( + cabextract + dialog + dos2unix + gawk + unzip + w3m + wget + wine + winetricks + wine_gecko + wine-mono + sdl2 + ncurses + mpg123 + libpulse + libpng + libjpeg-turbo + gnutls + alsa-plugins + alsa-lib + mesa + openal + xz + gst-plugins-bad + gst-plugins-good + gst-plugins-ugly + gst-libav + p7zip + ) + if [[ "$(uname -m)" == "x86_64" ]]; then + # Enable multilib + sudo sed -i '/^#\[multilib\]$/{{N;s/^#\[multilib\]\n#Include = \/etc\/pacman.d\/mirrorlist$/[multilib]\nInclude = \/etc\/pacman.d\/mirrorlist/;t;P;D}}' /etc/pacman.conf + # include lib32 packages. + packageList+=( + lib32-sdl2 + lib32-ncurses + lib32-mpg123 + lib32-libpulse + lib32-libpng + lib32-libjpeg-turbo + lib32-gnutls + lib32-alsa-plugins + lib32-alsa-lib + lib32-mesa + lib32-openal + lib32-gst-plugins-good + lib32-gst-plugins-bad + lib32-gst-plugins-ugly + lib32-gst-libav) + fi + # Some of these may fail, so do them in a for loop. + yay -Syy + for i in "${packageList[@]}" ; do + yay -S --needed $i + done +} + +configure_debian() { + packageList=( + dialog + gawk + gstreamer1.0-plugins-bad:i386 + gstreamer1.0-plugins-good:i386 + gstreamer1.0-plugins-ugly:i386 + mono-complete + ncurses5-dev + w3m + winehq-stable + ) + # make sure 32 bit libraries are available + sudo dpkg --add-architecture i386 + sudo apt install --install-recommends ${packageList[*]} +} + + +distro="$(head -1 /etc/issue | cut -d ' ' -f1)" +distro="${distro,,}" + +if is_function configure_${distro} ; then + configure_${distro} +else + echo "${distro^} is not yet supported. If you want it added, please contact storm_dragon@linux-a11y.org" | fold -s -w 72 +fi + +exit 0