updated on Tue Jan 10 04:01:21 UTC 2012
[aur-mirror.git] / knyttstories / knyttstories
blob18dc471479791f58d24c9ed2c4f3794c930677ba
1 #!/bin/bash
2 export WINEPREFIX="$HOME/.knyttstories/wine"
4 # Before running the game for the first time, some stuff needs to be done.
6 # Set some symlinks and prepare the game environment.
7 if [ ! -d "$HOME"/.knyttstories ] ; then
8 mkdir -p "$HOME"/.knyttstories/{wine,Saves} || exit 1
9 ln -s /usr/share/knyttstories/"Knytt Stories".exe "$HOME"/.knyttstories/knyttstories || exit 1
10 ln -s /var/games/knyttstories/Worlds "$HOME"/.knyttstories/Worlds || exit 1
11 cp -r /usr/share/knyttstories/Data "$HOME"/.knyttstories/ || exit 1
14 # We need the system32 directory to exist prior to attempting to copy the requireddll file.
15 if [ ! -d "$HOME"/.knyttstories/wine/drive_c/windows/system32 ]; then
16 mkdir -p "$HOME"/.knyttstories/wine/drive_c/windows/system32 || exit 1
19 # Copy the msvcp60.dll file to the system32 directory or the game won't run
20 if [ ! -f "$HOME"/.knyttstories/wine/drive_c/windows/system32/msvcp60.dll ]; then
21 ln -s /usr/share/knyttstories/msvcp60.dll "$HOME"/.knyttstories/wine/drive_c/windows/system32/msvcp60.dll || exit 1
24 # Run the game
25 wine "$HOME"/.knyttstories/knyttstories "$@"