[squeak-dev] Image Building Tool

Keith Hodges keith_hodges at yahoo.co.uk
Tue May 27 23:56:55 UTC 2008


This is in response to requests over IRC, an overview of some of the new 
tools.

Installer
======
A single class implementing a "Domain Specific Language" for loading 
packages into the image.
The class comment includes extensive documentation.

Example:

Installer sake addPackage: 'Pier'; install.

LevelPlayingField
=============
Level playing field is a single script available from 
http://installer.pbwiki.com/f/LPF.st that can be passed as a startup 
document when launching an image. It loads the image with the following 
tools in order to give everyone in all versions of squeak a similar 
starting point. Once the script has completed it hands over to "Launcher".

Installer
Launcher
Monticello1.5
MonticelloConfigurations
PackageInfo

Launcher
=======
Launcher is installed by LevelPlayingField and it processes subsequent 
command line parameters

Example:

#> squeak starting.image http://installer.pbwiki.com/f/LPF.st Installer 
do="MinorFixes;Packages" SmalltalkImage save=new.image +quit

installer.pbwiki.com
==============
Is intended for publishing installation scripts that are used in early 
stages of building a squeak image. i.e scripts which may run prior to 
more advanced tools, such as Sake/Packages, being loaded into the image.

This wiki is on Installers webscript search path. You can publish 
scripts for any and all versions of squeak and Installer will run the 
appropriate script for the version of squeak that is running.

Sake
====
Based upon concepts in "Make" and "Rake", implements a scheme for 
defining tasks, with dependencies and for running tasks that are needed. 
Tasks are typically defined as class methods, and may, unlike Rake, take 
parameters.

An example task:

Packages class >> #taskGenerateAll
 
^ SakeTask define: [ :task |
     
    task dependsOn: {   "a list of other tasks upon which this task is 
dependent"
   
    self taskGenerateAllUniverses
   
     }.
       
    task if: [ self squeakmap notNil ].    "the action is run if the 
needed block returns true"
   
    "the action itself is a block or a list of tasks"

    task action: { self squeakmap taskGenerateSqueakMapPackageTasks }

]

An example task that takes a parameter is referenced as a dependency 
like so:

task dependsOn: { SakeClassTask class: #ClassA ensureSubclass: #ClassB. }.

The basics of Sake are fully implemented, in SakeTask, SakeClassTask, 
and SakeFileTask which uses Rio to reference files. We have not as yet 
implemented bulk multiple file handling as is the traditional staple 
diet of "Make".

Sake/Packages
===========
A Universes like package manager built using Sake. Package definitions 
are methods defining tasks, similar to the example above but with some 
more meta information. Each package definition is a method in a class, 
enabling the complete set of package definitions for a version of squeak 
to be managed in a single monticello package. This also allows all 
package definitions for all squeak versions to be loaded simultaneously, 
and managed using a standard class browser. Currently most of the 
package definitions are generated automatically from the Universes 
server, but there is the ability to subclass and specialise them.   

Sake/Packages definitions define a load: action and an unload action. 
The actions themselves can be any task or script, facilitating more 
flexibility than the model constrained Universes.

Sake/Tasks
========
A package for collecting miscellaneous image housekeeping tasks, 
according to squeak version.

thats about as brief an overview as I can manage,

all the best

Keith








More information about the Squeak-dev mailing list