Add "Unix drives" /tmp and ${HOME}, and Device and Filesystem
statements, to autogenerated wine.conf.
This commit is contained in:
parent
e2f4aefb38
commit
9bd682d899
|
@ -78,10 +78,12 @@ sub ReadFSTAB {
|
||||||
my ($device, $mntpoint, $type, @rest) = split(' ', $_);
|
my ($device, $mntpoint, $type, @rest) = split(' ', $_);
|
||||||
if ($device !~ m"^/dev/fd") {
|
if ($device !~ m"^/dev/fd") {
|
||||||
if ($type eq "msdos" || $type eq "vfat") {
|
if ($type eq "msdos" || $type eq "vfat") {
|
||||||
push(@::FatDrives, [$device, $mntpoint]);
|
push(@::FatDrives, [$device, $mntpoint, $type]);
|
||||||
}
|
}
|
||||||
elsif ($type eq "iso9660" || ($device eq '/dev/cdrom' && $type eq 'auto') ) {
|
elsif ($type eq "iso9660" ||
|
||||||
push(@::CdromDrives, [$device, $mntpoint]);
|
$mntpoint eq "/cdrom" ||
|
||||||
|
($device eq '/dev/cdrom' && $type eq 'auto') ) {
|
||||||
|
push(@::CdromDrives, [$device, $mntpoint, 'win95']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -91,14 +93,18 @@ sub ReadFSTAB {
|
||||||
warn "cannot help you (yet)\n";
|
warn "cannot help you (yet)\n";
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
push(@::UnixDrives, ['', '/tmp', 'hd']);
|
||||||
|
push(@::UnixDrives, ['', '${HOME}', 'network']);
|
||||||
my $MagicDrive = 'C';
|
my $MagicDrive = 'C';
|
||||||
@::FatDrives = sort byDriveOrder @::FatDrives;
|
@::FatDrives = sort byDriveOrder @::FatDrives;
|
||||||
@::CdromDrives = sort byCdOrder @::CdromDrives;
|
@::CdromDrives = sort byCdOrder @::CdromDrives;
|
||||||
foreach my $FatDrive (@::FatDrives) {
|
foreach my $FatDrive (@::FatDrives) {
|
||||||
print "[Drive $MagicDrive]\n";
|
print "[Drive $MagicDrive]\n";
|
||||||
my $MntPoint = $FatDrive->[1];
|
my $MntPoint = $FatDrive->[1];
|
||||||
|
my $FileSys = $FatDrive->[2];
|
||||||
print "Path=$MntPoint\n";
|
print "Path=$MntPoint\n";
|
||||||
print "Type=hd\n";
|
print "Type=hd\n";
|
||||||
|
print "Filesystem=$FileSys\n";
|
||||||
print "\n";
|
print "\n";
|
||||||
&RegisterDrive($MagicDrive, $FatDrive);
|
&RegisterDrive($MagicDrive, $FatDrive);
|
||||||
if(!&IsMounted($FatDrive->[0])) {
|
if(!&IsMounted($FatDrive->[0])) {
|
||||||
|
@ -109,13 +115,27 @@ sub ReadFSTAB {
|
||||||
}
|
}
|
||||||
foreach my $CdromDrive (@::CdromDrives) {
|
foreach my $CdromDrive (@::CdromDrives) {
|
||||||
print "[Drive $MagicDrive]\n";
|
print "[Drive $MagicDrive]\n";
|
||||||
|
my $Device = $CdromDrive->[0];
|
||||||
my $MntPoint = $CdromDrive->[1];
|
my $MntPoint = $CdromDrive->[1];
|
||||||
|
my $FileSys = $CdromDrive->[2];
|
||||||
print "Path=$MntPoint\n";
|
print "Path=$MntPoint\n";
|
||||||
print "Type=cdrom\n";
|
print "Type=cdrom\n";
|
||||||
|
print "Device=$Device\n";
|
||||||
|
print "Filesystem=$FileSys\n";
|
||||||
print "\n";
|
print "\n";
|
||||||
&RegisterDrive($MagicDrive, $CdromDrive);
|
&RegisterDrive($MagicDrive, $CdromDrive);
|
||||||
$MagicDrive++;
|
$MagicDrive++;
|
||||||
}
|
}
|
||||||
|
foreach my $UnixDrive (@::UnixDrives) {
|
||||||
|
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 "\n";
|
||||||
|
$MagicDrive++;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
sub FindWindowsDir {
|
sub FindWindowsDir {
|
||||||
|
@ -199,7 +219,7 @@ sub IsMounted {
|
||||||
}
|
}
|
||||||
|
|
||||||
sub RegisterDrive {
|
sub RegisterDrive {
|
||||||
my($DOSdrive, $Drive) = @_;
|
my($DOSdrive, $Drive, $Type) = @_;
|
||||||
$::DOS2Unix{$DOSdrive} = $Drive;
|
$::DOS2Unix{$DOSdrive} = $Drive;
|
||||||
$::Device2DOS{$Drive->[0]} = $DOSdrive;
|
$::Device2DOS{$Drive->[0]} = $DOSdrive;
|
||||||
$::MntPoint2DOS{$Drive->[1]} = $DOSdrive;
|
$::MntPoint2DOS{$Drive->[1]} = $DOSdrive;
|
||||||
|
|
Loading…
Reference in New Issue