Skip to content

Commit

Permalink
Setup environment variable WINE_BIN as a complete replacement for WINE
Browse files Browse the repository at this point in the history
  • Loading branch information
rhabacker committed Jan 15, 2025
1 parent ab80d85 commit b43ef60
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
9 changes: 3 additions & 6 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
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
If set, this specifies which wine binary to use by default
.TP
.I WINESERVER
Expand Down

0 comments on commit b43ef60

Please sign in to comment.