author | Claus Gittinger <cg@exept.de> |
Sat, 06 Mar 1999 01:25:29 +0100 | |
changeset 324 | e8eb27061a3f |
parent 322 | 48f27b856cb9 |
child 325 | 10f4f4024870 |
permissions | -rw-r--r-- |
25 | 1 |
"/ |
2 |
"/ $Header$ |
|
86 | 3 |
"/ |
209 | 4 |
"/ ST/X startup configuration & command file: |
5 |
"/ |
|
25 | 6 |
"/ startup configuration for smalltalk |
7 |
"/ |
|
8 |
"/ - everything in here are plain smalltalk expressions; |
|
9 |
"/ - statements with in a group are separated by a period. |
|
10 |
"/ - Each group of statements has to be delimited by an exclamation |
|
11 |
"/ character. |
|
12 |
"/ - avoid exclas in comments (or double them) |
|
13 |
"/ - nested comments are not allowed - take care. |
|
14 |
"/ |
|
15 |
"/ remember: this is fileOut-format |
|
16 |
"/ |
|
17 |
"/ comments can be either: |
|
18 |
"/ - standard smalltalk comments (i.e. from dquote to dquote) |
|
19 |
"/ - ST/X end of line comments (i.e. dquote followed by /) |
|
20 |
"/ |
|
21 |
"/ "this is a comment" |
|
22 |
"/ "/ another comment |
|
23 |
"/ |
|
24 |
"/*************************************************************** |
|
25 |
"/ PLEASE: only add things here, if they are of general interrest |
|
26 |
"/ and NEITHER site specific NOT display specific. |
|
27 |
"/ |
|
28 |
"/ site specific things are to be added to "h_<hostname>.rc" |
|
29 |
"/ display specifics to "d_<displayName>.rc" |
|
30 |
"/ and private user stuff in "private.rc" |
|
31 |
"/*************************************************************** |
|
0 | 32 |
|
25 | 33 |
"/ |
53
00437bd1cfe7
allow systemPath to be set via a shell variable
Claus Gittinger <cg@exept.de>
parents:
42
diff
changeset
|
34 |
"/ allow definition of the systemPath from an environment variable |
00437bd1cfe7
allow systemPath to be set via a shell variable
Claus Gittinger <cg@exept.de>
parents:
42
diff
changeset
|
35 |
"/ for example, to only try files in a users home and /usr/local/lib/smalltalk, |
00437bd1cfe7
allow systemPath to be set via a shell variable
Claus Gittinger <cg@exept.de>
parents:
42
diff
changeset
|
36 |
"/ add the following in your shell-profile: |
86 | 37 |
"/ export STX_SYSTEMPATH=$HOME:/usr/local/lib/smalltalk |
53
00437bd1cfe7
allow systemPath to be set via a shell variable
Claus Gittinger <cg@exept.de>
parents:
42
diff
changeset
|
38 |
"/ notice, that shell variable names are NOT expanded again in STX_SYSTEMPATH |
00437bd1cfe7
allow systemPath to be set via a shell variable
Claus Gittinger <cg@exept.de>
parents:
42
diff
changeset
|
39 |
"/ Make certain that all relevant files are found along your path - you may see |
00437bd1cfe7
allow systemPath to be set via a shell variable
Claus Gittinger <cg@exept.de>
parents:
42
diff
changeset
|
40 |
"/ funny viewStyles, colors and stupid strings if wrong. |
00437bd1cfe7
allow systemPath to be set via a shell variable
Claus Gittinger <cg@exept.de>
parents:
42
diff
changeset
|
41 |
"/ |
197 | 42 |
|
53
00437bd1cfe7
allow systemPath to be set via a shell variable
Claus Gittinger <cg@exept.de>
parents:
42
diff
changeset
|
43 |
|path| |
287
8151d262bd27
check for gnu-smalltalk sources along my path;
Claus Gittinger <cg@exept.de>
parents:
272
diff
changeset
|
44 |
|
53
00437bd1cfe7
allow systemPath to be set via a shell variable
Claus Gittinger <cg@exept.de>
parents:
42
diff
changeset
|
45 |
(path := OperatingSystem getEnvironment:'STX_SYSTEMPATH') notNil ifTrue:[ |
00437bd1cfe7
allow systemPath to be set via a shell variable
Claus Gittinger <cg@exept.de>
parents:
42
diff
changeset
|
46 |
Smalltalk systemPath:(path asCollectionOfSubstringsSeparatedBy:$:) |
287
8151d262bd27
check for gnu-smalltalk sources along my path;
Claus Gittinger <cg@exept.de>
parents:
272
diff
changeset
|
47 |
] ifFalse:[ |
8151d262bd27
check for gnu-smalltalk sources along my path;
Claus Gittinger <cg@exept.de>
parents:
272
diff
changeset
|
48 |
"/ look for gnu-smalltalk class files along my PATH. |
8151d262bd27
check for gnu-smalltalk sources along my path;
Claus Gittinger <cg@exept.de>
parents:
272
diff
changeset
|
49 |
"/ if found, remove that directory from the PATH to avoid |
8151d262bd27
check for gnu-smalltalk sources along my path;
Claus Gittinger <cg@exept.de>
parents:
272
diff
changeset
|
50 |
"/ autoloading wrong classes. |
8151d262bd27
check for gnu-smalltalk sources along my path;
Claus Gittinger <cg@exept.de>
parents:
272
diff
changeset
|
51 |
(path := Smalltalk getSystemFileName:'initialize.st') notNil ifTrue:[ |
8151d262bd27
check for gnu-smalltalk sources along my path;
Claus Gittinger <cg@exept.de>
parents:
272
diff
changeset
|
52 |
path := path asFilename directoryName. |
308
6e6d557009c7
dont loose windows keyboard setup after image restart
Claus Gittinger <cg@exept.de>
parents:
287
diff
changeset
|
53 |
('smalltalk.rc [info]: found gnu-smalltalk sources in ' , path , '; removed from systemPath.') infoPrintCR. |
287
8151d262bd27
check for gnu-smalltalk sources along my path;
Claus Gittinger <cg@exept.de>
parents:
272
diff
changeset
|
54 |
Smalltalk systemPath:(Smalltalk systemPath remove:path; yourself). |
8151d262bd27
check for gnu-smalltalk sources along my path;
Claus Gittinger <cg@exept.de>
parents:
272
diff
changeset
|
55 |
] |
53
00437bd1cfe7
allow systemPath to be set via a shell variable
Claus Gittinger <cg@exept.de>
parents:
42
diff
changeset
|
56 |
]. |
86 | 57 |
! |
58 |
||
59 |
|args| |
|
60 |
||
61 |
args := Smalltalk commandLineArguments. |
|
126 | 62 |
((args size > 0) and:[args last = '--buildClasses']) ifTrue:[ |
86 | 63 |
'binary' asFilename isDirectory ifFalse:[ |
195 | 64 |
'smalltalk.rc [warning]: no binary directory for classes.' errorPrintCR. |
86 | 65 |
] ifTrue:[ |
66 |
"/ |
|
67 |
"/ load all lazy classes |
|
68 |
"/ |
|
69 |
Autoload subclasses do:[:aClass | |
|
70 |
Autoload autoloadFailedSignal handle:[:ex | |
|
195 | 71 |
'smalltalk.rc [warning]: autoload failed' errorPrintCR. |
86 | 72 |
ex return. |
73 |
] do:[ |
|
195 | 74 |
'smalltalk.rc [info]: loading ' infoPrint. aClass name infoPrint. ' ...' infoPrintCR. |
86 | 75 |
aClass autoload. |
76 |
] |
|
77 |
]. |
|
78 |
||
79 |
"/ |
|
80 |
"/ binary save all classes |
|
81 |
"/ |
|
82 |
Autoload loadedClasses do:[:cls | |
|
195 | 83 |
'smalltalk.rc [info]: saving binary of ' infoPrint. cls name infoPrint. ' ...' infoPrintCR. |
86 | 84 |
cls binaryFileOut. |
85 |
OperatingSystem executeCommand:'mv *.cls binary'. |
|
86 |
] |
|
87 |
]. |
|
88 |
Smalltalk exit |
|
89 |
]. |
|
90 |
! |
|
53
00437bd1cfe7
allow systemPath to be set via a shell variable
Claus Gittinger <cg@exept.de>
parents:
42
diff
changeset
|
91 |
|
00437bd1cfe7
allow systemPath to be set via a shell variable
Claus Gittinger <cg@exept.de>
parents:
42
diff
changeset
|
92 |
"/ |
25 | 93 |
"/ map Language variable setting to known and handled |
94 |
"/ values: |
|
53
00437bd1cfe7
allow systemPath to be set via a shell variable
Claus Gittinger <cg@exept.de>
parents:
42
diff
changeset
|
95 |
"/ |
25 | 96 |
Language == #De ifTrue:[ |
143
71dc5ec7ef26
Renamed NewLauncher to Launcher.
Stefan Vogel <sv@exept.de>
parents:
133
diff
changeset
|
97 |
Language := #german |
25 | 98 |
]. |
99 |
! |
|
8 | 100 |
|
25 | 101 |
"/ |
102 |
"/ just a quick check, if this ST/X installation seems to |
|
103 |
"/ be halfway complete (it happened to some people, that |
|
41 | 104 |
"/ their source/resource directories were not installed) |
25 | 105 |
"/ - better to warn early ... |
106 |
"/ |
|
5 | 107 |
|anyWrong missing| |
108 |
anyWrong := false. |
|
109 |
missing := ''. |
|
110 |
(Smalltalk getSystemFileName:'resources/SBrowser.rs') isNil ifTrue:[ |
|
123
a974136fe017
startup infoPrinting suppressable (-q flag)
Claus Gittinger <cg@exept.de>
parents:
121
diff
changeset
|
111 |
'***********************************************************************' errorPrintCR. |
251 | 112 |
'***** ATTENTION: please check installation of your >>resource<< files' errorPrintCR. |
250 | 113 |
'***** I will not be able to give non-english messages' errorPrintCR. |
5 | 114 |
anyWrong := true. |
115 |
missing := '''resources'' '. |
|
116 |
]. |
|
117 |
(Smalltalk getSystemFileName:'source/Object.st') isNil ifTrue:[ |
|
271 | 118 |
(Smalltalk getSystemFileName:'source/source.zip') isNil ifTrue:[ |
42 | 119 |
"/ |
120 |
"/ there may still be a SourceCodeManager ... |
|
121 |
"/ |
|
208 | 122 |
(Smalltalk at:#SourceCodeManager) isNil ifTrue:[ |
123
a974136fe017
startup infoPrinting suppressable (-q flag)
Claus Gittinger <cg@exept.de>
parents:
121
diff
changeset
|
123 |
'***********************************************************************' errorPrintCR. |
251 | 124 |
'***** ATTENTION: please check installation of your >>source<< files' errorPrintCR. |
123
a974136fe017
startup infoPrinting suppressable (-q flag)
Claus Gittinger <cg@exept.de>
parents:
121
diff
changeset
|
125 |
'***** ' errorPrintCR. |
a974136fe017
startup infoPrinting suppressable (-q flag)
Claus Gittinger <cg@exept.de>
parents:
121
diff
changeset
|
126 |
'***** the browser/debugger may not be able to show sourcecode.' errorPrintCR. |
251 | 127 |
'***** Also, autoloading may fail if sourceFiles are missing.' errorPrintCR. |
42 | 128 |
anyWrong := true. |
129 |
missing := missing , '''source'' '. |
|
130 |
] |
|
271 | 131 |
] |
5 | 132 |
]. |
133 |
(Smalltalk getSystemFileName:'bitmaps/SBrowser.xbm') isNil ifTrue:[ |
|
123
a974136fe017
startup infoPrinting suppressable (-q flag)
Claus Gittinger <cg@exept.de>
parents:
121
diff
changeset
|
134 |
'***********************************************************************' errorPrintCR. |
251 | 135 |
'***** ATTENTION: please check installation of your >>bitmap<< files' errorPrintCR. |
5 | 136 |
anyWrong := true. |
137 |
missing := missing , '''bitmaps'' '. |
|
138 |
]. |
|
7 | 139 |
(Smalltalk getSystemFileName:'resources/normal.style') isNil ifTrue:[ |
123
a974136fe017
startup infoPrinting suppressable (-q flag)
Claus Gittinger <cg@exept.de>
parents:
121
diff
changeset
|
140 |
'***********************************************************************' errorPrintCR. |
251 | 141 |
'***** ATTENTION: please check installation of your >>style<< files' errorPrintCR. |
250 | 142 |
'***** I will use a plain b&w viewStyle as a fallBack' errorPrintCR. |
7 | 143 |
anyWrong := true. |
144 |
missing := missing , '''resources'' '. |
|
145 |
]. |
|
146 |
||
5 | 147 |
anyWrong ifTrue:[ |
123
a974136fe017
startup infoPrinting suppressable (-q flag)
Claus Gittinger <cg@exept.de>
parents:
121
diff
changeset
|
148 |
'*****' errorPrintCR. |
a974136fe017
startup infoPrinting suppressable (-q flag)
Claus Gittinger <cg@exept.de>
parents:
121
diff
changeset
|
149 |
'***** directory(s) named: ' errorPrint. missing errorPrint. 'incomplete/not existing' errorPrintCR. |
251 | 150 |
'***** I could not find the missing directory along your path,' errorPrintCR. |
151 |
'***** which is:' errorPrintCR. |
|
152 |
Smalltalk systemPath do:[:dir | |
|
308
6e6d557009c7
dont loose windows keyboard setup after image restart
Claus Gittinger <cg@exept.de>
parents:
287
diff
changeset
|
153 |
('***** ' , dir storeString) errorPrintCR. |
251 | 154 |
]. |
16 | 155 |
|
123
a974136fe017
startup infoPrinting suppressable (-q flag)
Claus Gittinger <cg@exept.de>
parents:
121
diff
changeset
|
156 |
'*****' errorPrintCR. |
a974136fe017
startup infoPrinting suppressable (-q flag)
Claus Gittinger <cg@exept.de>
parents:
121
diff
changeset
|
157 |
'***** Try: "make source bitmaps resources styles"' errorPrintCR. |
a974136fe017
startup infoPrinting suppressable (-q flag)
Claus Gittinger <cg@exept.de>
parents:
121
diff
changeset
|
158 |
'***** or: "make symlinks" to fix this.' errorPrintCR. |
a974136fe017
startup infoPrinting suppressable (-q flag)
Claus Gittinger <cg@exept.de>
parents:
121
diff
changeset
|
159 |
'***********************************************************************' errorPrintCR. |
5 | 160 |
] |
161 |
! |
|
162 |
||
25 | 163 |
"/ |
164 |
"/ check for display-classes being compiled into the system; |
|
165 |
"/ (and if display connection can be established) |
|
166 |
"/ if not, enter a simple read-eval-print loop |
|
167 |
"/ |
|
0 | 168 |
Display isNil ifTrue:[ |
5 | 169 |
DeviceWorkstation notNil ifTrue:[ |
195 | 170 |
'smalltalk.rc [warning]: No Display connection.' errorPrintCR. |
197 | 171 |
'smalltalk.rc [info]: Either set the DISPLAY environment variable,' infoPrintCR. |
172 |
'smalltalk.rc [info]: or start smalltalk with a -display argument.' infoPrintCR. |
|
5 | 173 |
] ifFalse:[ |
195 | 174 |
'smalltalk.rc [warning]: Configuration without display.' errorPrintCR. |
5 | 175 |
]. |
133 | 176 |
'' errorPrintCR. |
202 | 177 |
'Textmode (enter smalltalk expressions terminated by single exclamation mark;' errorPrintCR. |
178 |
OperatingSystem isUNIXlike ifTrue:[ |
|
209 | 179 |
' CTRL-D to leave line-by-line interpreter.)' errorPrintCR. |
201 | 180 |
] ifFalse:[ |
209 | 181 |
' CTRL-Z to leave line-by-line interpreter.)' errorPrintCR. |
201 | 182 |
]. |
0 | 183 |
Smalltalk readEvalPrint. |
184 |
Smalltalk exit |
|
10 | 185 |
]. |
0 | 186 |
|
25 | 187 |
"/ |
188 |
"/ this makes X-errors be handled immediately (so you see, |
|
189 |
"/ where it occured) but slows down the system soooo muuuucccchhh .. |
|
190 |
"/ if commented out, errors will be reported asynchronously. |
|
191 |
"/ (I enable this, when things go bad during startup) |
|
192 |
"/ |
|
10 | 193 |
"/ Display unBuffered. |
0 | 194 |
|
25 | 195 |
"/ |
196 |
"/ this starts the incremental GC earlier |
|
197 |
"/ (default is 500000) |
|
198 |
"/ the number given is the number of bytes which have to be allocated |
|
199 |
"/ since the last GC, to start the incremental GC running. |
|
200 |
"/ (see ObjectMemory>>documentation) |
|
201 |
"/ Claus: I moved this to the private.rc file |
|
202 |
"/ |
|
10 | 203 |
"/ ObjectMemory incrementalGCLimit:100000. |
0 | 204 |
|
25 | 205 |
"/ |
206 |
"/ this starts the incremental GC when freeSpace drops below a limit |
|
207 |
"/ (default is nil - i.e. dont look at freeSpace) |
|
208 |
"/ (see ObjectMemory>>documentation) |
|
209 |
"/ Claus: I moved this to the private.rc file |
|
210 |
"/ |
|
16 | 211 |
"/ ObjectMemory freeSpaceGCLimit:300000. |
212 |
||
322 | 213 |
"/ experimental: try to always keep some bytes in the pocket |
214 |
"/ this changes the memory policy, to start the background collector whenever |
|
215 |
"/ freespace drops below 250k or 500k have been allocated since the last GC. |
|
216 |
"/ AND to allocate more memory, if (after the collect) less than 1Mb is free. |
|
217 |
"/ Doing so makes the system behave better if lots of memory is required |
|
218 |
"/ for short periods of time, since it prepares itself for that situation |
|
219 |
"/ during idle time. (I often walk around in the fileBrowser, loading big |
|
220 |
"/ files like XWorkstation.st or SystemBrowser.st ....) |
|
221 |
||
222 |
ObjectMemory freeSpaceGCAmount:1000000. |
|
223 |
ObjectMemory freeSpaceGCLimit:250000. |
|
224 |
ObjectMemory incrementalGCLimit:500000. |
|
225 |
ObjectMemory oldSpaceIncrement:500000. |
|
226 |
ObjectMemory startBackgroundCollectorAt:5. |
|
227 |
ObjectMemory startBackgroundFinalizationAt:5. |
|
228 |
||
229 |
"/ experimental: |
|
230 |
"/ run the background collector at a dynamic priority - it will |
|
231 |
"/ now always get a chance to make some progress ... |
|
232 |
||
233 |
Smalltalk addStartBlock:[ |
|
234 |
'private.rc [info]: start timeSlicing...' infoPrintCR. |
|
235 |
Processor startTimeSlicing. |
|
236 |
Processor supportDynamicPriorities:true. |
|
237 |
ObjectMemory backgroundCollectProcess priorityRange:(4 to:9). |
|
238 |
ObjectMemory backgroundFinalizationProcess priorityRange:(4 to:9). |
|
239 |
]. |
|
240 |
||
241 |
"/ experimental: configure the memory manager to quickly increase |
|
242 |
"/ its oldSpace, as long as it stays below 8Mb (i.e. do not enter |
|
243 |
"/ a blocking mark&sweep or compress, but go straight ahead increasing |
|
244 |
"/ the oldSpace). Above that, behave as usual, i.e. try a GC first, |
|
245 |
"/ then increase the oldSpace size if that did not help. |
|
246 |
"/ If you have a machine with lots of (real) memory, you may want to |
|
247 |
"/ increase the number. The value below should be ok for 16-32Mb machines. |
|
248 |
"/ |
|
249 |
ObjectMemory fastMoreOldSpaceLimit:8*1024*1024. |
|
250 |
ObjectMemory fastMoreOldSpaceAllocation:true. |
|
251 |
! |
|
252 |
||
253 |
"/ another experimental (and a secret for now, since I dont want |
|
254 |
"/ you to play with those ;-) |
|
255 |
"/ For now, this is experimental. Once the best numbers |
|
256 |
"/ have been found, I'll hardwire them and document it ... |
|
257 |
||
258 |
|a| |
|
259 |
ObjectMemory newSpaceSize > (500*1024) ifTrue:[ |
|
260 |
a := #(nil nil nil nil -16 -4 -2 -2 0 0 16 nil) copy. |
|
261 |
] ifFalse:[ |
|
262 |
"/ min max cpy /32 /16 /8 /4 /2 /4 /8 /16 /32 " |
|
263 |
"/ |
|
264 |
"/ slow tenure - keeps objects longer in newSpace, |
|
265 |
"/ producing more scavenge overhead, but releasing IGC somewhat |
|
266 |
"/ |
|
267 |
"/ a := #(nil nil nil -100 -8 -4 -1 1 2 4 8 16 nil) copy. |
|
268 |
"/ a := #(nil nil nil nil -16 -4 0 0 0 4 16 nil) copy. |
|
269 |
||
270 |
"fast tenure" |
|
271 |
"/ |
|
272 |
"/ fast tenure - moves objects earlier into oldSpace, |
|
273 |
"/ releasing newSpace collector; however, the oldSpace IGC |
|
274 |
"/ may have more work to do. |
|
275 |
"/ |
|
276 |
a := #(nil nil nil nil -20 -8 -3 -1 -1 1 16 nil) copy. |
|
277 |
]. |
|
278 |
ObjectMemory tenureParameters:a. |
|
279 |
||
25 | 280 |
"/ |
281 |
"/ lazy loading |
|
282 |
"/ (faster fileIn) - this is EXPERIMENTAL. |
|
169 | 283 |
"/ |
284 |
"/ - if turned on, an autoload operation will only create methodStubs |
|
285 |
"/ (uncompiled) which trap when called the first time. |
|
286 |
"/ The bytecode compiler will compile them when first executen. |
|
287 |
"/ |
|
288 |
"/ - if turned off, an autoload will load & compile the while class, |
|
289 |
"/ which makes autoloading slower, but avoids the initial delays |
|
290 |
"/ |
|
291 |
"/ This is much like just-in-time compilation, but on a higher level. |
|
25 | 292 |
"/ If there are any problems with lazy methods, disable the following |
152 | 293 |
"/ and let me (cg@exept.ssw.de) know what happened. |
25 | 294 |
"/ |
223 | 295 |
Autoload compileLazy:true. |
5 | 296 |
|
25 | 297 |
"/ |
298 |
"/ define the language (you can also set the LANG-shell variable) |
|
169 | 299 |
"/ (currently #english, #german and #french are supported). |
300 |
"/ some fragments for other languages (japanese ;-) exist. |
|
152 | 301 |
"/ Setting it here will override the LANG variable setting, |
25 | 302 |
"/ if neither set here nor in LANG, #english is the default. |
169 | 303 |
"/ see (and enhance) the resource files |
25 | 304 |
"/ Claus: supposed to be done in private.rc or via LANG variable |
305 |
"/ |
|
10 | 306 |
"/ Smalltalk language:#german. |
307 |
"/ Smalltalk language:#english. |
|
0 | 308 |
|
25 | 309 |
"/ |
310 |
"/ this handles all variant display stuff |
|
311 |
"/ (i.e. things which might change, when DISPLAY is set different) |
|
312 |
"/ |
|
195 | 313 |
"/ 'smalltalk.rc [info]: reading ''display.rc'' ...' infoPrintCR. |
10 | 314 |
Smalltalk fileIn:'display.rc'. |
0 | 315 |
|
25 | 316 |
"/ |
317 |
"/ this defines stuff relating to the host we are running on |
|
318 |
"/ |
|
195 | 319 |
"/ 'smalltalk.rc [info]: reading ''host.rc'' ...' infoPrintCR. |
10 | 320 |
Smalltalk fileIn:'host.rc'. |
0 | 321 |
|
25 | 322 |
"/ |
143
71dc5ec7ef26
Renamed NewLauncher to Launcher.
Stefan Vogel <sv@exept.de>
parents:
133
diff
changeset
|
323 |
"/ Ask user to accept Licence. |
71dc5ec7ef26
Renamed NewLauncher to Launcher.
Stefan Vogel <sv@exept.de>
parents:
133
diff
changeset
|
324 |
"/ exit, if rejected. |
324
e8eb27061a3f
llow for licenceBox to be suppressed
Claus Gittinger <cg@exept.de>
parents:
322
diff
changeset
|
325 |
"/ |
152 | 326 |
"/ You may find this annoying - but lawers say: "this is a must ..." ;-) |
327 |
"/ (it will not be shown when coming up via a snapshot image) |
|
324
e8eb27061a3f
llow for licenceBox to be suppressed
Claus Gittinger <cg@exept.de>
parents:
322
diff
changeset
|
328 |
"/ Also, the licenceBox can be suppressed with a command-line argument; |
e8eb27061a3f
llow for licenceBox to be suppressed
Claus Gittinger <cg@exept.de>
parents:
322
diff
changeset
|
329 |
"/ however, if you do so, we assume you have read & accepted it at least |
e8eb27061a3f
llow for licenceBox to be suppressed
Claus Gittinger <cg@exept.de>
parents:
322
diff
changeset
|
330 |
"/ once (since this command-line-argument is not documented, you obviously |
e8eb27061a3f
llow for licenceBox to be suppressed
Claus Gittinger <cg@exept.de>
parents:
322
diff
changeset
|
331 |
"/ read the code below). |
220 | 332 |
|
324
e8eb27061a3f
llow for licenceBox to be suppressed
Claus Gittinger <cg@exept.de>
parents:
322
diff
changeset
|
333 |
"/ |
e8eb27061a3f
llow for licenceBox to be suppressed
Claus Gittinger <cg@exept.de>
parents:
322
diff
changeset
|
334 |
"/ WARNING: read the licence text before you disable the code below, |
e8eb27061a3f
llow for licenceBox to be suppressed
Claus Gittinger <cg@exept.de>
parents:
322
diff
changeset
|
335 |
"/ or start stx with a suppress argument. |
e8eb27061a3f
llow for licenceBox to be suppressed
Claus Gittinger <cg@exept.de>
parents:
322
diff
changeset
|
336 |
"/ |
250 | 337 |
|
324
e8eb27061a3f
llow for licenceBox to be suppressed
Claus Gittinger <cg@exept.de>
parents:
322
diff
changeset
|
338 |
(Smalltalk commandLineArguments includes:'--noLicenceBox') ifFalse:[ |
e8eb27061a3f
llow for licenceBox to be suppressed
Claus Gittinger <cg@exept.de>
parents:
322
diff
changeset
|
339 |
Smalltalk addStartBlock:[ |
e8eb27061a3f
llow for licenceBox to be suppressed
Claus Gittinger <cg@exept.de>
parents:
322
diff
changeset
|
340 |
'smalltalk.rc [info]: show licence conditions ...' infoPrintCR. |
e8eb27061a3f
llow for licenceBox to be suppressed
Claus Gittinger <cg@exept.de>
parents:
322
diff
changeset
|
341 |
|
e8eb27061a3f
llow for licenceBox to be suppressed
Claus Gittinger <cg@exept.de>
parents:
322
diff
changeset
|
342 |
LicenceBox autoload. |
220 | 343 |
|
324
e8eb27061a3f
llow for licenceBox to be suppressed
Claus Gittinger <cg@exept.de>
parents:
322
diff
changeset
|
344 |
LicenceBox licenceRejectSignal handle:[:ex| |
e8eb27061a3f
llow for licenceBox to be suppressed
Claus Gittinger <cg@exept.de>
parents:
322
diff
changeset
|
345 |
Smalltalk exit |
e8eb27061a3f
llow for licenceBox to be suppressed
Claus Gittinger <cg@exept.de>
parents:
322
diff
changeset
|
346 |
] do:[ |
e8eb27061a3f
llow for licenceBox to be suppressed
Claus Gittinger <cg@exept.de>
parents:
322
diff
changeset
|
347 |
(LicenceBox open) ifFalse:[Smalltalk exit]. |
e8eb27061a3f
llow for licenceBox to be suppressed
Claus Gittinger <cg@exept.de>
parents:
322
diff
changeset
|
348 |
Smalltalk at:#LicenceBox put:nil. |
e8eb27061a3f
llow for licenceBox to be suppressed
Claus Gittinger <cg@exept.de>
parents:
322
diff
changeset
|
349 |
]. |
e8eb27061a3f
llow for licenceBox to be suppressed
Claus Gittinger <cg@exept.de>
parents:
322
diff
changeset
|
350 |
] |
143
71dc5ec7ef26
Renamed NewLauncher to Launcher.
Stefan Vogel <sv@exept.de>
parents:
133
diff
changeset
|
351 |
]. |
71dc5ec7ef26
Renamed NewLauncher to Launcher.
Stefan Vogel <sv@exept.de>
parents:
133
diff
changeset
|
352 |
|
71dc5ec7ef26
Renamed NewLauncher to Launcher.
Stefan Vogel <sv@exept.de>
parents:
133
diff
changeset
|
353 |
"/ |
41 | 354 |
"/ read private (per user) stuff |
25 | 355 |
"/ |
195 | 356 |
'smalltalk.rc [info]: reading ''private.rc'' ...' infoPrintCR. |
10 | 357 |
Smalltalk fileIn:'private.rc'. |
5 | 358 |
|
25 | 359 |
"/ |
169 | 360 |
"/ read saved configuration settings (if any) |
361 |
"/ |
|
195 | 362 |
"/ 'smalltalk.rc [info]: reading ''settings.stx'' ...' infoPrintCR. |
169 | 363 |
Smalltalk fileIn:'settings.stx'. |
364 |
||
365 |
"/ |
|
366 |
"/ set the package to some useful default |
|
367 |
"/ |
|
368 |
Project notNil ifTrue:[ |
|
369 |
Project setDefaultProject. |
|
370 |
Project current packageName:#'private'. |
|
371 |
]. |
|
372 |
||
373 |
"/ |
|
152 | 374 |
"/ if error occurs, and debugger has problems coming up, |
375 |
"/ uncomment the following ... |
|
25 | 376 |
"/ |
10 | 377 |
"/ Debugger := MiniDebugger. |
0 | 378 |
|
152 | 379 |
"/ |
380 |
"/ save an initial image; this will speedup the next startup |
|
381 |
"/ (since all autoload-stuff will already be initialized) |
|
382 |
"/ |
|
153 | 383 |
|
226 | 384 |
"/ 'st.img' asFilename exists ifFalse:[ |
385 |
"/ |doneWithStartupStuff| |
|
386 |
"/ |
|
387 |
"/ doneWithStartupStuff := Semaphore new. |
|
388 |
"/ |
|
389 |
"/ Smalltalk addStartBlock:[ |
|
250 | 390 |
"/ [ |
391 |
"/ doneWithStartupStuff wait. |
|
226 | 392 |
"/ 'smalltalk.rc [info]: saving initial image for faster future startup ...' infoPrintCR. |
393 |
"/ ObjectMemory primSnapShotOn:'st.img' |
|
250 | 394 |
"/ ] forkAt:1 |
226 | 395 |
"/ ]. |
396 |
"/ |
|
397 |
"/ Smalltalk addStartBlock:[ |
|
250 | 398 |
"/ [ |
399 |
"/ Delay waitForSeconds:10. |
|
400 |
"/ doneWithStartupStuff signal |
|
401 |
"/ ] forkAt:1 |
|
226 | 402 |
"/ ]. |
403 |
"/ ]. |
|
86 | 404 |
! |