[squeak-dev] Letting the VM run multiple image formats

tim Rowledge tim at rowledge.org
Sun Feb 9 06:04:49 UTC 2020


I suggest that what we would like to achieve is a way to run either 32 or 64 bit images on all our platforms with minimal fiddling. I mean sure, fiddling is fun but that isn't the sort of fun fiddling we like to have fun with, right?

David has long had a unix script that uses his imageformat program to test the image file format and work out the right vm to use and then launch the image with that vm. I'm not sure right now if it also checks for the latest version of the relevant vm (a loosely equivalent script we use for the Pi NuScratch system makes use of some trickery - 
`
# find the latest vm
VM=`ls /usr/lib/squeak/5.0-20*/squeak|sort -r | head -1`
# and thus its directory
BIN=`/usr/bin/dirname $VM`

- to find the most recently date-named vm and I assume we could do the same.

We could of course go full-nutter and make use of the amazing trick discussed around 6 May 2019 in some fascinating messages from Subbu 
(subject: [squeak-dev] Running Squeak fro ma unix shell script file with #! squeak...)
to put the vm name to use in the image header like a shebangbinbash. I guess we would make that refer to a script that still did the latest-vm-lookup trick.

For other platforms we might have to use a different approach, though I suspect Mac OS could just use the same unix ideas if not actual scripts. Windows ... no idea and probably something annoying but it must be able to do sometihng equivalent. The only thing we have to be careful about is not deciding on an option that makes it hard to use other platforms in the future.

For deployment/downloads we'd likely want to just bundle both 32&64 bit vms in a package set up to use the script(s) -after all the executables are not particularly large. 

Err, it's too late at night for me to care about looking it up, but are we also going to get problems from wanting to run 32 bit images on a 64 bit OS where the OS insists on 64 form executables? Of course we are, silly question...

tim
--
tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim
Oxymorons: Exact estimate




More information about the Squeak-dev mailing list