How About an InstallSqueak Image?

Raab, Andreas Andreas.Raab at disney.com
Wed Jun 16 19:24:58 UTC 1999


Andres,

These are some *really* interesting points - I actually like this idea a lot
and we might just try it and see what the anti-virus programs say about it.

> > It would appear that the only missing piece is how to glue arbitrary
> data 
> > (installer image and compressed files) onto the end of an executable
> file 
> > (a Squeak VM) in such a way that the host OS will only load the first
> part, 
> > and won't be unhappy about the presence of the second part.
> 
> **Wintel**
> 
> There are a lot of utilities that can glue anything to the end of an
> exe file, including the grotesque:
> 
> copy first.exe /b + garbage.files /b + ... + last.garbage /b
> destination.file.exe
> 
It is not grotesque at all - just think about it in a slightly different
way:

	| exeFile |
	exeFile := FileStream newFileNamed:'SqueakInstall.exe'.
	exeFile binary.
	exeFile nextPutAll:(FileStream oldFileNamed: 'Squeak.exe')
contentsOfEntireFile.
	exeFile nextPutAll:(FileStream oldFileNamed: 'Install.image')
contentsOfEntireFile.
	...

allowing us to create the entire thing *completely* from Squeak (one would
probably add some file names; compression flags etc.)

> The result is that first.exe's header points to places that are still
> valid, and the rest is ignored by the loader OS. This works since DOS,
> the added stuff is treated as if it was an overlay, and so it's not
> loaded until the exe needs it (never).
> 
I didn't know this (I always thought that you would have to adjust the
EXE-header in some way; a cleaner but much harder way to do it). Now, the
things remaining to do in the startup code would be:
* Find the actual length of the EXE-file
* Map the following image into memory
* Run it
That doesn't sound too hard - any volunteers?!

  Andreas
--
+===== Andreas Raab ========= (andreasr at wdi.disney.com) ==+
| Walt Disney Imagineering        Phone: +1 818 544 5016  I
I Glendale, CA                    Fax:   +1 818 544 4544  I
+======< http://isgwww.cs.uni-magdeburg.de/~raab >========+





More information about the Squeak-dev mailing list