summarylogtreecommitdiffstats
path: root/winestart
blob: d1ca53dd4ff8cc9abf666f82f2e3390996404fc1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/bin/bash

# some stuff taken from https://github.com/Frogging-Family/wine-tkg-git/blob/master/wine-tkg-git/wine-tkg-scripts/wine-tkg

winebindir="$(dirname "$(readlink -f "$0")")"

export PATH="$winebindir:$PATH"
export LD_LIBRARY_PATH="$winebindir/../lib64/wine/x86_64-unix:$winebindir/../lib64/wine/x86_64-windows:$winebindir/../lib64/wine/i386-windows:$winebindir/../lib/wine/i386-unix:$winebindir/../lib/wine/i386-windows:$LD_LIBRARY_PATH"

# set realtime priority on wineserver (but don't override user's choice)
if [ "${STAGING_RT_PRIORITY_SERVER}" != "0" ]; then
    export STAGING_RT_PRIORITY_SERVER=${STAGING_RT_PRIORITY_SERVER:-55}
fi

if ! [[ "${*:1}" =~ "wineserver" ]]; then
  wine "${@:1}"
else
  wineserver "${@:2}"
fi