[gs-commits] (xefitra) rev 10509 - trunk/gs/toolbin
robin at ghostscript.com
robin at ghostscript.com
Thu Dec 17 17:57:15 UTC 2009
Author: robin
Date: 2009-12-17 17:57:14 +0000 (Thu, 17 Dec 2009)
New Revision: 10509
Modified:
trunk/gs/toolbin/htmldiff.pl
Log:
Update the arguments passed to ghostscript by htmldiff.pl so that they
more closely match those used by the localcluster.
DETAILS
localcluster uses "-dNOOUTERSAVE -dJOBSERVER -c false 0 startjob pop -f"
The use of -dJOBSERVER changes the output given for some of the ps3cet files
due to having different stack contents at the outer level.
This seems to eliminate most of the differences between htmldiff results
and local cluster results. Those that remain seem to be caused by differences
in the output of devices (htmldiff uses bmp, wheras the localcluster uses
pgm/pbm/etc).
One minor point; the use of -dJOBSERVER is defined in doc/Use.htm
to require input to be supplied via stdin. I originally wrote the code to
do this, but it seems this gives problems on Windows for some files
(for reasons that are beyond my comprehension at this time). Accordingly,
I've swapped back to supplying the filenames on the command line and
everything seems to be fine.
If this presents a problem on platforms other than windows, simply
edit the value of $redir as shown at the top of the file and redirection
will be used. If this turns out to be necessary, it may be possible to
automate this.
Modified: trunk/gs/toolbin/htmldiff.pl
===================================================================
--- trunk/gs/toolbin/htmldiff.pl 2009-12-17 15:24:07 UTC (rev 10508)
+++ trunk/gs/toolbin/htmldiff.pl 2009-12-17 17:57:14 UTC (rev 10509)
@@ -23,16 +23,16 @@
$pclexe = "main\\obj\\pcl6.exe";
$xpsexe = "xps\\obj\\gxps.exe";
$svgexe = "svg\\obj\\gsvg.exe";
-$bmpcmpexe = "..\\bmpcmp\\bmpcmp\\Debug\\bmpcmp.exe";
+$bmpcmpexe = "..\\bmpcmp\\bmpcmp\\Release\\bmpcmp.exe";
$convertexe= "convert.exe"; # ImageMagick
# The args fed to the different exes. Probably won't need to play with these.
-$gsargs = "-sDEVICE=bmp16m -dNOPAUSE -dBATCH -q -sDEFAULTPAPERSIZE=letter";
+$gsargs = "-sDEVICE=bmp16m -dNOPAUSE -dBATCH -q -sDEFAULTPAPERSIZE=letter -dNOOUTERSAVE -dJOBSERVER -c false 0 startjob pop -f";
$gsargsPS = " %rom%Resource/Init/gs_cet.ps";
$pclargs = "-sDEVICE=bmp16m -dNOPAUSE";
$xpsargs = "-sDEVICE=bmp16m -dNOPAUSE";
$svgargs = "-sDEVICE=bmp16m -dNOPAUSE";
-$pwgsargs = "-sDEVICE=pdfwrite -dNOPAUSE -dBATCH -q";
+$pwgsargs = "-sDEVICE=pdfwrite -dNOPAUSE -dBATCH -q -sDEFAULTPAPERSIZE=letter -dNOOUTERSAVE -dJOBSERVER -c false 0 startjob pop -f";
$pwpclargs = "-sDEVICE=pdfwrite -dNOPAUSE";
$pwxpsargs = "-sDEVICE=pdfwrite -dNOPAUSE";
$pwsvgargs = "-sDEVICE=pdfwrite -dNOPAUSE";
@@ -53,6 +53,11 @@
# version.
$reference = "..\\ghostpdlREF\\";
+# I thought we'd need to use redirection, but this gives problems on
+# windows at least. Non windows users may want to use the following:
+# $redir = " - < ";
+$redir = " ";
+
# END SETUP SECTION
########################################################################
@@ -174,11 +179,11 @@
if ($exe eq "gs")
{
$cmd = $gsexe;
- $cmd .= " ".$gsargs;
$cmd .= " -r".$res;
$cmd .= " -sOutputFile=".$outdir."/tmp1_%d.bmp";
+ $cmd .= " ".$gsargs;
if ($file =~ m/\.PS$/) { $cmd .= " ".$gsargsPS };
- $cmd .= " ".$file;
+ $cmd .= $redir.$file;
$ret = system($cmd);
if ($ret != 0)
{
@@ -189,11 +194,11 @@
next;
}
$cmd = $reference.$gsexe;
- $cmd .= " ".$gsargs;
$cmd .= " -r".$res;
$cmd .= " -sOutputFile=".$outdir."/tmp2_%d.bmp";
+ $cmd .= " ".$gsargs;
if ($file =~ m/\.PS$/) { $cmd .= " ".$gsargsPS }
- $cmd .= " ".$file;
+ $cmd .= $redir.$file;
$ret = system($cmd);
if ($ret != 0)
{
@@ -300,11 +305,11 @@
elsif ($exe eq "pwgs")
{
$cmd = $gsexe;
- $cmd .= " ".$pwgsargs;
$cmd .= " -r".$res;
$cmd .= " -sOutputFile=".$outdir."/tmp1.pdf";
+ $cmd .= " ".$pwgsargs;
if ($file2 =~ m/\.PS$/) { $cmd .= " ".$gsargsPS; }
- $cmd .= " ".$file2;
+ $cmd .= $redir.$file2;
$ret = system($cmd);
if ($ret != 0)
{
@@ -315,11 +320,11 @@
next;
}
$cmd = $reference.$gsexe;
- $cmd .= " ".$pwgsargs;
$cmd .= " -r".$res;
$cmd .= " -sOutputFile=".$outdir."/tmp2.pdf";
+ $cmd .= " ".$pwgsargs;
if ($file2 =~ m/\.PS$/) { $cmd .= " ".$gsargsPS; }
- $cmd .= " ".$file2;
+ $cmd .= $redir.$file2;
$ret = system($cmd);
if ($ret != 0)
{
@@ -330,10 +335,10 @@
next;
}
$cmd = $gsexe;
- $cmd .= " ".$gsargs;
$cmd .= " -r".$res;
$cmd .= " -sOutputFile=".$outdir."/tmp1_%d.bmp";
- $cmd .= " ".$outdir."/tmp1.pdf";
+ $cmd .= " ".$gsargs;
+ $cmd .= $redir.$outdir."/tmp1.pdf";
$ret = system($cmd);
if ($ret != 0)
{
@@ -344,10 +349,10 @@
next;
}
$cmd = $gsexe;
- $cmd .= " ".$gsargs;
$cmd .= " -r".$res;
$cmd .= " -sOutputFile=".$outdir."/tmp2_%d.bmp";
- $cmd .= " ".$outdir."/tmp2.pdf";
+ $cmd .= " ".$gsargs;
+ $cmd .= $redir.$outdir."/tmp2.pdf";
$ret = system($cmd);
if ($ret != 0)
{
@@ -391,10 +396,10 @@
next;
}
$cmd = $gsexe;
- $cmd .= " ".$gsargs;
$cmd .= " -r".$res;
$cmd .= " -sOutputFile=".$outdir."/tmp1_%d.bmp";
- $cmd .= " ".$outdir."/tmp1.pdf";
+ $cmd .= " ".$gsargs;
+ $cmd .= $redir.$outdir."/tmp1.pdf";
$ret = system($cmd);
if ($ret != 0)
{
@@ -405,10 +410,10 @@
next;
}
$cmd = $reference.$gsexe;
- $cmd .= " ".$gsargs;
$cmd .= " -r".$res;
$cmd .= " -sOutputFile=".$outdir."/tmp2_%d.bmp";
- $cmd .= " ".$outdir."/tmp2.pdf";
+ $cmd .= " ".$gsargs;
+ $cmd .= $redir.$outdir."/tmp2.pdf";
$ret = system($cmd);
if ($ret != 0)
{
@@ -452,10 +457,10 @@
next;
}
$cmd = $gsexe;
- $cmd .= " ".$gsargs;
$cmd .= " -r".$res;
$cmd .= " -sOutputFile=".$outdir."/tmp1_%d.bmp";
- $cmd .= " ".$outdir."/tmp1.pdf";
+ $cmd .= " ".$gsargs;
+ $cmd .= $redir.$outdir."/tmp1.pdf";
$ret = system($cmd);
if ($ret != 0)
{
@@ -466,10 +471,10 @@
next;
}
$cmd = $reference.$gsexe;
- $cmd .= " ".$gsargs;
$cmd .= " -r".$res;
$cmd .= " -sOutputFile=".$outdir."/tmp2_%d.bmp";
- $cmd .= " ".$outdir."/tmp2.pdf";
+ $cmd .= " ".$gsargs;
+ $cmd .= $redir.$outdir."/tmp2.pdf";
$ret = system($cmd);
if ($ret != 0)
{
@@ -513,10 +518,10 @@
next;
}
$cmd = $gsexe;
- $cmd .= " ".$gsargs;
$cmd .= " -r".$res;
$cmd .= " -sOutputFile=".$outdir."/tmp1_%d.bmp";
- $cmd .= " ".$outdir."/tmp1.pdf";
+ $cmd .= " ".$gsargs;
+ $cmd .= $redir.$outdir."/tmp1.pdf";
$ret = system($cmd);
if ($ret != 0)
{
@@ -527,10 +532,10 @@
next;
}
$cmd = $reference.$gsexe;
- $cmd .= " ".$gsargs;
$cmd .= " -r".$res;
$cmd .= " -sOutputFile=".$outdir."/tmp2_%d.bmp";
- $cmd .= " ".$outdir."/tmp2.pdf";
+ $cmd .= " ".$gsargs;
+ $cmd .= $redir.$outdir."/tmp2.pdf";
$ret = system($cmd);
if ($ret != 0)
{
More information about the gs-commits
mailing list