[Pkg] Packages: Packages-Core-kph.46.mcz
squeaksource-noreply at iam.unibe.ch
squeaksource-noreply at iam.unibe.ch
Mon Jul 7 15:20:50 UTC 2008
A new version of Packages-Core was added to project Packages:
http://www.squeaksource.com/Packages/Packages-Core-kph.46.mcz
==================== Summary ====================
Name: Packages-Core-kph.46
Author: kph
Time: 7 July 2008, 4:20:47 pm
UUID: 56e265da-fada-4a19-80fc-c366be8c6aa0
Ancestors: Packages-Core-kph.45
reinstated version instVar esp. since #= uses it and info should be optional really.
=============== Diff against Packages-Core-kph.45 ===============
Item was changed:
SakeTask subclass: #Packages
+ instanceVariableNames: 'unloadBlock unloadPriors provides name version'
- instanceVariableNames: 'unloadBlock unloadPriors provides name'
classVariableNames: 'Provided'
poolDictionaries: ''
category: 'Packages-Core'!
Packages class
instanceVariableNames: 'lastUpdate theUUniverse'!
!Packages commentStamp: 'kph 5/16/2008 01:40' prior: 0!
To generate all of the methods based upon universes definitions:
Packages taskGenerateAllUniverses run.
or
Packages taskGenerateAll run.
Sake/Packages usage:
Public API
============
"load package definition for your current version of Squeak"
Packages current load: 'Seaside'.
Packages beta named: 'Seaside'.
or
(Packages current named: 'Seaside') run. " or runQuietly, runStepping, runLogging"
(Packages beta named: 'Seaside') run.
multiples:
Packages current load: #('Seaside' 'Magma' 'Logging')
Run-variants
=========
#runStepping , - presents a confirm/debug dialog before each action.
#run - default.
#runQuietly - auto-confirms any SakeConfirm dialogs.
#runLogging - Writes any SakeStop warnings to self log.
Unloading
========
Unloading comes in two variants.
Each package task loaded by Sake/Packages is remembered in the 'provided' list
If you perform:
Packages unload: 'Seaside' .
Packages unloadStepping: 'Seaside' .
Then the 'historical' unload scripts are used, as defined when the original load tasks were run.
If instead you perform:
(Packages current named: 'Seaside') unload runStepping.
Then the most recently defined unload script will be run.
Note: If packages such as "Magma server" and "Magma client" provides "Magma", then
Packages unload: 'Magma'.
Will unload whichever of the two are loaded.
===
Misc notes...
Universes are using 'instance side' task definition, so the task extensions mechanism does not work in this context.
!
Item was added:
+ ----- Method: Packages class>>launchFrom: (in category 'launcher') -----
+ launchFrom: launcher
+
+ ^self launchWith: launcher getParameters!
Item was changed:
----- Method: Packages>>version: (in category 'as yet unclassified') -----
version: aPackageVersion
"the method which versions us is our context"
self setContext: thisContext sender.
+ self info version: aPackageVersion.
+ version := aPackageVersion.!
- self info version: aPackageVersion.!
Item was added:
+ ----- Method: Packages class>>launchWith: (in category 'launcher') -----
+ launchWith: params
+
+ | packagesClass task runLevel |
+
+ packagesClass := self current.
+
+ runLevel := #run.
+
+ params at: 'B' ifPresent: [ :v | params at: 'BETA' put: v ].
+ params at: 'U' ifPresent: [ :v | params at: 'UNLOAD' put: v ].
+ params at: 'L' ifPresent: [ :v | params at: 'LOAD' put: v ].
+ params at: 'S' ifPresent: [ :v | params at: 'STEPPING' put: v ].
+ params at: 'I' ifPresent: [ :v | params at: 'INTERACTIVELY' put: v ].
+ params at: 'Q' ifPresent: [ :v | params at: 'QUIETLY' put: v ].
+
+ params at: 'BETA' ifPresent: [ :v |
+ v ifTrue: [ packagesClass := self beta ].
+ ].
+
+ params at: 'LOAD' ifPresent: [ :v |
+ task := packagesClass collection: (v splitOn: ';')
+ ].
+
+ params at: 'UNLOAD' ifPresent: [ :v |
+ task := SakeTask collection: ((v splitOn: ';') collect: [ :ea | (self named: ea) unload ])
+ ].
+
+ params at: 'STEPPING' ifPresent: [ :v |
+ v ifTrue: [ runLevel := #runStepping ].
+ ].
+
+ params at: 'QUIETLY' ifPresent: [ :v |
+ v ifTrue: [ runLevel := #runQuietly ].
+ ].
+ params at: 'INTERACTIVELY' ifPresent: [ :v |
+ v ifTrue: [ runLevel := #runInteractively ].
+ ].
+
+ task perform: runLevel.!
Item was changed:
----- Method: Packages>>version (in category 'as yet unclassified') -----
version
+ ^ self version!
- ^ self info version!
More information about the Packages
mailing list