|
|
6.109 PackageLoader
- Defined in namespace Smalltalk
- Category: Language-Data types
- I am not part of a standard Smalltalk system. I provide methods for loading
packages into a Smalltalk image, correctly handling dependencies.
6.109.1 PackageLoader class: accessing
- addPackage: package directory: dir fileIn: fileIns needs: prerequisites
- Add the given package to the `packages' file, with the given directory (if relative, it is relative to the kernel directory), fileIns and prerequisites. fileIns and prerequisites should be two Collections of Strings. Note that none of this fields are optional. If there are no prere- quisites, just use #('Kernel') as the prerequisites.
- directoryFor: package
- Answer a complete path to the given package's file-in
- fileInsFor: package
- Answer a Set of Strings containing the filenames of the given package's file-ins (relative to the directory answered by #directoryFor:)
- filesFor: package
- Answer a Set of Strings containing the filenames of the given package's files (file-ins are relative to the directory answered by #directoryFor:, shared modules are relative to the ModulePath)
- ignoreCallouts
- Answer whether unavailable C callouts must generate errors or not.
- ignoreCallouts: aBoolean
- Set whether unavailable C callouts must generate errors or not.
- modulesFor: package
- Answer a Set of Strings containing the filenames of the given package's file-ins (relative to the directory answered by #directoryFor:)
- prerequisitesFor: package
- Answer a Set of Strings containing the prerequisites for the given package
- refreshDependencies
- Reload the `packages' file in the image directory
6.109.2 PackageLoader class: loading
- extractDependenciesFor: packagesList onError: aBlock
- Answer an OrderedCollection containing all the packages which you have to load to enable the packages in packagesList, in an appropriate order. For example PackageLoader extractDependenciesFor: #('BloxTestSuite' 'Blox' 'Browser') on a newly built image will evaluate to an OrderedCollection containing 'Kernel', 'C:tclInit', 'Blox', 'BloxTestSuite' and 'Browser'. Note that Blox has been moved before BloxTestSuite. Pass an error message to aBlock if any of the packages needs C call-outs which are not defined.
- fileInPackage: package
- File in the given package into GNU Smalltalk.
- fileInPackages: packagesList
- File in all the packages in packagesList into GNU Smalltalk.
6.109.3 PackageLoader class: testing
- canLoad: package
- Answer whether all the needed C call-outs are registered within GNU Smalltalk
|