Summary: | Requested change to windows gssetgs.bat | ||
---|---|---|---|
Product: | Ghostscript | Reporter: | Marcos H. Woehrmann <marcos.woehrmann> |
Component: | Config/Install | Assignee: | Robin Watts <robin.watts> |
Status: | RESOLVED FIXED | ||
Severity: | enhancement | CC: | christinedelight.top85 |
Priority: | P4 | ||
Version: | 9.00 | ||
Hardware: | PC | ||
OS: | Windows 7 | ||
Customer: | Word Size: | --- | |
Attachments: | gssetgs.bat |
Description
Marcos H. Woehrmann
2010-10-27 04:18:13 UTC
Created attachment 6867 [details]
gssetgs.bat
Mr Google suggests that %~dp0 expands in a batch file to the drive and path of the batchfile. (So in C:\some\path\batch.bat %~dp0 will expand to C:\some\path\)
The proposed change would therefore allow people to run:
C:\whatever\path\gs\lib\gssetgs.bat
and have GS and GSC set up to point to the versions of ghostscript in C:\whatever\path\gs\bin\ without that directory needing to be on the path.
This is a good thing for people that haven't got gs on their path, but a bad thing for those that have - it prevents users copying that batch file to somewhere else on the harddrive.
I attach an updated script here for comments; this version will set GS and GSC to point to the ones in %~dp0..\bin\ if they exist. If not, it reverts to the old mechanism and uses the ones on the path.
Any refinements/comments welcome.
As to the second part of the bug report: > I've installed a printer throw ghostpdf.inf, but it is not PDF one, but PS. > I use ps2pdf.bat (the way I've found gssetgs issue), but it will be > far more convenient to get PDF file directly. > I have no sufficient skills to make necessary changes to inf-file (or > ppd one?), can you improve printer installation part? Or give me, > please, more-or-less direct help to find solution myself. I have no experience of this myself, but 2 people have told me that this (creating a virtual printer that creates PDF files) cannot be achieved directly using ghostscript and a ppd. The way to achieve this is apparently to use RedMon port monitor. Google suggests that: http://pages.cs.wisc.edu/~ghost/redmon/ is a good place to look. (In reply to comment #2) > I have no experience of this myself, but 2 people have told me that this > (creating a virtual printer that creates PDF files) cannot be achieved directly > using ghostscript and a ppd. > > The way to achieve this is apparently to use RedMon port monitor. Google > suggests that: http://pages.cs.wisc.edu/~ghost/redmon/ is a good place to look. Or, more simply, use something like Primo PDF: http://www.primopdf.com/index.aspx If I remember correctly we like Primo because they are an actual customer, instead of selling a front end which requires Ghostscript to be downloaded separately in order to avoid commercial licensing. I find it hard to believe that anyone really cares at this point, but to get this bug off my list... Fixed in: commit bc1d2d9742c960f1d4905f43810be072c5d92390 Author: Robin Watts <robin.watts@artifex.com> Date: Mon Jul 9 11:15:00 2018 +0100 Bug 691725: Tweak gssetgs*.bat files. The existing scripts assume that the gs binaries are on the path. The tweaked scripts check to see if there is a binary in the same directory as the .bat file, and if there is, use that in preference to any version on the path. Otherwise functionality is identical. |