From 3d9e4b67e3af060a335992fba97a3b39d2ace3ad Mon Sep 17 00:00:00 2001 From: Storm Dragon Date: Sat, 9 Oct 2021 17:37:52 -0400 Subject: [PATCH] Rough draft of script to configre pi for gaming with audiogame-manager. --- .includes/gaming.sh | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .includes/gaming.sh diff --git a/.includes/gaming.sh b/.includes/gaming.sh new file mode 100644 index 0000000..bbeb2d5 --- /dev/null +++ b/.includes/gaming.sh @@ -0,0 +1,30 @@ +#!/bin/bash + + +install_package() { + # If for some reason we have to change AUR helpers, this function should make it easy to update everything all at once. + yay --needed --noconfirm -S "$@" +} + +# URL from where wine is downloaded, must be i686 +wineURL="https://32.arlm.tyzoid.com/i686/community/wine-5.14-1.0-i686.pkg.tar.zst" + +# Install required packages +install_package cabextract box86 dos2unix p7zip unzip xdotool +# Download and install wine +wineFile="$(mktemp)" +wget -O "$wineFile" "$wineURL" +pushd /opt +sudo tar xf "$wineFile" +sudo mv usr wine +popd + +# Create files and links in /usr/local/bin +sudo mkdir -p /usr/local/bin +echo -e '#!/bin/bash\nsetarch linux32 -L /opt/wine/bin/wine '"$@" | sudo tee /usr/local/bin/wine > /dev/null +sudo chmod 755 /usr/local/bin/wine +for i in wineboot winecfg wineserver ; do + sudo ln -s /opt/wine/bin/"$i" /usr/local/bin/"$i" + sudo chmod 755 /usr/local/bin/"$i" +done +