diff --git a/emulators/wine/files/wine.sh b/emulators/wine/files/wine.sh index 057406196371..ebd89e55ebdc 100644 --- a/emulators/wine/files/wine.sh +++ b/emulators/wine/files/wine.sh @@ -1,21 +1,17 @@ #!/bin/sh TARGET="$(realpath "$0")" -if [ -z "$WINESERVER" ] -then - if [ -f "${TARGET%/*}/wineserver" ] - then - export WINESERVER="${TARGET%/*}/wineserver" - fi - if [ -f "${TARGET%/*}/wineserver32" ] - then +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" "$@"