diff options
author | Emmanuel Gil Peyrot | 2015-06-09 00:23:40 +0100 |
---|---|---|
committer | Emmanuel Gil Peyrot | 2015-06-09 00:23:40 +0100 |
commit | fb43759f641f596709c52aed8b403f34b6d4de03 (patch) | |
tree | 60a3d9e3c6a3f024387f6cc7e7e07b25168e52df /th06-demo-wine.sh | |
download | aur-fb43759f641f596709c52aed8b403f34b6d4de03.tar.gz |
Hello Gensokyo. _o/
Diffstat (limited to 'th06-demo-wine.sh')
-rwxr-xr-x | th06-demo-wine.sh | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/th06-demo-wine.sh b/th06-demo-wine.sh new file mode 100755 index 000000000000..7e3f1682d36a --- /dev/null +++ b/th06-demo-wine.sh @@ -0,0 +1,40 @@ +#!/bin/sh + +NAME='th06-demo' +SRC="/usr/share/$NAME" +DEST="$HOME/.local/share/$NAME" + +export WINEPREFIX="$DEST/wine" +export WINEDLLOVERRIDES='mscoree,mshtml=' +export WINEARCH='win32' +export LANG='ja_JP.UTF-8' + +# At the first launch, link the read-only data. +if [ ! -d "$DEST" ] ; then + mkdir -p "$DEST" + mkdir -p "$WINEPREFIX" + ln -s "$SRC/東方紅魔郷.exe" "$DEST/" + ln -s "$SRC/custom.exe" "$DEST/" + for i in CM IN MD ST TL; do + ln -s "$SRC/紅魔郷$i.DAT" "$DEST/" + done +fi + +# Launch the MIDI server if installed and not running. +if [ '' != "`whereis timidity | grep '/usr/bin'`" ] ; then + if [ "`ps -A | grep timidity`" == '' ] ; then + timidity -iA & + myins='true' + fi +fi + +cd "$DEST" + +# Launch the game +wine 東方紅魔郷 + +# End the MIDI server. +if [ "$myins" == 'true' ] ; then + killall timidity +fi + |