| 
  • If you are citizen of an European Union member nation, you may not use this service unless you are at least 16 years old.

  • You already know Dokkio is an AI-powered assistant to organize & manage your digital files & messages. Very soon, Dokkio will support Outlook as well as One Drive. Check it out today!

View
 

Installer

This version was saved 15 years, 1 month ago View current version     Page history
Saved by PBworks
on February 15, 2009 at 9:00:36 pm
 

Installer Documentation

Installer provides a simple Domain Specific Language for installing packages from Monticello and SqueakMap of various version.

 

One design decision is to be able to paste scripts into a workspace to be run and tested from there without any special editing.

 

also recommended: Launcher and Scripter.

 

  1. Launcher can also be loaded to allow Installer to be given as a squeak startup document with various commandline parameters which install packages and optionally save the image.
  2. Scripter from http://www.squeaksource.com/Scripter.html can be used to Tidy up extra windows that scripts open when preparing an image for publication.

Using SqueakMap

 

1) #squeakmap

squeakmap := Installer squeakmap.

squeakmap install: 'DynamicBindings'.

squeakmap open. "opens the squeak map loader gui"

2)

Installer squeakmap install: 'DynamicBindings'.

 

3) Web Squeakmap

An alternative which uses http (similar usage api to squeakmap)

Very useful in images which do not have a working Squeakmap packageloader (3.7)

squeakmap := Installer websqueakmap.

squeakmap package: 'DynamicBindings'; install.

 

4) Abbreviated instanciation

squeakmap := Installer sm. "squeakmap"

squeakmap := Installer wsm. "web-squeakmap"

 

5) Finding Packages by Name

(Installer sm match: 'Labby*') explore.

 

6) Obtaining List of Package Versions

(Installer sm package: 'Labby & Walker'; versions) explore.

 

7) Searching Packages

(fields available for searching: author: name:, summary:,description:)

Installer sm search: 'seaside'.

Installer sm search: 'author:*Smith'.

 

8) Specify specific version of a package for installation

Installer sm install: 'Labby(17)'.

 

Using #monticello (abbreviated form #mc)

Monticello repository options:

Installer monticello http: aUrl.

Installer monticello http: aUrl user: name password: secret.

Installer monticello ftp: host directory: dir user: name password: secret.

Installer monticello magma: host port: aport

Installer monticello goods: host port: aport.

Installer monticello directory: stringOrFileDirectory.

 

1) Typical Usage

Installer monticello http: 'http://www.squeaksource.com';

project: 'Seaside';

install: 'Comet-lr.8';

install: 'Scriptaculous'.

 

 

 

 

 

 

 

2) To specify particular package versions/authors to load

Installer monticello http: 'http://www.squeaksource.com';

project: 'Seaside';

install: #('Comet-lr' 'Comet-pmm'); "either of these"

install: 'Scriptaculous-lr.148'. "specific version"

 

 

 

 

 

 

 

3) When user/password is required

Installer monticello http: 'http://www.squeaksource.com';

user: 'me'; password: 'asecret';

install: 'something'.

 

 

 

 

 

 

 

4) Abbreviated instanciation for convenience.

Installer squeaksource.

Installer ss.

Installer squeakFoundation.

Installer sf.

Installer lukas.

Installer impara.

Installer wiresong.

 

URLs

1a)

1b)

 

2) URL + Page

Installer web

url: 'http://minnow.cc.gatech.edu/squeak/uploads/5889/';

install: 'MakeTestsGreen39.cs'.

 

 

 

 

 

 

 

Embedded scripts

3) Scripts embedded in html web pages are delimited by <code st="">...</code>

Installer web url: 'http://wiki.squeak.org/squeak/742'; install.

 

4) Custom markers for embedded scripts

Installer web

url: 'http://wiki.squeak.org/742';

markers: 'beginning of script...end of script';

install.

Note: Scripts embedded in html or a swiki page may need to escape some entities.

Supported entities are & > < ☆ " (see Installer-c-#entities)

Mantis

note: wherever a bug number is used below you can use a string that begins with the bug number. The remainder of the string is ignored, useful to annotate the purpose of the fix.

1) Viewing a file uploaded to a mantis bug report

Installer mantis bug: 4874 view: 'Join.4.cs'.

2) Installing a file uploaded to a mantis bug report

Installer mantis bug: 4874 fix: 'Join.4.cs'.

3) as above, inform user if bug report has been updated since a given date

Installer mantis bug: 4874 fix: 'JoinTest.1.cs' date: '12-18-06'.

4) Install a fix or view a bug report for a given bug.

Installer mantis viewBug: 4874.

Installer mantis fixBug: 4874.

The fix script is published in a note added to the bug report page with the following syntax

"fix begin"

Installer mantis bug: 474 fix: 'Join.4.cs'.

"fix test"

Installer mantis bug: 474 fix: 'JoinTest.1.cs' date: '12-18-06'.

"fix end"

The "fix test" section is optional; if not present, the bug will have a null testing script

"fix begin"

Installer mantis bug: 474 fix: 'Join.4.cs'.

"fix end"

5) Install a fix for a given bug, ignoring all test code

(test code is that delimeted by: "fix test" ... "fix end" )

Installer mantis justFixBug: 474.

or

Installer mantis justFixBug: 474 date: '12-19-06'.

6) View the mantis report for a bug.

Installer mantis bug: 474.

7) Open a ChangeList browser on the file attached to the bug.

Installer mantis bug: 474 browse: 'file.cs'.

7b) Open a workspace on file contents.

Installer mantis bug: 474 view: 'file.cs'.

7c) Return file contents.

Installer mantis bug: 474 retrieve: 'file.cs'.

8) Load bug fix if it has not already been loaded.

Installer ensureFix: '474 Date and time improvements'.

Installer ensureFixes: #(474 123).

Web Support

Installer has a 'webSearchPath', by default this path includes:

  1. http://installer.pbwiki.com/<pageName>-<Smalltalk version>-<author initials>
  2. http://installer.pbwiki.com/<pageName>-<Smalltalk version>
  3. http://installer.pbwiki.com/<pageName>

The following will look for pageName 'Monticello' in the above places

Installer web install: 'Monticello'.

Universes Support

#addPackage:/#package: are synonomous in Installer. #install: is always equivalent to #addPackage:'pkg';install. For universes it makes sense to use the non abbreviated form, because it can process multiple packages in one install.

Installer universe

addPackage: 'a pkg';

addPackage: 'b pkg(1.1)';

install.

Additional features

 

A) Viewing files in monticello snapshot browser.

Where you can #install:/#install you can also #view:/#view.

Installer ss project:'Installer'; view: 'Installer-Core'.

Installer web url: 'http://installer.pbwiki.com/f/Installer.st'; view.

Installer ss project: 'Installer'; view: 'Installer-Core'.

Installer ss project: 'Installer'; browse: 'Installer-Core'.

 

B) Debug

Installer debug "Open debugger on error"

Installer noDebug "Log errors"

 

C) Installer validationBlock:

If you have a long script which goes wrong, providing a validation block can be useful to track down the problem. If supplied it is executed after each installation. A debugger will be opened if the validation block returns false.

 

D) #rememberAs

Add your own favourite repositories.

Installer monticello http: 'http://gjallar.krampe.se'; rememberAs: #gjallar.

henceforth:

Installer gjallar install: 'Q2'.

E) Automate user interactions: #answer:with:

Installer ss project: 'Seaside'.

answer: '*config*;' with: 'seaside';

answer: '*password*;' with: 'admin';

install: 'Seaside2.8a1'

*not supported in older squeak versions

Comments (0)

You don't have permission to comment on this page.