Commit 57f9c33c authored by Alexandre Julliard's avatar Alexandre Julliard

tools: Allow running installed builtin apps even when the 32-bit loader is missing.

parent 821c2ed6
...@@ -25,9 +25,6 @@ appname=`basename "$0" .exe`.exe ...@@ -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 ...@@ -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
# now look in PATH
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
# finally look in PATH echo "$0: the Wine loader is missing"
exec wine "$appname" "$@" exit 1
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment