0
|
1 |
"*
|
|
2 |
* $Header$
|
|
3 |
* startup configuration for smalltalk
|
|
4 |
*
|
|
5 |
* everything in here are plain smalltalk expressions
|
|
6 |
* statements with in a group are separated by a period.
|
|
7 |
* each group of statements has to be delimited by an exclamation
|
|
8 |
* character.
|
|
9 |
* avoid exclas in comments (or double them)
|
|
10 |
* nested comments are not allowed - take care.
|
|
11 |
* (this is fileOut-format)
|
|
12 |
*"
|
|
13 |
|
|
14 |
"*
|
5
|
15 |
* just a quick check, if this ST/X installation seems to
|
|
16 |
* be halfway complete (it happened to some people, that
|
|
17 |
* their source/resource directories where not installed)
|
|
18 |
* - better to warn early ...
|
|
19 |
*"
|
|
20 |
|anyWrong missing|
|
|
21 |
anyWrong := false.
|
|
22 |
missing := ''.
|
|
23 |
(Smalltalk getSystemFileName:'resources/SBrowser.rs') isNil ifTrue:[
|
|
24 |
'***********************************************************************' errorPrintNL.
|
|
25 |
'***** ATTENTION: please check installation of your resource files' errorPrintNL.
|
|
26 |
anyWrong := true.
|
|
27 |
missing := '''resources'' '.
|
|
28 |
].
|
|
29 |
(Smalltalk getSystemFileName:'source/Object.st') isNil ifTrue:[
|
|
30 |
'***********************************************************************' errorPrintNL.
|
|
31 |
'***** ATTENTION: please check installation of your source files' errorPrintNL.
|
|
32 |
anyWrong := true.
|
|
33 |
missing := missing , '''source'' '.
|
|
34 |
].
|
|
35 |
(Smalltalk getSystemFileName:'bitmaps/SBrowser.xbm') isNil ifTrue:[
|
|
36 |
'***********************************************************************' errorPrintNL.
|
|
37 |
'***** ATTENTION: please check installation of your bitmap files' errorPrintNL.
|
|
38 |
anyWrong := true.
|
|
39 |
missing := missing , '''bitmaps'' '.
|
|
40 |
].
|
|
41 |
anyWrong ifTrue:[
|
|
42 |
'*****' errorPrintNL.
|
|
43 |
'***** directory(s) named: ' errorPrint. missing errorPrint. 'incomplete/not existing' errorPrintNL.
|
|
44 |
'***** your path is: ' errorPrint.
|
|
45 |
Smalltalk systemPath asArray storeString errorPrintNL.
|
|
46 |
'*****' errorPrintNL.
|
|
47 |
'***********************************************************************' errorPrintNL.
|
|
48 |
]
|
|
49 |
!
|
|
50 |
|
|
51 |
"*
|
|
52 |
* check for display-classes being compiled into the system;
|
|
53 |
* (and if display connection can be established)
|
0
|
54 |
* if not, enter a simple read-eval-print loop
|
|
55 |
*"
|
|
56 |
Display isNil ifTrue:[
|
5
|
57 |
DeviceWorkstation notNil ifTrue:[
|
|
58 |
'cannot connect to display' errorPrintNewline
|
|
59 |
] ifFalse:[
|
|
60 |
'oops - no display' errorPrintNewline.
|
|
61 |
].
|
0
|
62 |
Smalltalk readEvalPrint.
|
|
63 |
Smalltalk exit
|
|
64 |
]
|
|
65 |
!
|
|
66 |
|
|
67 |
"*
|
5
|
68 |
* this makes X-errors be handled immediately (so you see,
|
0
|
69 |
* where it occured) but slows down the system soooo muuuucccchhh ..
|
|
70 |
* if commented out, errors will be reported asynchronously.
|
|
71 |
* (I enable this, when things go bad during startup)
|
|
72 |
*"
|
5
|
73 |
"Display unBuffered"
|
|
74 |
!
|
0
|
75 |
|
|
76 |
"*
|
|
77 |
* this starts incremental GC earlier
|
|
78 |
* (default is 500000)
|
5
|
79 |
* the number given is the number of bytes which have to be allocated
|
|
80 |
* since the last GC, to start the incremental GC running.
|
0
|
81 |
*"
|
|
82 |
"
|
|
83 |
ObjectMemory incrementalGCLimit:100000
|
|
84 |
"
|
|
85 |
!
|
|
86 |
|
|
87 |
"*
|
5
|
88 |
* lazy loading
|
|
89 |
* (faster fileIn) - this is EXPERIMENTAL
|
|
90 |
*"
|
|
91 |
" "
|
|
92 |
Autoload compileLazy:true
|
|
93 |
" "
|
|
94 |
!
|
|
95 |
|
|
96 |
"*
|
|
97 |
* you can override the view style
|
|
98 |
* OBSOLETE: its now defined in the d_xxx.rc files
|
|
99 |
* PS: I personally like #iris most
|
0
|
100 |
*"
|
|
101 |
"View defaultStyle:#iris "
|
5
|
102 |
"View defaultStyle:#motif " "ugly"
|
0
|
103 |
"View defaultStyle:#next "
|
5
|
104 |
"View defaultStyle:#view3D " "somewhat neutral 3D style"
|
|
105 |
"View defaultStyle:#mswindow " "not finished"
|
|
106 |
"View defaultStyle:#normal " "the good old style"
|
0
|
107 |
!
|
|
108 |
|
|
109 |
"*
|
|
110 |
* define the language (you can also set the LANG-shell variable)
|
|
111 |
* (currently only #english and #german are supported)
|
5
|
112 |
* setting it here will override the LANG variable setting,
|
|
113 |
* if neither set here nor in LANG, english is the default.
|
|
114 |
* (currently, strings are not available for other than english
|
|
115 |
* and german; french will follow next - see resource files)
|
0
|
116 |
*"
|
|
117 |
"Language := #german"
|
|
118 |
"Language := #english"
|
|
119 |
!
|
|
120 |
|
|
121 |
"*
|
|
122 |
* this handles all variant display stuff
|
|
123 |
* (i.e. things which might change, when DISPLAY is set different)
|
|
124 |
*"
|
|
125 |
Smalltalk fileIn:'display.rc'
|
|
126 |
!
|
|
127 |
|
|
128 |
"*
|
|
129 |
* this defines stuff relating to the machine we are running on
|
|
130 |
*"
|
|
131 |
Smalltalk fileIn:'host.rc'
|
|
132 |
!
|
|
133 |
|
|
134 |
"*
|
5
|
135 |
* you can add your very private things here - if its put into HOME/.smalltalk,
|
|
136 |
* each user can add his/her private things even when everything else is
|
|
137 |
* shared
|
|
138 |
*"
|
|
139 |
Smalltalk fileIn:'private.rc'
|
|
140 |
!
|
|
141 |
|
|
142 |
"*
|
0
|
143 |
* start some views ...
|
|
144 |
* you can add all stuff you'd like to come up by default
|
|
145 |
* the first time
|
|
146 |
*"
|
|
147 |
|
|
148 |
"*
|
5
|
149 |
* start a Transcript (if linked-in)
|
0
|
150 |
*"
|
5
|
151 |
TextCollector notNil ifTrue:[
|
|
152 |
'starting Transcript ...' errorPrintNL.
|
|
153 |
TextCollector newTranscript.
|
|
154 |
]
|
|
155 |
!
|
0
|
156 |
|
|
157 |
"
|
|
158 |
you can change colors too ..
|
5
|
159 |
obsolete: below code sets it only for the current Transcript,
|
|
160 |
which will not affect future ones.
|
|
161 |
See code above, which changes the class resources - thats better
|
0
|
162 |
"
|
5
|
163 |
|
|
164 |
"/(View defaultStyle == #iris) ifTrue:[
|
|
165 |
"/ (Display hasColors and:[Display depth > 4]) ifTrue:[
|
|
166 |
"/ Transcript foregroundColor:(Color lightGrey) backgroundColor:(Color red:0 green:0 blue:25);
|
|
167 |
"/ cursorForegroundColor:(Color black) backgroundColor:(Color green);
|
|
168 |
"/ selectionForegroundColor:(Color black) backgroundColor:(Color grey);
|
|
169 |
"/ viewBackground:(Color red:0 green:0 blue:25)
|
|
170 |
"/ ] ifFalse:[
|
|
171 |
"/ Transcript foregroundColor:(Color white) backgroundColor:(Color black);
|
|
172 |
"/ cursorForegroundColor:(Color black) backgroundColor:(Color white);
|
|
173 |
"/ selectionForegroundColor:(Color black) backgroundColor:(Color veryLightGrey);
|
|
174 |
"/ viewBackground:(Color black)
|
|
175 |
"/ ]
|
|
176 |
"/]
|
0
|
177 |
|
|
178 |
"*
|
5
|
179 |
* start the Launcher (if linked-in)
|
0
|
180 |
*"
|
5
|
181 |
Launcher notNil ifTrue:[
|
|
182 |
'starting main-menu ...' errorPrintNL.
|
|
183 |
Launcher open
|
|
184 |
]
|
|
185 |
!
|
0
|
186 |
|
|
187 |
"*
|
|
188 |
* start a SystemBrowser
|
|
189 |
* - I dont want one (using Launcher)
|
|
190 |
*"
|
|
191 |
"
|
5
|
192 |
SystemBrowser open
|
0
|
193 |
"
|
|
194 |
!
|
|
195 |
|
|
196 |
"*
|
|
197 |
* start a FileBrowser
|
|
198 |
* - I dont want one (using Launcher)
|
|
199 |
*"
|
|
200 |
"
|
5
|
201 |
FileBrowser open
|
0
|
202 |
"
|
|
203 |
!
|
|
204 |
|
|
205 |
"*
|
|
206 |
* start a Workspace
|
|
207 |
* - I dont want one (using Launcher)
|
|
208 |
*"
|
|
209 |
"
|
5
|
210 |
Workspace open
|
0
|
211 |
"
|
|
212 |
!
|
|
213 |
|
|
214 |
"*
|
|
215 |
* if things go very badly, turn on message tracing ...
|
5
|
216 |
* but be prepared for lots of output
|
0
|
217 |
*"
|
5
|
218 |
"
|
0
|
219 |
Smalltalk debugOn.
|
|
220 |
"
|
|
221 |
"*
|
|
222 |
* if error occurs, and debugger has problems coming up
|
|
223 |
*"
|
|
224 |
"
|
|
225 |
" "
|
|
226 |
Debugger := MiniDebugger.
|
|
227 |
" "
|
|
228 |
!
|
|
229 |
|
|
230 |
"*
|
|
231 |
* see smalltalk_r.rc for what this is for ...
|
|
232 |
*"
|
|
233 |
Smalltalk at:#'_ImageDisplayDepth' put:Display depth.
|
|
234 |
Smalltalk at:#'_ImageDisplayHasColors' put:Display hasColors.
|
|
235 |
Smalltalk at:#'_ImageDisplayHasGreyscales' put:Display hasGreyscales.
|
|
236 |
!
|