Skip to content

Commit

Permalink
winetricks_set_wineprefix: warn if binary arch is unknown
Browse files Browse the repository at this point in the history
Currently if the binary arch can't be detected, w_die exits
the function winetricks_get_file_arch, but winetricks
continues. For now, only warn about this.
  • Loading branch information
jre-wine committed Feb 18, 2024
1 parent dbaca9e commit a5a9a02
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/winetricks
Original file line number Diff line number Diff line change
Expand Up @@ -5106,10 +5106,16 @@ winetricks_set_wineprefix()
if test -d "${W_DRIVE_C}/windows/syswow64"; then
# Check the bitness of wineserver + wine binary, used later to determine if we're on a WOW setup (no wine64)
# https://github.com/Winetricks/winetricks/issues/2030

WINESERVER_BIN="$(which "${WINESERVER}")"
_W_wineserver_binary_arch="$(winetricks_get_file_arch "${WINESERVER_BIN}")"
if ! _W_wineserver_binary_arch="$(winetricks_get_file_arch "${WINESERVER_BIN}")"; then
w_warn "Unknown file arch of ${WINESERVER_BIN}, continuing anyway."
fi

WINE_BIN="$(which "${WINE}")"
_W_wine_binary_arch="$(winetricks_get_file_arch "${WINE_BIN}")"
if ! _W_wine_binary_arch="$(winetricks_get_file_arch "${WINE_BIN}")"; then
w_warn "Unknown file arch of ${WINE_BIN}, continuing anyway."
fi

# determine wow64 type (new/old)
# FIXME: check what upstream is calling them
Expand Down

0 comments on commit a5a9a02

Please sign in to comment.