tools: Allow running installed builtin apps even when the 32-bit loader is missing.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
821c2ed6a3
commit
57f9c33c08
|
@ -25,9 +25,6 @@ appname=`basename "$0" .exe`.exe
|
||||||
# first try explicit WINELOADER
|
# first try explicit WINELOADER
|
||||||
if [ -x "$WINELOADER" ]; then exec "$WINELOADER" "$appname" "$@"; fi
|
if [ -x "$WINELOADER" ]; then exec "$WINELOADER" "$appname" "$@"; fi
|
||||||
|
|
||||||
# then default bin directory
|
|
||||||
if [ -x "@bindir@/wine" ]; then exec "@bindir@/wine" "$appname" "$@"; fi
|
|
||||||
|
|
||||||
# now try the directory containing $0
|
# now try the directory containing $0
|
||||||
appdir=""
|
appdir=""
|
||||||
case "$0" in
|
case "$0" in
|
||||||
|
@ -47,6 +44,21 @@ case "$0" in
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
if [ -x "$appdir/wine" ]; then exec "$appdir/wine" "$appname" "$@"; fi
|
if [ -x "$appdir/wine" ]; then exec "$appdir/wine" "$appname" "$@"; fi
|
||||||
|
if [ -x "$appdir/wine64" ]; then exec "$appdir/wine64" "$appname" "$@"; fi
|
||||||
|
|
||||||
# finally look in PATH
|
# now look in PATH
|
||||||
exec wine "$appname" "$@"
|
saved_ifs=$IFS
|
||||||
|
IFS=:
|
||||||
|
for d in $PATH
|
||||||
|
do
|
||||||
|
IFS=$saved_ifs
|
||||||
|
if [ -x "$d/wine" ]; then exec "$d/wine" "$appname" "$@"; fi
|
||||||
|
if [ -x "$d/wine64" ]; then exec "$d/wine64" "$appname" "$@"; fi
|
||||||
|
done
|
||||||
|
|
||||||
|
# finally, the default bin directory
|
||||||
|
if [ -x "@bindir@/wine" ]; then exec "@bindir@/wine" "$appname" "$@"; fi
|
||||||
|
if [ -x "@bindir@/wine64" ]; then exec "@bindir@/wine64" "$appname" "$@"; fi
|
||||||
|
|
||||||
|
echo "$0: the Wine loader is missing"
|
||||||
|
exit 1
|
||||||
|
|
Loading…
Reference in New Issue