[ENH] One-click executables

Stefan Matthias Aust sma at netsurf.de
Thu Jul 15 20:12:48 UTC 1999


Andreas Raab wrote:

>The only problem I can see is how the
>VM would determine the start/length of the image to run.

No problem...

>How do you like
>storing start and length (plus perhaps a magic number) at the very end of
>the generated file?!

....as this is the way I do it.  The SQR format (as described in the class
comment of the attached file-out of my original email) is defined that way.
 At fileSize-8, there's a magic number plus the start offset of the first
injected file.  Each file has a header consisting of another magic number,
a name and the size of the file.

>> Unfortunately, it seems that Squeak cannot uncompress a source file 

>Hm ... do you have update 1017 in your image?!

Thanks, I'm pretty sure that I haven't updated yet...

>If not then I'll have to double check (because 64k is not
>just an assumption; its the max size than can actually occur with a 15bit
>window).

I thought, it might have occured, because I used "-9" for maximal
compression which could enlarge the compression window. But I'll check
again with the patch applied.

>I would just add a trivial check to the startup code if the executable file
>contains an image (see above), then modify #readImageFile: to have an
>optional offset and then load the image and goooo ;-)

I already checked the code and I think, #readImageFile: is not the right
place.  If the program reaches this point, the C part of the VM has already
checked wether the user has supplied an image file or not.  However,
there's just a minor modification to the Smalltalk part of the VM code
needed - which is even compatible with the normal code - to add SQR-archives.

The main part of work is to adapt the C part.  Andreas, did you ever
thought about reducing the size of the C part?  All command line
processing, for example, could be done in Smalltalk, I think.  I also
wonder whether this code is really platform-dependent or whether not all
platforms need this kind of code.

>Anyways, I'm really excited about this stuff. Let me know how it is coming
>along.

Sure.  

PS: Tim, thanks for your comments regarding other platforms.


bye
--
Stefan Matthias Aust  //  Bevor wir fallen, fallen wir lieber auf.





More information about the Squeak-dev mailing list