wineconf fix

Andreas Mohr amohr at codeweavers.com
Thu Feb 1 09:58:09 CST 2001


Hi all,

- fix wineconf to generate new config file format
- fix some variable checks

Andreas Mohr
-------------- next part --------------
Determining best CVS host...
Using CVSROOT :pserver:cvs at wine.codeweavers.com:/home/cvs/wine
Index: tools/wineconf
===================================================================
RCS file: /home/cvs/wine/wine/tools/wineconf,v
retrieving revision 1.6
diff -u -r1.6 wineconf
--- tools/wineconf	2000/10/29 18:04:09	1.6
+++ tools/wineconf	2001/02/01 21:37:44
@@ -34,7 +34,7 @@
 # and serial device configuration is hardcoded and not configured for
 # the machine it runs on.  Similarly, spy parameters are hard coded.
 
-# It would make sense to incorporate much of the hueristic code in
+# It would make sense to incorporate much of the heuristic code in
 # this program into a library to be shared with a dosemu configuration
 # program, because it seems that at least some of the same stuff will
 # be wanted.  The program needs to be cleaned up still.  A better tmp
@@ -49,6 +49,8 @@
 
 GetOptions('windir=s', 'sysdir=s', 'thorough', 'debug:s', 'inifile=s') || &Usage;
 
+print "WINE REGISTRY Version 2\n";
+print ";; All keys relative to \\\\Machine\\\\Software\\\\Wine\\\\Wine\\\\Config\n\n";
 &ReadFSTAB();
 &FindWindowsDir();
 &ReadAutoexecBat();
@@ -103,9 +105,9 @@
 	print "[Drive $MagicDrive]\n";
 	my $MntPoint = $FatDrive->[1];
 	my $FileSys = $FatDrive->[2];
-	print "Path=$MntPoint\n";
-	print "Type=hd\n";
-	print "Filesystem=$FileSys\n";
+	print "\"Path\" = \"$MntPoint\"\n";
+	print "\"Type\" = \"hd\"\n";
+	print "\"Filesystem\" = \"$FileSys\"\n";
 	print "\n";
 	&RegisterDrive($MagicDrive, $FatDrive);
 	if(!&IsMounted($FatDrive->[0])) {
@@ -119,10 +121,10 @@
 	my $Device = $CdromDrive->[0];
 	my $MntPoint = $CdromDrive->[1];
 	my $FileSys = $CdromDrive->[2];
-	print "Path=$MntPoint\n";
-	print "Type=cdrom\n";
-	print "Device=$Device\n";
-	print "Filesystem=$FileSys\n";
+	print "\"Path\" = \"$MntPoint\"\n";
+	print "\"Type\" = \"cdrom\"\n";
+	print "\"Device\" = \"$Device\"\n";
+	print "\"Filesystem\" = \"$FileSys\"\n";
 	print "\n";
 	&RegisterDrive($MagicDrive, $CdromDrive);
 	$MagicDrive++;
@@ -131,9 +133,9 @@
 	print "[Drive $MagicDrive]\n";
 	my $MntPoint = $UnixDrive->[1];
 	my $Type = $UnixDrive->[2];
-	print "Path=$MntPoint\n";
-	print "Type=$Type\n";
-	print "Filesystem=win95\n";
+	print "\"Path\" = \"$MntPoint\"\n";
+	print "\"Type\" = \"$Type\"\n";
+	print "\"Filesystem\" = \"win95\"\n";
 	print "\n";
 	$MagicDrive++;
     }
@@ -189,12 +191,12 @@
     }
     $::windir = &ToDos(dirname($winini));
     print "[wine]\n";
-    print "windows=$::windir\n";
+    print "\"windows\" = \"$::windir\"\n";
     if ($::opt_sysdir) {
-	print "system=$::opt_sysdir\n";
+	print "\"system\" = \"$::opt_sysdir\"\n";
     }
     else {
-	print "system=$::windir\\SYSTEM\n";
+	print "\"system\" = \"$::windir\\SYSTEM\"\n";
     }
 }
 
@@ -250,7 +252,7 @@
 		    my $matchname = $1;
 		    my $subname = $1;
 		    $subname =~ tr/A-Z/a-z/;
-		    if ($::opt_debug =~ /path/i) {
+		    if (($::opt_debug) && ($::opt_debug =~ /path/i)) {
 			print STDERR "DEBUG: Found $matchname as $subname\n";
 			print STDERR "DEBUG: Old varvalue:\n$varvalue\n";
 			print STDERR "DEBUG: Old subname value:\n" .
@@ -265,7 +267,7 @@
 			warn "is not implemented.)  Using null value\n";
 			$varvalue =~ s/%$matchname%//;
 		    }
-		    if ($::opt_debug =~ /path/i) {
+		    if (($::opt_debug) && ($::opt_debug =~ /path/i)) {
 			print STDERR "DEBUG: New varvalue:\n$varvalue\n";
 		    }
 		}
@@ -284,7 +286,7 @@
 
     if ($::DOSenv{"path"}) {
 	my @pathdirs = split(/\s*;\s*/, $::DOSenv{"path"});
-	if ($::opt_debug =~ /path/i) {
+	if (($::opt_debug) && ($::opt_debug =~ /path/i)) {
 	    print STDERR "DEBUG (path): @pathdirs\n";
 	}
 	foreach my $pathdir (@pathdirs) {
@@ -293,7 +295,7 @@
 		    warn "Ignoring duplicate DOS path entry $pathdir\n";
 		}
 		else {
-		    if ($::opt_debug =~ /path/i) {
+		    if (($::opt_debug) && ($::opt_debug =~ /path/i)) {
 			print STDERR "DEBUG (path): Found $pathdir\n";
 		    }
 		    push(@::DOSpathlist, $pathdir);
@@ -304,7 +306,7 @@
 		warn "exist\n";
 	    }
 	}
-	print "path=" . join(";", @::DOSpathlist) . "\n";
+	print "\"path\" = \"" . join(";", @::DOSpathlist) . "\"\n";
     }
     else {
 	# Code status: tested 1.4
@@ -324,15 +326,15 @@
 	    $command =~ s%[^/]+$%%;
 	    $::DOSexecdir{&ToDos($command)}++;
 	}
-	print "path=" . 
+	print "\"path\" = \"" . 
 	    join(";", 
 		 grep(s%\\$%%, 
 		      sort {$::DOSexecdir{$b} <=> $::DOSexecdir{$a}}
-		      (keys %::DOSexecdir))) . "\n";
+		      (keys %::DOSexecdir))) . "\"\n";
     }
 
     if ($::DOSenv{"temp"} && -d &ToUnix($::DOSenv{"temp"})) {
-	print "temp=" . $::DOSenv{"temp"} . "\n";
+	print "\"temp\" = \"" . $::DOSenv{"temp"} . "\"\n";
     }
     else {
         my $TheTemp;
@@ -349,11 +351,11 @@
 	$TheTemp = '/tmp' if (!$TheTemp && -d '/tmp');
 	if ($TheTemp) {
 	    warn "Using $TheTemp\n";
-	    print "temp=$TheTemp\n";
+	    print "\"temp\" = \"$TheTemp\"\n";
 	}
 	else {
 	    warn "Using C:\\\n";
-	    print "temp=C:\\\n";
+	    print "\"temp\" = \"C:\\\"\n";
 	}
     }
     print "\n";


More information about the wine-patches mailing list