author | Claus Gittinger <cg@exept.de> |
Thu, 25 Jul 1996 14:25:46 +0200 | |
changeset 131 | 20fc8bdf1de5 |
parent 125 | 82e8b356f5c3 |
child 136 | bc79e1bf5e2f |
permissions | -rw-r--r-- |
12 | 1 |
"/ |
2 |
"/ $Header$ |
|
3 |
"/ |
|
4 |
"/ This file is processed at initial startup |
|
5 |
"/ - not when resuming an image. |
|
6 |
"/ |
|
0 | 7 |
|
12 | 8 |
"/ |
9 |
"/ install uncompiled classes as autoload |
|
10 |
"/ classes ... (if not already present) |
|
11 |
"/ Autoloaded classes will be automatically filed-in |
|
12 |
"/ when first accessed. This allows a smaller executable, |
|
13 |
"/ but creates a short delay, when the class is loaded on |
|
14 |
"/ first access. |
|
15 |
"/ |
|
16 |
"/ You can add more classes to these lists - |
|
17 |
"/ i.e. all your classes you like to have around, |
|
18 |
"/ but which are not needed often enough to justify |
|
19 |
"/ machine code for them ... |
|
0 | 20 |
|
24 | 21 |
|requiredClasses| |
22 |
||
81 | 23 |
"/ GLXWorkstation forceGL:true. |
79 | 24 |
"/ OperatingSystem disableSignal:14. |
81 | 25 |
|
26 |
||
26 | 27 |
ObjectMemory infoPrinting:false. |
81 | 28 |
Smalltalk loadBinaries:true. |
26 | 29 |
|
24 | 30 |
Project notNil ifTrue:[ |
31 |
Project setDefaultProject. |
|
25 | 32 |
Project current packageName:#'autoloaded'. |
24 | 33 |
]. |
10 | 34 |
|
12 | 35 |
"/ |
77 | 36 |
"/ when filing in, keep source as reference to file |
37 |
"/ (instead of keeping a string locally in the image) |
|
38 |
"/ |
|
85 | 39 |
"/ I disable this - its dangerous if you fileIn |
40 |
"/ classes from other directories and fileOut later clobbers those files |
|
41 |
"/ |
|
42 |
"/ ClassCategoryReader sourceMode:#reference. |
|
77 | 43 |
|
44 |
"/ |
|
12 | 45 |
"/ the following are required (either compiled or interpreted) ... |
46 |
"/ |
|
10 | 47 |
requiredClasses := #( |
77 | 48 |
ObsoleteObject |
49 |
BinaryIOManager BinaryInputManager BinaryOutputManager BinaryObjectStorage |
|
50 |
StringCollection |
|
51 |
). |
|
10 | 52 |
|
53 |
requiredClasses do:[:s | |
|
54 |
(Smalltalk at:s) isNil ifTrue:[ |
|
25 | 55 |
('loading ' , s , ' ...') infoPrintNL. |
10 | 56 |
Smalltalk fileInClass:s initialize:true lazy:false silent:true |
57 |
] |
|
58 |
]. |
|
24 | 59 |
! |
60 |
||
61 |
|optionalClasses optionalGames optionalDemos optionalApps optionalBench |
|
131
20fc8bdf1de5
removed (old) builtIn class list; depend on abbrev.stc alone
Claus Gittinger <cg@exept.de>
parents:
125
diff
changeset
|
62 |
optionalTools optionalViews optionalImage compat optionalPro optionalUI| |
0 | 63 |
|
25 | 64 |
'installing autoloaded classes ...' infoPrintNL. |
0 | 65 |
|
24 | 66 |
(Smalltalk at:#View) isNil ifTrue:[ |
111 | 67 |
"/ |
26 | 68 |
"/ mhmh - seems to be a minitalk |
69 |
"/ try for shared libraries ... |
|
111 | 70 |
"/ |
26 | 71 |
Smalltalk loadBinaries:true. |
111 | 72 |
|
26 | 73 |
ObjectFileLoader notNil ifTrue:[ |
74 |
#( |
|
75 |
'libbasic2' |
|
76 |
'libbasic3' |
|
77 |
'libview' |
|
78 |
'libview2' |
|
79 |
'libwidg' |
|
80 |
'libwidg2' |
|
81 |
'libwidg3' |
|
82 |
'libxt' |
|
83 |
'libtool' |
|
84 |
'XWorkstat' |
|
85 |
'GLXWorkstat' |
|
86 |
) do:[:nm | |
|
74 | 87 |
('binary/' , nm) asFilename exists ifTrue:[ |
75 | 88 |
('loading ' , nm , ' ...') infoPrintNL. |
89 |
(ObjectFileLoader loadObjectFile:'binary/' , nm , (ObjectFileLoader sharedLibraryExtension)) ifFalse:[ |
|
74 | 90 |
'load of ' , nm , ' failed' infoPrintNL |
91 |
] |
|
26 | 92 |
]. |
93 |
]. |
|
94 |
Workstation initialize. |
|
95 |
GraphicsContext initialize. |
|
96 |
]. |
|
97 |
||
24 | 98 |
optionalViews := #( |
26 | 99 |
DeviceWorkstation |
24 | 100 |
Workstation |
26 | 101 |
XWorkstation |
24 | 102 |
DisplayRootView |
103 |
SimpleView |
|
104 |
TopView |
|
105 |
StandardSystemView |
|
106 |
ModalBox |
|
107 |
View |
|
108 |
PseudoView |
|
109 |
DeviceDrawable |
|
110 |
DisplayMedium |
|
111 |
GraphicsContext |
|
112 |
Image |
|
113 |
ViewStyle |
|
114 |
KeyboardMap |
|
115 |
KeyboardForwarder |
|
116 |
TextCollector |
|
77 | 117 |
SynchronousWindowSensor |
24 | 118 |
WindowSensor |
119 |
WindowGroup |
|
120 |
WindowEvent |
|
121 |
WindowingTransformation |
|
122 |
FontDescription |
|
123 |
Font |
|
124 |
Form |
|
125 |
Cursor |
|
126 |
Color |
|
127 |
Depth1Image |
|
128 |
Depth8Image |
|
129 |
ResourcePack |
|
130 |
Model |
|
131 |
Controller |
|
132 |
ApplicationModel |
|
133 |
WindowBuilder |
|
134 |
PopUpView |
|
135 |
ShadowView |
|
136 |
Colormap |
|
25 | 137 |
DeviceHandle |
138 |
DeviceFormHandle |
|
139 |
DeviceViewHandle |
|
140 |
DisplayObject |
|
24 | 141 |
). |
142 |
optionalViews do:[:s | |
|
143 |
"install if not already compiled-in" |
|
144 |
(Smalltalk at:s) isNil ifTrue:[ |
|
145 |
Autoload subclass:s |
|
146 |
instanceVariableNames:'' |
|
147 |
classVariableNames:'' |
|
148 |
poolDictionaries:'' |
|
149 |
category:'autoloaded-Views' |
|
150 |
] |
|
151 |
]. |
|
26 | 152 |
DeviceWorkstation autoload. |
153 |
XWorkstation autoload. |
|
72 | 154 |
Workstation autoload. |
155 |
DeviceHandle autoload. |
|
156 |
DeviceFormHandle autoload. |
|
157 |
DeviceViewHandle autoload. |
|
24 | 158 |
]. |
131
20fc8bdf1de5
removed (old) builtIn class list; depend on abbrev.stc alone
Claus Gittinger <cg@exept.de>
parents:
125
diff
changeset
|
159 |
! |
24 | 160 |
|
131
20fc8bdf1de5
removed (old) builtIn class list; depend on abbrev.stc alone
Claus Gittinger <cg@exept.de>
parents:
125
diff
changeset
|
161 |
|f s s2 l clsName abbrev package cat rev cls| |
111 | 162 |
|
131
20fc8bdf1de5
removed (old) builtIn class list; depend on abbrev.stc alone
Claus Gittinger <cg@exept.de>
parents:
125
diff
changeset
|
163 |
f := Smalltalk getSystemFileName:'include/abbrev.stc'. |
20fc8bdf1de5
removed (old) builtIn class list; depend on abbrev.stc alone
Claus Gittinger <cg@exept.de>
parents:
125
diff
changeset
|
164 |
f notNil ifTrue:[ |
20fc8bdf1de5
removed (old) builtIn class list; depend on abbrev.stc alone
Claus Gittinger <cg@exept.de>
parents:
125
diff
changeset
|
165 |
s := f asFilename readStream. |
20fc8bdf1de5
removed (old) builtIn class list; depend on abbrev.stc alone
Claus Gittinger <cg@exept.de>
parents:
125
diff
changeset
|
166 |
s notNil ifTrue:[ |
20fc8bdf1de5
removed (old) builtIn class list; depend on abbrev.stc alone
Claus Gittinger <cg@exept.de>
parents:
125
diff
changeset
|
167 |
[s atEnd] whileFalse:[ |
20fc8bdf1de5
removed (old) builtIn class list; depend on abbrev.stc alone
Claus Gittinger <cg@exept.de>
parents:
125
diff
changeset
|
168 |
l := s nextLine withoutSeparators. |
20fc8bdf1de5
removed (old) builtIn class list; depend on abbrev.stc alone
Claus Gittinger <cg@exept.de>
parents:
125
diff
changeset
|
169 |
l notEmpty ifTrue:[ |
20fc8bdf1de5
removed (old) builtIn class list; depend on abbrev.stc alone
Claus Gittinger <cg@exept.de>
parents:
125
diff
changeset
|
170 |
s2 := l readStream. |
20fc8bdf1de5
removed (old) builtIn class list; depend on abbrev.stc alone
Claus Gittinger <cg@exept.de>
parents:
125
diff
changeset
|
171 |
clsName := (s2 upTo:Character space) withoutSeparators asSymbol. |
20fc8bdf1de5
removed (old) builtIn class list; depend on abbrev.stc alone
Claus Gittinger <cg@exept.de>
parents:
125
diff
changeset
|
172 |
(Smalltalk at:clsName) isNil ifTrue:[ |
114
d26d2bf8e816
extract autoload info from abbrev.stc
Claus Gittinger <cg@exept.de>
parents:
111
diff
changeset
|
173 |
abbrev := (s2 upTo:Character space) withoutSeparators asSymbol. |
d26d2bf8e816
extract autoload info from abbrev.stc
Claus Gittinger <cg@exept.de>
parents:
111
diff
changeset
|
174 |
package := (s2 upTo:Character space) withoutSeparators asSymbol. |
131
20fc8bdf1de5
removed (old) builtIn class list; depend on abbrev.stc alone
Claus Gittinger <cg@exept.de>
parents:
125
diff
changeset
|
175 |
|
117 | 176 |
rev := nil. |
177 |
s2 skipSeparators. |
|
178 |
s2 atEnd ifFalse:[ |
|
179 |
s2 peek isDigit ifTrue:[ |
|
180 |
rev := (s2 upTo:Character space) withoutSeparators |
|
181 |
] |
|
182 |
]. |
|
114
d26d2bf8e816
extract autoload info from abbrev.stc
Claus Gittinger <cg@exept.de>
parents:
111
diff
changeset
|
183 |
cat := s2 upToEnd withoutSeparators. |
d26d2bf8e816
extract autoload info from abbrev.stc
Claus Gittinger <cg@exept.de>
parents:
111
diff
changeset
|
184 |
|
111 | 185 |
(cat startsWith:$') ifTrue:[ |
186 |
cat := cat copyFrom:2 to:(cat size - 1). |
|
187 |
||
114
d26d2bf8e816
extract autoload info from abbrev.stc
Claus Gittinger <cg@exept.de>
parents:
111
diff
changeset
|
188 |
"/ ' autoloaded: ' print. clsName print. ' in ' print. cat printNL. |
111 | 189 |
|
114
d26d2bf8e816
extract autoload info from abbrev.stc
Claus Gittinger <cg@exept.de>
parents:
111
diff
changeset
|
190 |
"/ install if not already compiled-in |
111 | 191 |
|
131
20fc8bdf1de5
removed (old) builtIn class list; depend on abbrev.stc alone
Claus Gittinger <cg@exept.de>
parents:
125
diff
changeset
|
192 |
Autoload subclass:clsName |
20fc8bdf1de5
removed (old) builtIn class list; depend on abbrev.stc alone
Claus Gittinger <cg@exept.de>
parents:
125
diff
changeset
|
193 |
instanceVariableNames:'' |
20fc8bdf1de5
removed (old) builtIn class list; depend on abbrev.stc alone
Claus Gittinger <cg@exept.de>
parents:
125
diff
changeset
|
194 |
classVariableNames:'' |
20fc8bdf1de5
removed (old) builtIn class list; depend on abbrev.stc alone
Claus Gittinger <cg@exept.de>
parents:
125
diff
changeset
|
195 |
poolDictionaries:'' |
20fc8bdf1de5
removed (old) builtIn class list; depend on abbrev.stc alone
Claus Gittinger <cg@exept.de>
parents:
125
diff
changeset
|
196 |
category:cat. |
20fc8bdf1de5
removed (old) builtIn class list; depend on abbrev.stc alone
Claus Gittinger <cg@exept.de>
parents:
125
diff
changeset
|
197 |
|
20fc8bdf1de5
removed (old) builtIn class list; depend on abbrev.stc alone
Claus Gittinger <cg@exept.de>
parents:
125
diff
changeset
|
198 |
cls := Smalltalk at:clsName. |
20fc8bdf1de5
removed (old) builtIn class list; depend on abbrev.stc alone
Claus Gittinger <cg@exept.de>
parents:
125
diff
changeset
|
199 |
cls package:package asSymbol. |
20fc8bdf1de5
removed (old) builtIn class list; depend on abbrev.stc alone
Claus Gittinger <cg@exept.de>
parents:
125
diff
changeset
|
200 |
rev notNil ifTrue:[ |
20fc8bdf1de5
removed (old) builtIn class list; depend on abbrev.stc alone
Claus Gittinger <cg@exept.de>
parents:
125
diff
changeset
|
201 |
cls setBinaryRevision:rev |
20fc8bdf1de5
removed (old) builtIn class list; depend on abbrev.stc alone
Claus Gittinger <cg@exept.de>
parents:
125
diff
changeset
|
202 |
] |
114
d26d2bf8e816
extract autoload info from abbrev.stc
Claus Gittinger <cg@exept.de>
parents:
111
diff
changeset
|
203 |
] |
111 | 204 |
] |
131
20fc8bdf1de5
removed (old) builtIn class list; depend on abbrev.stc alone
Claus Gittinger <cg@exept.de>
parents:
125
diff
changeset
|
205 |
] |
114
d26d2bf8e816
extract autoload info from abbrev.stc
Claus Gittinger <cg@exept.de>
parents:
111
diff
changeset
|
206 |
]. |
131
20fc8bdf1de5
removed (old) builtIn class list; depend on abbrev.stc alone
Claus Gittinger <cg@exept.de>
parents:
125
diff
changeset
|
207 |
s close. |
20fc8bdf1de5
removed (old) builtIn class list; depend on abbrev.stc alone
Claus Gittinger <cg@exept.de>
parents:
125
diff
changeset
|
208 |
]. |
0 | 209 |
] |
12 | 210 |
! |
0 | 211 |
|
12 | 212 |
"/ |
213 |
"/ a kludge: we might have added new ImageReaders above - let Image know about it |
|
214 |
"/ |
|
131
20fc8bdf1de5
removed (old) builtIn class list; depend on abbrev.stc alone
Claus Gittinger <cg@exept.de>
parents:
125
diff
changeset
|
215 |
|imageClass cls| |
20fc8bdf1de5
removed (old) builtIn class list; depend on abbrev.stc alone
Claus Gittinger <cg@exept.de>
parents:
125
diff
changeset
|
216 |
|
20fc8bdf1de5
removed (old) builtIn class list; depend on abbrev.stc alone
Claus Gittinger <cg@exept.de>
parents:
125
diff
changeset
|
217 |
imageClass := Smalltalk at:#Image ifAbsent:nil. |
20fc8bdf1de5
removed (old) builtIn class list; depend on abbrev.stc alone
Claus Gittinger <cg@exept.de>
parents:
125
diff
changeset
|
218 |
imageClass notNil ifTrue:[ |
20fc8bdf1de5
removed (old) builtIn class list; depend on abbrev.stc alone
Claus Gittinger <cg@exept.de>
parents:
125
diff
changeset
|
219 |
imageClass isBehavior ifTrue:[ |
20fc8bdf1de5
removed (old) builtIn class list; depend on abbrev.stc alone
Claus Gittinger <cg@exept.de>
parents:
125
diff
changeset
|
220 |
imageClass initializeFileFormatTable. |
12 | 221 |
] |
222 |
]. |
|
223 |
||
224 |
"/ |
|
225 |
"/ some ST80 name aliases |
|
226 |
"/ (actually, much more is needed - this is just a start ...) |
|
227 |
"/ |
|
131
20fc8bdf1de5
removed (old) builtIn class list; depend on abbrev.stc alone
Claus Gittinger <cg@exept.de>
parents:
125
diff
changeset
|
228 |
(cls := Smalltalk at:#StandardSystemView) notNil ifTrue:[ |
20fc8bdf1de5
removed (old) builtIn class list; depend on abbrev.stc alone
Claus Gittinger <cg@exept.de>
parents:
125
diff
changeset
|
229 |
Smalltalk at:#ScheduledWindow put:cls |
12 | 230 |
]. |
131
20fc8bdf1de5
removed (old) builtIn class list; depend on abbrev.stc alone
Claus Gittinger <cg@exept.de>
parents:
125
diff
changeset
|
231 |
(cls := Smalltalk at:#Socket) notNil ifTrue:[ |
20fc8bdf1de5
removed (old) builtIn class list; depend on abbrev.stc alone
Claus Gittinger <cg@exept.de>
parents:
125
diff
changeset
|
232 |
Smalltalk at:#UnixSocketAccessor put:cls |
12 | 233 |
]. |
234 |
Smalltalk at:#BlockClosure put:Block. |
|
131
20fc8bdf1de5
removed (old) builtIn class list; depend on abbrev.stc alone
Claus Gittinger <cg@exept.de>
parents:
125
diff
changeset
|
235 |
(cls := Smalltalk at:#DialogBox) notNil ifTrue:[ |
20fc8bdf1de5
removed (old) builtIn class list; depend on abbrev.stc alone
Claus Gittinger <cg@exept.de>
parents:
125
diff
changeset
|
236 |
Smalltalk at:#Dialog put:cls. |
20fc8bdf1de5
removed (old) builtIn class list; depend on abbrev.stc alone
Claus Gittinger <cg@exept.de>
parents:
125
diff
changeset
|
237 |
Smalltalk at:#DialogView put:cls. |
20fc8bdf1de5
removed (old) builtIn class list; depend on abbrev.stc alone
Claus Gittinger <cg@exept.de>
parents:
125
diff
changeset
|
238 |
]. |
12 | 239 |
|
72 | 240 |
Smalltalk at:#Console put:Stderr. |
241 |
||
12 | 242 |
FileDirectory notNil ifTrue:[ |
131
20fc8bdf1de5
removed (old) builtIn class list; depend on abbrev.stc alone
Claus Gittinger <cg@exept.de>
parents:
125
diff
changeset
|
243 |
Smalltalk at:#Disk put:(FileDirectory directoryNamed:'/') |
12 | 244 |
]. |
131
20fc8bdf1de5
removed (old) builtIn class list; depend on abbrev.stc alone
Claus Gittinger <cg@exept.de>
parents:
125
diff
changeset
|
245 |
|
12 | 246 |
Display notNil ifTrue:[ |
131
20fc8bdf1de5
removed (old) builtIn class list; depend on abbrev.stc alone
Claus Gittinger <cg@exept.de>
parents:
125
diff
changeset
|
247 |
Smalltalk at:#Window put:(Display class). |
20fc8bdf1de5
removed (old) builtIn class list; depend on abbrev.stc alone
Claus Gittinger <cg@exept.de>
parents:
125
diff
changeset
|
248 |
Smalltalk at:#Screen put:(Display class). |
12 | 249 |
]. |
250 |
||
251 |
"/ |
|
252 |
"/ ST/X has (currently) no Double, but Float is what ST-80's Double is ... |
|
253 |
"/ |
|
254 |
Smalltalk at:#Double put:Float. |
|
255 |
||
24 | 256 |
Project notNil ifTrue:[ |
257 |
Project setDefaultProject. |
|
258 |
Project current packageName:#'patches'. |
|
259 |
]. |
|
260 |
||
26 | 261 |
Class catchMethodRedefinitions:false. |
125 | 262 |
'installing patches ...' infoPrintNL. |
263 |
||
16 | 264 |
"/ |
12 | 265 |
"/ the following patches where added by the changesBrowsers 'make change a patch' |
266 |
"/ function ... |
|
267 |
"/ |
|
125 | 268 |
! |
269 |