Bug 691975 - Working with a 64-bit version of GhostScript
Summary: Working with a 64-bit version of GhostScript
Status: RESOLVED FIXED
Alias: None
Product: Artifex GSview
Classification: Unclassified
Component: General (show other bugs)
Version: unspecified
Hardware: PC All
: P4 normal
Assignee: Ray Johnston
URL:
Keywords:
: 691994 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-02-15 17:03 UTC by Bogdan Barbu
Modified: 2022-05-14 15:18 UTC (History)
3 users (show)

See Also:
Customer:
Word Size: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Bogdan Barbu 2011-02-15 17:03:51 UTC
Hi,

I've installed the 64-bit versions of both GhostScript and GSview and it seems that GSview expects a 32-bit copy of GhostScript (it complains about gsdll32.dll not being there, for instance).

Cheers,
Bogdan
Comment 1 Ray Johnston 2011-02-15 17:09:17 UTC
I didn't know that there was a 64-bit GSView. You can either install the
32-bit Ghostscript, or rename the gsdll64.dll to gsdll32.dll until this gets
addressed.
Comment 2 Bogdan Barbu 2011-02-15 17:14:43 UTC
(In reply to comment #1)
> I didn't know that there was a 64-bit GSView. You can either install the
> 32-bit Ghostscript, or rename the gsdll64.dll to gsdll32.dll until this gets
> addressed.

I already did the latter and it worked, I just forgot to mention the workaround.
Comment 3 Russell Lang 2011-02-16 11:37:11 UTC
32-bit version of GSview needs to use the 32-bit version of Ghostscript.
64-bit version of GSview needs to use the 64-bit version of Ghostscript.
Artifex did not upload a full installer for Ghostscript 9.0, because the 64-bit executable runs slower than the 32-bit, even on 64-bit Windows.
I suggest you use the 32-bit versions.

You can install both, and Windows will put them in separate directories, one in
c:\program files, and the other in c:\program files (x86)

There was a bug in the older GSview 4.8, which would attempt to use gsdll64.dll for previewing, and gsdll32.dll (and fail) when converting or printing.
Comment 4 Bogdan Barbu 2011-02-16 12:51:20 UTC
(In reply to comment #3)
> Artifex did not upload a full installer for Ghostscript 9.0, because the 64-bit
> executable runs slower than the 32-bit, even on 64-bit Windows.
> I suggest you use the 32-bit versions.

I know the GS 9.0 installer actually contains a 32-bit DLL but the 9.01 one is actually 64-bit (I've checked).
Comment 5 Russell Lang 2011-02-24 23:59:49 UTC
I haven't got a 64-bit system in front of me, but from the source code it looks like the GS 9.01 installer for 64-bit is broken.  The DLL and EXE originally had a 32 in their name, but this was changed to 64.  However, the installer is still writing to the registry that the DLL is gsdll32.dll, so this is what GSview is trying to load.

Workaround is to copy "c:\program files\gs\gs9.01\bin\gsdll64.dll" to "c:\program files\gs\gs9.01\bin\gsdll32.dll", so there are two copies of the DLL, but with different names.

I'm not sure how the Windows 64-bit archive was created, because the makefile still references the "32" names for the executables and DLL.

I'll have another look at this in a few days.
Comment 6 Ray Johnston 2011-02-25 18:12:43 UTC
I discovered a patch needed in dwsetup.cpp to set the proper GS_DLL registry
key.

I am pretty sure it is OK now.

We will be updating the 64-bit Windows binaries with the new version. Please
try the one at: http://casper.ghostscript.com/~ray/gs901w64.exe 

I changed the comments in dwsetup.cpp, but the substantive change is:

Index: psi/dwsetup.cpp
===================================================================
--- psi/dwsetup.cpp     (revision 12199)
+++ psi/dwsetup.cpp     (working copy)
@@ -751,7 +751,11 @@
        strcpy(szDLL, g_szTargetDir);
        strcat(szDLL, "\\");
        strcat(szDLL, cinst.GetMainDir());
+#ifdef _WIN64
+       strcat(szDLL, "\\bin\\gsdll64.dll");
+#else
        strcat(szDLL, "\\bin\\gsdll32.dll");
+#endif
        if (!cinst.UpdateRegistryValue(regkey1, regkey2, "GS_DLL", szDLL)) {
                gs_addmess("Failed to add registry value\n");
                return FALSE;
Comment 7 Bogdan Barbu 2011-02-25 22:18:33 UTC
Sorry to report but this doesn't solve the problem. I think that the problem is still in GSview, though --- otherwise it should complain about not finding gsdll64.dll, regardles of the registry. If there's no GS at all, it still wants gsdll32.dll.
Comment 8 Russell Lang 2011-02-27 09:53:30 UTC
Ray's change works for me.  If you have previously installed GS 9.01, and run GSview, GSview will remember that it is looking for gsdll32.dll and fail.  After installing Ray's gs901w64.exe, you will need to run GSview then select "Options, Easy Configure, 9.01, Ok".  After that it will work.
For clean installs, it will work with Ray's update.

There are remaining changes needed in GSview, so that by default it looks for gsdll64.dll if ghostscript has not been configured on Win64.  In common use this will not be an issue.  If you are installing GSview to use as a portable application (nothing installed, not registry changes, etc.), then you will still have problems until I update GSview.

Thanks Ray, you got to it quicker than me.
Comment 9 Ken Sharp 2011-02-28 10:30:20 UTC
*** Bug 691994 has been marked as a duplicate of this bug. ***
Comment 10 Russell Lang 2012-06-18 12:14:01 UTC
Fixed in Ghostscript 9.04 and GSview 5.0.
Comment 11 Ray Johnston 2018-07-09 18:58:39 UTC
It appears that this was fixed, but bug never closed.
Comment 12 iyana 2022-05-14 15:18:22 UTC
(In reply to Russell Lang from comment #8)
> Ray's change works for me.  If you have previously installed GS 9.01, and
> run GSview, GSview will remember that it is looking for gsdll32.dll and
> fail.  After installing Ray's gs901w64.exe, you will need to run GSview then
> select "Options, Easy Configure, 9.01, Ok".  After that it will work.
> For clean installs, it will work with Ray's update.
> 
> There are remaining changes needed in GSview, so that by default it looks
> for gsdll64.dll if ghostscript has not been configured on Win64.  In common
> use this will not be an issue.  If you are installing GSview to use as a
> portable application (nothing installed, not registry changes, etc.), then
> you will still have problems until I update GSview.
> 
> Thanks Ray, you got to it quicker than me.

thanks alot you saved my seimister