[ENH] Squeak Installer

John Pierce john.raymond.pierce at gmail.com
Tue Oct 12 11:15:36 UTC 2004


Change Set:		SqueakInstaller
Date:			11 October 2004
Author:			John Pierce

Automates SqueakMap and Monticello package installations.  Generally,
this is designed to be used to setup a clean Squeak image with your
favorite set of packages and settings.  It requires the
automate.user.inputs change set already posted on squeak-dev.  Over
time, I think I will extend this program to keep an image up-to-date
and automate software updates, but for the time being I use it to
build brand new images.

In addition to installing SM and MCZ packages it is possible to
configure optional pre-installation and post-installation blocks that
you can run to configure your image.  See SqueakInstaller
class>>myStandardInstallation for a fairly complex example of how I
use this on a routine basis to completely config clean images for my
production use.

The simplest format for providing packages to install is to list them
using literal arrays.  For example, to provide a set of SqueakMap
packages to install use the list, #( (Monticello 20) (NetStrings 1) ).
 In this example, each item in the list is a pair, with the name of
the SqueakMap package and the autoversion to install.  Installations
will be performed in order as they are specified in the list.

Monticello packages to install are specified in similar format, but
the second parameter is the URL (minus the trailing slash) for the
directory on the net that contains the versioned files.  In general,
if you only provide two parameters for MCZ packages then the latest
edition of the package will be installed.  If you need to specify a
specific version then provide a third parameter that contains the
exact filename of the version file.

Here's an example of MCZ files to install:  #( (OmniBrowser
'monticello.wiresong.ca/ob' 'OmniBrowser-cwp.198.mcz') (GOODS
'beta4.com/mc/db') ).  This will install a specific version of
OmniBrowser and the latest edition of GOODS.

You can setup two lists of MCZ packages to install.  The only
distinction between the two lists is that public MCZ packages will use
empty strings for user / password.  The personal MCZ packages will use
the user / password requested by the installer up front (if you have
any personal packages).

Lastly, you will most likely need to provide a list of messages to
suppress and/or answers for modal dialogs that the authors of various
packages might popup on the screen.  See the class side example for
how to format these -- but, in general, you can automate a complete
installation and configuration without human intervention.

Oh yeah, I didn't make this a MCZ package because I wanted to keep it
utterly simple for me to load / run my installation program in a clean
Squeak image with only a couple of lines of code.  Here's what my
installation script looks (I paste the following code into a workspace
of a new image, run it, walk away for 5 minutes, and then my image is
completely built):

'http://www.saltypickle.com/Home/uploads/automate.3.user.inputs-jrp.cs'
asUrl retrieveContents contentStream fileIn.
'http://www.saltypickle.com/Home/uploads/squeakinstaller-jrp.2.cs' asUrl
retrieveContents contentStream fileIn.
SqueakInstaller myStandardInstallation install.

Pretty easy, eh?  That's the point.

Regards,

John

PS - I posted this to the list as an enhancement.  Maybe it is only a
[GOODIE] instead.  I have no earthly idea if anyone wants to include
something like this in the base image.
 I mostly don't care if it is not incorporated.  I have the change set
and will use it that way for the conceivable future.  In general I
provide this change set on the list here as others might find it
useful to build production images in an automated way.  I am certainly
open to taking this utility in many different directions, but here you
go as a start.

-- 
If at first the idea is not absurd, then there is no hope for it. --
Albert Einstein
-------------- next part --------------
A non-text attachment was scrubbed...
Name: squeakinstaller-jrp.1.cs.gz
Type: application/x-gzip-compressed
Size: 5048 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20041012/ae64d301/squeakinstaller-jrp.1.cs.bin


More information about the Squeak-dev mailing list