Simplify architecture check

This commit is contained in:
the Sane. 2024-10-25 20:54:49 -04:00 committed by GitHub
parent 1afd9af437
commit 71b226598a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -985,6 +985,8 @@ wine_check() {
if [ ! -x "$(command -v wine)" ]; then if [ ! -x "$(command -v wine)" ]; then
preflight_fail+=("Wine does not appear to be installed.\nPlease refer to our Quick Start Guide:\n$lug_wiki") preflight_fail+=("Wine does not appear to be installed.\nPlease refer to our Quick Start Guide:\n$lug_wiki")
return 1 return 1
else
preflight_pass+=("Wine is installed on your system.")
fi fi
# Get the current wine version # Get the current wine version
@ -1014,7 +1016,7 @@ wine_check() {
esac esac
} }
# Proceed only if the Wine version is acceptable # If system wine passes the above checks, also check for the new wow64 mode that currently does not work
if [ "$system_wine_ok" = "true" ]; then if [ "$system_wine_ok" = "true" ]; then
# Get paths to wine and wineserver binaries # Get paths to wine and wineserver binaries
wine_bin="$(command -v wine)" wine_bin="$(command -v wine)"
@ -1051,35 +1053,10 @@ wine_check() {
fi fi
fi fi
# Determine WOW64 type # If it's the new WOW64 or an unknown state, fail the check
if [ "${wineserver_binary_arch}" = "${wine_binary_arch}" ]; then if [ "${wineserver_binary_arch}" = "${wine_binary_arch}" ] || [ -z "${wineserver_binary_arch}" ] || [ -z "${wine_binary_arch}" ]; then
wow64_style="new"
elif [ -n "${wineserver_binary_arch}" ] && [ -n "${wine_binary_arch}" ]; then
wow64_style="classic"
else
wow64_style="unknown"
system_wine_ok="false" system_wine_ok="false"
fi fi
# If WOW64 support is present, check if it's "new" or "classic WOW64
# If it is set system_wine_ok to false
if [ "${wow64_style}" = "new" ]; then
preflight_fail+=("Wine is installed but uses the experimental WOW64 mode, which is not supported.")
system_wine_ok="false"
elif [ "${wow64_style}" = "classic" ]; then
preflight_pass+=("Wine is installed on your system.")
system_wine_ok="true"
elif [ "${wow64_style}" = "unknown" ]; then
preflight_fail+=("Failed to determine if Wine has experimental WOW64 support.")
system_wine_ok="false"
else
# Wine is installed and does not have WOW64 support
preflight_fail+=("Wine is installed but does not have WOW64 support. Please install 64bit Wine")
system_wine_ok="false"
fi
else
preflight_fail+=("Wine version $wine_current does not meet the required version $wine_required.")
system_wine_ok="false"
fi fi
} }