Download and cache latest version of winetricks. This insures that the latest version is being used, yes, even on Debian. lol This change should be considered experimental currently, it seems stable but if it proves otherwise it will be reverted.

This commit is contained in:
Storm Dragon 2021-10-09 04:16:35 -04:00
parent 0221f4c7eb
commit 0c05d98bc9

View File

@ -181,12 +181,6 @@ checklist() {
errorList+=("Critical: Wine is not installed. You will not be able to play any games.") errorList+=("Critical: Wine is not installed. You will not be able to play any games.")
fi fi
packageList+=("wine") packageList+=("wine")
if command -v winetricks &> /dev/null ; then
[[ $# -eq 0 ]] && echo "Winetricks is installed."
else
errorList+=("Critical: Winetricks is not installed. This means wine cannot be configured, dependancies cannot be installed, and only self-voicing games have any chance of working.")
fi
packageList+=("winetricks")
if command -v curl &> /dev/null ; then if command -v curl &> /dev/null ; then
[[ $# -eq 0 ]] && echo "Curl is installed." [[ $# -eq 0 ]] && echo "Curl is installed."
else else
@ -442,6 +436,22 @@ echo "Loading documentation, please wait..."
exit 0 exit 0
} }
winetricks() {
# Download or update agm's copy of winetricks
if [[ ! -e "${cache}/winetricks" ]]; then
checkWinetricksUpdate="true"
download "https://raw.githubusercontent.com/Winetricks/winetricks/master/src/winetricks"
chmod 700 "${cache}/winetricks"
else
if [[ "$checkWinetricksUpdate" != "true" ]]; then
checkWinetricksUpdate="true"
${cache}/winetricks --self-update
fi
fi
# Run the requested winetricks parameters
${cache}/winetricks "$@"
}
install_wine_bottle() { install_wine_bottle() {
# 32 bit installations work best and are the default here, if you need to override it, do it in the game specific installation steps. # 32 bit installations work best and are the default here, if you need to override it, do it in the game specific installation steps.
export WINEARCH="${WINEARCH:-win32}" export WINEARCH="${WINEARCH:-win32}"
@ -757,6 +767,7 @@ cache="${XDG_CONFIG_HOME:-$HOME/.config}/storm-games/audiogame-manager/cache"
configFile="${XDG_CONFIG_HOME:-$HOME/.config}/storm-games/audiogame-manager/games.conf" configFile="${XDG_CONFIG_HOME:-$HOME/.config}/storm-games/audiogame-manager/games.conf"
mkdir -p "${cache}" mkdir -p "${cache}"
mkdir -p "${configFile%/*}" mkdir -p "${configFile%/*}"
checkWinetricksUpdate="false"
# Turn off debug messages # Turn off debug messages
export WINEDEBUG="-all" export WINEDEBUG="-all"
# Compatibility with box86 # Compatibility with box86