summarylogtreecommitdiffstats
path: root/th07.sh
diff options
context:
space:
mode:
authorChristopher Luna2015-06-08 16:18:44 -0500
committerChristopher Luna2015-06-08 16:18:44 -0500
commitcfbff51fe004e37ed03203d714a1ba70eadc461c (patch)
tree3f02c88762a5fab378b10ad0cc916cbf45118fad /th07.sh
downloadaur-cfbff51fe004e37ed03203d714a1ba70eadc461c.tar.gz
First commit
Diffstat (limited to 'th07.sh')
-rw-r--r--th07.sh35
1 files changed, 35 insertions, 0 deletions
diff --git a/th07.sh b/th07.sh
new file mode 100644
index 000000000000..998d43fe29c9
--- /dev/null
+++ b/th07.sh
@@ -0,0 +1,35 @@
+#!/bin/bash
+export WINEPREFIX="$HOME/.th07/wine"
+export WINEDLLOVERRIDES="mshtml="
+
+if [ ! -d "$HOME"/.th07 ] ; then
+ mkdir -p "$HOME"/.th07/wine || exit 1
+ ln -s /usr/share/th07/th07.exe "$HOME"/.th07/th07.exe || exit 1
+ ln -s /usr/share/th07/custom.exe "$HOME"/.th07/custom.exe || exit 1
+ ln -s /usr/share/th07/th07tr.dat "$HOME"/.th07/th07tr.dat || exit 1
+fi
+
+if [ ! -f "$HOME"/.th07/th07.cfg ] ; then
+ echo "AAABAAIABAD//////////wMAAAACAAcAWAJYAgIDAAIBAQAAAgABAAAAAAAAAAAAAAAAAAEIAAA=" |base64 -d > "$HOME"/.th07/th07.cfg || exit 1
+fi
+
+if [ "" != "`whereis timidity|grep '/usr/bin'`" ] ; then
+ if [ "" == "`ps -A|grep timidity`" ] ; then
+ timidity -iA &
+ myins="true"
+ fi
+fi
+
+CFG=$(base64 ~/.th07/th07.cfg)
+echo $CFG|sed 's/.\(....\)$/I\1/' |base64 -d > ~/.th07/th07.cfg
+cd ~/.th07
+if [ -e "$HOME"/.th07/th07e.exe ]; then
+ wine "$HOME"/.th07/th07e.exe "$@"
+fi
+if [ ! -e "$HOME"/.th07/th07e.exe ]; then
+ wine "$HOME"/.th07/th07.exe "$@"
+fi
+if [ "true" == "$myins" ] ; then
+ killall timidity
+fi
+