forked from The-Wineskin-Project/wineskin-source
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwineserver
executable file
·46 lines (39 loc) · 2.09 KB
/
wineserver
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#!/bin/sh
#
# Wrapper script for winetricks compatability
#
# Copyright (C) 2021 Dean M Greer
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
#
# workaround SIP DYLD_stripping
# see https://support.apple.com/en-us/HT204899
export WINETRICKS_FALLBACK_LIBRARY_PATH="$(dirname "$0")/../../../Frameworks:$(dirname "$0")/../../../Frameworks/GStreamer.framework/Libraries"
export GST_PLUGIN_PATH="$(dirname "$0")/../../../Frameworks/GStreamer.framework/Libraries/gstreamer-1.0"
export WINESKINPATH="$(dirname "$0")/../../../SharedSupport/wine/bin"
export WINEPREFIX="${WINEPREFIX:-$(dirname "$0")/../../../SharedSupport/prefix}"
if [[ ${OSTYPE:6} -ge 23 && "$(/usr/bin/env arch -x86_64 /usr/sbin/sysctl -in sysctl.proc_translated)" = "1" && -n "${WINED3DMETAL}" ]]; then
export D3DMETALPATH="$(dirname "$0")/../../../Frameworks/d3dmetal/wine"
export WINETRICKS_FALLBACK_LIBRARY_PATH="$(dirname "$0")/../../../Frameworks/moltenvkcx:${WINETRICKS_FALLBACK_LIBRARY_PATH}"
export WINEDLLOVERRIDES="*dxgi,*d3d10core,*d3d11,*d3d12=b"
fi
export DYLD_FALLBACK_LIBRARY_PATH="${WINETRICKS_FALLBACK_LIBRARY_PATH}"
# .Net 7 and later segfault under Rosetta2
# https://github.com/dotnet/runtime/issues/94909
export DOTNET="DOTNET_EnableWriteXorExecute=0"
# Check for wineserver and use if found
if [[ -x "$(command -v "$WINESKINPATH"/wineserver)" ]]; then exec "$WINESKINPATH/wineserver" "$@"; fi
echo "Error: the wineserver was not found in $WINESKINPATH"
exit 1