Does it work if you export the variable right before running the script?
Bash:
export WINESERVER=wineserver32
sh winetricks corefonts
export WINESERVER=wineserver32
sh winetricks corefonts
$ echo $WINESERVER
wineserver32
$ sh winetricks corefonts
------------------------------------------------------
warning: wineserver not found!
------------------------------------------------------
$
grep -i wineserver winetricks
? grep -i wineserver
in the winetricks script - How to do it?$ grep -i wineserver winetricks
w_wineserver -w
# wrapper around wineserver, to let users know that it will wait indefinitely/kill stuff
w_wineserver()
*-k) w_warn "Running ${WINESERVER} -k. This will kill all running wine processes in prefix=${WINEPREFIX}";;
*-w) w_warn "Running ${WINESERVER} -w. This will hang until all wine processes in prefix=${WINEPREFIX} terminate";;
*) w_warn "Invoking wineserver with '$*'";;
"${WINESERVER}" $@
w_wineserver -w
"${WINESERVER}" -w
WINESERVER=""
# Find wineserver.
"${WINESERVER}" \
"$(command -v wineserver 2> /dev/null)" \
"$(dirname "${WINE}")/server/wineserver" \
/usr/bin/wineserver-development \
/usr/lib/wine/wineserver \
/usr/lib/i386-kfreebsd-gnu/wine/wineserver \
/usr/lib/i386-linux-gnu/wine/wineserver \
/usr/lib/powerpc-linux-gnu/wine/wineserver \
/usr/lib/i386-kfreebsd-gnu/wine/bin/wineserver \
/usr/lib/i386-linux-gnu/wine/bin/wineserver \
/usr/lib/powerpc-linux-gnu/wine/bin/wineserver \
/usr/lib/x86_64-linux-gnu/wine/bin/wineserver \
/usr/lib/i386-kfreebsd-gnu/wine-development/wineserver \
/usr/lib/i386-linux-gnu/wine-development/wineserver \
/usr/lib/powerpc-linux-gnu/wine-development/wineserver \
/usr/lib/x86_64-linux-gnu/wine-development/wineserver \
/usr/lib/*/wine-development/wineserver|/usr/bin/wineserver-development)
file-not-found) w_die "wineserver not found!" ;;
*) WINESERVER="${x}" ;;
w_wineserver -w
w_wineserver -w
w_wineserver -w
w_wineserver -w
w_wineserver -w
# or should we just do w_wineserver -k, like fable_tlc does?
w_wineserver -k
So instead of usingThis whole check is somehow botched and only works with a full path. That is,WINESERVER=/usr/local/bin/wineserver32
.
WINESERVER=wineserver32
you use WINESERVER=/usr/local/bin/wineserver32
in .profile. freebsd-version -kru ; uname -aKU
pkg -vv | grep -e url -e enabled
pkg info -x wine
% pkg provides /usr/local/bin/wineserver32
% pkg provides /usr/local/bin/wineserver
Name : wine-devel-7.1,1
Desc : Microsoft Windows compatibility environment
Repo : FreeBSD
Filename: usr/local/bin/wineserver
Name : wine-6.0.2_1,1
Desc : Microsoft Windows compatibility environment
Repo : FreeBSD
Filename: usr/local/bin/wineserver
% pkg info -x wine
wine-6.0.2_1,1
wine-proton-6.3.2_3
winetricks-20210825
% uname -KU
1400051 1400051
% pkg -vv | grep -e url -e enabled
url : "http://pkg0.bme.freebsd.org/FreeBSD:14:amd64/latest",
enabled : yes,
url : "https://alpha.pkgbase.live/current/FreeBSD:14:amd64/latest",
enabled : no,
url : "file:///usr/local/poudriere/data/packages/main-default",
enabled : yes,
%
pkg provides
, NB <https://www.freshports.org/ports-mgmt/pkg-provides/#message>.FreeBSD:14
winetricks corefonts
sh
prefix to the command.what think you of the first line in my spoiler?
[xxx@xxx ~]$ pkg provides /usr/local/bin/wineserver32
pkg: unknown command: provides
For more information on available commands and options see 'pkg help'.
pkg plugins
finds the provides plugin:root@xxx:~ # pkg plugins
NAME DESC VERSION
provides A plugin for querying which package provides a particular file 0.7.1
pkg provides /usr/local/bin/wineserver32
saysroot@xxx:~ # pkg provides /usr/local/bin/wineserver32
usage: pkg provides [-uf] [-r repo] pattern
A plugin for querying which package provides a particular file
root@A9t:/home/luba # freebsd-version -kru ; uname -aKU
13.0-RELEASE-p6
13.0-RELEASE-p6
13.0-RELEASE-p7
FreeBSD A9t 13.0-RELEASE-p6 FreeBSD 13.0-RELEASE-p6 #0: Mon Jan 10 06:26:40 UTC 2022 root@amd64-builder.daemonology.net:/usr/obj/usr/src/i386.i386/sys/GENERIC i386 1300139 1300139
root@A9t:/home/luba # pkg -vv | grep -e url -e enabled
url : "pkg+http://pkg.FreeBSD.org/FreeBSD:13:i386/latest",
enabled : yes,
root@A9t:/home/luba # pkg info -x wine
wine-6.0.2_1,1
winetricks-20210825
root@A9t:/home/luba # pkg provides /usr/local/bin/wineserver32
Provides database not found, please update first.
root@A9t:/home/luba # pkg provides -u
Fetching provides database: 100% 14 MiB 1.7MB/s 00:09
Extracting database....success
root@A9t:/home/luba # pkg provides /usr/local/bin/wineserver32
Name : wine-devel-7.1,1
Desc : Microsoft Windows compatibility environment
Repo : FreeBSD
Filename: usr/local/bin/wineserver32
Name : wine-6.0.2_1,1
Desc : Microsoft Windows compatibility environment
Repo : FreeBSD
Inserted this line, the result is zero. Does not work.So instead of usingWINESERVER=wineserver32
you useWINESERVER=/usr/local/bin/wineserver32
in .profile.
wine: could not load kernel32.dll, status c000007a