Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#9 Windows Ghostscript delegate can fail

closed-fixed
5
2004-03-06
2004-02-18
Anonymous
No

When running Graphicsmagick in Windows, if Ghostscript
is installed under the 'Program Files' directory, an
error is returned that the Poscript delegate failed.

The problem is the name of the 'Program Files'
directory. The command that runs the delegate needs the
short path to the Ghostscript executable, like this:
c:\progra~1\gs\...

In magic/nt_base.c, after this line:
code = NTGetRegistryValue(HKEY_LOCAL_MACHINE, key,
name, ptr, &length);

I added this line for a quick fix:
GetShortPathName(ptr, ptr, length);

and it solved the problem for my installation.

This is a trivial issue since most users will install
Ghostscript in the default location, c:\gs. However, it
is reasonable to expect the installation could be in
c:\program files.

submitted by David Kelleher
sourceForge @ davidk (dot) net

Discussion

  • Logged In: YES
    user_id=128624

    I am fairly certain that the problems with spaces in the
    command path will be solved by wrapping the command path in
    double quotes. Therefore, rather than translating the
    command path to the legacy Windows version, I have added
    double quotes around all substituted command names in
    delegates.mgk.

     
    • labels: 595549 --> File Format Support
    • status: open --> closed-fixed