summarylogtreecommitdiffstats
path: root/cemu.sh
blob: 957f335b883b3aa3fd03e7abb9b4c866e3f45b34 (plain)
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
#!/bin/bash
export WINEPREFIX="$HOME/.cemu/wine"
export WINEDLLOVERRIDES="mscoree=;mshtml=;dbghelp.dll=n,b"

# Allows to play BotW with Polaris video cards
export R600_DEBUG="nohyperz"

if [ ! -d "$HOME"/.cemu ] ; then
  mkdir -p "$HOME"/.cemu/wine || exit 1
  ln -s /usr/share/cemu/Cemu.exe "$HOME"/.cemu/Cemu.exe || exit 1
  ln -s /usr/share/cemu/dbghelp.dll "$HOME"/.cemu/dbghelp.dll || exit 1
  ln -s /usr/share/cemu/keystone.dll "$HOME"/.cemu/keystone.dll || exit 1
  ln -s /usr/share/cemu/sharedFonts "$HOME"/.cemu/sharedFonts || exit 1
  cp -r /usr/share/cemu/gameProfiles "$HOME"/.cemu/ || exit 1
  cp -r /usr/share/cemu/mlc01 "$HOME"/.cemu/ || exit 1
  cp -r /usr/share/cemu/shaderCache "$HOME"/.cemu/ || exit 1
fi

if [ ! -L "$HOME"/.cemu/sharedFonts ] && [ ! -d "$HOME"/.cemu/sharedFonts ] ; then
  ln -s /usr/share/cemu/sharedFonts "$HOME"/.cemu/sharedFonts || exit 1
fi
if [ -L "$HOME"/.cemu/gameProfiles ] ; then
  rm "$HOME"/.cemu/gameProfiles
  cp -r /usr/share/cemu/gameProfiles "$HOME"/.cemu/ || exit 1
fi

if [ ! -f "$HOME"/.cemu/wine/drive_c/windows/syswow64/vcruntime140.dll ]; then
  if [ -n "`whereis zenity|grep bin`" ]; then
    zenity --info  --title 'Cemu' --text 'Installing wine dependencies.\n\nThe process may take a few minutes'
  fi
  winetricks -q vcrun2017
  winetricks settings win7
fi
cd ~/.cemu
wine Cemu.exe "$@"