[Newbies] saving image automatically
Norbert Hartl
norbert at hartl.name
Mon Apr 30 22:26:04 UTC 2007
On Mon, 2007-04-30 at 15:17 -0400, David Shaffer wrote:
> Norbert Hartl wrote:
> > Hi,
> >
> > I'm trying to save an image under a different name. I
> > have a image I'm working with (e.g. VNC enabled) and I
> > like to create a derived image under a different name.
> >
> > I use
> >
> > MySetup>>deploy
> > RFBServer doStopServer.
> > SmalltalkImage current closeSourceFiles.
> > SmalltalkImage current saveChangesInFileNamed: 'base-deploy.changes'.
> > SmalltalkImage current saveImageInFileNamed: 'base-deploy.image'.
> > SmalltalkImage current snapshot: false andQuit: true
> >
> >
> Norbert,
>
> This is going to sound stupid but my solution to this is to save twice.
> I do exactly what you describe in several of my image building scripts.
> Basically the sequence:
>
> MCFileBasedRepository flushAllCaches.
> RFBServer stop.
> SmalltalkImage current saveAs: 'something'
> SmalltalkImage current snapshot: true andQuit: true
>
I only have a saveAs selector but no saveAs: What squeak version are
you using?
> The reason that I do this is that snapshot:andQuit: has logic to make
> sure that when an image is restarted it doesn't quit. You could
> probably duplicate that logic but I found this solution to be more
> expedient. I'm eager to hear a better way :-) :-)
Yes, me too. And an idea to automatically upgrade the image to the last
version found in Monticello ;)
Norbert
More information about the Beginners
mailing list