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.
- 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.
- 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.
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
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
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
Embedded scripts
3) Scripts embedded in html web pages are delimited by ...
4) Custom markers for embedded scripts
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"
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:
- http://installer.pbwiki.com/<pageName>-<Smalltalk version>-<author initials>
- http://installer.pbwiki.com/<pageName>-<Smalltalk version>
- 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.
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.