ports/emulators/wine-devel/files/wine.sh
Gerald Pfeifer a1490b2592 emulators/wine-devel: Sync files/wine.sh with emulators/wine
This forward ports the following two commits from emulators/wine
as far as files/wine.sh goes:

    commit ef11261971
    Author: Gerald Pfeifer <gerald@FreeBSD.org>
    Date:   Wed Jan 31 12:27:21 2024 +0000

    emulators/wine: Simplify the logic in wine.sh

and

    commit 0f2052c378
    Author: Alexander Vereeken <Alexander88207@protonmail.com>
    Date:   Sun Dec 17 22:58:41 2023 +0000

    emulators/wine: Unbreak WoW64

    This is an excerpt of 1f07ec6014 by Alex S <iwtcex@gmail.com> for
    emulators/wine-proton.

PR:		275677, 279927
Reported by: 	scf
2024-07-01 10:05:19 +00:00

17 lines
402 B
Bash

#!/bin/sh
TARGET="$(realpath "$0")"
if [ -z "$WINESERVER" ]; then
if [ -f "${TARGET%/*}/wineserver32" ]; then
export WINESERVER="${TARGET%/*}/wineserver32"
elif [ -f "${TARGET%/*}/wineserver" ]; then
export WINESERVER="${TARGET%/*}/wineserver"
fi
fi
# Workaround for https://bugs.winehq.org/show_bug.cgi?id=50257
export LD_BIND_NOW=1
export LD_32_BIND_NOW=1
exec "${TARGET}.bin" "$@"