Added
Link Here
|
1 |
#!/bin/sh -e |
2 |
TARGET="$(realpath "$0")" |
3 |
PREFIX="${TARGET%/*/*}" |
4 |
LOCALBASE="${PREFIX}" |
5 |
|
6 |
I386_ROOT="${WINE_i386_ROOT:-$HOME/.i386-wine-pkg}" |
7 |
|
8 |
if [ ! -f "$I386_ROOT/$PREFIX/bin/wine" ] |
9 |
then |
10 |
printf "%s doesn't exist!\n\n" "$I386_ROOT/$PREFIX/bin/wine" |
11 |
printf "Try installing 32-bit wine with\n\t%s\n" "$PREFIX/share/wine/pkg32.sh install wine mesa-dri" |
12 |
exit 1 |
13 |
fi |
14 |
|
15 |
WINE32_VERSION=$(env -u WINELOADERNOEXEC "$I386_ROOT/$PREFIX/bin/wine" --version) |
16 |
WINE64_VERSION=$(env -u WINELOADERNOEXEC "${TARGET}64" --version) |
17 |
if [ "$WINE32_VERSION" != "$WINE64_VERSION" ] |
18 |
then |
19 |
printf "wine [%s] and wine64 [%s] versions do not match!\n\n" "$WINE32_VERSION" "$WINE64_VERSION" |
20 |
printf "Try updating 32-bit wine with\n\t%s\n" "$PREFIX/share/wine/pkg32.sh upgrade" |
21 |
exit 1 |
22 |
fi |
23 |
|
24 |
export LIBGL_DRIVERS_PATH="${LIBGL_DRIVERS_PATH:+$LIBGL_DRIVERS_PATH:}$LOCALBASE/lib/dri:$LOCALBASE/lib32/dri:$I386_ROOT/$LOCALBASE/lib/dri" |
25 |
export LD_32_LIBRARY_PATH="${LD_32_LIBRARY_PATH:+$LD_32_LIBRARY_PATH:}$I386_ROOT/$PREFIX/lib/wine:$LOCALBASE/lib32:$I386_ROOT/$LOCALBASE/lib" |
26 |
for d in "$I386_ROOT/$LOCALBASE"/llvm* |
27 |
do |
28 |
if [ -d "$d" ] |
29 |
then |
30 |
export LD_32_LIBRARY_PATH="$LD_32_LIBRARY_PATH:$d" |
31 |
fi |
32 |
done |
33 |
export LD_32_LIBRARY_PATH_RPATH=y |
34 |
|
35 |
if [ -z "$WINE_NO_WOW64" ] |
36 |
then |
37 |
export WINESERVER="${TARGET}server" |
38 |
fi |
39 |
|
40 |
exec "$I386_ROOT/$PREFIX/bin/wine" "$@" |