I've just been making a shrunk image intended to work headless. After carefully testing my headless linux VM witha normal 4282 level image, I was more than a little disturbed to find that it didn't work after shrinking.
The problems turned out to be two places in the AutoStart / AbstractLauncher class worlds.
When you shrink an image and remove Morphic you suddenly find that commandline scripts no longer get processed. This is because:-
a) ProjectLauncher tries to setup some Flaps, which no longer exist
b) AutoStart only starts its installed launchers if there is a WorldState - which no longer exists.
This changeset provides a reasonably tidy fix by making AutoStart delegate a bit better to the luncher class involved, and by providing a default #startUp that continues to check for WorldState. The CommandLineLauncher is an example of overriding that to work without Morphic in a shrunk, headless image.
To activate CommandLineLauncher, remember to use ProjectLauncher deactivate. CommandLineLauncher activate before saving the image.
tim
Duh. Tags....
In message 735d53b14a.rowledge@goldskin.stcla1.sfba.home.com Tim Rowledge tim@sumeru.stanford.edu wrote:
I've just been making a shrunk image intended to work headless. After carefully testing my headless linux VM witha normal 4282 level image, I was more than a little disturbed to find that it didn't work after shrinking.
The problems turned out to be two places in the AutoStart / AbstractLauncher class worlds.
When you shrink an image and remove Morphic you suddenly find that commandline scripts no longer get processed. This is because:-
a) ProjectLauncher tries to setup some Flaps, which no longer exist
b) AutoStart only starts its installed launchers if there is a WorldState - which no longer exists.
This changeset provides a reasonably tidy fix by making AutoStart delegate a bit better to the luncher class involved, and by providing a default #startUp that continues to check for WorldState. The CommandLineLauncher is an example of overriding that to work without Morphic in a shrunk, headless image.
To activate CommandLineLauncher, remember to use ProjectLauncher deactivate. CommandLineLauncher activate before saving the image.
tim
On Tue, 28 Aug 2001 15:21:45 -0700, Tim Rowledge tim@sumeru.stanford.edu wrote:
I've just been making a shrunk image intended to work headless. After carefully testing my headless linux VM witha normal 4282 level image, I was more than a little disturbed to find that it didn't work after shrinking.
Tim,
How small have you been able to make the image?
Later, Jon
-------------------------------------------------------------- Jon Hylands Jon@huv.com http://www.huv.com/jon
Project: Micro Seeker (Micro Autonomous Underwater Vehicle) http://www.huv.com
Jon Hylands jon@huv.com is widely believed to have written:
How small have you been able to make the image?
This one came out at 5Mb, but for some reason I don't seem to be able to get rid of the 3D project. Ran all the usual stuff, but it just sits there sticking its tongue out at me. The window goes away ok, but the project is still there in the project list.
One I prepared based on update 4164 got down to 3.3Mb doing just the same shrinkage. Go figure.
tim
On Wed, 29 Aug 2001 15:02:40 -0700, Tim Rowledge tim@sumeru.stanford.edu wrote:
This one came out at 5Mb, but for some reason I don't seem to be able to get rid of the 3D project. Ran all the usual stuff, but it just sits there sticking its tongue out at me. The window goes away ok, but the project is still there in the project list.
One I prepared based on update 4164 got down to 3.3Mb doing just the same shrinkage. Go figure.
I'm currently at about 1.7MB with an automated majorShrink, and I've gotten that image down to 1 MB with my headless stripper and some manual intervention. I'm going to do some more work tonight on that...
I can post my majorShrink fix (which runs with a 4282 image) if you'd like it... I'll be posting the whole thing when I'm done, and hopefully it should get us down to a sub-500 MB headles image with no manual intervention required other than running the two scripts.
Later, Jon
-------------------------------------------------------------- Jon Hylands Jon@huv.com http://www.huv.com/jon
Project: Micro Seeker (Micro Autonomous Underwater Vehicle) http://www.huv.com
Jon Hylands jon@huv.com is widely believed to have written:
I'm currently at about 1.7MB with an automated majorShrink, and I've gotten that image down to 1 MB with my headless stripper and some manual intervention. I'm going to do some more work tonight on that...
Ooh, well done. One of the major problems I've noticed is that leaving in the code that tries to do the whittling of classes/methods tends to remove True & False and I get blow ups in the attempts to deal with Booleans... rather frustrating but not important enough in practise for me to have hit on it yet.
Oh and it's annoying to be told that you have to be in an MVC project AND in the top project... bit tricky in recent images!
tim
On Wed, 29 Aug 2001 18:32:12 -0700, Tim Rowledge tim@sumeru.stanford.edu wrote:
Ooh, well done. One of the major problems I've noticed is that leaving in the code that tries to do the whittling of classes/methods tends to remove True & False and I get blow ups in the attempts to deal with Booleans... rather frustrating but not important enough in practise for me to have hit on it yet.
Yeah, I had to patch it to force include:
True False ReadOnlyVariableBinding SystemOrganization ClassOrganizer
Oh and it's annoying to be told that you have to be in an MVC project AND in the top project... bit tricky in recent images!
There's a pretty simple 4-step Doit that takes care of that.
Smalltalk zapAllOtherProjects. ProjectHistory currentHistory initialize. Smalltalk garbageCollect. Project rebuildAllProjects.
You have to be in an MVC project for this to work...
Later, Jon
-------------------------------------------------------------- Jon Hylands Jon@huv.com http://www.huv.com/jon
Project: Micro Seeker (Micro Autonomous Underwater Vehicle) http://www.huv.com
Hi John,
I'm currently at about 1.7MB with an automated majorShrink, and I've
gotten
that image down to 1 MB with my headless stripper and some manual intervention. I'm going to do some more work tonight on that...
This is big news, considering that SWT still doesn't have a script for shrinking. ;-)
I can post my majorShrink fix (which runs with a 4282 image) if you'd like
it...
Please do, I like it too.
I'll be posting the whole thing when I'm done, and hopefully it should get us down to a sub-500 MB headles image with no manual intervention required other than running the two scripts.
But, isn't sub-500 MB headless image a bit too much (unless it is super duper sub 500MB, that makes it something like 499.99 KB ;-)
Cheers,
PhiHo
----- Original Message ----- From: "Jon Hylands" jon@huv.com To: squeak-dev@lists.squeakfoundation.org Sent: Wednesday, August 29, 2001 6:54 PM Subject: Re: AutoStart doesn't work with a shrunken image
On Wed, 29 Aug 2001 15:02:40 -0700, Tim Rowledge tim@sumeru.stanford.edu wrote:
This one came out at 5Mb, but for some reason I don't seem to be able to get rid of the 3D project. Ran all the usual stuff, but it just sits there sticking its tongue out at me. The window goes away ok, but the project is still there in the project list.
One I prepared based on update 4164 got down to 3.3Mb doing just the same shrinkage. Go figure.
I'm currently at about 1.7MB with an automated majorShrink, and I've gotten that image down to 1 MB with my headless stripper and some manual intervention. I'm going to do some more work tonight on that...
I can post my majorShrink fix (which runs with a 4282 image) if you'd like it... I'll be posting the whole thing when I'm done, and hopefully it should get us down to a sub-500 MB headles image with no manual intervention required other than running the two scripts.
Later, Jon
-------------------------------------------------------------- Jon Hylands Jon@huv.com http://www.huv.com/jon
Project: Micro Seeker (Micro Autonomous Underwater Vehicle) http://www.huv.com
On Wed, 29 Aug 2001 21:52:23 -0400, "PhiHo Hoang" phiho.hoang@home.com wrote:
But, isn't sub-500 MB headless image a bit too much (unless it is super
duper sub 500MB, that makes it something like 499.99 KB ;-)
Oops :-)
I meant < 500 KB, of course...
Later, Jon
-------------------------------------------------------------- Jon Hylands Jon@huv.com http://www.huv.com/jon
Project: Micro Seeker (Micro Autonomous Underwater Vehicle) http://www.huv.com
squeak-dev@lists.squeakfoundation.org