| 
  • 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

Page history last edited by Ken G. Brown 14 years, 8 months ago

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

 

Installer squeakmap install: 'DynamicBindings'.

Installer 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)

 

Installer websqueakmap package: 'DynamicBindings'; install.

 

4) Abbreviated instanciation

 

Installer sm. "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 directory: dir

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 & > < &star; " (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'.

 

Or add your own local directory repository.

Installer monticello directory: 'myLocalDirPath'; rememberAs: #myLocalRepo. 

 

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 (6)

Anonymous said

at 12:17 am on Feb 3, 2008

Damn it, whenever I make 'Scripter' linkable in the 'also recommend:' line it breaks the table of contents for some reason. Either that or it doesn't result in a link. I can't seem to find docs on the syntax so I've been using both the classic and point and click editting modes.

Anonymous said

at 1:08 am on Feb 3, 2008

In the section on the Embedded scripts, what is the usage of the st param and the text of the code tag?

Anonymous said

at 1:25 am on Feb 3, 2008

regarding 'Web Support'. My understanding of a search path is that the first instance that is found ends the search. Yet I see you have an example of a user-specific LevelPlayingField for 3.7 but it just beeps. Either then it doesn't really do anything, which maybe is intended in this case, or Web Support is actually implemented so that the search continues through the entire list and loads each found. Which is it?

Anonymous said

at 6:12 pm on Apr 12, 2008

I recently made a typo in a file name that I was loading via Installer:

Installer monticello http: 'http://source.wiresong.ca/ob/';
install: 'OB-Enhancements-dc.144.mcz'.

The 'dc' should have been 'dr', it gives an error:
****MessageNotUnderstood: UndefinedObject>>encodeForHTTPdata
which I did not find helpful in resolving the issue.
Could a more descriptive message be provided that would indicate the file was not found, at least as one of the possibilities?
Thx,
Ken

keith_hodges said

at 5:26 pm on Apr 23, 2008

For mantis, it finds the last entry only. For others it should concatenate the found code sections. This allows chunks of code to be documented.

Norberto Manzanos said

at 8:30 pm on Mar 10, 2010

I found some bugs in Installer and InstallerMonticello packages. Is this the properly forum to report them?
If not, sorry for bother you.

InstallerMonticello >>mcDetectFileBlock:
The detection is made with #beginsWith:, but if you have two different packages which begins with the same string, it would detect a wrong package.
Reeplaced by #copyUpToLast: $-

InstallerMonticello >>mcSortFileBlock
If the file has no number (it could happen, yes, and it happened to me with a file create by MonticelloConfiguration, which I didn't remember it existed) the files collection is sorted wrongly, since #asInteger will answer nil.
Replaced #asInteger by #asNumber

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