Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions src/winetricks
Original file line number Diff line number Diff line change
Expand Up @@ -4442,10 +4442,7 @@ winetricks_set_wineprefix()
w_warn "Unknown file arch of ${WINESERVER_BIN}."
fi

if [ -z "${WINE_BIN}" ]; then
WINE_BIN="$(command -v "${WINE}")"
fi
_W_wine_binary_arch="$(winetricks_get_file_arch "${WINE_BIN}")"
_W_wine_binary_arch="$(winetricks_get_file_arch "${WINE}")"
if [ -z "${_W_wine_binary_arch}" ]; then
# wine might be a script calling a binary in Wine's bindir.
if [ -z "${WINE_BINDIR}" ] && [ -x "${WINEBOOT_BIN}" ]; then
Expand All @@ -4456,7 +4453,7 @@ winetricks_set_wineprefix()
fi
fi
if [ -z "${_W_wine_binary_arch}" ]; then
w_warn "Unknown file arch of ${WINE_BIN}."
w_warn "Unknown file arch of ${WINE}."
fi

# determine wow64 type (new/old)
Expand Down Expand Up @@ -4826,7 +4823,7 @@ winetricks_wine_setup()
W_DRIVE_C="C:/"
;;
*)
WINE="${WINE:-wine}"
WINE=${WINE:-${WINE_BIN:-wine}}
# Find wineserver.
# Some distributions (Debian before wine 1.8-2) don't have it on the path.
for x in \
Expand Down Expand Up @@ -4873,7 +4870,10 @@ winetricks_wine_setup()
WINETRICKS_ORIGINAL_WINEPREFIX="${HOME}/.wine"
fi
_abswine="$(command -v "${WINE}" 2>/dev/null)"
if ! test -x "${_abswine}" || ! test -f "${_abswine}"; then
if test -x "${_abswine}"; then
WINE=${_abswine}
export WINE
else
w_die "WINE is ${WINE}, which is neither on the path nor an executable file"
fi
unset _abswine
Expand Down
2 changes: 1 addition & 1 deletion src/winetricks.1
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ winetricks 7zip
.SH ENVIRONMENT VARIABLES
Wine checks several environment variables on startup:
.TP
.I WINE
.I WINE, WINE_BIN
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The manual should explain what each of them does / when to use them / etc.

If set, this specifies which wine binary to use by default
.TP
.I WINESERVER
Expand Down
Loading