-
-
Notifications
You must be signed in to change notification settings - Fork 20
Expand file tree
/
Copy pathwrapper
More file actions
executable file
·53 lines (46 loc) · 1.58 KB
/
wrapper
File metadata and controls
executable file
·53 lines (46 loc) · 1.58 KB
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
47
48
49
50
51
52
53
# WINE env
export WINE="$APPDIR/usr/bin/wine"
export WINEDEBUG=${WINEDEBUG:-"fixme-all"}
export WINEPREFIX=${WINEPREFIX:-"$HOME/.wine-appimage"}
export WINESERVER="$APPDIR/usr/bin/wineserver"
# DXVK env
export DXVK_HUD=${DXVK_HUD:-"0"}
export DXVK_LOG_LEVEL=${DXVK_LOG_LEVEL:-"none"}
export DXVK_STATE_CACHE=${DXVK_STATE_CACHE:-"0"}
export DXVK_CONFIG_FILE=${DXVK_CONFIG_FILE:-"$progHome/dxvk.conf"}
# check gpu vendor
VENDOR=$(glxinfo -B | grep "OpenGL vendor")
if [[ $VENDOR == *"Intel"* ]]; then
export VK_ICD_FILENAMES="/usr/share/vulkan/icd.d/intel_icd.i686.json:/usr/share/vulkan/icd.d/intel_icd.x86_64.json"
elif [[ $VENDOR == *"NVIDIA"* ]]; then
export VK_ICD_FILENAMES="/usr/share/vulkan/icd.d/nvidia_icd.json"
elif [[ $VENDOR == *"Radeon"* ]]; then
export VK_ICD_FILENAMES="/usr/share/vulkan/icd.d/radeon_icd.i686.json:/usr/share/vulkan/icd.d/radeon_icd.x86_64.json"
fi
# Load winecfg if no arguments given
APPLICATION=""
if [ -z "$*" ] ; then
APPLICATION="winecfg"
fi
# Allow the AppImage to be symlinked to e.g., /usr/bin/wineserver
if [ -n "$APPIMAGE" ] ; then
BINARY_NAME=$(basename "$ARGV0")
else
BINARY_NAME=$(basename "$0")
fi
if [ -n "$1" ] && [ -e "$APPDIR/bin/$1" ] ; then
MAIN="$APPDIR/bin/$1" ; shift
elif [ -n "$1" ] && [ -e "$APPDIR/usr/bin/$1" ] ; then
MAIN="$APPDIR/usr/bin/$1" ; shift
elif [ -e "$APPDIR/bin/$BINARY_NAME" ] ; then
MAIN="$APPDIR/bin/$BINARY_NAME"
elif [ -e "$APPDIR/usr/bin/$BINARY_NAME" ] ; then
MAIN="$APPDIR/usr/bin/$BINARY_NAME"
else
MAIN="$APPDIR/usr/bin/wine"
fi
if [ -z "$APPLICATION" ] ; then
"$MAIN" "$@"
else
"$MAIN" "$APPLICATION"
fi