--- On Thu, 20/5/10, Matijn Woudt tijnema@gmail.com wrote:
- On Tue, 18 May 2010, Hin-Tak Leung wrote:
So it seems that setupgs.exe is mis-compiled
under wine with win7 sdk but
just happened to also work under wine. Any
idea how it might happen?
I have gone ahead and done exactly that - the correct
behavior should be a
msg box saying filelist.txt is missing, rather than
setupgs.exe not a valid
win32 application.
http://www.ghostscript.com/~hintak/setupgs-vista.exe http://www.ghostscript.com/~hintak/setupgs-wine.exe
I haven't tried the uninstaller yet, so I don't know
if the wine-built
uninstaller work:
http://www.ghostscript.com/~hintak/uninstgs-vista.exe http://www.ghostscript.com/~hintak/uninstgs-wine.exe
To analyse the executables are a bit beyond me, but I
hope somebody can do
that.
under either system, if I compile the file twice
quickly, the result differs
only by the datestamp and checksum (and in two
wine-compiled executable
built a bit of time between , also a few bytes in the
.text section after
what looks like an import table in a hex editor?
There are a few differences I spotted between the two executables:
- setupgs-wine.exe has wrong image size, changing it from
0x2b200 to 0x2b000 makes the executable working under win7. 2) setupgs-wine.exe has wrong resource size, probably related to 1), because the size of both executables are the same. 3) The assembly in setupgs-wine.exe has only LF line endings, vista has CRLF. This explains 2).
I don't know the reason for 3), I assume it's a bug somewhere in wine.
I tried uninstgs-wine.exe and it is also broken. What's more, the executable is of a different size. I am thinking 2 and 3 are probably red herrings, although it is curious how it happens. (I git-archive under unix and use winzip to extract them, so the manifests are the same, and have unix line endings.)
The ghostscript distribution has other executables besides setupgs.exe and uninstgs.exe (for install and uninstall), but only those two seem to be broken. Those two are also different in having been manipulated through mt. Could the running of mt be buggy?
mt -nologo -manifest $(PSSRC)dwsetup_x64.manifest -outputresource:$(SETUP_XE);#1
I have tried re-running mt on either a built executable or vista-compiled ones, but there are no modification. perhaps I don't understand what it does and how it does its work.