[VM] Build report and queries (Unix and Win32)

Ross Boylan RossBoylan at stanfordalumni.org
Thu Feb 21 00:42:27 UTC 2002


At 11:59 PM 2/20/02 +0100, Andreas wrote:
>Lex,
>
> > It's kind of interesting how different platforms are affected by this.
> > Old Unix VM's are perfectly fine with these images, because they just
> > obediently pass on the requested image file to the
> > platform-independent portion of Squeak.  The Windows VM's (and maybe
> > the Mac VM's?) try to do some sanity checking to protect the
> > user from Bad Catastrophic Horrible Bad Things that they couldn't
> > possibly want,
>
>Actually no. What you're seeing is a side effect of an entirely
>different feature - namely that of being able to start Squeak just by
>double clicking on the executable or dropping some project file or
>whatever onto it. In order for this to work, the VM checks if the thing
>you're passing in is a Squeak image file and if not, tries to find one
>on its own.
>
> > and end up being a tiny bit too restrictive. Instead of fixing the
>sanity
> > check, it would be possible to just *remove* the check, but I don't
>remember
> > anyone proposing that kind of solution.
>
>For good reasons. Many (most?) Windows people are used to start
>applications and therefore, if there is a Squeak.exe they will try to
>start it and if it dies for no good reason or gives questionable
>responses (like popping up dialog boxes etc) you've just lost a possible
>user.
>
>Cheers,
>   - Andreas

But the same check is implemented in several different places in the code:
checkImageVersionFromstartingAt in interp.c does it (and this is ultimately 
why the image can be read)
SqueakImageLength in sqWin32Window.c does it
IsImage in SqWin32Args.c does it

I just excised IsImage from my source, and replaced the one call to it with 
SqueakImageLength()>0 (this is not in the diffs I put out).  So those two 
seem redundant.  And I wonder if there's a way to get rid of 
SqueakImageLength too.  The failure behavior of checkImage version is 
probably no good, but there's some redundancy here it would be nice to 
eliminate.





More information about the Squeak-dev mailing list