From 71b226598a0654204578a09f81bb15281d9c2bd4 Mon Sep 17 00:00:00 2001 From: "the Sane." <3657071+the-sane@users.noreply.github.com> Date: Fri, 25 Oct 2024 20:54:49 -0400 Subject: [PATCH] Simplify architecture check --- lug-helper.sh | 33 +++++---------------------------- 1 file changed, 5 insertions(+), 28 deletions(-) diff --git a/lug-helper.sh b/lug-helper.sh index 76ad4ff..a391774 100755 --- a/lug-helper.sh +++ b/lug-helper.sh @@ -985,6 +985,8 @@ wine_check() { 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") return 1 + else + preflight_pass+=("Wine is installed on your system.") fi # Get the current wine version @@ -1014,7 +1016,7 @@ wine_check() { 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 # Get paths to wine and wineserver binaries wine_bin="$(command -v wine)" @@ -1051,35 +1053,10 @@ wine_check() { fi fi - # Determine WOW64 type - if [ "${wineserver_binary_arch}" = "${wine_binary_arch}" ]; then - wow64_style="new" - elif [ -n "${wineserver_binary_arch}" ] && [ -n "${wine_binary_arch}" ]; then - wow64_style="classic" - else - wow64_style="unknown" + # If it's the new WOW64 or an unknown state, fail the check + if [ "${wineserver_binary_arch}" = "${wine_binary_arch}" ] || [ -z "${wineserver_binary_arch}" ] || [ -z "${wine_binary_arch}" ]; then system_wine_ok="false" 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 }