mirror of
https://github.com/the-sane/lug-helper.git
synced 2025-07-01 05:21:00 +00:00
lug-helper.sh: Add check for 32-bit only wine installs and fail the preflight check.
This commit is contained in:
@ -1009,7 +1009,9 @@ wine_check() {
|
||||
ob_output="$(od -An -t x1 -j 0x12 -N 1 "$file_path" 2>/dev/null | tr -d '[:space:]')"
|
||||
case "$ob_output" in
|
||||
"3e") echo "x86_64" ;;
|
||||
"03"|"06") echo "i386" ;;
|
||||
"b7") echo "aarch64" ;;
|
||||
"28") echo "aarch32" ;;
|
||||
*) echo "" ;;
|
||||
esac
|
||||
}
|
||||
@ -1026,7 +1028,6 @@ wine_check() {
|
||||
|
||||
# If unable to determine architecture, attempt alternative methods
|
||||
if [ -z "${wine_binary_arch}" ]; then
|
||||
wineboot_bin="$(command -v wineboot)"
|
||||
if [ -x "${wineboot_bin}" ]; then
|
||||
wine_bin_dir="$(dirname "$(readlink -f "${wineboot_bin}" 2>/dev/null)" 2>/dev/null)"
|
||||
if [ -x "${wine_bin_dir}/wine" ]; then
|
||||
@ -1051,8 +1052,15 @@ wine_check() {
|
||||
fi
|
||||
fi
|
||||
|
||||
# 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
|
||||
# If Wine is 32-bit only, fail the check
|
||||
if { [ "${wineserver_binary_arch}" = "i386" ] || [ "${wineserver_binary_arch}" = "aarch32" ]; } && \
|
||||
{ [ "${wine_binary_arch}" = "i386" ] || [ "${wine_binary_arch}" = "aarch32" ]; }; then
|
||||
preflight_fail+=("Wine does not appear to be installed correctly.\nPlease refer to our Quick Start Guide:\n$lug_wiki")
|
||||
system_wine_ok="false"
|
||||
fi
|
||||
|
||||
# If it's the new WOW64, fail the check
|
||||
if [ "${wineserver_binary_arch}" = "${wine_binary_arch}" ]; then
|
||||
system_wine_ok="false"
|
||||
fi
|
||||
fi
|
||||
|
Reference in New Issue
Block a user