File indexing completed on 2023-03-03 23:36:58
3536316a3… Alex*0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
360a3f914… Jona*0019
3536316a3… Alex*0020
0021
0022
0023
0024 appdir=""
4422d22cf… Alex*0025 name=$0
0026
3536316a3… Alex*0027 case "$0" in
0028 */*)
0029
0030 appdir=`dirname "$0"`
4422d22cf… Alex*0031 name=`basename "$0"`
3536316a3… Alex*0032 ;;
0033 *)
0034
0035 saved_ifs=$IFS
0036 IFS=:
0037 for d in $PATH
0038 do
0039 IFS=$saved_ifs
4422d22cf… Alex*0040 if [ -x "$d/$name" ]
3536316a3… Alex*0041 then
0042 appdir="$d"
0043 break
0044 fi
0045 done
0046 ;;
0047 esac
0048
4422d22cf… Alex*0049
3536316a3… Alex*0050
0051 if [ -x "$appdir/server/wineserver" ]
0052 then topdir="$appdir"
0053 elif [ -x "$appdir/../server/wineserver" ]
0054 then topdir="$appdir/.."
0055 elif [ -x "$appdir/../../server/wineserver" ]
0056 then topdir="$appdir/../.."
0057 elif [ -x "$appdir/../../../server/wineserver" ]
0058 then topdir="$appdir/../../.."
0059 else
4422d22cf… Alex*0060 echo "$name: could not locate the Wine build tree"
3536316a3… Alex*0061 exit 1
0062 fi
0063
0064
0065
0066 topdir=`cd "$topdir" && pwd`
0067
a808f38c1… Alex*0068 if [ "`uname -s`" = "Darwin" ]
3536316a3… Alex*0069 then
a808f38c1… Alex*0070 if [ -n "$DYLD_LIBRARY_PATH" ]
0071 then
5c831122c… Alex*0072 DYLD_LIBRARY_PATH="$topdir/dlls/ntdll:$topdir/dlls/win32u:$DYLD_LIBRARY_PATH"
a808f38c1… Alex*0073 else
5c831122c… Alex*0074 DYLD_LIBRARY_PATH="$topdir/dlls/ntdll:$topdir/dlls/win32u"
a808f38c1… Alex*0075 fi
0076 export DYLD_LIBRARY_PATH
3536316a3… Alex*0077 fi
a808f38c1… Alex*0078
4422d22cf… Alex*0079 if [ -x "$topdir/loader/$name" ]
0080 then WINELOADER="$topdir/loader/$name"
0081 elif [ -x "$topdir/loader/wine" ]
50c6ac832… Alex*0082 then WINELOADER="$topdir/loader/wine"
12aa347e1… Fran*0083 elif [ -x "$topdir/loader/wine64" ]
0084 then WINELOADER="$topdir/loader/wine64"
50c6ac832… Alex*0085 else
4422d22cf… Alex*0086 echo "$name: could not find the Wine loader in $topdir"
50c6ac832… Alex*0087 exit 1
0088 fi
bf463abfe… Alex*0089 export WINELOADER
3536316a3… Alex*0090
6a2ca011b… Eric*0091
0092 if [ -f "$topdir/.winewrapper" ]
0093 then
0094 . $topdir/.winewrapper
0095 fi
0096
3536316a3… Alex*0097
0098
50c6ac832… Alex*0099 exec "$WINELOADER" "$@"