Skip to content

Commit

Permalink
winetricks_set_wineprefix: provide basics to determine Wine's bindir
Browse files Browse the repository at this point in the history
  • Loading branch information
jre-wine committed Feb 23, 2024
1 parent a9a5567 commit f036b30
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/winetricks
Original file line number Diff line number Diff line change
Expand Up @@ -5063,6 +5063,19 @@ winetricks_set_wineprefix()
# 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}")"

# wineboot often is a link pointing to wineapploader in Wine's bindir. If we don't find binaries we may look for them there later
if [ -n "${READLINK_F}" ]; then
true
elif [ "$(uname -s)" = "Darwin" ]; then
# readlink exists on MacOS, but does not support "-f" on MacOS < 12.3
# Use perl instead
READLINK_F="perl -MCwd=abs_path -le 'print abs_path readlink(shift);'"
else
READLINK_F="readlink -f"
fi
WINEBOOT_BIN="$(dirname "${WINESERVER_BIN}")/$(basename "${WINESERVER_BIN}"|sed 's,wineserver,wineboot,')"

_W_wineserver_binary_arch="$(winetricks_get_file_arch "${WINESERVER_BIN}")"
WINE_BIN="$(which "${WINE}")"
_W_wine_binary_arch="$(winetricks_get_file_arch "${WINE_BIN}")"
Expand Down

0 comments on commit f036b30

Please sign in to comment.