mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-16 05:45:33 +00:00
Patch for bug 225359: Drawing dependency graphs should work on Win32; patch by Byron Jones (glob) <bugzilla@glob.com.au>; r=jouni; a=justdave.
This commit is contained in:
parent
9ff220e1b0
commit
8ba4fb37b9
@ -226,14 +226,19 @@ if ($webdotbase =~ /^https?:/) {
|
||||
|
||||
# First, generate the png image file from the .dot source
|
||||
|
||||
my $dotfh;
|
||||
my ($pngfh, $pngfilename) = File::Temp::tempfile("XXXXXXXXXX",
|
||||
SUFFIX => '.png',
|
||||
DIR => $webdotdir);
|
||||
open (DOT, '-|') or exec ($webdotbase, "-Tpng", $filename);
|
||||
binmode $pngfh;
|
||||
open(DOT, "$webdotbase -Tpng $filename|");
|
||||
binmode DOT;
|
||||
print $pngfh $_ while <DOT>;
|
||||
close DOT;
|
||||
close $pngfh;
|
||||
|
||||
# On Windows $pngfilename will contain \ instead of /
|
||||
$pngfilename =~ s|\\|/|g if $^O eq 'MSWin32';
|
||||
|
||||
$vars->{'image_url'} = $pngfilename;
|
||||
|
||||
# Then, generate a imagemap datafile that contains the corner data
|
||||
@ -243,7 +248,9 @@ if ($webdotbase =~ /^https?:/) {
|
||||
my ($mapfh, $mapfilename) = File::Temp::tempfile("XXXXXXXXXX",
|
||||
SUFFIX => '.map',
|
||||
DIR => $webdotdir);
|
||||
open (DOT, '-|') or exec ($webdotbase, "-Tismap", $filename);
|
||||
binmode $mapfh;
|
||||
open(DOT, "$webdotbase -Tismap $filename|");
|
||||
binmode DOT;
|
||||
print $mapfh $_ while <DOT>;
|
||||
close DOT;
|
||||
close $mapfh;
|
||||
|
Loading…
x
Reference in New Issue
Block a user