Skip to content

Instantly share code, notes, and snippets.

@divadsn
Last active May 1, 2021 01:36
Show Gist options
  • Save divadsn/f9ce6e35cdd43d7ba0220841eb54ef57 to your computer and use it in GitHub Desktop.
Save divadsn/f9ce6e35cdd43d7ba0220841eb54ef57 to your computer and use it in GitHub Desktop.
All-in-one installation script for Multi Theft Auto on Linux. Requires wine with lib32 supported libraries.
#!/bin/bash
export WINEPREFIX=/home/$USER/.local/share/MultiTheftAuto
export WINEARCH=win32
wineboot -u
hexdump -n 4 -e '4/4 "%08X" 1 "\n"' /dev/urandom > $WINEPREFIX/drive_c/.windows-serial
winetricks -q d3dx9
winetricks settings fontsmooth=rgb
winetricks settings sandbox
curl "https://mirror.codebucket.de/.testing/fonts.zip" --output /tmp/fonts.zip
unzip /tmp/fonts.zip -d $WINEPREFIX/drive_c/windows/Fonts/
rm /tmp/fonts.zip
SETUP_FILE=$(zenity --file-selection)
if [ $? -ne 0 ]; then
print "No file selected, aborting..."
exit 1
fi
wine "$SETUP_FILE"
wineserver -w
wineboot -r
SETUP_FILE=$WINEPREFIX/drive_c/mtasa-1.5.8.exe
curl "https://mirror.s6.mtasa.ohbah.com/mtasa/main/mtasa-1.5.8.exe" --output $SETUP_FILE
wine "$SETUP_FILE"
wineboot -r
@divadsn
Copy link
Author

divadsn commented Apr 11, 2021

List of required packages on Arch Linux based distros:
sudo pacman -S wine winetricks wine-mono wine-gecko lib32-alsa-lib lib32-alsa-plugins lib32-libpulse lib32-alsa-oss lib32-openal lib32-mpg123 lib32-giflib lib32-libpng lib32-gnutls lib32-gst-plugins-base lib32-gst-plugins-good lib32-libcups lib32-libxrandr

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment