Hi,
This is the patch I use at SUSE for wineprefixcreate.
Mike wanted to see it ;)
$dlldir/config is the sample config file with just minimal local suse changes.
Ciao, Marcus
Index: wineprefixcreate.in =================================================================== RCS file: /home/wine/wine/tools/wineprefixcreate.in,v retrieving revision 1.4 diff -u -r1.4 wineprefixcreate.in --- wineprefixcreate.in 14 May 2004 00:43:50 -0000 1.4 +++ wineprefixcreate.in 7 Aug 2004 12:40:57 -0000 @@ -86,8 +86,10 @@
if [ -d "$WINEPREFIX" ] || mkdir "$WINEPREFIX"; then : else - echo "Could not create $WINEPREFIX, aborting" - exit 1 +fi + +if [ ! -f "$WINEPREFIX/config" ]; then + cp $dlldir/config "$WINEPREFIX/config" fi
WINEPREFIX=`cd "$WINEPREFIX" && pwd` @@ -124,6 +126,35 @@ [ -d "$i" ] || mkdir "$i" done
+# Create the drive symlinks +if [ ! -d "$WINEPREFIX/dosdevices" ] +then + mkdir "$WINEPREFIX/dosdevices" + ln -s "../drive_c" "$WINEPREFIX/dosdevices/c:" + ln -s "/" "$WINEPREFIX/dosdevices/z:" + ln -s "/tmp" "$WINEPREFIX/dosdevices/x:" + if [ -d "$HOME" ]; then + ln -s "$HOME" "$WINEPREFIX/dosdevices/y:" + if [ ! -f "$HOME/.windows-label" ]; then + echo "HOME" > "$HOME/.windows-label" + fi + fi + # autodetect CD-ROMS on SUSE. + drive=D + for i in /media/* ; do + bn=`basename $i` + if [ "$i" = "/media/floppy" ]; then + ln -s /media/floppy "$WINEPREFIX/dosdevices/a:" + ln -s /dev/fd0 "$WINEPREFIX/dosdevices/a::" + fi + if echo $bn| grep -E -v "^(sd|usb-storage|floppy)" >/dev/null; then + ln -s /media/$bn "$WINEPREFIX/dosdevices/"`echo $drive|tr "[A-Z]" "[a-z]"`: + ln -s /dev/$bn "$WINEPREFIX/dosdevices/"`echo $drive|tr "[A-Z]" "[a-z]"`:: + drive=`echo $drive|tr "D-L" "E-M"` + fi + done +fi + # Create the application symlinks
link_app()
Is there any way to generalise the CD drive detection code so it works on all distros, maybe by parsing the output of "mount" or the fstab?
On Sat, 07 Aug 2004 14:43:07 +0200, Marcus Meissner wrote:
Hi,
This is the patch I use at SUSE for wineprefixcreate.
Mike wanted to see it ;)
$dlldir/config is the sample config file with just minimal local suse changes.
Ciao, Marcus