On 23/11/2018 21:02, Alexandre Julliard wrote:
Andre Heider a.heider@gmail.com writes:
This also avoids mixing binaries of multiple WINE installations.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=40245 Signed-off-by: Andre Heider a.heider@gmail.com
tools/winegcc/Makefile.in | 1 + tools/winegcc/winegcc.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-)
Using the path of winegcc from argv[0] may be a better choice.
That may get too fragile, distros do some crazy stuff.
On debian, winegcc looks like this:
/usr/bin/winegcc -> /etc/alternatives/winegcc /etc/alternatives/winegcc -> /usr/bin/winegcc-stable cat /usr/bin/winegcc-stable
#!/bin/sh -e
name=$(basename $0 | cut -d- -f1)
# wineg++ fails to find winebuild in Wine's bindir # See https://bugs.winehq.org/show_bug.cgi?id=40245 if test -z "$WINEBUILD"; then export WINEBUILD="/usr/lib/wine/winebuild" fi
exec /usr/lib/wine/$name $@
winebuild is similar, just without the wrapper script.
So there's `winegcc` using debian's alternatives system, but you can use `winegcc-stable` or `winegcc-development` too.
Picturing a patch which works in those cases too won't win a beauty contest :)
winegcc with my patch won't find winebuild if you move the prefix, but if one really wants to go down that road, there's still WINEBUILD to fix it up.
Regards, Andre