"/
"/ $Header$
"/
"/ This file is processed at initial startup
"/ - not when resuming an image.
"/
"/
"/ install uncompiled classes as autoload
"/ classes ... (if not already present)
"/ Autoloaded classes will be automatically filed-in
"/ when first accessed. This allows a smaller executable,
"/ but creates a short delay, when the class is loaded on
"/ first access.
"/
"/ You can add more classes to these lists -
"/ i.e. all your classes you like to have around,
"/ but which are not needed often enough to justify
"/ machine code for them ...
|requiredClasses|
"/ GLXWorkstation forceGL:true.
"/ OperatingSystem disableSignal:14.
Class catchMethodRedefinitions:false.
ObjectMemory infoPrinting:false.
"/ Smalltalk loadBinaries:true.
Compiler allowUnderscoreInIdentifier:true.
Compiler warnUnderscoreInIdentifier:false.
Compiler warnSTXSpecials:false.
Project notNil ifTrue:[
Project setDefaultProject.
Project current packageName:#'autoloaded'.
].
"/
"/ when filing in, keep source as reference to file
"/ (instead of keeping a string locally in the image)
"/
"/ I disable this - its dangerous if you fileIn
"/ classes from other directories and fileOut later clobbers those files
"/
"/ ClassCategoryReader sourceMode:#reference.
"/
"/ the following are required (either compiled or interpreted) ...
"/
requiredClasses := #(
ObsoleteObject
BinaryIOManager BinaryInputManager BinaryOutputManager BinaryObjectStorage
StringCollection
).
requiredClasses do:[:s |
(Smalltalk at:s) isNil ifTrue:[
('loading ' , s , ' ...') infoPrintNL.
Smalltalk fileInClass:s initialize:true lazy:false silent:true
]
].
!
|optionalViews|
(Smalltalk at:#View) isNil ifTrue:[
'installing required autoloaded classes ...' infoPrintNL.
optionalViews := #(
DeviceWorkstation
Workstation
XWorkstation
DisplayRootView
SimpleView
TopView
StandardSystemView
ModalBox
View
PseudoView
DeviceDrawable
DisplayMedium
GraphicsContext
Image
ViewStyle
KeyboardMap
KeyboardForwarder
TextCollector
SynchronousWindowSensor
WindowSensor
WindowGroup
WindowEvent
WindowingTransformation
FontDescription
Font
Form
Cursor
Color
Depth1Image
Depth8Image
ResourcePack
Model
Controller
ApplicationModel
WindowBuilder
PopUpView
ShadowView
Colormap
DeviceHandle
DeviceFormHandle
DeviceViewHandle
DisplayObject
).
optionalViews do:[:s |
"install if not already compiled-in"
(Smalltalk at:s) isNil ifTrue:[
Autoload subclass:s
instanceVariableNames:''
classVariableNames:''
poolDictionaries:''
category:'autoloaded-Views'
]
].
DeviceWorkstation autoload.
XWorkstation autoload.
Workstation autoload.
DeviceHandle autoload.
DeviceFormHandle autoload.
DeviceViewHandle autoload.
].
!
"/
"/ read the abbrev.stc file, extract class names
"/ and install all nonExisting classes as autoloaded
"/
|needToReactivate|
HistoryManager notNil ifTrue:[
needToReactivate := HistoryManager isActive.
HistoryManager deactivate.
] ifFalse:[
needToReactivate := false
].
Class withoutUpdatingChangesDo:[
'installing autoloaded classes ...' printCR.
Smalltalk silentLoading:false.
Smalltalk installAutoloadedClassesFrom:'include/abbrev.stc'.
].
needToReactivate ifTrue:[HistoryManager activate].
!
"/
"/ a kludge: we might have added new ImageReaders above - let Image know about it
"/
|imageClass cls|
imageClass := Smalltalk at:#Image ifAbsent:nil.
imageClass notNil ifTrue:[
imageClass isBehavior ifTrue:[
imageClass initializeFileFormatTable.
]
].
"/
"/ some ST80 name aliases
"/ (actually, much more is needed - this is just a start ...)
"/
(cls := Smalltalk at:#StandardSystemView) notNil ifTrue:[
Smalltalk at:#ScheduledWindow put:cls
].
(cls := Smalltalk at:#Socket) notNil ifTrue:[
Smalltalk at:#UnixSocketAccessor put:cls
].
Smalltalk at:#BlockClosure put:Block.
(cls := Smalltalk at:#DialogBox) notNil ifTrue:[
Smalltalk at:#Dialog put:cls.
Smalltalk at:#DialogView put:cls.
].
Smalltalk at:#Console put:Stderr.
FileDirectory notNil ifTrue:[
Smalltalk at:#Disk put:(FileDirectory directoryNamed:'/')
].
Display notNil ifTrue:[
Smalltalk at:#Window put:(Display class).
Smalltalk at:#Screen put:(Display class).
Smalltalk at:#Sensor put:Display.
].
"/
"/ ST/X has (currently) no Double, but Float is what ST-80's Double is ...
"/
Smalltalk at:#Double put:Float.
"/
"/ Temporary backward comatibility (will be removed)
"/
"/ Smalltalk at:#NewLauncher put:Launcher.
Project notNil ifTrue:[
Project setDefaultProject.
Project current packageName:#'patches'.
].
Class catchMethodRedefinitions:false.
'installing patches ...' infoPrintNL.
!
"/
"/ the following patches where added by the changesBrowsers 'make change a patch'
"/ function ...
"/