#!/bin/bash winedir="$HOME/.wine" fakewindir="$winedir/fake_windows" wineconf="$winedir/config" if [ -f $wineconf ]; then sed -e 's/${HOME}/%HOME%/' <$wineconf >$wineconf.new mv $wineconf.new $wineconf fi if [ -d "$fakewindir" ]; then exit 0 fi mkdir -p "$fakewindir" cd "$fakewindir" || exit 1 # # List of directories we need. Synced against winedefault.reg and wineinstall. # while read dir; do mkdir -p "$fakewindir/$dir" done < $winedir/config drive=D for i in /media/* ; do bn=`basename $i` if [ "$bn" != "$floppy" ]; then echo "[Drive $drive]" >> $winedir/config echo "\"Path\"=\"$i\"" >> $winedir/config echo "\"Label\"=\"$bn\"" >> $winedir/config echo "\"Type\"=\"cdrom\"" >> $winedir/config echo "\"FS\"=\"win95\"" >> $winedir/config echo ";\"Device\"=\"/dev/$bn\"" >> $winedir/config echo >> $winedir/config drive=`echo $drive|tr "D-L" "E-M"` fi done cat /usr/lib/wine/config.suse.tail >> $winedir/config # Loading default registry. /usr/bin/regedit /usr/lib/wine/reg/winedefault.reg