author | Claus Gittinger <cg@exept.de> |
Sun, 19 Jan 2020 16:29:54 +0100 | |
changeset 1621 | 5db4b463c4fe |
parent 1614 | f1a83cf1a147 |
permissions | -rw-r--r-- |
609 | 1 |
"/ Encoding: iso8859-1 |
25 | 2 |
"/ |
3 |
"/ $Header$ |
|
86 | 4 |
"/ |
399 | 5 |
"/ MIMEType: application/x-smalltalk-source |
6 |
"/ |
|
209 | 7 |
"/ ST/X startup configuration & command file: |
8 |
"/ |
|
25 | 9 |
"/ startup configuration for smalltalk |
10 |
"/ |
|
11 |
"/ - everything in here are plain smalltalk expressions; |
|
12 |
"/ - statements with in a group are separated by a period. |
|
13 |
"/ - Each group of statements has to be delimited by an exclamation |
|
14 |
"/ character. |
|
15 |
"/ - avoid exclas in comments (or double them) |
|
16 |
"/ - nested comments are not allowed - take care. |
|
17 |
"/ |
|
18 |
"/ remember: this is fileOut-format |
|
19 |
"/ |
|
20 |
"/ comments can be either: |
|
21 |
"/ - standard smalltalk comments (i.e. from dquote to dquote) |
|
22 |
"/ - ST/X end of line comments (i.e. dquote followed by /) |
|
23 |
"/ |
|
24 |
"/ "this is a comment" |
|
25 |
"/ "/ another comment |
|
26 |
"/ |
|
27 |
"/*************************************************************** |
|
28 |
"/ PLEASE: only add things here, if they are of general interrest |
|
29 |
"/ and NEITHER site specific NOT display specific. |
|
30 |
"/ |
|
31 |
"/ site specific things are to be added to "h_<hostname>.rc" |
|
32 |
"/ display specifics to "d_<displayName>.rc" |
|
33 |
"/ and private user stuff in "private.rc" |
|
34 |
"/*************************************************************** |
|
488
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
35 |
|cpu enableJIT| |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
36 |
|
1467
befae5d031b8
--autoload option to get the old behavior;
Claus Gittinger <cg@exept.de>
parents:
1457
diff
changeset
|
37 |
"/ (Smalltalk commandLineArguments includes:'--quick') ifFalse:[ |
befae5d031b8
--autoload option to get the old behavior;
Claus Gittinger <cg@exept.de>
parents:
1457
diff
changeset
|
38 |
"/ 'smalltalk.rc [info]: initial startup (snapshot image restart is faster)...' infoPrintCR. |
befae5d031b8
--autoload option to get the old behavior;
Claus Gittinger <cg@exept.de>
parents:
1457
diff
changeset
|
39 |
"/ ]. |
488
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
40 |
|
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
41 |
"/ |
1299 | 42 |
"/ the JIT translator is (was) known to work with the following |
488
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
43 |
"/ architectures: |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
44 |
"/ ix86 (linux, win32, unixware) |
1341
9a6ea7ab9585
changed settings file order (private first)
Claus Gittinger <cg@exept.de>
parents:
1316
diff
changeset
|
45 |
"/ sgi-mips (irix) [no longer supported] |
9a6ea7ab9585
changed settings file order (private first)
Claus Gittinger <cg@exept.de>
parents:
1316
diff
changeset
|
46 |
"/ alpha (osf) [no longer supported] |
488
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
47 |
"/ sparc (solaris) [only tested with v7 & v8 & v9 cpus] |
1299 | 48 |
"/ rs6k (aix) [not very well tested] |
49 |
"/ mc68k [no longer supported] |
|
50 |
"/ mc88k [no longer supported] |
|
51 |
"/ pa-risk [no longer supported] |
|
488
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
52 |
"/ |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
53 |
enableJIT := false. |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
54 |
|
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
55 |
cpu := OperatingSystem getCPUType. |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
56 |
(#( |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
57 |
'i386' |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
58 |
'sparc' |
1341
9a6ea7ab9585
changed settings file order (private first)
Claus Gittinger <cg@exept.de>
parents:
1316
diff
changeset
|
59 |
"/ 'mips' |
9a6ea7ab9585
changed settings file order (private first)
Claus Gittinger <cg@exept.de>
parents:
1316
diff
changeset
|
60 |
"/ 'alpha' |
488
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
61 |
) includes:cpu) ifTrue:[ |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
62 |
enableJIT := true. |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
63 |
|
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
64 |
cpu = 'sparc' ifTrue:[ |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
65 |
"/ for now, disable if we detect running on a sparcV10; |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
66 |
"/ Reason: |
1341
9a6ea7ab9585
changed settings file order (private first)
Claus Gittinger <cg@exept.de>
parents:
1316
diff
changeset
|
67 |
"/ we do not have v10 machines here at exept , |
488
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
68 |
"/ and therefore have no way of checking if it runs on v10. |
1341
9a6ea7ab9585
changed settings file order (private first)
Claus Gittinger <cg@exept.de>
parents:
1316
diff
changeset
|
69 |
"/ I don't want ST/X to crash on your side in that case ... |
488
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
70 |
"/ ... better run a bit slower than not running at all. |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
71 |
"/ Please let us know if it runs and we will remove the code below |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
72 |
"/ (which you should do as well). |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
73 |
|
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
74 |
((OperatingSystem getSystemInfo at:#instructionSets) includesString:'sparcv10') ifTrue:[ |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
75 |
'smalltalk.rc [warning]: disable JIT for sparcV10 - not yet validated' infoPrintCR. |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
76 |
enableJIT := false |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
77 |
] |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
78 |
] |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
79 |
]. |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
80 |
|
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
81 |
enableJIT ifTrue:[ |
656 | 82 |
"/ 'smalltalk.rc [info]: turn on JIT...' infoPrintCR. |
488
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
83 |
ObjectMemory justInTimeCompilation:true. |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
84 |
]. |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
85 |
|
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
86 |
"/ OperatingSystem disableSignal:14. |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
87 |
|
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
88 |
ObjectMemory infoPrinting:false. |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
89 |
"/ Smalltalk loadBinaries:true. |
1341
9a6ea7ab9585
changed settings file order (private first)
Claus Gittinger <cg@exept.de>
parents:
1316
diff
changeset
|
90 |
"/ Compiler allowUnderscoreInIdentifier:true. |
9a6ea7ab9585
changed settings file order (private first)
Claus Gittinger <cg@exept.de>
parents:
1316
diff
changeset
|
91 |
"/ Compiler warnUnderscoreInIdentifier:false. |
9a6ea7ab9585
changed settings file order (private first)
Claus Gittinger <cg@exept.de>
parents:
1316
diff
changeset
|
92 |
"/ Compiler warnSTXSpecials:false. |
488
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
93 |
! |
0 | 94 |
|
25 | 95 |
"/ |
53
00437bd1cfe7
allow systemPath to be set via a shell variable
Claus Gittinger <cg@exept.de>
parents:
42
diff
changeset
|
96 |
"/ 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
|
97 |
"/ 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
|
98 |
"/ add the following in your shell-profile: |
86 | 99 |
"/ 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
|
100 |
"/ 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
|
101 |
"/ 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
|
102 |
"/ 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
|
103 |
"/ |
197 | 104 |
|
781 | 105 |
|path pathOfSTXExecutable pathOfCurrentDir| |
287
8151d262bd27
check for gnu-smalltalk sources along my path;
Claus Gittinger <cg@exept.de>
parents:
272
diff
changeset
|
106 |
|
704 | 107 |
"/ 'systemPath before: ' infoPrint. Smalltalk systemPath infoPrintCR. |
108 |
"/ 'exec: ' infoPrint. OperatingSystem nameOfSTXExecutable infoPrintCR. |
|
109 |
"/ 'execPath: ' infoPrint. OperatingSystem pathOfSTXExecutable infoPrintCR. |
|
680 | 110 |
|
782 | 111 |
pathOfSTXExecutable := OperatingSystem pathOfSTXExecutable. |
112 |
pathOfSTXExecutable notNil ifTrue:[ |
|
113 |
pathOfSTXExecutable := pathOfSTXExecutable asFilename directory. |
|
114 |
]. |
|
781 | 115 |
pathOfCurrentDir := Filename currentDirectory asAbsoluteFilename. |
672 | 116 |
|
53
00437bd1cfe7
allow systemPath to be set via a shell variable
Claus Gittinger <cg@exept.de>
parents:
42
diff
changeset
|
117 |
(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
|
118 |
Smalltalk systemPath:(path asCollectionOfSubstringsSeparatedBy:$:) |
287
8151d262bd27
check for gnu-smalltalk sources along my path;
Claus Gittinger <cg@exept.de>
parents:
272
diff
changeset
|
119 |
] ifFalse:[ |
8151d262bd27
check for gnu-smalltalk sources along my path;
Claus Gittinger <cg@exept.de>
parents:
272
diff
changeset
|
120 |
"/ 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
|
121 |
"/ 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
|
122 |
"/ autoloading wrong classes. |
8151d262bd27
check for gnu-smalltalk sources along my path;
Claus Gittinger <cg@exept.de>
parents:
272
diff
changeset
|
123 |
(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
|
124 |
path := path asFilename directoryName. |
308
6e6d557009c7
dont loose windows keyboard setup after image restart
Claus Gittinger <cg@exept.de>
parents:
287
diff
changeset
|
125 |
('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
|
126 |
Smalltalk systemPath:(Smalltalk systemPath remove:path; yourself). |
672 | 127 |
]. |
782 | 128 |
pathOfSTXExecutable notNil ifTrue:[ |
129 |
(Smalltalk systemPath includes:pathOfSTXExecutable name) ifFalse:[ |
|
130 |
Smalltalk systemPath addFirst:pathOfSTXExecutable name. |
|
131 |
] |
|
677 | 132 |
]. |
781 | 133 |
(Smalltalk systemPath includes:pathOfCurrentDir name) ifFalse:[ |
134 |
Smalltalk systemPath addFirst:pathOfCurrentDir name. |
|
135 |
]. |
|
672 | 136 |
|
677 | 137 |
"/ the current directory should always be first... |
138 |
(Smalltalk systemPath includes:'.') ifTrue:[ |
|
139 |
Smalltalk systemPath remove:'.'. |
|
140 |
]. |
|
1384 | 141 |
(Smalltalk systemPath includes:Filename currentDirectory pathName) ifTrue:[ |
142 |
Smalltalk systemPath remove:Filename currentDirectory pathName. |
|
677 | 143 |
]. |
1384 | 144 |
Smalltalk systemPath addFirst:Filename currentDirectory pathName. |
53
00437bd1cfe7
allow systemPath to be set via a shell variable
Claus Gittinger <cg@exept.de>
parents:
42
diff
changeset
|
145 |
]. |
409 | 146 |
|
488
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
147 |
(path := OperatingSystem getEnvironment:'STX_PACKAGEPATH') notNil ifTrue:[ |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
148 |
Smalltalk packagePath:(path asCollectionOfSubstringsSeparatedBy:$:). |
680 | 149 |
'smalltalk.rc [info]: setting packagePath from STX_PACKAGEPATH' infoPrintCR. |
488
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
150 |
] ifFalse:[ |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
151 |
"/ |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
152 |
"/ if running in the development environment, |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
153 |
"/ only use the local packages. |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
154 |
"/ |
782 | 155 |
(pathOfSTXExecutable notNil |
156 |
and:[(pathOfSTXExecutable construct:'../../../stx/projects/smalltalk') exists]) ifTrue:[ |
|
679 | 157 |
Smalltalk packagePath removeAll; add:(pathOfSTXExecutable construct:'../../..') pathName. |
680 | 158 |
'smalltalk.rc [info]: setting packagePath for local operation' infoPrintCR. |
781 | 159 |
] ifFalse:[ |
160 |
(pathOfCurrentDir construct:'../../../stx/projects/smalltalk') exists ifTrue:[ |
|
161 |
Smalltalk packagePath removeAll; add:(pathOfCurrentDir construct:'../../..') pathName. |
|
162 |
'smalltalk.rc [info]: setting packagePath for local operation' infoPrintCR. |
|
163 |
] |
|
488
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
164 |
]. |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
165 |
|
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
166 |
"/ |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
167 |
"/ any additional local packages ?. |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
168 |
"/ |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
169 |
'packages' asFilename exists ifTrue:[ |
677 | 170 |
(Smalltalk packagePath includes:'packages' asFilename pathName) ifFalse:[ |
171 |
Smalltalk packagePath addFirst:'packages' asFilename pathName. |
|
172 |
]. |
|
488
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
173 |
]. |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
174 |
]. |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
175 |
|
689 | 176 |
"/ 'systemPath: ' errorPrint. Smalltalk systemPath errorPrintCR. |
177 |
"/ 'packagePath: ' errorPrint. Smalltalk packagePath errorPrintCR. |
|
781 | 178 |
Smalltalk packagePath isEmpty ifTrue:[ |
179 |
'smalltalk.rc [warning]: packagePath is empty' errorPrintCR. |
|
180 |
]. |
|
672 | 181 |
|
409 | 182 |
Smalltalk flushPathCaches. |
86 | 183 |
! |
184 |
||
1276
80b650ffab1c
New option --loadPackage <packageName> - may oocur multiple times
Stefan Vogel <sv@exept.de>
parents:
1248
diff
changeset
|
185 |
"/ look fore one ore more --loadPackage arguments |
80b650ffab1c
New option --loadPackage <packageName> - may oocur multiple times
Stefan Vogel <sv@exept.de>
parents:
1248
diff
changeset
|
186 |
"/ load the packages |
80b650ffab1c
New option --loadPackage <packageName> - may oocur multiple times
Stefan Vogel <sv@exept.de>
parents:
1248
diff
changeset
|
187 |
|args idx| |
80b650ffab1c
New option --loadPackage <packageName> - may oocur multiple times
Stefan Vogel <sv@exept.de>
parents:
1248
diff
changeset
|
188 |
|
80b650ffab1c
New option --loadPackage <packageName> - may oocur multiple times
Stefan Vogel <sv@exept.de>
parents:
1248
diff
changeset
|
189 |
args := Smalltalk commandLineArguments ? #(). |
80b650ffab1c
New option --loadPackage <packageName> - may oocur multiple times
Stefan Vogel <sv@exept.de>
parents:
1248
diff
changeset
|
190 |
[ |
80b650ffab1c
New option --loadPackage <packageName> - may oocur multiple times
Stefan Vogel <sv@exept.de>
parents:
1248
diff
changeset
|
191 |
idx := args indexOf:'-L'. |
80b650ffab1c
New option --loadPackage <packageName> - may oocur multiple times
Stefan Vogel <sv@exept.de>
parents:
1248
diff
changeset
|
192 |
idx == 0 ifTrue:[ |
80b650ffab1c
New option --loadPackage <packageName> - may oocur multiple times
Stefan Vogel <sv@exept.de>
parents:
1248
diff
changeset
|
193 |
idx := args indexOf:'--loadPackage'. |
80b650ffab1c
New option --loadPackage <packageName> - may oocur multiple times
Stefan Vogel <sv@exept.de>
parents:
1248
diff
changeset
|
194 |
]. |
80b650ffab1c
New option --loadPackage <packageName> - may oocur multiple times
Stefan Vogel <sv@exept.de>
parents:
1248
diff
changeset
|
195 |
idx ~~ 0 |
80b650ffab1c
New option --loadPackage <packageName> - may oocur multiple times
Stefan Vogel <sv@exept.de>
parents:
1248
diff
changeset
|
196 |
] whileTrue:[ |
80b650ffab1c
New option --loadPackage <packageName> - may oocur multiple times
Stefan Vogel <sv@exept.de>
parents:
1248
diff
changeset
|
197 |
Smalltalk loadPackage:(args at:idx+1). |
80b650ffab1c
New option --loadPackage <packageName> - may oocur multiple times
Stefan Vogel <sv@exept.de>
parents:
1248
diff
changeset
|
198 |
args removeAtIndex:idx+1; removeAtIndex:idx. |
80b650ffab1c
New option --loadPackage <packageName> - may oocur multiple times
Stefan Vogel <sv@exept.de>
parents:
1248
diff
changeset
|
199 |
]. |
80b650ffab1c
New option --loadPackage <packageName> - may oocur multiple times
Stefan Vogel <sv@exept.de>
parents:
1248
diff
changeset
|
200 |
! |
80b650ffab1c
New option --loadPackage <packageName> - may oocur multiple times
Stefan Vogel <sv@exept.de>
parents:
1248
diff
changeset
|
201 |
|
488
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
202 |
|args buildClasses openDisplay prevCatchSetting| |
86 | 203 |
|
488
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
204 |
args := Smalltalk commandLineArguments ? #(). |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
205 |
|
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
206 |
buildClasses := false. |
126 | 207 |
((args size > 0) and:[args last = '--buildClasses']) ifTrue:[ |
86 | 208 |
'binary' asFilename isDirectory ifFalse:[ |
195 | 209 |
'smalltalk.rc [warning]: no binary directory for classes.' errorPrintCR. |
488
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
210 |
Smalltalk exit. |
86 | 211 |
]. |
488
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
212 |
buildClasses := true. |
432 | 213 |
]. |
214 |
||
8 | 215 |
|
488
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
216 |
"/ check for display-classes being required and compiled into the system; |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
217 |
"/ if not, load the display classes. |
25 | 218 |
"/ |
488
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
219 |
openDisplay := false. |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
220 |
(Smalltalk isHeadless or:[args includes:'--noDisplay']) ifFalse:[ |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
221 |
(Smalltalk at:#DeviceWorkstation) isNil ifTrue:[ |
637 | 222 |
"no view classes compiled into the system. |
488
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
223 |
Minimum smalltalk does only contain libbasic, libcomp and librun. |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
224 |
FileIn view stuff" |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
225 |
|
656 | 226 |
'smalltalk.rc [info]: installing required class libraries...' infoPrintCR. |
488
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
227 |
(Smalltalk isClassLibraryLoaded:'libbasic2') ifFalse:[ |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
228 |
Smalltalk loadPackage:'stx:libbasic2'. |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
229 |
]. |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
230 |
Smalltalk loadPackage:'stx:libview'. |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
231 |
Smalltalk fileInClassLibrary:'XWorkstation' inPackage:'stx:libview'. |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
232 |
OperatingSystem isMSWINDOWSlike ifTrue:[ |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
233 |
Smalltalk fileInClassLibrary:'WinWorkstation' inPackage:'stx:libview'. |
609 | 234 |
]. |
488
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
235 |
]. |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
236 |
openDisplay := true. |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
237 |
]. |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
238 |
|
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
239 |
|
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
240 |
"/ Install patches, once everything has been loaded. |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
241 |
"/ System methods may be overwritten by patches. |
336
5eb44f3e88af
do not output 'no sourceCode' warning messages
Claus Gittinger <cg@exept.de>
parents:
331
diff
changeset
|
242 |
|
1111
a139aac9c633
Print warning on error during fileIn of 'patches'
Stefan Vogel <sv@exept.de>
parents:
1090
diff
changeset
|
243 |
prevCatchSetting := Class catchMethodRedefinitions:false. |
488
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
244 |
(Smalltalk secureFileIn:(Smalltalk commandName asFilename withSuffix:'pch')) ifFalse:[ |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
245 |
Smalltalk isStandAloneApp ifFalse:[ |
1111
a139aac9c633
Print warning on error during fileIn of 'patches'
Stefan Vogel <sv@exept.de>
parents:
1090
diff
changeset
|
246 |
(Smalltalk secureFileIn:'patches') ifFalse:[ |
1112 | 247 |
'smalltalk.rc [warning]: error while filing in ''patches'' - some patches have not been loaded!!' errorPrintCR. |
1111
a139aac9c633
Print warning on error during fileIn of 'patches'
Stefan Vogel <sv@exept.de>
parents:
1090
diff
changeset
|
248 |
]. |
488
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
249 |
]. |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
250 |
]. |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
251 |
Class catchMethodRedefinitions:prevCatchSetting. |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
252 |
|
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
253 |
openDisplay ifTrue:[ |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
254 |
"/ open the graphical display |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
255 |
[ |
1361 | 256 |
'smalltalk.rc [info]: opening display...' infoPrintCR. |
488
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
257 |
Screen openDefaultDisplay:nil. |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
258 |
] on:Screen deviceOpenErrorSignal do:[:ex| |
1112 | 259 |
('smalltalk.rc [warning]: no display connection to: ', ex parameter printString) errorPrintCR. |
260 |
'smalltalk.rc [info]: either set the DISPLAY environment variable,' infoPrintCR. |
|
488
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
261 |
'smalltalk.rc [info]: or start smalltalk with a -display argument.' infoPrintCR. |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
262 |
Smalltalk isStandAloneApp ifFalse:[ |
394
70ecff920548
Fix DISPLAY access for headless servers.
Stefan Vogel <sv@exept.de>
parents:
387
diff
changeset
|
263 |
'' errorPrintCR. |
70ecff920548
Fix DISPLAY access for headless servers.
Stefan Vogel <sv@exept.de>
parents:
387
diff
changeset
|
264 |
'Textmode (enter smalltalk expressions terminated by single exclamation mark;' errorPrintCR. |
70ecff920548
Fix DISPLAY access for headless servers.
Stefan Vogel <sv@exept.de>
parents:
387
diff
changeset
|
265 |
OperatingSystem isUNIXlike ifTrue:[ |
70ecff920548
Fix DISPLAY access for headless servers.
Stefan Vogel <sv@exept.de>
parents:
387
diff
changeset
|
266 |
' CTRL-D to leave line-by-line interpreter.)' errorPrintCR. |
70ecff920548
Fix DISPLAY access for headless servers.
Stefan Vogel <sv@exept.de>
parents:
387
diff
changeset
|
267 |
] ifFalse:[ |
70ecff920548
Fix DISPLAY access for headless servers.
Stefan Vogel <sv@exept.de>
parents:
387
diff
changeset
|
268 |
' CTRL-Z to leave line-by-line interpreter.)' errorPrintCR. |
70ecff920548
Fix DISPLAY access for headless servers.
Stefan Vogel <sv@exept.de>
parents:
387
diff
changeset
|
269 |
]. |
1533
4ac01d754eec
Send #readEvalPrintLoop instead of #readEvalPrint (the latter is gone)
mawalch
parents:
1528
diff
changeset
|
270 |
Smalltalk readEvalPrintLoop. |
355
007bd12bd854
check for source access possible AFTER reading private.rc
Claus Gittinger <cg@exept.de>
parents:
336
diff
changeset
|
271 |
]. |
488
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
272 |
Smalltalk exit |
5 | 273 |
]. |
10 | 274 |
]. |
0 | 275 |
|
25 | 276 |
"/ |
277 |
"/ this makes X-errors be handled immediately (so you see, |
|
278 |
"/ where it occured) but slows down the system soooo muuuucccchhh .. |
|
279 |
"/ if commented out, errors will be reported asynchronously. |
|
280 |
"/ (I enable this, when things go bad during startup) |
|
281 |
"/ |
|
10 | 282 |
"/ Display unBuffered. |
0 | 283 |
|
924 | 284 |
|
488
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
285 |
"/ |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
286 |
"/ lazy loading |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
287 |
"/ (faster fileIn) - this is EXPERIMENTAL. |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
288 |
"/ |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
289 |
"/ - if turned on, an autoload operation will only create methodStubs |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
290 |
"/ (uncompiled) which trap when called the first time. |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
291 |
"/ The bytecode compiler will compile them when first executen. |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
292 |
"/ |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
293 |
"/ - if turned off, an autoload will load & compile the whole class, |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
294 |
"/ which makes autoloading slower, but avoids the initial delays |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
295 |
"/ |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
296 |
"/ This is much like just-in-time compilation, but on a higher level. |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
297 |
"/ If there are any problems with lazy methods, disable the following |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
298 |
"/ and let me (info@exept.de) know what happened. |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
299 |
"/ |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
300 |
Autoload compileLazy:true. |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
301 |
|
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
302 |
"/ |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
303 |
"/ read the abbrev.stc file, extract class names |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
304 |
"/ and install all nonExisting classes as autoloaded |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
305 |
"/ |
609 | 306 |
Class withoutUpdatingChangesDo:[ |
568 | 307 |
|needToReactivate| |
308 |
||
309 |
HistoryManager notNil ifTrue:[ |
|
310 |
needToReactivate := HistoryManager isActive. |
|
311 |
HistoryManager deactivate. |
|
312 |
] ifFalse:[ |
|
313 |
needToReactivate := false |
|
314 |
]. |
|
617
f6afee16b359
Add --quick options to come up without gimmicks
Stefan Vogel <sv@exept.de>
parents:
612
diff
changeset
|
315 |
|
1467
befae5d031b8
--autoload option to get the old behavior;
Claus Gittinger <cg@exept.de>
parents:
1457
diff
changeset
|
316 |
"/ ((Smalltalk commandLineArguments includes:'--quick') |
befae5d031b8
--autoload option to get the old behavior;
Claus Gittinger <cg@exept.de>
parents:
1457
diff
changeset
|
317 |
"/ or:[ (Smalltalk isPlugin) |
befae5d031b8
--autoload option to get the old behavior;
Claus Gittinger <cg@exept.de>
parents:
1457
diff
changeset
|
318 |
"/ or:[ (Smalltalk commandLineArguments includes:'--faststart') |
befae5d031b8
--autoload option to get the old behavior;
Claus Gittinger <cg@exept.de>
parents:
1457
diff
changeset
|
319 |
"/ or:[ (Smalltalk commandLineArguments includes:'--fastStart') |
befae5d031b8
--autoload option to get the old behavior;
Claus Gittinger <cg@exept.de>
parents:
1457
diff
changeset
|
320 |
"/ ]]]) ifFalse: |
befae5d031b8
--autoload option to get the old behavior;
Claus Gittinger <cg@exept.de>
parents:
1457
diff
changeset
|
321 |
(Smalltalk commandLineArguments includes:'--autoload') |
befae5d031b8
--autoload option to get the old behavior;
Claus Gittinger <cg@exept.de>
parents:
1457
diff
changeset
|
322 |
ifTrue: |
befae5d031b8
--autoload option to get the old behavior;
Claus Gittinger <cg@exept.de>
parents:
1457
diff
changeset
|
323 |
[ |
656 | 324 |
'smalltalk.rc [info]: installing autoloaded classes...' infoPrintCR. |
617
f6afee16b359
Add --quick options to come up without gimmicks
Stefan Vogel <sv@exept.de>
parents:
612
diff
changeset
|
325 |
Smalltalk installAutoloadedClasses. |
f6afee16b359
Add --quick options to come up without gimmicks
Stefan Vogel <sv@exept.de>
parents:
612
diff
changeset
|
326 |
]. |
568 | 327 |
needToReactivate ifTrue:[HistoryManager activate]. |
328 |
]. |
|
488
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
329 |
|
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
330 |
buildClasses ifTrue:[ |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
331 |
"/ |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
332 |
"/ load all lazy classes |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
333 |
"/ |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
334 |
Autoload subclasses do:[:aClass | |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
335 |
Autoload autoloadFailedSignal handle:[:ex | |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
336 |
'smalltalk.rc [warning]: autoload failed' errorPrintCR. |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
337 |
ex return. |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
338 |
] do:[ |
656 | 339 |
'smalltalk.rc [info]: loading ' infoPrint. aClass name infoPrint. '...' infoPrintCR. |
488
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
340 |
aClass autoload. |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
341 |
] |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
342 |
]. |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
343 |
|
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
344 |
"/ |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
345 |
"/ binary save all classes |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
346 |
"/ |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
347 |
Autoload loadedClasses do:[:cls | |
656 | 348 |
'smalltalk.rc [info]: saving binary of ' infoPrint. cls name infoPrint. '...' infoPrintCR. |
488
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
349 |
cls binaryFileOut. |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
350 |
OperatingSystem executeCommand:'mv *.cls binary'. |
1346 | 351 |
]. |
488
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
352 |
Smalltalk exit |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
353 |
]. |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
354 |
! |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
355 |
|
25 | 356 |
"/ |
686 | 357 |
"/ Memory settings. NOTE that all these settings may be overwritten by |
358 |
"/ settings.stx which stores the Launcher's settings. |
|
359 |
||
360 |
"/ |
|
25 | 361 |
"/ this starts the incremental GC earlier |
362 |
"/ (default is 500000) |
|
363 |
"/ the number given is the number of bytes which have to be allocated |
|
364 |
"/ since the last GC, to start the incremental GC running. |
|
365 |
"/ (see ObjectMemory>>documentation) |
|
366 |
"/ Claus: I moved this to the private.rc file |
|
367 |
"/ |
|
609 | 368 |
"/ ObjectMemory incrementalGCLimit:100000. |
0 | 369 |
|
25 | 370 |
"/ |
371 |
"/ this starts the incremental GC when freeSpace drops below a limit |
|
372 |
"/ (default is nil - i.e. dont look at freeSpace) |
|
373 |
"/ (see ObjectMemory>>documentation) |
|
374 |
"/ Claus: I moved this to the private.rc file |
|
375 |
"/ |
|
609 | 376 |
"/ ObjectMemory freeSpaceGCLimit:300000. |
16 | 377 |
|
322 | 378 |
"/ experimental: try to always keep some bytes in the pocket |
379 |
"/ this changes the memory policy, to start the background collector whenever |
|
609 | 380 |
"/ freespace drops below 250k or 500k have been allocated since the last GC. |
322 | 381 |
"/ AND to allocate more memory, if (after the collect) less than 1Mb is free. |
382 |
"/ Doing so makes the system behave better if lots of memory is required |
|
383 |
"/ for short periods of time, since it prepares itself for that situation |
|
384 |
"/ during idle time. (I often walk around in the fileBrowser, loading big |
|
385 |
"/ files like XWorkstation.st or SystemBrowser.st ....) |
|
386 |
||
1341
9a6ea7ab9585
changed settings file order (private first)
Claus Gittinger <cg@exept.de>
parents:
1316
diff
changeset
|
387 |
ObjectMemory freeSpaceGCAmount:(1024*1024). |
1362 | 388 |
ObjectMemory freeSpaceGCLimit:(4*1024*1024). |
389 |
"/ ObjectMemory incrementalGCLimit:(4*1024*1024). |
|
390 |
ObjectMemory oldSpaceIncrement:(4*1024*1024). |
|
457 | 391 |
ObjectMemory oldSpaceCompressLimit:0. "/ temporary kludge |
609 | 392 |
ObjectMemory startBackgroundCollectorAt:5. |
393 |
ObjectMemory startBackgroundFinalizationAt:5. |
|
566 | 394 |
|
395 |
"/ this limits the amount of memory which is allocated for oldSpace |
|
396 |
"/ (for example to prevent ST/X from taking memory from other processes) |
|
397 |
"/ The absolute maximum is a builtIn constant and OS specific. |
|
398 |
||
399 |
"/ ObjectMemory maxOldSpace:1024*1024*128. |
|
1297 | 400 |
"/ ObjectMemory maxOldSpace:1024*1024*512. |
1341
9a6ea7ab9585
changed settings file order (private first)
Claus Gittinger <cg@exept.de>
parents:
1316
diff
changeset
|
401 |
|
1298 | 402 |
ExternalBytes sizeofPointer == 8 ifTrue:[ |
1601
60b3ed3fb216
changed the memory parameters for big systems.
Claus Gittinger <cg@exept.de>
parents:
1589
diff
changeset
|
403 |
|ram mega maxUsedMb| |
60b3ed3fb216
changed the memory parameters for big systems.
Claus Gittinger <cg@exept.de>
parents:
1589
diff
changeset
|
404 |
|
60b3ed3fb216
changed the memory parameters for big systems.
Claus Gittinger <cg@exept.de>
parents:
1589
diff
changeset
|
405 |
"/ on a 64bit system, |
60b3ed3fb216
changed the memory parameters for big systems.
Claus Gittinger <cg@exept.de>
parents:
1589
diff
changeset
|
406 |
"/ limit to 2/3 of the physical ram to prevent a runaway program from thrashing the system. |
60b3ed3fb216
changed the memory parameters for big systems.
Claus Gittinger <cg@exept.de>
parents:
1589
diff
changeset
|
407 |
"/ However, not less than 8Gb. |
1298 | 408 |
"/ if you really need more, change that line |
1601
60b3ed3fb216
changed the memory parameters for big systems.
Claus Gittinger <cg@exept.de>
parents:
1589
diff
changeset
|
409 |
(ram := OperatingSystem getSystemInfo at:#physicalRam ifAbsent:nil) notNil ifTrue:[ |
1602 | 410 |
mega := ram / (1024 * 1024). |
411 |
maxUsedMb := mega * 2 // 3. |
|
1601
60b3ed3fb216
changed the memory parameters for big systems.
Claus Gittinger <cg@exept.de>
parents:
1589
diff
changeset
|
412 |
maxUsedMb := maxUsedMb max:(8*1024). |
1614 | 413 |
('setting maxOld to %1 Mb' bindWith:(maxUsedMb)) infoPrintCR. |
1602 | 414 |
ObjectMemory maxOldSpace:(maxUsedMb*1024*1024). |
1601
60b3ed3fb216
changed the memory parameters for big systems.
Claus Gittinger <cg@exept.de>
parents:
1589
diff
changeset
|
415 |
]. |
60b3ed3fb216
changed the memory parameters for big systems.
Claus Gittinger <cg@exept.de>
parents:
1589
diff
changeset
|
416 |
"/ eg. to allow up to 40Gb of oldSpace, uncomment: |
1419 | 417 |
"/ ObjectMemory maxOldSpace:40*1024*1024*1024. |
1614 | 418 |
"/ ObjectMemory oldSpaceIncrement:(128*1024*1024). |
419 |
"/ ObjectMemory incrementalGCLimit:(64*1024*1024). |
|
1298 | 420 |
]. |
1297 | 421 |
|
1341
9a6ea7ab9585
changed settings file order (private first)
Claus Gittinger <cg@exept.de>
parents:
1316
diff
changeset
|
422 |
"/ experimental: configure the memory manager to quickly increase |
9a6ea7ab9585
changed settings file order (private first)
Claus Gittinger <cg@exept.de>
parents:
1316
diff
changeset
|
423 |
"/ its oldSpace, as long as it stays below 256Mb |
9a6ea7ab9585
changed settings file order (private first)
Claus Gittinger <cg@exept.de>
parents:
1316
diff
changeset
|
424 |
"/ (i.e. do not enter a blocking mark&sweep or compress, |
9a6ea7ab9585
changed settings file order (private first)
Claus Gittinger <cg@exept.de>
parents:
1316
diff
changeset
|
425 |
"/ but go straight ahead increasing the oldSpace). |
9a6ea7ab9585
changed settings file order (private first)
Claus Gittinger <cg@exept.de>
parents:
1316
diff
changeset
|
426 |
"/ Above that, behave as usual, i.e. try a GC first, |
9a6ea7ab9585
changed settings file order (private first)
Claus Gittinger <cg@exept.de>
parents:
1316
diff
changeset
|
427 |
"/ then increase the oldSpace size if that did not help. |
9a6ea7ab9585
changed settings file order (private first)
Claus Gittinger <cg@exept.de>
parents:
1316
diff
changeset
|
428 |
"/ If you have a machine with lots of (real) memory, you may want to |
9a6ea7ab9585
changed settings file order (private first)
Claus Gittinger <cg@exept.de>
parents:
1316
diff
changeset
|
429 |
"/ increase the number. |
9a6ea7ab9585
changed settings file order (private first)
Claus Gittinger <cg@exept.de>
parents:
1316
diff
changeset
|
430 |
"/ |
1614 | 431 |
ExternalBytes sizeofPointer == 8 ifTrue:[ |
432 |
ObjectMemory fastMoreOldSpaceLimit:1024*1024*1024. |
|
433 |
] ifFalse:[ |
|
434 |
ObjectMemory fastMoreOldSpaceLimit:256*1024*1024. |
|
435 |
]. |
|
1341
9a6ea7ab9585
changed settings file order (private first)
Claus Gittinger <cg@exept.de>
parents:
1316
diff
changeset
|
436 |
ObjectMemory fastMoreOldSpaceAllocation:true. |
9a6ea7ab9585
changed settings file order (private first)
Claus Gittinger <cg@exept.de>
parents:
1316
diff
changeset
|
437 |
|
1419 | 438 |
"/ this changes the size of the eden generation, where objects |
439 |
"/ are initially allocated. Making it bigger may increase pause |
|
440 |
"/ times a bit, if many objects survive, but reduces the overall overhead |
|
441 |
"/ For server type applications (request-response-loops such as in webServers), |
|
442 |
"/ it is a good idea to make it big enough to handle a request-cycles temporary |
|
443 |
"/ data |
|
444 |
||
1528
1637fd500f17
larger newSpace for 64bit systems.
Claus Gittinger <cg@exept.de>
parents:
1500
diff
changeset
|
445 |
"/ for server applications: |
1637fd500f17
larger newSpace for 64bit systems.
Claus Gittinger <cg@exept.de>
parents:
1500
diff
changeset
|
446 |
"/ use larger newSpace, leading to possibly slightly longer worst case pause times, |
1341
9a6ea7ab9585
changed settings file order (private first)
Claus Gittinger <cg@exept.de>
parents:
1316
diff
changeset
|
447 |
"/ but less overhead overall. |
1528
1637fd500f17
larger newSpace for 64bit systems.
Claus Gittinger <cg@exept.de>
parents:
1500
diff
changeset
|
448 |
"/ I.e. for webservers, protocol servers etc, where blocking times |
1341
9a6ea7ab9585
changed settings file order (private first)
Claus Gittinger <cg@exept.de>
parents:
1316
diff
changeset
|
449 |
"/ above 30ms are acceptable (also works for interactive programming) |
9a6ea7ab9585
changed settings file order (private first)
Claus Gittinger <cg@exept.de>
parents:
1316
diff
changeset
|
450 |
|
1528
1637fd500f17
larger newSpace for 64bit systems.
Claus Gittinger <cg@exept.de>
parents:
1500
diff
changeset
|
451 |
ExternalAddress pointerSize == 8 ifTrue:[ |
1637fd500f17
larger newSpace for 64bit systems.
Claus Gittinger <cg@exept.de>
parents:
1500
diff
changeset
|
452 |
ObjectMemory newSpaceSize:(32*1024*1024). |
1637fd500f17
larger newSpace for 64bit systems.
Claus Gittinger <cg@exept.de>
parents:
1500
diff
changeset
|
453 |
] ifFalse:[ |
1637fd500f17
larger newSpace for 64bit systems.
Claus Gittinger <cg@exept.de>
parents:
1500
diff
changeset
|
454 |
ObjectMemory newSpaceSize:(16*1024*1024). |
1637fd500f17
larger newSpace for 64bit systems.
Claus Gittinger <cg@exept.de>
parents:
1500
diff
changeset
|
455 |
]. |
1637fd500f17
larger newSpace for 64bit systems.
Claus Gittinger <cg@exept.de>
parents:
1500
diff
changeset
|
456 |
|
1362 | 457 |
ObjectMemory incrementalGCLimit:(64*1024*1024). |
1341
9a6ea7ab9585
changed settings file order (private first)
Claus Gittinger <cg@exept.de>
parents:
1316
diff
changeset
|
458 |
|
9a6ea7ab9585
changed settings file order (private first)
Claus Gittinger <cg@exept.de>
parents:
1316
diff
changeset
|
459 |
"/ |
322 | 460 |
"/ run the background collector at a dynamic priority - it will |
461 |
"/ now always get a chance to make some progress ... |
|
1341
9a6ea7ab9585
changed settings file order (private first)
Claus Gittinger <cg@exept.de>
parents:
1316
diff
changeset
|
462 |
"/ |
322 | 463 |
Smalltalk addStartBlock:[ |
1316 | 464 |
"/ 'smalltalk.rc [info]: start timeSlicing...' infoPrintCR. |
322 | 465 |
Processor startTimeSlicing. |
466 |
Processor supportDynamicPriorities:true. |
|
467 |
ObjectMemory backgroundCollectProcess priorityRange:(4 to:9). |
|
468 |
ObjectMemory backgroundFinalizationProcess priorityRange:(4 to:9). |
|
469 |
]. |
|
470 |
! |
|
471 |
||
488
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
472 |
"/ another experimental (and a secret for now, since I don't want |
322 | 473 |
"/ you to play with those ;-) |
474 |
"/ For now, this is experimental. Once the best numbers |
|
475 |
"/ have been found, I'll hardwire them and document it ... |
|
476 |
||
686 | 477 |
|tenureParams| |
426
74cc4af22873
install autoloaded classes BEFORE doing display.rc/host.rc
Claus Gittinger <cg@exept.de>
parents:
424
diff
changeset
|
478 |
|
322 | 479 |
ObjectMemory newSpaceSize > (500*1024) ifTrue:[ |
686 | 480 |
tenureParams := #(nil nil nil nil -16 -4 -2 -2 0 0 16 nil) copy. |
322 | 481 |
] ifFalse:[ |
482 |
"/ min max cpy /32 /16 /8 /4 /2 /4 /8 /16 /32 " |
|
483 |
"/ |
|
484 |
"/ slow tenure - keeps objects longer in newSpace, |
|
485 |
"/ producing more scavenge overhead, but releasing IGC somewhat |
|
486 |
"/ |
|
686 | 487 |
"/ tenureParams := #(nil nil nil -100 -8 -4 -1 1 2 4 8 16 nil) copy. |
488 |
"/ tenureParams := #(nil nil nil nil -16 -4 0 0 0 4 16 nil) copy. |
|
322 | 489 |
|
490 |
"/ |
|
491 |
"/ fast tenure - moves objects earlier into oldSpace, |
|
492 |
"/ releasing newSpace collector; however, the oldSpace IGC |
|
493 |
"/ may have more work to do. |
|
494 |
"/ |
|
686 | 495 |
tenureParams := #(nil nil nil nil -20 -8 -3 -1 -1 1 16 nil) copy. |
322 | 496 |
]. |
686 | 497 |
ObjectMemory tenureParameters:tenureParams. |
488
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
498 |
! |
0 | 499 |
|
25 | 500 |
"/ |
358
14a45495e3d8
autoloaded classes must be read after the host.rc file;
Claus Gittinger <cg@exept.de>
parents:
355
diff
changeset
|
501 |
"/ this defines stuff relating to the host we are running on |
14a45495e3d8
autoloaded classes must be read after the host.rc file;
Claus Gittinger <cg@exept.de>
parents:
355
diff
changeset
|
502 |
"/ |
656 | 503 |
"/ 'smalltalk.rc [info]: reading ''host.rc''...' infoPrintCR. |
358
14a45495e3d8
autoloaded classes must be read after the host.rc file;
Claus Gittinger <cg@exept.de>
parents:
355
diff
changeset
|
504 |
Smalltalk fileIn:'host.rc'. |
14a45495e3d8
autoloaded classes must be read after the host.rc file;
Claus Gittinger <cg@exept.de>
parents:
355
diff
changeset
|
505 |
|
14a45495e3d8
autoloaded classes must be read after the host.rc file;
Claus Gittinger <cg@exept.de>
parents:
355
diff
changeset
|
506 |
"/ |
25 | 507 |
"/ this handles all variant display stuff |
508 |
"/ (i.e. things which might change, when DISPLAY is set different) |
|
331
a0be330a1f43
moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents:
325
diff
changeset
|
509 |
"/ Notice, that the display may be different from the host we run on; |
a0be330a1f43
moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents:
325
diff
changeset
|
510 |
"/ Host specific things are configured in host.rc. |
25 | 511 |
"/ |
336
5eb44f3e88af
do not output 'no sourceCode' warning messages
Claus Gittinger <cg@exept.de>
parents:
331
diff
changeset
|
512 |
Display notNil ifTrue:[ |
656 | 513 |
"/ 'smalltalk.rc [info]: reading ''display.rc''...' infoPrintCR. |
336
5eb44f3e88af
do not output 'no sourceCode' warning messages
Claus Gittinger <cg@exept.de>
parents:
331
diff
changeset
|
514 |
Smalltalk fileIn:'display.rc'. |
5eb44f3e88af
do not output 'no sourceCode' warning messages
Claus Gittinger <cg@exept.de>
parents:
331
diff
changeset
|
515 |
]. |
0 | 516 |
|
25 | 517 |
"/ |
143
71dc5ec7ef26
Renamed NewLauncher to Launcher.
Stefan Vogel <sv@exept.de>
parents:
133
diff
changeset
|
518 |
"/ Ask user to accept Licence. |
71dc5ec7ef26
Renamed NewLauncher to Launcher.
Stefan Vogel <sv@exept.de>
parents:
133
diff
changeset
|
519 |
"/ exit, if rejected. |
324
e8eb27061a3f
llow for licenceBox to be suppressed
Claus Gittinger <cg@exept.de>
parents:
322
diff
changeset
|
520 |
"/ |
152 | 521 |
"/ You may find this annoying - but lawers say: "this is a must ..." ;-) |
522 |
"/ (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
|
523 |
"/ 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
|
524 |
"/ 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
|
525 |
"/ 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
|
526 |
"/ read the code below). |
220 | 527 |
|
324
e8eb27061a3f
llow for licenceBox to be suppressed
Claus Gittinger <cg@exept.de>
parents:
322
diff
changeset
|
528 |
"/ |
325 | 529 |
"/ WARNING: read the licence text before you: |
530 |
"/ - disable the code below, |
|
531 |
"/ - or start stx with a suppress argument. |
|
324
e8eb27061a3f
llow for licenceBox to be suppressed
Claus Gittinger <cg@exept.de>
parents:
322
diff
changeset
|
532 |
"/ |
250 | 533 |
|
678 | 534 |
(Smalltalk isStandAloneApp not |
686 | 535 |
and:[Smalltalk isPlugin not |
536 |
and:[Display notNil |
|
678 | 537 |
]]) ifTrue:[ |
617
f6afee16b359
Add --quick options to come up without gimmicks
Stefan Vogel <sv@exept.de>
parents:
612
diff
changeset
|
538 |
((Smalltalk commandLineArguments includes:'--noLicenceBox') |
663 | 539 |
or:[(Smalltalk commandLineArguments includes:'--quick') |
540 |
or:[(Smalltalk commandLineArguments includes:'--faststart') |
|
541 |
or:[(Smalltalk commandLineArguments includes:'--fastStart') |
|
678 | 542 |
]]]) ifFalse:[ |
488
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
543 |
Smalltalk addStartBlock:[ |
656 | 544 |
'smalltalk.rc [info]: show licence conditions...' infoPrintCR. |
488
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
545 |
LicenceBox autoload. |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
546 |
LicenceBox licenceRejectSignal handle:[:ex| |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
547 |
Smalltalk exit |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
548 |
] do:[ |
1358
7ea72a25a3d6
exitOnLastClose disabled for licenseBox
Claus Gittinger <cg@exept.de>
parents:
1346
diff
changeset
|
549 |
Display exitOnLastClose:false. |
656 | 550 |
(LicenceBox open) ifFalse:[ |
551 |
'smalltalk.rc [info]: licence conditions not accepted.' infoPrintCR. |
|
552 |
Smalltalk exit |
|
553 |
]. |
|
687 | 554 |
Class withoutUpdatingChangesDo:[ |
555 |
Smalltalk removeClass:LicenceBox. |
|
556 |
]. |
|
488
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
557 |
]. |
336
5eb44f3e88af
do not output 'no sourceCode' warning messages
Claus Gittinger <cg@exept.de>
parents:
331
diff
changeset
|
558 |
] |
324
e8eb27061a3f
llow for licenceBox to be suppressed
Claus Gittinger <cg@exept.de>
parents:
322
diff
changeset
|
559 |
] |
143
71dc5ec7ef26
Renamed NewLauncher to Launcher.
Stefan Vogel <sv@exept.de>
parents:
133
diff
changeset
|
560 |
]. |
358
14a45495e3d8
autoloaded classes must be read after the host.rc file;
Claus Gittinger <cg@exept.de>
parents:
355
diff
changeset
|
561 |
! |
14a45495e3d8
autoloaded classes must be read after the host.rc file;
Claus Gittinger <cg@exept.de>
parents:
355
diff
changeset
|
562 |
|
723 | 563 |
|cls| |
358
14a45495e3d8
autoloaded classes must be read after the host.rc file;
Claus Gittinger <cg@exept.de>
parents:
355
diff
changeset
|
564 |
"/ |
14a45495e3d8
autoloaded classes must be read after the host.rc file;
Claus Gittinger <cg@exept.de>
parents:
355
diff
changeset
|
565 |
"/ some ST80 name aliases |
14a45495e3d8
autoloaded classes must be read after the host.rc file;
Claus Gittinger <cg@exept.de>
parents:
355
diff
changeset
|
566 |
"/ (actually, much more is needed - this is just a start ...) |
14a45495e3d8
autoloaded classes must be read after the host.rc file;
Claus Gittinger <cg@exept.de>
parents:
355
diff
changeset
|
567 |
"/ |
14a45495e3d8
autoloaded classes must be read after the host.rc file;
Claus Gittinger <cg@exept.de>
parents:
355
diff
changeset
|
568 |
(cls := Smalltalk at:#StandardSystemView) notNil ifTrue:[ |
1589 | 569 |
Smalltalk at:#ScheduledWindow put:cls. |
570 |
Smalltalk at:#SystemWindow put:cls. |
|
358
14a45495e3d8
autoloaded classes must be read after the host.rc file;
Claus Gittinger <cg@exept.de>
parents:
355
diff
changeset
|
571 |
]. |
14a45495e3d8
autoloaded classes must be read after the host.rc file;
Claus Gittinger <cg@exept.de>
parents:
355
diff
changeset
|
572 |
(cls := Smalltalk at:#Socket) notNil ifTrue:[ |
14a45495e3d8
autoloaded classes must be read after the host.rc file;
Claus Gittinger <cg@exept.de>
parents:
355
diff
changeset
|
573 |
Smalltalk at:#UnixSocketAccessor put:cls. |
14a45495e3d8
autoloaded classes must be read after the host.rc file;
Claus Gittinger <cg@exept.de>
parents:
355
diff
changeset
|
574 |
Smalltalk at:#SocketAccessor put:cls. |
14a45495e3d8
autoloaded classes must be read after the host.rc file;
Claus Gittinger <cg@exept.de>
parents:
355
diff
changeset
|
575 |
Smalltalk at:#SocketAccessorByAddress put:cls. |
14a45495e3d8
autoloaded classes must be read after the host.rc file;
Claus Gittinger <cg@exept.de>
parents:
355
diff
changeset
|
576 |
]. |
14a45495e3d8
autoloaded classes must be read after the host.rc file;
Claus Gittinger <cg@exept.de>
parents:
355
diff
changeset
|
577 |
Smalltalk at:#BlockClosure put:Block. |
14a45495e3d8
autoloaded classes must be read after the host.rc file;
Claus Gittinger <cg@exept.de>
parents:
355
diff
changeset
|
578 |
Smalltalk at:#CompiledMethod put:Method. |
14a45495e3d8
autoloaded classes must be read after the host.rc file;
Claus Gittinger <cg@exept.de>
parents:
355
diff
changeset
|
579 |
(cls := Smalltalk at:#DialogBox) notNil ifTrue:[ |
14a45495e3d8
autoloaded classes must be read after the host.rc file;
Claus Gittinger <cg@exept.de>
parents:
355
diff
changeset
|
580 |
Smalltalk at:#Dialog put:cls. |
14a45495e3d8
autoloaded classes must be read after the host.rc file;
Claus Gittinger <cg@exept.de>
parents:
355
diff
changeset
|
581 |
Smalltalk at:#DialogView put:cls. |
397 | 582 |
Smalltalk at:#FillInTheBlank put:cls. |
358
14a45495e3d8
autoloaded classes must be read after the host.rc file;
Claus Gittinger <cg@exept.de>
parents:
355
diff
changeset
|
583 |
]. |
14a45495e3d8
autoloaded classes must be read after the host.rc file;
Claus Gittinger <cg@exept.de>
parents:
355
diff
changeset
|
584 |
Smalltalk at:#ByteString put:String. |
14a45495e3d8
autoloaded classes must be read after the host.rc file;
Claus Gittinger <cg@exept.de>
parents:
355
diff
changeset
|
585 |
Smalltalk at:#ByteSymbol put:Symbol. |
14a45495e3d8
autoloaded classes must be read after the host.rc file;
Claus Gittinger <cg@exept.de>
parents:
355
diff
changeset
|
586 |
Smalltalk at:#ByteEncodedString put:String. |
14a45495e3d8
autoloaded classes must be read after the host.rc file;
Claus Gittinger <cg@exept.de>
parents:
355
diff
changeset
|
587 |
Smalltalk at:#Console put:Stderr. |
14a45495e3d8
autoloaded classes must be read after the host.rc file;
Claus Gittinger <cg@exept.de>
parents:
355
diff
changeset
|
588 |
Smalltalk at:#HandlerList put:HandlerCollection. |
14a45495e3d8
autoloaded classes must be read after the host.rc file;
Claus Gittinger <cg@exept.de>
parents:
355
diff
changeset
|
589 |
Smalltalk at:#SignalCollection put:SignalSet. |
424
4b6de7399a42
ProgrsssWidgetSpec alias (VW compat)
Claus Gittinger <cg@exept.de>
parents:
416
diff
changeset
|
590 |
(cls := Smalltalk at:#ProgressIndicatorSpec) notNil ifTrue:[ |
4b6de7399a42
ProgrsssWidgetSpec alias (VW compat)
Claus Gittinger <cg@exept.de>
parents:
416
diff
changeset
|
591 |
Smalltalk at:#ProgressWidgetSpec put:cls. |
4b6de7399a42
ProgrsssWidgetSpec alias (VW compat)
Claus Gittinger <cg@exept.de>
parents:
416
diff
changeset
|
592 |
]. |
428 | 593 |
(cls := Smalltalk at:#ProgressIndicator) notNil ifTrue:[ |
594 |
Smalltalk at:#ProgressWidgetView put:cls. |
|
595 |
]. |
|
358
14a45495e3d8
autoloaded classes must be read after the host.rc file;
Claus Gittinger <cg@exept.de>
parents:
355
diff
changeset
|
596 |
|
14a45495e3d8
autoloaded classes must be read after the host.rc file;
Claus Gittinger <cg@exept.de>
parents:
355
diff
changeset
|
597 |
"/ FileDirectory notNil ifTrue:[ |
14a45495e3d8
autoloaded classes must be read after the host.rc file;
Claus Gittinger <cg@exept.de>
parents:
355
diff
changeset
|
598 |
"/ Smalltalk at:#Disk put:(Filename rootDirectory) |
14a45495e3d8
autoloaded classes must be read after the host.rc file;
Claus Gittinger <cg@exept.de>
parents:
355
diff
changeset
|
599 |
"/ ]. |
14a45495e3d8
autoloaded classes must be read after the host.rc file;
Claus Gittinger <cg@exept.de>
parents:
355
diff
changeset
|
600 |
|
488
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
601 |
Screen notNil ifTrue:[ |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
602 |
Smalltalk at:#Window put:Screen. |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
603 |
Smalltalk at:#Sensor put:Screen default. |
358
14a45495e3d8
autoloaded classes must be read after the host.rc file;
Claus Gittinger <cg@exept.de>
parents:
355
diff
changeset
|
604 |
]. |
14a45495e3d8
autoloaded classes must be read after the host.rc file;
Claus Gittinger <cg@exept.de>
parents:
355
diff
changeset
|
605 |
|
14a45495e3d8
autoloaded classes must be read after the host.rc file;
Claus Gittinger <cg@exept.de>
parents:
355
diff
changeset
|
606 |
"/ |
14a45495e3d8
autoloaded classes must be read after the host.rc file;
Claus Gittinger <cg@exept.de>
parents:
355
diff
changeset
|
607 |
"/ ST/X has (currently) no Double, but Float is what ST-80's Double is ... |
14a45495e3d8
autoloaded classes must be read after the host.rc file;
Claus Gittinger <cg@exept.de>
parents:
355
diff
changeset
|
608 |
"/ |
14a45495e3d8
autoloaded classes must be read after the host.rc file;
Claus Gittinger <cg@exept.de>
parents:
355
diff
changeset
|
609 |
Smalltalk at:#Double put:Float. |
14a45495e3d8
autoloaded classes must be read after the host.rc file;
Claus Gittinger <cg@exept.de>
parents:
355
diff
changeset
|
610 |
|
14a45495e3d8
autoloaded classes must be read after the host.rc file;
Claus Gittinger <cg@exept.de>
parents:
355
diff
changeset
|
611 |
Smalltalk at:#Browser put:SystemBrowser. |
1419 | 612 |
|
613 |
"/ |
|
614 |
"/ some ANSI name aliases |
|
615 |
"/ |
|
616 |
(Smalltalk includesKey:#DateAndTime) ifFalse:[ |
|
617 |
Smalltalk at:#DateAndTime put:Timestamp. |
|
618 |
]. |
|
619 |
(Smalltalk includesKey:#Duration) ifFalse:[ |
|
620 |
Smalltalk at:#Duration put:TimeDuration. |
|
621 |
]. |
|
622 |
||
358
14a45495e3d8
autoloaded classes must be read after the host.rc file;
Claus Gittinger <cg@exept.de>
parents:
355
diff
changeset
|
623 |
! |
686 | 624 |
|file| |
143
71dc5ec7ef26
Renamed NewLauncher to Launcher.
Stefan Vogel <sv@exept.de>
parents:
133
diff
changeset
|
625 |
|
71dc5ec7ef26
Renamed NewLauncher to Launcher.
Stefan Vogel <sv@exept.de>
parents:
133
diff
changeset
|
626 |
"/ |
41 | 627 |
"/ read private (per user) stuff |
25 | 628 |
"/ |
632
6cb9fe000c20
-F arg to allow other than private.rc
Claus Gittinger <cg@exept.de>
parents:
617
diff
changeset
|
629 |
(Smalltalk commandLine includes:'-F') ifTrue:[ |
1500 | 630 |
|idx| |
632
6cb9fe000c20
-F arg to allow other than private.rc
Claus Gittinger <cg@exept.de>
parents:
617
diff
changeset
|
631 |
|
6cb9fe000c20
-F arg to allow other than private.rc
Claus Gittinger <cg@exept.de>
parents:
617
diff
changeset
|
632 |
idx := Smalltalk commandLine indexOf:'-F'. |
6cb9fe000c20
-F arg to allow other than private.rc
Claus Gittinger <cg@exept.de>
parents:
617
diff
changeset
|
633 |
file := Smalltalk commandLine at:idx + 1. |
6cb9fe000c20
-F arg to allow other than private.rc
Claus Gittinger <cg@exept.de>
parents:
617
diff
changeset
|
634 |
] ifFalse:[ |
686 | 635 |
file := 'private.rc'. |
632
6cb9fe000c20
-F arg to allow other than private.rc
Claus Gittinger <cg@exept.de>
parents:
617
diff
changeset
|
636 |
]. |
686 | 637 |
('smalltalk.rc [info]: reading ''' , file , '''...') infoPrintCR. |
638 |
Smalltalk fileIn:file. |
|
1246
357edb85942f
- settings reading improved - searches also ~/.smalltalk/settings.stx
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1112
diff
changeset
|
639 |
! |
357edb85942f
- settings reading improved - searches also ~/.smalltalk/settings.stx
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1112
diff
changeset
|
640 |
|
357edb85942f
- settings reading improved - searches also ~/.smalltalk/settings.stx
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1112
diff
changeset
|
641 |
"JV@2012-05-03: Search system path for rc.d directories, collect all *.rc files |
357edb85942f
- settings reading improved - searches also ~/.smalltalk/settings.stx
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1112
diff
changeset
|
642 |
and then file them in a lexical order" |
357edb85942f
- settings reading improved - searches also ~/.smalltalk/settings.stx
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1112
diff
changeset
|
643 |
|
357edb85942f
- settings reading improved - searches also ~/.smalltalk/settings.stx
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1112
diff
changeset
|
644 |
| rcDFiles | |
357edb85942f
- settings reading improved - searches also ~/.smalltalk/settings.stx
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1112
diff
changeset
|
645 |
|
357edb85942f
- settings reading improved - searches also ~/.smalltalk/settings.stx
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1112
diff
changeset
|
646 |
rcDFiles := SortedCollection sortBlock:[:a :b|a baseName < b baseName]. |
357edb85942f
- settings reading improved - searches also ~/.smalltalk/settings.stx
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1112
diff
changeset
|
647 |
|
357edb85942f
- settings reading improved - searches also ~/.smalltalk/settings.stx
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1112
diff
changeset
|
648 |
Smalltalk realSystemPath ? #() do:[:syspath| |
357edb85942f
- settings reading improved - searches also ~/.smalltalk/settings.stx
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1112
diff
changeset
|
649 |
| rcD | |
357edb85942f
- settings reading improved - searches also ~/.smalltalk/settings.stx
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1112
diff
changeset
|
650 |
|
357edb85942f
- settings reading improved - searches also ~/.smalltalk/settings.stx
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1112
diff
changeset
|
651 |
rcD := syspath asFilename / 'rc.d'. |
357edb85942f
- settings reading improved - searches also ~/.smalltalk/settings.stx
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1112
diff
changeset
|
652 |
rcD exists ifTrue:[ |
357edb85942f
- settings reading improved - searches also ~/.smalltalk/settings.stx
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1112
diff
changeset
|
653 |
rcD directoryContentsAsFilenames do:[:each| |
357edb85942f
- settings reading improved - searches also ~/.smalltalk/settings.stx
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1112
diff
changeset
|
654 |
each suffix = 'rc' ifTrue:[ rcDFiles add: each] |
357edb85942f
- settings reading improved - searches also ~/.smalltalk/settings.stx
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1112
diff
changeset
|
655 |
]. |
357edb85942f
- settings reading improved - searches also ~/.smalltalk/settings.stx
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1112
diff
changeset
|
656 |
]. |
357edb85942f
- settings reading improved - searches also ~/.smalltalk/settings.stx
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1112
diff
changeset
|
657 |
]. |
357edb85942f
- settings reading improved - searches also ~/.smalltalk/settings.stx
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1112
diff
changeset
|
658 |
|
357edb85942f
- settings reading improved - searches also ~/.smalltalk/settings.stx
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1112
diff
changeset
|
659 |
rcDFiles do:[:each| |
357edb85942f
- settings reading improved - searches also ~/.smalltalk/settings.stx
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1112
diff
changeset
|
660 |
'smalltalk.rc [info]: reading ' infoPrint. |
357edb85942f
- settings reading improved - searches also ~/.smalltalk/settings.stx
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1112
diff
changeset
|
661 |
each baseName infoPrint. |
357edb85942f
- settings reading improved - searches also ~/.smalltalk/settings.stx
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1112
diff
changeset
|
662 |
'...' infoPrint. |
357edb85942f
- settings reading improved - searches also ~/.smalltalk/settings.stx
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1112
diff
changeset
|
663 |
( AbortOperationRequest , TerminateProcessRequest , Parser parseErrorSignal ) handle:[:ex | |
357edb85942f
- settings reading improved - searches also ~/.smalltalk/settings.stx
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1112
diff
changeset
|
664 |
'FAILED: ' errorPrint. |
357edb85942f
- settings reading improved - searches also ~/.smalltalk/settings.stx
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1112
diff
changeset
|
665 |
ex description errorPrintCR. |
357edb85942f
- settings reading improved - searches also ~/.smalltalk/settings.stx
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1112
diff
changeset
|
666 |
ex return. |
357edb85942f
- settings reading improved - searches also ~/.smalltalk/settings.stx
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1112
diff
changeset
|
667 |
] do:[ |
357edb85942f
- settings reading improved - searches also ~/.smalltalk/settings.stx
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1112
diff
changeset
|
668 |
each fileIn. |
357edb85942f
- settings reading improved - searches also ~/.smalltalk/settings.stx
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1112
diff
changeset
|
669 |
'OK' infoPrintCR. |
357edb85942f
- settings reading improved - searches also ~/.smalltalk/settings.stx
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1112
diff
changeset
|
670 |
]. |
357edb85942f
- settings reading improved - searches also ~/.smalltalk/settings.stx
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1112
diff
changeset
|
671 |
]. |
357edb85942f
- settings reading improved - searches also ~/.smalltalk/settings.stx
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1112
diff
changeset
|
672 |
! |
357edb85942f
- settings reading improved - searches also ~/.smalltalk/settings.stx
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1112
diff
changeset
|
673 |
|
488
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
674 |
Screen notNil ifTrue:[ |
441 | 675 |
"/ |
676 |
"/ read saved configuration settings (if any) |
|
677 |
"/ |
|
1364
ab2a726d83e8
Added --no-preferences and --preferences options.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1362
diff
changeset
|
678 |
| idx | |
ab2a726d83e8
Added --no-preferences and --preferences options.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1362
diff
changeset
|
679 |
|
ab2a726d83e8
Added --no-preferences and --preferences options.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1362
diff
changeset
|
680 |
idx := Smalltalk commandLineArguments indexOf: '--no-preferences'. |
ab2a726d83e8
Added --no-preferences and --preferences options.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1362
diff
changeset
|
681 |
idx ~~ 0 ifTrue:[ |
ab2a726d83e8
Added --no-preferences and --preferences options.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1362
diff
changeset
|
682 |
Smalltalk commandLineArguments removeAtIndex: idx. |
ab2a726d83e8
Added --no-preferences and --preferences options.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1362
diff
changeset
|
683 |
] ifFalse:[ |
ab2a726d83e8
Added --no-preferences and --preferences options.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1362
diff
changeset
|
684 |
'smalltalk.rc [info]: reading preferences ' infoPrint. |
1561 | 685 |
Error handle:[:ex | |
686 |
'FAILED: ' errorPrint. |
|
1364
ab2a726d83e8
Added --no-preferences and --preferences options.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1362
diff
changeset
|
687 |
ex description errorPrintCR. |
1561 | 688 |
Smalltalk exit: 1. |
1364
ab2a726d83e8
Added --no-preferences and --preferences options.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1362
diff
changeset
|
689 |
] do:[ |
1561 | 690 |
( AbortOperationRequest , TerminateProcessRequest , Parser parseErrorSignal ) handle:[:ex | |
691 |
'FAILED: ' errorPrint. |
|
692 |
ex description errorPrintCR. |
|
693 |
ex return. |
|
694 |
] do:[ |
|
695 |
UserPreferences readSettingsFile. |
|
1364
ab2a726d83e8
Added --no-preferences and --preferences options.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1362
diff
changeset
|
696 |
]. |
1246
357edb85942f
- settings reading improved - searches also ~/.smalltalk/settings.stx
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1112
diff
changeset
|
697 |
]. |
357edb85942f
- settings reading improved - searches also ~/.smalltalk/settings.stx
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1112
diff
changeset
|
698 |
]. |
933 | 699 |
]. |
355
007bd12bd854
check for source access possible AFTER reading private.rc
Claus Gittinger <cg@exept.de>
parents:
336
diff
changeset
|
700 |
! |
007bd12bd854
check for source access possible AFTER reading private.rc
Claus Gittinger <cg@exept.de>
parents:
336
diff
changeset
|
701 |
|
1500 | 702 |
"/ if there is a super-private.rc file in the workspaceDirectory, |
703 |
"/ file that in as well. |
|
704 |
|file| |
|
705 |
||
706 |
(UserPreferences current workspaceDirectory notNil |
|
707 |
and:[ (file := UserPreferences current workspaceDirectory asFilename / 'private.rc') exists ]) |
|
708 |
ifTrue:[ |
|
709 |
file := file pathName. |
|
710 |
('smalltalk.rc [info]: reading ''' , file , '''...') infoPrintCR. |
|
711 |
Smalltalk fileIn:file. |
|
712 |
]. |
|
713 |
! |
|
714 |
||
355
007bd12bd854
check for source access possible AFTER reading private.rc
Claus Gittinger <cg@exept.de>
parents:
336
diff
changeset
|
715 |
"/ |
007bd12bd854
check for source access possible AFTER reading private.rc
Claus Gittinger <cg@exept.de>
parents:
336
diff
changeset
|
716 |
"/ just a quick check, if this ST/X installation seems to |
007bd12bd854
check for source access possible AFTER reading private.rc
Claus Gittinger <cg@exept.de>
parents:
336
diff
changeset
|
717 |
"/ be halfway complete (it happened to some people, that |
007bd12bd854
check for source access possible AFTER reading private.rc
Claus Gittinger <cg@exept.de>
parents:
336
diff
changeset
|
718 |
"/ their source/resource directories were not installed) |
609 | 719 |
"/ - better to warn early ... |
355
007bd12bd854
check for source access possible AFTER reading private.rc
Claus Gittinger <cg@exept.de>
parents:
336
diff
changeset
|
720 |
"/ |
007bd12bd854
check for source access possible AFTER reading private.rc
Claus Gittinger <cg@exept.de>
parents:
336
diff
changeset
|
721 |
|anyWrong missing| |
007bd12bd854
check for source access possible AFTER reading private.rc
Claus Gittinger <cg@exept.de>
parents:
336
diff
changeset
|
722 |
Smalltalk isStandAloneApp ifFalse:[ |
007bd12bd854
check for source access possible AFTER reading private.rc
Claus Gittinger <cg@exept.de>
parents:
336
diff
changeset
|
723 |
anyWrong := false. |
007bd12bd854
check for source access possible AFTER reading private.rc
Claus Gittinger <cg@exept.de>
parents:
336
diff
changeset
|
724 |
missing := ''. |
409 | 725 |
|
1500 | 726 |
"/ |
727 |
"/ no longer needed - if we have the package, |
|
728 |
"/ we also have the resources ... |
|
729 |
"/ |
|
730 |
"/ (Smalltalk getResourceFileName:'SystemBrowser.rs' forClass:SystemBrowser) isNil ifTrue:[ |
|
731 |
"/ '***********************************************************************' errorPrintCR. |
|
732 |
"/ '***** ATTENTION: please check installation of your >>resource<< files' errorPrintCR. |
|
733 |
"/ '***** I will not be able to give non-english messages' errorPrintCR. |
|
734 |
"/ anyWrong := true. |
|
735 |
"/ missing := '''resources'' '. |
|
736 |
"/ ]. |
|
409 | 737 |
|
1500 | 738 |
"/ |
739 |
"/ no longer needed - if we have the package, |
|
740 |
"/ we also have the styles ... |
|
741 |
"/ |
|
742 |
"/ (Smalltalk getResourceFileName:'normal.style' forClass:View) isNil ifTrue:[ |
|
743 |
"/ '***********************************************************************' errorPrintCR. |
|
744 |
"/ '***** ATTENTION: please check installation of your >>style<< files' errorPrintCR. |
|
745 |
"/ '***** I will use a plain b&w viewStyle as a fallBack' errorPrintCR. |
|
746 |
"/ anyWrong := true. |
|
747 |
"/ missing := missing , '''resources'' '. |
|
748 |
"/ ]. |
|
409 | 749 |
|
686 | 750 |
(Smalltalk getPackageFileName:'stx/libbasic/source/Object.st') isNil and:[ |
751 |
(Smalltalk getPackageFileName:'stx/libbasic/Object.st') isNil and:[ |
|
752 |
(Smalltalk getSystemFileName:'source/Object.st') isNil and:[ |
|
753 |
(Smalltalk getSystemFileName:'source/source.zip') isNil and:[ |
|
754 |
(Smalltalk getSystemFileName:'source/libbasic.zip') isNil and:[ |
|
755 |
(Smalltalk getSourceFileName:'libbasic/Object.st') isNil and:[ |
|
355
007bd12bd854
check for source access possible AFTER reading private.rc
Claus Gittinger <cg@exept.de>
parents:
336
diff
changeset
|
756 |
"/ |
007bd12bd854
check for source access possible AFTER reading private.rc
Claus Gittinger <cg@exept.de>
parents:
336
diff
changeset
|
757 |
"/ there may still be a SourceCodeManager ... |
007bd12bd854
check for source access possible AFTER reading private.rc
Claus Gittinger <cg@exept.de>
parents:
336
diff
changeset
|
758 |
"/ |
007bd12bd854
check for source access possible AFTER reading private.rc
Claus Gittinger <cg@exept.de>
parents:
336
diff
changeset
|
759 |
(Smalltalk at:#SourceCodeManager) isNil ifTrue:[ |
007bd12bd854
check for source access possible AFTER reading private.rc
Claus Gittinger <cg@exept.de>
parents:
336
diff
changeset
|
760 |
'***********************************************************************' errorPrintCR. |
007bd12bd854
check for source access possible AFTER reading private.rc
Claus Gittinger <cg@exept.de>
parents:
336
diff
changeset
|
761 |
'***** ATTENTION: please check installation of your >>source<< files' errorPrintCR. |
007bd12bd854
check for source access possible AFTER reading private.rc
Claus Gittinger <cg@exept.de>
parents:
336
diff
changeset
|
762 |
'***** ' errorPrintCR. |
007bd12bd854
check for source access possible AFTER reading private.rc
Claus Gittinger <cg@exept.de>
parents:
336
diff
changeset
|
763 |
'***** the browser/debugger may not be able to show sourcecode.' errorPrintCR. |
007bd12bd854
check for source access possible AFTER reading private.rc
Claus Gittinger <cg@exept.de>
parents:
336
diff
changeset
|
764 |
'***** Also, autoloading may fail if sourceFiles are missing.' errorPrintCR. |
007bd12bd854
check for source access possible AFTER reading private.rc
Claus Gittinger <cg@exept.de>
parents:
336
diff
changeset
|
765 |
anyWrong := true. |
007bd12bd854
check for source access possible AFTER reading private.rc
Claus Gittinger <cg@exept.de>
parents:
336
diff
changeset
|
766 |
missing := missing , '''source'' '. |
686 | 767 |
]]]]]]]. |
409 | 768 |
|
1500 | 769 |
"/ |
770 |
"/ no longer needed - if we have the package, |
|
771 |
"/ we also have the bitmaps ... |
|
772 |
"/ |
|
773 |
"/ (Smalltalk bitmapFromFileNamed:'SmalltalkX.xbm' inPackage:'stx:libtool') isNil ifTrue:[ |
|
774 |
"/ '***********************************************************************' errorPrintCR. |
|
775 |
"/ '***** ATTENTION: please check installation of your >>bitmap<< files' errorPrintCR. |
|
776 |
"/ anyWrong := true. |
|
777 |
"/ missing := missing , '''bitmaps'' '. |
|
778 |
"/ ]. |
|
355
007bd12bd854
check for source access possible AFTER reading private.rc
Claus Gittinger <cg@exept.de>
parents:
336
diff
changeset
|
779 |
|
007bd12bd854
check for source access possible AFTER reading private.rc
Claus Gittinger <cg@exept.de>
parents:
336
diff
changeset
|
780 |
anyWrong ifTrue:[ |
007bd12bd854
check for source access possible AFTER reading private.rc
Claus Gittinger <cg@exept.de>
parents:
336
diff
changeset
|
781 |
'*****' errorPrintCR. |
007bd12bd854
check for source access possible AFTER reading private.rc
Claus Gittinger <cg@exept.de>
parents:
336
diff
changeset
|
782 |
'***** directory(s) named: ' errorPrint. missing errorPrint. 'incomplete/not existing' errorPrintCR. |
007bd12bd854
check for source access possible AFTER reading private.rc
Claus Gittinger <cg@exept.de>
parents:
336
diff
changeset
|
783 |
'***** I could not find the missing directory along your path,' errorPrintCR. |
007bd12bd854
check for source access possible AFTER reading private.rc
Claus Gittinger <cg@exept.de>
parents:
336
diff
changeset
|
784 |
'***** which is:' errorPrintCR. |
007bd12bd854
check for source access possible AFTER reading private.rc
Claus Gittinger <cg@exept.de>
parents:
336
diff
changeset
|
785 |
Smalltalk systemPath do:[:dir | |
007bd12bd854
check for source access possible AFTER reading private.rc
Claus Gittinger <cg@exept.de>
parents:
336
diff
changeset
|
786 |
('***** ' , dir storeString) errorPrintCR. |
007bd12bd854
check for source access possible AFTER reading private.rc
Claus Gittinger <cg@exept.de>
parents:
336
diff
changeset
|
787 |
]. |
007bd12bd854
check for source access possible AFTER reading private.rc
Claus Gittinger <cg@exept.de>
parents:
336
diff
changeset
|
788 |
|
007bd12bd854
check for source access possible AFTER reading private.rc
Claus Gittinger <cg@exept.de>
parents:
336
diff
changeset
|
789 |
'*****' errorPrintCR. |
007bd12bd854
check for source access possible AFTER reading private.rc
Claus Gittinger <cg@exept.de>
parents:
336
diff
changeset
|
790 |
'***** Try: "make source bitmaps resources styles"' errorPrintCR. |
007bd12bd854
check for source access possible AFTER reading private.rc
Claus Gittinger <cg@exept.de>
parents:
336
diff
changeset
|
791 |
'***** or: "make symlinks" to fix this.' errorPrintCR. |
007bd12bd854
check for source access possible AFTER reading private.rc
Claus Gittinger <cg@exept.de>
parents:
336
diff
changeset
|
792 |
'***********************************************************************' errorPrintCR. |
007bd12bd854
check for source access possible AFTER reading private.rc
Claus Gittinger <cg@exept.de>
parents:
336
diff
changeset
|
793 |
] |
007bd12bd854
check for source access possible AFTER reading private.rc
Claus Gittinger <cg@exept.de>
parents:
336
diff
changeset
|
794 |
] |
007bd12bd854
check for source access possible AFTER reading private.rc
Claus Gittinger <cg@exept.de>
parents:
336
diff
changeset
|
795 |
! |
169 | 796 |
|
797 |
"/ |
|
1500 | 798 |
"/ set the current package to some useful default |
169 | 799 |
"/ |
800 |
Project notNil ifTrue:[ |
|
801 |
Project setDefaultProject. |
|
443 | 802 |
"/ Project current package:#'private'. |
169 | 803 |
]. |
804 |
||
805 |
"/ |
|
152 | 806 |
"/ if error occurs, and debugger has problems coming up, |
807 |
"/ uncomment the following ... |
|
25 | 808 |
"/ |
10 | 809 |
"/ Debugger := MiniDebugger. |
0 | 810 |
|
1422 | 811 |
|
812 |
"/ |
|
1500 | 813 |
"/ load initial packages (as set in the user's prefs) |
1422 | 814 |
"/ |
1609 | 815 |
UserPreferences current autoloadedPackages notEmptyOrNil ifTrue:[ |
1428 | 816 |
(Smalltalk commandLineArguments includesAny:#('--noAutoload' '--noautoload')) ifTrue:[ |
1426 | 817 |
'smalltalk.rc [info]: autoloaded packages suppressed.' infoPrintCR. |
818 |
] ifFalse:[ |
|
1422 | 819 |
'smalltalk.rc [info]: loading autoloaded packages...' infoPrintCR. |
820 |
(UserPreferences current autoloadedPackages) do:[:eachPackage | |
|
1424
602b53d13b37
splash message when autoloading packages
Claus Gittinger <cg@exept.de>
parents:
1422
diff
changeset
|
821 |
Smalltalk showSplashMessage:('Autoloading ',eachPackage,'...'). |
1425 | 822 |
Error handle:[:ex | |
1457 | 823 |
('smalltalk.rc [error]: error while autoloading package: ',eachPackage) errorPrintCR. |
1425 | 824 |
] do:[ |
1611 | 825 |
('smalltalk.rc [info]: loading ',eachPackage,'...') infoPrintCR. |
1609 | 826 |
Smalltalk loadPackage:eachPackage asAutoloaded:true. |
827 |
(defClass := eachPackage asPackageId projectDefinitionClass) notNil ifTrue:[ |
|
828 |
defClass installAutoloadedClasses. |
|
829 |
]. |
|
1425 | 830 |
] |
1422 | 831 |
]. |
1424
602b53d13b37
splash message when autoloading packages
Claus Gittinger <cg@exept.de>
parents:
1422
diff
changeset
|
832 |
Smalltalk showSplashMessage:('done.'). |
1426 | 833 |
] |
1422 | 834 |
]. |
835 |
||
152 | 836 |
"/ |
837 |
"/ save an initial image; this will speedup the next startup |
|
838 |
"/ (since all autoload-stuff will already be initialized) |
|
839 |
"/ |
|
672 | 840 |
((Smalltalk commandLineArguments includes:'--quick') |
686 | 841 |
or:[(Smalltalk commandLineArguments includes:'--faststart') |
842 |
or:[(Smalltalk commandLineArguments includes:'--fastStart') |
|
843 |
or:[(Smalltalk isPlugin) |
|
672 | 844 |
]]]) ifFalse:[ |
1384 | 845 |
('st.img' asFilename exists not and:[Filename currentDirectory isWritable]) ifTrue:[ |
686 | 846 |
|doneWithStartupStuff| |
153 | 847 |
|
686 | 848 |
doneWithStartupStuff := Semaphore new. |
609 | 849 |
|
686 | 850 |
Smalltalk addStartBlock:[ |
851 |
[ |
|
852 |
doneWithStartupStuff wait. |
|
853 |
'smalltalk.rc [info]: saving initial image for faster future startup...' infoPrintCR. |
|
854 |
ObjectMemory primSnapShotOn:'st.img' |
|
855 |
] forkAt:1. |
|
856 |
[ |
|
857 |
Delay waitForSeconds:10. |
|
858 |
doneWithStartupStuff signal |
|
859 |
] forkAt:1. |
|
860 |
]. |
|
861 |
]. |
|
672 | 862 |
]. |