summarylogtreecommitdiffstats
path: root/gog-bg2-config
diff options
context:
space:
mode:
authorAndré Fettouhi2015-06-09 21:15:34 +0200
committerAndré Fettouhi2015-06-09 21:15:34 +0200
commit630e8f75aa6ca3a8c341ab176da9506c97d35159 (patch)
tree75b3b4e58927c254fbeec248bd72e4be88e45652 /gog-bg2-config
downloadaur-gog-baldurs-gate-2.tar.gz
Initial import
Diffstat (limited to 'gog-bg2-config')
-rw-r--r--gog-bg2-config25
1 files changed, 25 insertions, 0 deletions
diff --git a/gog-bg2-config b/gog-bg2-config
new file mode 100644
index 000000000000..dad021de727a
--- /dev/null
+++ b/gog-bg2-config
@@ -0,0 +1,25 @@
+#!/usr/bin/bash
+ID=baldurs-gate-2
+WRITABLE='*.ini *.KEY *.tlk'
+EXE=BGConfig.exe
+USERDIR=$HOME/.gog/$ID
+export WINEPREFIX=$USERDIR/.wine
+export WINEDEBUG=-all
+
+if ! [ -d $USERDIR ]
+then
+ INSTALLDIR=/opt/gog/$ID
+ mkdir -p $(dirname $USERDIR)
+ cp -as $INSTALLDIR $USERDIR
+ WINEARCH=win32 wineboot -i
+ rm $WINEPREFIX/dosdevices/"z:"
+ ln -s $USERDIR $WINEPREFIX/drive_c
+ cd $USERDIR
+ for file in $WRITABLE
+ do
+ cp -a --remove-destination $INSTALLDIR/$file $file
+ done
+fi
+
+cd $WINEPREFIX/drive_c/$ID
+wine $EXE