[V3dot10] Loading complicated packages in reduced images
Edgar J. De Cleene
edgardec2001 at yahoo.com.ar
Mon Jun 23 18:30:02 UTC 2008
El 6/23/08 11:59 AM, "Keith Hodges" <keith_hodges at yahoo.co.uk> escribió:
> Dear Edgar,
>
> in order to solve the loading of "actual applications", many people use
> Installer scripts.
>
> Installer is designed to be used in minimal images which may not have
> any form of UI.
>
> Installer has the advantage that you can debug the script line by line
> in a workspace. It also has facilities to enable the script to run
> unattended since it can respond automatically when a package requires
> user interaction.
>
> You may be interested to hear that Installer can make use of
> Sake/Packages. Sake/Packages captures dependencies between many
> different packages and provides the ability for you as a user of
> Sake/Packages to fine tune the package definitions so that everything
> works smoothly.
>
> best regards
>
> Keith
Read carefully.
I don't say loading in "normal" images which have all classes you need.
I talking about next modular or reduced images, like Spoon or Kernel and in
a minor place SqueakLightII or any 3.11 which don't have a lot of classes.
As example , the first DNU many packages raise is about Test, as this
reduced images don't have.
Also , not all packages uses last conventions.
As example, still many use TwoWayScrollPane , but this is a long time
obsolete.
And we have some Morphs, Nebraska, Kedama, Etoys, going to live out of
image.
So , how deal with this ?
My bad solution is attached, when is polished I change for use the ftp as I
do for updating SqueakLight.
I don't need Installer, SqueakMap, Universes. All was useful and could be
loaded easily on top of SqueakLightII, but none solve the real trouble.
Edgar
-------------- next part --------------
'From SqueakLight|II of 31 May 2008 [latest update: #7177] on 23 June 2008 at 10:17:55 am'!
!MCPackageLoader methodsFor: 'public' stamp: 'muOuser 6/23/2008 09:36'!
loadWithNameLike: baseName
self analyze.
unloadableDefinitions isEmpty ifFalse: [self lookMissingClasses.
self warnAboutDependencies].
self useNewChangeSetNamedLike: baseName during: [self basicLoad]! !
!MCPackageLoader methodsFor: 'objects from disk' stamp: 'muOuser 6/23/2008 09:38'!
lookMissingClasses
requirements do: [:ea| self lookForClass: ea asString].! !
!Object class methodsFor: 'private' stamp: 'muOuser 6/23/2008 09:58'!
lookForClass: aClass
| dir fname |
dir := FileDirectory default.
fname := 'NormalClasses:' , aClass , '.st'.
(dir fileExists: fname)
ifTrue: [fname := dir pathName , FileDirectory slash , fname.
(FileStream oldFileNamed: fname) fileIn.
Transcript show: 'Aprendi ', aClass printString;cr.
^ Smalltalk at: (aClass asString) ifAbsent:[]].
! !
!SystemVersion methodsFor: '*smbase-extension' stamp: 'jcg 11/2/2004 10:03'!
majorMinorVersion
"Return the major/minor version number of the form X.Y, without any 'alpha' or 'beta' or other suffix."
"(SystemVersion new version: 'Squeak3.7alpha') majorMinorVersion" " --> 'Squeak3.7' "
"SystemVersion current majorMinorVersion"
| char stream |
stream := ReadStream on: version, 'x'.
stream upTo: $..
char := stream next.
char ifNil: [^ version]. "eg: 'Jasmine-rc1' has no $. in it."
[char isDigit]
whileTrue: [char := stream next].
^ version copyFrom: 1 to: stream position - 1
! !
More information about the V3dot10
mailing list