Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setup internal used environment variable WINE with absolute wine path #2320

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

rhabacker
Copy link
Contributor

In the error or verbosity case this helps to see the actual wine executable used.

Closes: #2319

Copy link
Contributor

@jre-wine jre-wine left a comment

Choose a reason for hiding this comment

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

I haven't really tested it, sorry, but if this does what you need it for, it sounds good. Just two thoughts:

Somewhere else in the code there's already
WINE_BIN="$(command -v "${WINE}")"
Doing the same thing twice seems unnecessary, could this be simplified?

AFAICT this is unnecessary or wrong here:
&& test -f "${_abswine}"

To avoid the unnecessary -f use
if test -x "${_abswine}" ; then

Or if there is a legit case where WINE is not executable but is a file use
if test -x "${_abswine}" || test -f "${_abswine}"; then

The additional check as to whether the absolute path of wine
is a file is superfluous, as the executability is checked
beforehand.
In the error or verbosity case this helps to see the actual wine
executable used.

Closes: Winetricks#2319
@rhabacker rhabacker force-pushed the fix-2319 branch 2 times, most recently from e80c8ee to b43ef60 Compare January 15, 2025 11:20
@@ -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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants