3 # Wrapper script to start a Winelib application once it is installed
5 # Copyright (C) 2002 Alexandre Julliard
7 # determine the app Winelib library name
8 appname=`basename "$0" .exe`.exe
10 #allow Wine to load Winelib application from the current directory
11 export WINEDLLPATH=$WINEDLLPATH:.
13 # first try explicit WINELOADER
14 if [ -x "$WINELOADER" ]; then exec "$WINELOADER" "$appname" "$@"; fi
16 # then default bin directory
17 if [ -x "/usr/local/bin/wine" ]; then exec "/usr/local/bin/wine" "$appname" "$@"; fi
19 # now try the directory containing $0
23 # $0 contains a path, use it
27 # no directory in $0, search in PATH
33 if [ -x "$d/$0" ]; then appdir="$d"; break; fi
37 if [ -x "$appdir/wine" ]; then exec "$appdir/wine" "$appname" "$@"; fi
39 # finally look in PATH
40 exec wine "$appname" "$@"