Back to home page

Wine source

 
 

    


File indexing completed on 2019-02-11 01:37:40

3536316a3 Alex*0001 #!/bin/sh
                0002 #
                0003 # Wrapper script to start a Winelib application once it is installed
                0004 #
                0005 # Copyright (C) 2002 Alexandre Julliard
                0006 #
                0007 # This library is free software; you can redistribute it and/or
                0008 # modify it under the terms of the GNU Lesser General Public
                0009 # License as published by the Free Software Foundation; either
                0010 # version 2.1 of the License, or (at your option) any later version.
                0011 #
                0012 # This library is distributed in the hope that it will be useful,
                0013 # but WITHOUT ANY WARRANTY; without even the implied warranty of
                0014 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
                0015 # Lesser General Public License for more details.
                0016 #
                0017 # You should have received a copy of the GNU Lesser General Public
                0018 # License along with this library; if not, write to the Free Software
360a3f914 Jona*0019 # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
3536316a3 Alex*0020 #
                0021 
                0022 # determine the app Winelib library name
                0023 appname=`basename "$0" .exe`.exe
                0024 
                0025 # first try explicit WINELOADER
                0026 if [ -x "$WINELOADER" ]; then exec "$WINELOADER" "$appname" "$@"; fi
                0027 
                0028 # now try the directory containing $0
                0029 appdir=""
                0030 case "$0" in
                0031   */*)
                0032     # $0 contains a path, use it
                0033     appdir=`dirname "$0"`
                0034     ;;
                0035   *)
                0036     # no directory in $0, search in PATH
                0037     saved_ifs=$IFS
                0038     IFS=:
                0039     for d in $PATH
                0040     do
                0041       IFS=$saved_ifs
                0042       if [ -x "$d/$0" ]; then appdir="$d"; break; fi
                0043     done
                0044     ;;
                0045 esac
                0046 if [ -x "$appdir/wine" ]; then exec "$appdir/wine" "$appname" "$@"; fi
57f9c33c0 Alex*0047 if [ -x "$appdir/wine64" ]; then exec "$appdir/wine64" "$appname" "$@"; fi
                0048 
                0049 # now look in PATH
                0050 saved_ifs=$IFS
                0051 IFS=:
                0052 for d in $PATH
                0053 do
                0054   IFS=$saved_ifs
                0055   if [ -x "$d/wine" ]; then exec "$d/wine" "$appname" "$@"; fi
                0056   if [ -x "$d/wine64" ]; then exec "$d/wine64" "$appname" "$@"; fi
                0057 done
                0058 
                0059 # finally, the default bin directory
                0060 if [ -x "@bindir@/wine" ]; then exec "@bindir@/wine" "$appname" "$@"; fi
                0061 if [ -x "@bindir@/wine64" ]; then exec "@bindir@/wine64" "$appname" "$@"; fi
3536316a3 Alex*0062 
57f9c33c0 Alex*0063 echo "$0: the Wine loader is missing"
                0064 exit 1