summarylogtreecommitdiffstats
path: root/th08.sh
diff options
context:
space:
mode:
authorChristopher Luna2015-06-08 16:21:33 -0500
committerChristopher Luna2015-06-08 16:21:33 -0500
commit3fd825af917485427e9f7cbf54ab8c109c6206ec (patch)
tree9a9296975477495ce85144f870b106831dfb2ea6 /th08.sh
downloadaur-3fd825af917485427e9f7cbf54ab8c109c6206ec.tar.gz
First commit
Diffstat (limited to 'th08.sh')
-rw-r--r--th08.sh37
1 files changed, 37 insertions, 0 deletions
diff --git a/th08.sh b/th08.sh
new file mode 100644
index 000000000000..4fe6c5b4d30d
--- /dev/null
+++ b/th08.sh
@@ -0,0 +1,37 @@
+#!/bin/bash
+
+export WINEPREFIX="$HOME/.th08/wine"
+export WINEDLLOVERRIDES="mshtml="
+
+if [ ! -d "$HOME"/.th08 ] ; then
+ mkdir -p "$HOME"/.th08/wine || exit 1
+ ln -s /usr/share/th08/th08.exe "$HOME"/.th08/th08.exe || exit 1
+ ln -s /usr/share/th08/custom.exe "$HOME"/.th08/custom.exe || exit 1
+ ln -s /usr/share/th08/th08tr.dat "$HOME"/.th08/th08tr.dat || exit 1
+fi
+if [ ! -f "$HOME"/.th08/th08.cfg ] ; then
+ echo "AAABAAIABAD//////////wMAAAABAAgAWAJYAgIDAAIBAQAAAgAAZFAAAAAAAAAAAAAAAAAAAAABCAAA"|base64 -d >~/.th08/th08.cfg
+fi
+if [ "" != "`whereis timidity|grep '/usr/bin'`" ] ; then
+ if [ "" == "`ps -A|grep timidity`" ] ; then
+ timidity -iA &
+ myins="true"
+ fi
+fi
+# this sed is to make sure directinput is always activaded.
+# the controls can be a bit unresponsive without it
+mv ~/.th08/th08.cfg ~/.th08/th08.cfg.bak
+base64 th08.cfg.bak -w 0|sed 's/.\(...\)$/C\1/'|base64 -d>~/.th08/th08.cfg
+rm ~/.th08/th08.cfg.bak
+
+cd ~/.th08
+if [ -e "$HOME"/.th08/th08e.exe ]; then
+ wine "$HOME"/.th08/th08e.exe "$@"
+fi
+if [ ! -e "$HOME"/.th08/th08e.exe ]; then
+ wine "$HOME"/.th08/th08.exe "$@"
+fi
+if [ "true" == "$myins" ] ; then
+ killall timidity
+fi
+