[GRASS-dev] Re: winGRASS

Glynn Clements glynn at gclements.plus.com
Mon Dec 18 12:39:19 EST 2006


Michael Barton wrote:

> Mea culpa on this. Written before we (I) realized the issues this kind of
> call to a unix command would cause for Windows. I'll change this to a pure
> TclTk call that will work in all platforms.
> 
> Along this line, in mapprint.tcl, I used ...
> 
> cat [filename] | gs [ghostscript flags and arguments]
> 
> ... For postscript printing.
> 
> Does ghostscript work for Windows?

Yes.

> If so, any ideas of a substitute for the
> "cat [filename] | gs ..." syntax that would work on Windows?

Well, "gs ... filename.ps" is normally preferable to using a pipe on
any platform.

However, there are a few differences between the native Windows
version of Ghostscript and the Unix version; according to the Use.htm
file:

	9.3 MS Windows
	
	The name of the Ghostscript command line executable on MS Windows is
	gswin32c so use this instead of the plain 'gs' in the quickstart
	examples.
	
	You must add gs\bin and gs\lib to the PATH, where gs is the top-level
	Ghostscript directory.
	
	When passing options to ghostcript through a batch file wrapper such
	as ps2pdf.bat you need to substitute '#' for '=' as the separator
	between options and their arguments. For example:
	
	    ps2pdf -sPAPERSIZE#a4 file.ps file.pdf
	
	Ghostscript treats '#' the same internally, and the '=' is mangled by
	the command shell.
	
	There is also an older version for windows called just gswin32 that
	provides its own window for the interactive postscript prompt. Except
	on Windows 3.1, gswin32c is the better option since it uses the native
	command prompt window.

Note that this only applies to the native Windows version; Cygwin's
Ghostscript package behaves identically to the Unix version.

-- 
Glynn Clements <glynn at gclements.plus.com>




More information about the grass-dev mailing list