blob: dad021de727a6f7a6f19d005458bf9291cf827d2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
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
|