From b43ef60712b743f766e17b07cc656cb193830e93 Mon Sep 17 00:00:00 2001 From: Ralf Habacker Date: Wed, 15 Jan 2025 10:14:35 +0100 Subject: [PATCH] Setup environment variable WINE_BIN as a complete replacement for WINE --- src/winetricks | 9 +++------ src/winetricks.1 | 2 +- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/src/winetricks b/src/winetricks index b6ee3c692..c7975c2b6 100755 --- a/src/winetricks +++ b/src/winetricks @@ -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 @@ -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) @@ -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 \ diff --git a/src/winetricks.1 b/src/winetricks.1 index 7055efe2a..e8864f130 100644 --- a/src/winetricks.1 +++ b/src/winetricks.1 @@ -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