summarylogtreecommitdiffstats
path: root/knyttstories
diff options
context:
space:
mode:
authorDaniel Escoz2015-06-16 15:06:23 +0200
committerDaniel Escoz2015-06-16 15:06:23 +0200
commit56dd775630037ba01bb481b3305108beb9468367 (patch)
treedc2f007f4c34620eeec8b27a0afc14529337ef62 /knyttstories
downloadaur-56dd775630037ba01bb481b3305108beb9468367.tar.gz
Initial import
Diffstat (limited to 'knyttstories')
-rw-r--r--knyttstories26
1 files changed, 26 insertions, 0 deletions
diff --git a/knyttstories b/knyttstories
new file mode 100644
index 000000000000..0ce11851aa06
--- /dev/null
+++ b/knyttstories
@@ -0,0 +1,26 @@
+#!/bin/bash
+export WINEPREFIX="$HOME/.knyttstories/wine"
+
+# Before running the game for the first time, some stuff needs to be done.
+
+# Set some symlinks and prepare the game environment.
+if [ ! -d "$HOME"/.knyttstories ] ; then
+ mkdir -p "$HOME"/.knyttstories/{wine,Saves} || exit 1
+ ln -s /usr/share/knyttstories/"Knytt Stories".exe "$HOME"/.knyttstories/knyttstories || exit 1
+ ln -s /var/games/knyttstories/Worlds "$HOME"/.knyttstories/Worlds || exit 1
+ cp -r /usr/share/knyttstories/Data "$HOME"/.knyttstories/ || exit 1
+fi
+
+# We need the system32 directory to exist prior to attempting to copy the requireddll file.
+if [ ! -d "$HOME"/.knyttstories/wine/drive_c/windows/system32 ]; then
+ mkdir -p "$HOME"/.knyttstories/wine/drive_c/windows/system32 || exit 1
+fi
+
+# Copy the msvcp60.dll file to the system32 directory or the game won't run
+if [ ! -f "$HOME"/.knyttstories/wine/drive_c/windows/system32/msvcp60.dll ]; then
+ ln -s /usr/share/knyttstories/msvcp60.dll "$HOME"/.knyttstories/wine/drive_c/windows/system32/msvcp60.dll || exit 1
+fi
+
+# Run the game
+wine "$HOME"/.knyttstories/knyttstories "$@"
+