25
|
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 |
"/
|
|
12 |
"/ remember: this is fileOut-format
|
|
13 |
"/
|
|
14 |
"/ comments can be either:
|
|
15 |
"/ - standard smalltalk comments (i.e. from dquote to dquote)
|
|
16 |
"/ - ST/X end of line comments (i.e. dquote followed by /)
|
|
17 |
"/
|
|
18 |
"/ "this is a comment"
|
|
19 |
"/ "/ another comment
|
|
20 |
"/
|
|
21 |
"/***************************************************************
|
|
22 |
"/ PLEASE: only add things here, if they are of general interrest
|
|
23 |
"/ and NEITHER site specific NOT display specific.
|
|
24 |
"/
|
|
25 |
"/ site specific things are to be added to "h_<hostname>.rc"
|
|
26 |
"/ display specifics to "d_<displayName>.rc"
|
|
27 |
"/ and private user stuff in "private.rc"
|
|
28 |
"/***************************************************************
|
0
|
29 |
|
25
|
30 |
"/
|
|
31 |
"/ map Language variable setting to known and handled
|
|
32 |
"/ values:
|
|
33 |
Language == #De ifTrue:[
|
|
34 |
Language := #german
|
|
35 |
].
|
|
36 |
!
|
8
|
37 |
|
25
|
38 |
"/
|
|
39 |
"/ just a quick check, if this ST/X installation seems to
|
|
40 |
"/ be halfway complete (it happened to some people, that
|
|
41 |
"/ their source/resource directories where not installed)
|
|
42 |
"/ - better to warn early ...
|
|
43 |
"/
|
5
|
44 |
|anyWrong missing|
|
|
45 |
anyWrong := false.
|
|
46 |
missing := ''.
|
|
47 |
(Smalltalk getSystemFileName:'resources/SBrowser.rs') isNil ifTrue:[
|
|
48 |
'***********************************************************************' errorPrintNL.
|
|
49 |
'***** ATTENTION: please check installation of your resource files' errorPrintNL.
|
|
50 |
anyWrong := true.
|
|
51 |
missing := '''resources'' '.
|
|
52 |
].
|
|
53 |
(Smalltalk getSystemFileName:'source/Object.st') isNil ifTrue:[
|
|
54 |
'***********************************************************************' errorPrintNL.
|
|
55 |
'***** ATTENTION: please check installation of your source files' errorPrintNL.
|
19
|
56 |
'***** ' errorPrintNL.
|
|
57 |
'***** the browser/debugger may not be able to show sourcecode.' errorPrintNL.
|
5
|
58 |
anyWrong := true.
|
|
59 |
missing := missing , '''source'' '.
|
|
60 |
].
|
|
61 |
(Smalltalk getSystemFileName:'bitmaps/SBrowser.xbm') isNil ifTrue:[
|
|
62 |
'***********************************************************************' errorPrintNL.
|
|
63 |
'***** ATTENTION: please check installation of your bitmap files' errorPrintNL.
|
|
64 |
anyWrong := true.
|
|
65 |
missing := missing , '''bitmaps'' '.
|
|
66 |
].
|
7
|
67 |
(Smalltalk getSystemFileName:'resources/normal.style') isNil ifTrue:[
|
|
68 |
'***********************************************************************' errorPrintNL.
|
|
69 |
'***** ATTENTION: please check installation of your style files' errorPrintNL.
|
|
70 |
anyWrong := true.
|
|
71 |
missing := missing , '''resources'' '.
|
|
72 |
].
|
|
73 |
|
5
|
74 |
anyWrong ifTrue:[
|
|
75 |
'*****' errorPrintNL.
|
|
76 |
'***** directory(s) named: ' errorPrint. missing errorPrint. 'incomplete/not existing' errorPrintNL.
|
|
77 |
'***** your path is: ' errorPrint.
|
|
78 |
Smalltalk systemPath asArray storeString errorPrintNL.
|
16
|
79 |
|
5
|
80 |
'*****' errorPrintNL.
|
16
|
81 |
'***** Try: "make source bitmaps resources styles"' errorPrintNL.
|
|
82 |
'***** or: "make symlinks" to fix this.' errorPrintNL.
|
5
|
83 |
'***********************************************************************' errorPrintNL.
|
|
84 |
]
|
|
85 |
!
|
|
86 |
|
25
|
87 |
"/
|
|
88 |
"/ check for display-classes being compiled into the system;
|
|
89 |
"/ (and if display connection can be established)
|
|
90 |
"/ if not, enter a simple read-eval-print loop
|
|
91 |
"/
|
0
|
92 |
Display isNil ifTrue:[
|
5
|
93 |
DeviceWorkstation notNil ifTrue:[
|
26
|
94 |
'No Display connection.' errorPrintNL.
|
5
|
95 |
] ifFalse:[
|
26
|
96 |
'Configuration without display.' errorPrintNL.
|
5
|
97 |
].
|
26
|
98 |
'Textmode (enter smalltalk expressions terminated by single exclamation mark' errorPrintNL.
|
|
99 |
' CTRL-D to leave line-by-line interpreter.)' errorPrintNL.
|
0
|
100 |
Smalltalk readEvalPrint.
|
|
101 |
Smalltalk exit
|
10
|
102 |
].
|
0
|
103 |
|
25
|
104 |
"/
|
|
105 |
"/ this makes X-errors be handled immediately (so you see,
|
|
106 |
"/ where it occured) but slows down the system soooo muuuucccchhh ..
|
|
107 |
"/ if commented out, errors will be reported asynchronously.
|
|
108 |
"/ (I enable this, when things go bad during startup)
|
|
109 |
"/
|
10
|
110 |
"/ Display unBuffered.
|
0
|
111 |
|
25
|
112 |
"/
|
|
113 |
"/ this starts the incremental GC earlier
|
|
114 |
"/ (default is 500000)
|
|
115 |
"/ the number given is the number of bytes which have to be allocated
|
|
116 |
"/ since the last GC, to start the incremental GC running.
|
|
117 |
"/ (see ObjectMemory>>documentation)
|
|
118 |
"/ Claus: I moved this to the private.rc file
|
|
119 |
"/
|
10
|
120 |
"/ ObjectMemory incrementalGCLimit:100000.
|
0
|
121 |
|
25
|
122 |
"/
|
|
123 |
"/ this starts the incremental GC when freeSpace drops below a limit
|
|
124 |
"/ (default is nil - i.e. dont look at freeSpace)
|
|
125 |
"/ (see ObjectMemory>>documentation)
|
|
126 |
"/ Claus: I moved this to the private.rc file
|
|
127 |
"/
|
16
|
128 |
"/ ObjectMemory freeSpaceGCLimit:300000.
|
|
129 |
|
25
|
130 |
"/
|
|
131 |
"/ lazy loading
|
|
132 |
"/ (faster fileIn) - this is EXPERIMENTAL.
|
|
133 |
"/ If there are any problems with lazy methods, disable the following
|
|
134 |
"/ and let me (cg@ssw.de) know what happened.
|
|
135 |
"/
|
10
|
136 |
Autoload compileLazy:true.
|
5
|
137 |
|
25
|
138 |
"/
|
|
139 |
"/ define the language (you can also set the LANG-shell variable)
|
|
140 |
"/ (currently only #english and #german are supported)
|
|
141 |
"/ setting it here will override the LANG variable setting,
|
|
142 |
"/ if neither set here nor in LANG, #english is the default.
|
|
143 |
"/ (currently, strings are not available for other than english
|
|
144 |
"/ and german; french will follow next - see resource files)
|
|
145 |
"/ Claus: supposed to be done in private.rc or via LANG variable
|
|
146 |
"/
|
10
|
147 |
"/ Smalltalk language:#german.
|
|
148 |
"/ Smalltalk language:#english.
|
0
|
149 |
|
25
|
150 |
"/
|
|
151 |
"/ this handles all variant display stuff
|
|
152 |
"/ (i.e. things which might change, when DISPLAY is set different)
|
|
153 |
"/
|
10
|
154 |
Smalltalk fileIn:'display.rc'.
|
0
|
155 |
|
25
|
156 |
"/
|
|
157 |
"/ this defines stuff relating to the host we are running on
|
|
158 |
"/
|
10
|
159 |
Smalltalk fileIn:'host.rc'.
|
0
|
160 |
|
25
|
161 |
"/
|
|
162 |
"/ set the package to some useful default
|
|
163 |
"/
|
24
|
164 |
Project notNil ifTrue:[
|
|
165 |
Project setDefaultProject.
|
|
166 |
Project current packageName:#'private'.
|
|
167 |
].
|
25
|
168 |
|
|
169 |
"/
|
|
170 |
"/ you can add your very private things here - if its put into HOME/.smalltalk,
|
|
171 |
"/ each user can add his/her private things even when everything else is
|
|
172 |
"/ shared
|
|
173 |
"/
|
24
|
174 |
Transcript showCr:'reading private.rc ...'.
|
10
|
175 |
Smalltalk fileIn:'private.rc'.
|
5
|
176 |
|
25
|
177 |
View defaultStyle isNil ifTrue:[
|
|
178 |
Transcript showCr:'no style set in rc files - using default'.
|
|
179 |
View defaultStyle:#motif.
|
|
180 |
].
|
|
181 |
|
|
182 |
"/
|
|
183 |
"/ start some views ...
|
|
184 |
"/ you can add all stuff you'd like to come up by default
|
|
185 |
"/ the first time.
|
|
186 |
"/ NOTICE: you should do that in your 'private.rc'-file
|
|
187 |
"/
|
0
|
188 |
|
20
|
189 |
NewLauncher notNil ifTrue:[
|
|
190 |
'starting main-menu ...' errorPrintNL.
|
|
191 |
NewLauncher open
|
|
192 |
] ifFalse:[
|
|
193 |
"*
|
|
194 |
* start a Transcript (if linked-in)
|
|
195 |
*"
|
|
196 |
TextCollector notNil ifTrue:[
|
|
197 |
'starting Transcript ...' errorPrintNL.
|
|
198 |
TextCollector newTranscript.
|
|
199 |
"/ Transcript lineLimit:2000.
|
|
200 |
].
|
0
|
201 |
|
20
|
202 |
"*
|
|
203 |
* start the Launcher (if linked-in)
|
|
204 |
*"
|
|
205 |
Launcher notNil ifTrue:[
|
|
206 |
'starting main-menu ...' errorPrintNL.
|
|
207 |
Launcher open
|
|
208 |
].
|
10
|
209 |
].
|
0
|
210 |
|
25
|
211 |
"/
|
|
212 |
"/ start a SystemBrowser
|
|
213 |
"/ - I dont want one (using Launcher)
|
|
214 |
"/
|
10
|
215 |
"/ SystemBrowser open.
|
0
|
216 |
|
25
|
217 |
"/
|
|
218 |
"/ start a FileBrowser
|
|
219 |
"/ - I dont want one (using Launcher)
|
|
220 |
"/
|
10
|
221 |
"/ FileBrowser open.
|
0
|
222 |
|
25
|
223 |
"/
|
|
224 |
"/ start a Workspace
|
|
225 |
"/ - I dont want one (using Launcher)
|
|
226 |
"/
|
10
|
227 |
"/ Workspace open.
|
0
|
228 |
|
25
|
229 |
"/
|
|
230 |
"/ if things go very badly, turn on message tracing ...
|
|
231 |
"/ but be prepared for lots of output
|
|
232 |
"/
|
10
|
233 |
"/ Smalltalk debugOn.
|
|
234 |
|
25
|
235 |
"/
|
|
236 |
"/ if error occurs, and debugger has problems coming up
|
|
237 |
"/
|
10
|
238 |
"/ Debugger := MiniDebugger.
|
0
|
239 |
|
25
|
240 |
"/
|
|
241 |
"/ remember the type of display we started on, to check for
|
|
242 |
"/ a need to change things when we are restarted on another display.
|
|
243 |
"/ see smalltalk_r.rc for what this is for ...
|
|
244 |
"/
|
0
|
245 |
Smalltalk at:#'_ImageDisplayDepth' put:Display depth.
|
|
246 |
Smalltalk at:#'_ImageDisplayHasColors' put:Display hasColors.
|
|
247 |
Smalltalk at:#'_ImageDisplayHasGreyscales' put:Display hasGreyscales.
|
25
|
248 |
|
|
249 |
"/ Processor activeProcess vmTrace:true.
|
0
|
250 |
!
|