author | Claus Gittinger <cg@exept.de> |
Mon, 20 Feb 2006 22:09:34 +0100 | |
changeset 687 | 2909ff03ad8b |
parent 686 | 1e48a0068d34 |
child 689 | 0a5205406bb9 |
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 |
|
656 | 37 |
'smalltalk.rc [info]: initial startup (snapshot image restart is faster)...' infoPrintCR. |
488
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
38 |
|
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
39 |
"/ |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
40 |
"/ the JIT translator is known to work with the following |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
41 |
"/ architectures: |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
42 |
"/ ix86 (linux, win32, unixware) |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
43 |
"/ sgi-mips (irix) |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
44 |
"/ alpha (osf) |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
45 |
"/ sparc (solaris) [only tested with v7 & v8 & v9 cpus] |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
46 |
"/ aix (rs6k) [not very well tested] |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
47 |
"/ |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
48 |
enableJIT := false. |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
49 |
|
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
50 |
cpu := OperatingSystem getCPUType. |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
51 |
(#( |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
52 |
'i386' |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
53 |
'sparc' |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
54 |
'mips' |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
55 |
'alpha' |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
56 |
) includes:cpu) ifTrue:[ |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
57 |
enableJIT := true. |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
58 |
|
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
59 |
cpu = 'sparc' ifTrue:[ |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
60 |
"/ for now, disable if we detect running on a sparcV10; |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
61 |
"/ Reason: |
609 | 62 |
"/ we do not have v10 machines here at Exept (they even do not exist at this time), |
488
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
63 |
"/ and therefore have no way of checking if it runs on v10. |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
64 |
"/ I dont want ST/X to crash on your side in that case ... |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
65 |
"/ ... better run a bit slower than not running at all. |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
66 |
"/ 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
|
67 |
"/ (which you should do as well). |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
68 |
|
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
69 |
((OperatingSystem getSystemInfo at:#instructionSets) includesString:'sparcv10') ifTrue:[ |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
70 |
'smalltalk.rc [warning]: disable JIT for sparcV10 - not yet validated' infoPrintCR. |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
71 |
enableJIT := false |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
72 |
] |
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 |
]. |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
75 |
|
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
76 |
enableJIT ifTrue:[ |
656 | 77 |
"/ 'smalltalk.rc [info]: turn on JIT...' infoPrintCR. |
488
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
78 |
ObjectMemory justInTimeCompilation:true. |
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 |
"/ OperatingSystem disableSignal:14. |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
82 |
|
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
83 |
ObjectMemory infoPrinting:false. |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
84 |
"/ Smalltalk loadBinaries:true. |
609 | 85 |
Compiler allowUnderscoreInIdentifier:true. |
86 |
Compiler warnUnderscoreInIdentifier:false. |
|
488
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
87 |
Compiler warnSTXSpecials:false. |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
88 |
! |
0 | 89 |
|
25 | 90 |
"/ |
53
00437bd1cfe7
allow systemPath to be set via a shell variable
Claus Gittinger <cg@exept.de>
parents:
42
diff
changeset
|
91 |
"/ 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
|
92 |
"/ 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
|
93 |
"/ add the following in your shell-profile: |
86 | 94 |
"/ 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
|
95 |
"/ 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
|
96 |
"/ 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
|
97 |
"/ 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
|
98 |
"/ |
197 | 99 |
|
677 | 100 |
|path pathOfSTXExecutable| |
287
8151d262bd27
check for gnu-smalltalk sources along my path;
Claus Gittinger <cg@exept.de>
parents:
272
diff
changeset
|
101 |
|
680 | 102 |
'systemPath before: ' infoPrint. Smalltalk systemPath infoPrintCR. |
103 |
'exec: ' infoPrint. OperatingSystem nameOfSTXExecutable infoPrintCR. |
|
104 |
'execPath: ' infoPrint. OperatingSystem pathOfSTXExecutable infoPrintCR. |
|
105 |
||
679 | 106 |
pathOfSTXExecutable := OperatingSystem pathOfSTXExecutable asFilename directory. |
672 | 107 |
|
53
00437bd1cfe7
allow systemPath to be set via a shell variable
Claus Gittinger <cg@exept.de>
parents:
42
diff
changeset
|
108 |
(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
|
109 |
Smalltalk systemPath:(path asCollectionOfSubstringsSeparatedBy:$:) |
287
8151d262bd27
check for gnu-smalltalk sources along my path;
Claus Gittinger <cg@exept.de>
parents:
272
diff
changeset
|
110 |
] ifFalse:[ |
8151d262bd27
check for gnu-smalltalk sources along my path;
Claus Gittinger <cg@exept.de>
parents:
272
diff
changeset
|
111 |
"/ 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
|
112 |
"/ 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
|
113 |
"/ autoloading wrong classes. |
8151d262bd27
check for gnu-smalltalk sources along my path;
Claus Gittinger <cg@exept.de>
parents:
272
diff
changeset
|
114 |
(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
|
115 |
path := path asFilename directoryName. |
308
6e6d557009c7
dont loose windows keyboard setup after image restart
Claus Gittinger <cg@exept.de>
parents:
287
diff
changeset
|
116 |
('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
|
117 |
Smalltalk systemPath:(Smalltalk systemPath remove:path; yourself). |
672 | 118 |
]. |
119 |
||
679 | 120 |
(Smalltalk systemPath includes:pathOfSTXExecutable name) ifFalse:[ |
121 |
Smalltalk systemPath addFirst:pathOfSTXExecutable name. |
|
677 | 122 |
]. |
672 | 123 |
|
677 | 124 |
"/ the current directory should always be first... |
125 |
(Smalltalk systemPath includes:'.') ifTrue:[ |
|
126 |
Smalltalk systemPath remove:'.'. |
|
127 |
]. |
|
128 |
(Smalltalk systemPath includes:'.' asFilename pathName) ifTrue:[ |
|
129 |
Smalltalk systemPath remove:'.' asFilename pathName. |
|
130 |
]. |
|
131 |
Smalltalk systemPath addFirst:'.' asFilename pathName. |
|
53
00437bd1cfe7
allow systemPath to be set via a shell variable
Claus Gittinger <cg@exept.de>
parents:
42
diff
changeset
|
132 |
]. |
409 | 133 |
|
488
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
134 |
(path := OperatingSystem getEnvironment:'STX_PACKAGEPATH') notNil ifTrue:[ |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
135 |
Smalltalk packagePath:(path asCollectionOfSubstringsSeparatedBy:$:). |
680 | 136 |
'smalltalk.rc [info]: setting packagePath from STX_PACKAGEPATH' infoPrintCR. |
488
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
137 |
] ifFalse:[ |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
138 |
"/ |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
139 |
"/ if running in the development environment, |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
140 |
"/ only use the local packages. |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
141 |
"/ |
679 | 142 |
(pathOfSTXExecutable construct:'../../../stx/projects/smalltalk') exists ifTrue:[ |
143 |
Smalltalk packagePath removeAll; add:(pathOfSTXExecutable construct:'../../..') pathName. |
|
680 | 144 |
'smalltalk.rc [info]: setting packagePath for local operation' infoPrintCR. |
488
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
145 |
]. |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
146 |
|
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
147 |
"/ |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
148 |
"/ any additional local packages ?. |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
149 |
"/ |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
150 |
'packages' asFilename exists ifTrue:[ |
677 | 151 |
(Smalltalk packagePath includes:'packages' asFilename pathName) ifFalse:[ |
152 |
Smalltalk packagePath addFirst:'packages' asFilename pathName. |
|
153 |
]. |
|
488
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
154 |
]. |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
155 |
]. |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
156 |
|
672 | 157 |
'systemPath: ' errorPrint. Smalltalk systemPath errorPrintCR. |
158 |
'packagePath: ' errorPrint. Smalltalk packagePath errorPrintCR. |
|
159 |
||
409 | 160 |
Smalltalk flushPathCaches. |
86 | 161 |
! |
162 |
||
488
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
163 |
|args buildClasses openDisplay prevCatchSetting| |
86 | 164 |
|
488
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
165 |
args := Smalltalk commandLineArguments ? #(). |
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 |
buildClasses := false. |
126 | 168 |
((args size > 0) and:[args last = '--buildClasses']) ifTrue:[ |
86 | 169 |
'binary' asFilename isDirectory ifFalse:[ |
195 | 170 |
'smalltalk.rc [warning]: no binary directory for classes.' errorPrintCR. |
488
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
171 |
Smalltalk exit. |
86 | 172 |
]. |
488
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
173 |
buildClasses := true. |
432 | 174 |
]. |
175 |
||
8 | 176 |
|
488
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
177 |
"/ check for display-classes being required and compiled into the system; |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
178 |
"/ if not, load the display classes. |
25 | 179 |
"/ |
488
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
180 |
openDisplay := false. |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
181 |
(Smalltalk isHeadless or:[args includes:'--noDisplay']) ifFalse:[ |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
182 |
(Smalltalk at:#DeviceWorkstation) isNil ifTrue:[ |
637 | 183 |
"no view classes compiled into the system. |
488
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
184 |
Minimum smalltalk does only contain libbasic, libcomp and librun. |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
185 |
FileIn view stuff" |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
186 |
|
656 | 187 |
'smalltalk.rc [info]: installing required class libraries...' infoPrintCR. |
488
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
188 |
(Smalltalk isClassLibraryLoaded:'libbasic2') ifFalse:[ |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
189 |
Smalltalk loadPackage:'stx:libbasic2'. |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
190 |
]. |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
191 |
Smalltalk loadPackage:'stx:libview'. |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
192 |
Smalltalk fileInClassLibrary:'XWorkstation' inPackage:'stx:libview'. |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
193 |
OperatingSystem isMSWINDOWSlike ifTrue:[ |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
194 |
Smalltalk fileInClassLibrary:'WinWorkstation' inPackage:'stx:libview'. |
609 | 195 |
]. |
488
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
196 |
]. |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
197 |
openDisplay := true. |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
198 |
]. |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
199 |
|
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
200 |
|
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
201 |
"/ Install patches, once everything has been loaded. |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
202 |
"/ 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
|
203 |
|
488
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
204 |
prevCatchSetting := Class catchMethodRedefinitions. |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
205 |
Class catchMethodRedefinitions:false. |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
206 |
(Smalltalk secureFileIn:(Smalltalk commandName asFilename withSuffix:'pch')) ifFalse:[ |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
207 |
Smalltalk isStandAloneApp ifFalse:[ |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
208 |
Smalltalk secureFileIn:'patches'. |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
209 |
]. |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
210 |
]. |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
211 |
Class catchMethodRedefinitions:prevCatchSetting. |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
212 |
|
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
213 |
openDisplay ifTrue:[ |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
214 |
"/ open the graphical display |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
215 |
[ |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
216 |
Screen openDefaultDisplay:nil. |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
217 |
] on:Screen deviceOpenErrorSignal do:[:ex| |
491 | 218 |
('smalltalk.rc [warning]: No Display connection to: ', ex parameter printString) errorPrintCR. |
488
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
219 |
'smalltalk.rc [info]: Either set the DISPLAY environment variable,' infoPrintCR. |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
220 |
'smalltalk.rc [info]: or start smalltalk with a -display argument.' infoPrintCR. |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
221 |
Smalltalk isStandAloneApp ifFalse:[ |
394
70ecff920548
Fix DISPLAY access for headless servers.
Stefan Vogel <sv@exept.de>
parents:
387
diff
changeset
|
222 |
'' errorPrintCR. |
70ecff920548
Fix DISPLAY access for headless servers.
Stefan Vogel <sv@exept.de>
parents:
387
diff
changeset
|
223 |
'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
|
224 |
OperatingSystem isUNIXlike ifTrue:[ |
70ecff920548
Fix DISPLAY access for headless servers.
Stefan Vogel <sv@exept.de>
parents:
387
diff
changeset
|
225 |
' 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
|
226 |
] ifFalse:[ |
70ecff920548
Fix DISPLAY access for headless servers.
Stefan Vogel <sv@exept.de>
parents:
387
diff
changeset
|
227 |
' 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
|
228 |
]. |
70ecff920548
Fix DISPLAY access for headless servers.
Stefan Vogel <sv@exept.de>
parents:
387
diff
changeset
|
229 |
Smalltalk readEvalPrint. |
355
007bd12bd854
check for source access possible AFTER reading private.rc
Claus Gittinger <cg@exept.de>
parents:
336
diff
changeset
|
230 |
]. |
488
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
231 |
Smalltalk exit |
5 | 232 |
]. |
10 | 233 |
]. |
0 | 234 |
|
25 | 235 |
"/ |
236 |
"/ this makes X-errors be handled immediately (so you see, |
|
237 |
"/ where it occured) but slows down the system soooo muuuucccchhh .. |
|
238 |
"/ if commented out, errors will be reported asynchronously. |
|
239 |
"/ (I enable this, when things go bad during startup) |
|
240 |
"/ |
|
10 | 241 |
"/ Display unBuffered. |
0 | 242 |
|
617
f6afee16b359
Add --quick options to come up without gimmicks
Stefan Vogel <sv@exept.de>
parents:
612
diff
changeset
|
243 |
(buildClasses |
678 | 244 |
or:[ (args includes:'--noBanner') |
245 |
or:[ (args includes:'--quick') |
|
246 |
or:[ (args includes:'--faststart') |
|
247 |
or:[ (args includes:'--fastStart') |
|
248 |
or:[ Smalltalk isPlugin |
|
672 | 249 |
]]]]]) ifFalse:[ |
488
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
250 |
Smalltalk fileIn:'showBanner.rc'. |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
251 |
]. |
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 |
"/ |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
254 |
"/ lazy loading |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
255 |
"/ (faster fileIn) - this is EXPERIMENTAL. |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
256 |
"/ |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
257 |
"/ - if turned on, an autoload operation will only create methodStubs |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
258 |
"/ (uncompiled) which trap when called the first time. |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
259 |
"/ The bytecode compiler will compile them when first executen. |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
260 |
"/ |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
261 |
"/ - if turned off, an autoload will load & compile the whole class, |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
262 |
"/ which makes autoloading slower, but avoids the initial delays |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
263 |
"/ |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
264 |
"/ 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
|
265 |
"/ If there are any problems with lazy methods, disable the following |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
266 |
"/ and let me (info@exept.de) know what happened. |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
267 |
"/ |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
268 |
Autoload compileLazy:true. |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
269 |
|
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
270 |
"/ |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
271 |
"/ read the abbrev.stc file, extract class names |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
272 |
"/ and install all nonExisting classes as autoloaded |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
273 |
"/ |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
274 |
|
609 | 275 |
Class withoutUpdatingChangesDo:[ |
568 | 276 |
|needToReactivate| |
277 |
||
278 |
HistoryManager notNil ifTrue:[ |
|
279 |
needToReactivate := HistoryManager isActive. |
|
280 |
HistoryManager deactivate. |
|
281 |
] ifFalse:[ |
|
282 |
needToReactivate := false |
|
283 |
]. |
|
617
f6afee16b359
Add --quick options to come up without gimmicks
Stefan Vogel <sv@exept.de>
parents:
612
diff
changeset
|
284 |
|
663 | 285 |
((Smalltalk commandLineArguments includes:'--quick') |
678 | 286 |
or:[ (Smalltalk isPlugin) |
663 | 287 |
or:[ (Smalltalk commandLineArguments includes:'--faststart') |
288 |
or:[ (Smalltalk commandLineArguments includes:'--fastStart') |
|
678 | 289 |
]]]) ifFalse:[ |
656 | 290 |
'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
|
291 |
Smalltalk installAutoloadedClasses. |
f6afee16b359
Add --quick options to come up without gimmicks
Stefan Vogel <sv@exept.de>
parents:
612
diff
changeset
|
292 |
]. |
568 | 293 |
needToReactivate ifTrue:[HistoryManager activate]. |
294 |
]. |
|
488
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 |
buildClasses ifTrue:[ |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
297 |
"/ |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
298 |
"/ load all lazy classes |
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 subclasses do:[:aClass | |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
301 |
Autoload autoloadFailedSignal handle:[:ex | |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
302 |
'smalltalk.rc [warning]: autoload failed' errorPrintCR. |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
303 |
ex return. |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
304 |
] do:[ |
656 | 305 |
'smalltalk.rc [info]: loading ' infoPrint. aClass name infoPrint. '...' infoPrintCR. |
488
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
306 |
aClass autoload. |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
307 |
] |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
308 |
]. |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
309 |
|
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
310 |
"/ |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
311 |
"/ binary save all classes |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
312 |
"/ |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
313 |
Autoload loadedClasses do:[:cls | |
656 | 314 |
'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
|
315 |
cls binaryFileOut. |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
316 |
OperatingSystem executeCommand:'mv *.cls binary'. |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
317 |
] |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
318 |
Smalltalk exit |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
319 |
]. |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
320 |
! |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
321 |
|
25 | 322 |
"/ |
686 | 323 |
"/ Memory settings. NOTE that all these settings may be overwritten by |
324 |
"/ settings.stx which stores the Launcher's settings. |
|
325 |
||
326 |
"/ |
|
25 | 327 |
"/ this starts the incremental GC earlier |
328 |
"/ (default is 500000) |
|
329 |
"/ the number given is the number of bytes which have to be allocated |
|
330 |
"/ since the last GC, to start the incremental GC running. |
|
331 |
"/ (see ObjectMemory>>documentation) |
|
332 |
"/ Claus: I moved this to the private.rc file |
|
333 |
"/ |
|
609 | 334 |
"/ ObjectMemory incrementalGCLimit:100000. |
0 | 335 |
|
25 | 336 |
"/ |
337 |
"/ this starts the incremental GC when freeSpace drops below a limit |
|
338 |
"/ (default is nil - i.e. dont look at freeSpace) |
|
339 |
"/ (see ObjectMemory>>documentation) |
|
340 |
"/ Claus: I moved this to the private.rc file |
|
341 |
"/ |
|
609 | 342 |
"/ ObjectMemory freeSpaceGCLimit:300000. |
16 | 343 |
|
322 | 344 |
"/ experimental: try to always keep some bytes in the pocket |
345 |
"/ this changes the memory policy, to start the background collector whenever |
|
609 | 346 |
"/ freespace drops below 250k or 500k have been allocated since the last GC. |
322 | 347 |
"/ AND to allocate more memory, if (after the collect) less than 1Mb is free. |
348 |
"/ Doing so makes the system behave better if lots of memory is required |
|
349 |
"/ for short periods of time, since it prepares itself for that situation |
|
350 |
"/ during idle time. (I often walk around in the fileBrowser, loading big |
|
351 |
"/ files like XWorkstation.st or SystemBrowser.st ....) |
|
352 |
||
609 | 353 |
ObjectMemory freeSpaceGCAmount:1000000. |
354 |
ObjectMemory freeSpaceGCLimit:250000. |
|
355 |
ObjectMemory incrementalGCLimit:500000. |
|
322 | 356 |
ObjectMemory oldSpaceIncrement:500000. |
457 | 357 |
ObjectMemory oldSpaceCompressLimit:0. "/ temporary kludge |
609 | 358 |
ObjectMemory startBackgroundCollectorAt:5. |
359 |
ObjectMemory startBackgroundFinalizationAt:5. |
|
566 | 360 |
|
361 |
"/ this limits the amount of memory which is allocated for oldSpace |
|
362 |
"/ (for example to prevent ST/X from taking memory from other processes) |
|
363 |
"/ The absolute maximum is a builtIn constant and OS specific. |
|
364 |
||
365 |
"/ ObjectMemory maxOldSpace:1024*1024*128. |
|
366 |
ObjectMemory maxOldSpace:1024*1024*256. |
|
322 | 367 |
|
368 |
"/ experimental: |
|
369 |
"/ run the background collector at a dynamic priority - it will |
|
370 |
"/ now always get a chance to make some progress ... |
|
371 |
||
372 |
Smalltalk addStartBlock:[ |
|
394
70ecff920548
Fix DISPLAY access for headless servers.
Stefan Vogel <sv@exept.de>
parents:
387
diff
changeset
|
373 |
'smalltalk.rc [info]: start timeSlicing...' infoPrintCR. |
322 | 374 |
Processor startTimeSlicing. |
375 |
Processor supportDynamicPriorities:true. |
|
376 |
ObjectMemory backgroundCollectProcess priorityRange:(4 to:9). |
|
377 |
ObjectMemory backgroundFinalizationProcess priorityRange:(4 to:9). |
|
378 |
]. |
|
379 |
||
380 |
"/ experimental: configure the memory manager to quickly increase |
|
381 |
"/ its oldSpace, as long as it stays below 8Mb (i.e. do not enter |
|
382 |
"/ a blocking mark&sweep or compress, but go straight ahead increasing |
|
383 |
"/ the oldSpace). Above that, behave as usual, i.e. try a GC first, |
|
384 |
"/ then increase the oldSpace size if that did not help. |
|
385 |
"/ If you have a machine with lots of (real) memory, you may want to |
|
386 |
"/ increase the number. The value below should be ok for 16-32Mb machines. |
|
387 |
"/ |
|
388 |
ObjectMemory fastMoreOldSpaceLimit:8*1024*1024. |
|
389 |
ObjectMemory fastMoreOldSpaceAllocation:true. |
|
390 |
! |
|
391 |
||
488
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
392 |
"/ another experimental (and a secret for now, since I don't want |
322 | 393 |
"/ you to play with those ;-) |
394 |
"/ For now, this is experimental. Once the best numbers |
|
395 |
"/ have been found, I'll hardwire them and document it ... |
|
396 |
||
686 | 397 |
|tenureParams| |
426
74cc4af22873
install autoloaded classes BEFORE doing display.rc/host.rc
Claus Gittinger <cg@exept.de>
parents:
424
diff
changeset
|
398 |
|
322 | 399 |
ObjectMemory newSpaceSize > (500*1024) ifTrue:[ |
686 | 400 |
tenureParams := #(nil nil nil nil -16 -4 -2 -2 0 0 16 nil) copy. |
322 | 401 |
] ifFalse:[ |
402 |
"/ min max cpy /32 /16 /8 /4 /2 /4 /8 /16 /32 " |
|
403 |
"/ |
|
404 |
"/ slow tenure - keeps objects longer in newSpace, |
|
405 |
"/ producing more scavenge overhead, but releasing IGC somewhat |
|
406 |
"/ |
|
686 | 407 |
"/ tenureParams := #(nil nil nil -100 -8 -4 -1 1 2 4 8 16 nil) copy. |
408 |
"/ tenureParams := #(nil nil nil nil -16 -4 0 0 0 4 16 nil) copy. |
|
322 | 409 |
|
410 |
"/ |
|
411 |
"/ fast tenure - moves objects earlier into oldSpace, |
|
412 |
"/ releasing newSpace collector; however, the oldSpace IGC |
|
413 |
"/ may have more work to do. |
|
414 |
"/ |
|
686 | 415 |
tenureParams := #(nil nil nil nil -20 -8 -3 -1 -1 1 16 nil) copy. |
322 | 416 |
]. |
686 | 417 |
ObjectMemory tenureParameters:tenureParams. |
488
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
418 |
! |
0 | 419 |
|
25 | 420 |
"/ |
358
14a45495e3d8
autoloaded classes must be read after the host.rc file;
Claus Gittinger <cg@exept.de>
parents:
355
diff
changeset
|
421 |
"/ 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
|
422 |
"/ |
656 | 423 |
"/ '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
|
424 |
Smalltalk fileIn:'host.rc'. |
14a45495e3d8
autoloaded classes must be read after the host.rc file;
Claus Gittinger <cg@exept.de>
parents:
355
diff
changeset
|
425 |
|
14a45495e3d8
autoloaded classes must be read after the host.rc file;
Claus Gittinger <cg@exept.de>
parents:
355
diff
changeset
|
426 |
"/ |
25 | 427 |
"/ this handles all variant display stuff |
428 |
"/ (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
|
429 |
"/ 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
|
430 |
"/ Host specific things are configured in host.rc. |
25 | 431 |
"/ |
336
5eb44f3e88af
do not output 'no sourceCode' warning messages
Claus Gittinger <cg@exept.de>
parents:
331
diff
changeset
|
432 |
Display notNil ifTrue:[ |
656 | 433 |
"/ '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
|
434 |
Smalltalk fileIn:'display.rc'. |
5eb44f3e88af
do not output 'no sourceCode' warning messages
Claus Gittinger <cg@exept.de>
parents:
331
diff
changeset
|
435 |
]. |
0 | 436 |
|
25 | 437 |
"/ |
143
71dc5ec7ef26
Renamed NewLauncher to Launcher.
Stefan Vogel <sv@exept.de>
parents:
133
diff
changeset
|
438 |
"/ Ask user to accept Licence. |
71dc5ec7ef26
Renamed NewLauncher to Launcher.
Stefan Vogel <sv@exept.de>
parents:
133
diff
changeset
|
439 |
"/ exit, if rejected. |
324
e8eb27061a3f
llow for licenceBox to be suppressed
Claus Gittinger <cg@exept.de>
parents:
322
diff
changeset
|
440 |
"/ |
152 | 441 |
"/ You may find this annoying - but lawers say: "this is a must ..." ;-) |
442 |
"/ (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
|
443 |
"/ 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
|
444 |
"/ 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
|
445 |
"/ 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
|
446 |
"/ read the code below). |
220 | 447 |
|
324
e8eb27061a3f
llow for licenceBox to be suppressed
Claus Gittinger <cg@exept.de>
parents:
322
diff
changeset
|
448 |
"/ |
325 | 449 |
"/ WARNING: read the licence text before you: |
450 |
"/ - disable the code below, |
|
451 |
"/ - or start stx with a suppress argument. |
|
324
e8eb27061a3f
llow for licenceBox to be suppressed
Claus Gittinger <cg@exept.de>
parents:
322
diff
changeset
|
452 |
"/ |
250 | 453 |
|
678 | 454 |
(Smalltalk isStandAloneApp not |
686 | 455 |
and:[Smalltalk isPlugin not |
456 |
and:[Display notNil |
|
678 | 457 |
]]) ifTrue:[ |
617
f6afee16b359
Add --quick options to come up without gimmicks
Stefan Vogel <sv@exept.de>
parents:
612
diff
changeset
|
458 |
((Smalltalk commandLineArguments includes:'--noLicenceBox') |
663 | 459 |
or:[(Smalltalk commandLineArguments includes:'--quick') |
460 |
or:[(Smalltalk commandLineArguments includes:'--faststart') |
|
461 |
or:[(Smalltalk commandLineArguments includes:'--fastStart') |
|
678 | 462 |
]]]) ifFalse:[ |
488
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
463 |
Smalltalk addStartBlock:[ |
656 | 464 |
'smalltalk.rc [info]: show licence conditions...' infoPrintCR. |
488
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
465 |
LicenceBox autoload. |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
466 |
LicenceBox licenceRejectSignal handle:[:ex| |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
467 |
Smalltalk exit |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
468 |
] do:[ |
656 | 469 |
(LicenceBox open) ifFalse:[ |
470 |
'smalltalk.rc [info]: licence conditions not accepted.' infoPrintCR. |
|
471 |
Smalltalk exit |
|
472 |
]. |
|
687 | 473 |
Class withoutUpdatingChangesDo:[ |
474 |
Smalltalk removeClass:LicenceBox. |
|
475 |
]. |
|
488
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
476 |
]. |
336
5eb44f3e88af
do not output 'no sourceCode' warning messages
Claus Gittinger <cg@exept.de>
parents:
331
diff
changeset
|
477 |
] |
324
e8eb27061a3f
llow for licenceBox to be suppressed
Claus Gittinger <cg@exept.de>
parents:
322
diff
changeset
|
478 |
] |
143
71dc5ec7ef26
Renamed NewLauncher to Launcher.
Stefan Vogel <sv@exept.de>
parents:
133
diff
changeset
|
479 |
]. |
358
14a45495e3d8
autoloaded classes must be read after the host.rc file;
Claus Gittinger <cg@exept.de>
parents:
355
diff
changeset
|
480 |
! |
14a45495e3d8
autoloaded classes must be read after the host.rc file;
Claus Gittinger <cg@exept.de>
parents:
355
diff
changeset
|
481 |
|
14a45495e3d8
autoloaded classes must be read after the host.rc file;
Claus Gittinger <cg@exept.de>
parents:
355
diff
changeset
|
482 |
"/ |
14a45495e3d8
autoloaded classes must be read after the host.rc file;
Claus Gittinger <cg@exept.de>
parents:
355
diff
changeset
|
483 |
"/ some ST80 name aliases |
14a45495e3d8
autoloaded classes must be read after the host.rc file;
Claus Gittinger <cg@exept.de>
parents:
355
diff
changeset
|
484 |
"/ (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
|
485 |
"/ |
14a45495e3d8
autoloaded classes must be read after the host.rc file;
Claus Gittinger <cg@exept.de>
parents:
355
diff
changeset
|
486 |
(cls := Smalltalk at:#StandardSystemView) notNil ifTrue:[ |
14a45495e3d8
autoloaded classes must be read after the host.rc file;
Claus Gittinger <cg@exept.de>
parents:
355
diff
changeset
|
487 |
Smalltalk at:#ScheduledWindow put:cls |
14a45495e3d8
autoloaded classes must be read after the host.rc file;
Claus Gittinger <cg@exept.de>
parents:
355
diff
changeset
|
488 |
]. |
14a45495e3d8
autoloaded classes must be read after the host.rc file;
Claus Gittinger <cg@exept.de>
parents:
355
diff
changeset
|
489 |
(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
|
490 |
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
|
491 |
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
|
492 |
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
|
493 |
]. |
14a45495e3d8
autoloaded classes must be read after the host.rc file;
Claus Gittinger <cg@exept.de>
parents:
355
diff
changeset
|
494 |
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
|
495 |
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
|
496 |
(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
|
497 |
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
|
498 |
Smalltalk at:#DialogView put:cls. |
397 | 499 |
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
|
500 |
]. |
14a45495e3d8
autoloaded classes must be read after the host.rc file;
Claus Gittinger <cg@exept.de>
parents:
355
diff
changeset
|
501 |
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
|
502 |
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
|
503 |
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
|
504 |
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
|
505 |
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
|
506 |
Smalltalk at:#SignalCollection put:SignalSet. |
424
4b6de7399a42
ProgrsssWidgetSpec alias (VW compat)
Claus Gittinger <cg@exept.de>
parents:
416
diff
changeset
|
507 |
(cls := Smalltalk at:#ProgressIndicatorSpec) notNil ifTrue:[ |
4b6de7399a42
ProgrsssWidgetSpec alias (VW compat)
Claus Gittinger <cg@exept.de>
parents:
416
diff
changeset
|
508 |
Smalltalk at:#ProgressWidgetSpec put:cls. |
4b6de7399a42
ProgrsssWidgetSpec alias (VW compat)
Claus Gittinger <cg@exept.de>
parents:
416
diff
changeset
|
509 |
]. |
428 | 510 |
(cls := Smalltalk at:#ProgressIndicator) notNil ifTrue:[ |
511 |
Smalltalk at:#ProgressWidgetView put:cls. |
|
512 |
]. |
|
358
14a45495e3d8
autoloaded classes must be read after the host.rc file;
Claus Gittinger <cg@exept.de>
parents:
355
diff
changeset
|
513 |
|
14a45495e3d8
autoloaded classes must be read after the host.rc file;
Claus Gittinger <cg@exept.de>
parents:
355
diff
changeset
|
514 |
"/ FileDirectory notNil ifTrue:[ |
14a45495e3d8
autoloaded classes must be read after the host.rc file;
Claus Gittinger <cg@exept.de>
parents:
355
diff
changeset
|
515 |
"/ 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
|
516 |
"/ ]. |
14a45495e3d8
autoloaded classes must be read after the host.rc file;
Claus Gittinger <cg@exept.de>
parents:
355
diff
changeset
|
517 |
|
488
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
518 |
Screen notNil ifTrue:[ |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
519 |
Smalltalk at:#Window put:Screen. |
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
520 |
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
|
521 |
]. |
14a45495e3d8
autoloaded classes must be read after the host.rc file;
Claus Gittinger <cg@exept.de>
parents:
355
diff
changeset
|
522 |
|
14a45495e3d8
autoloaded classes must be read after the host.rc file;
Claus Gittinger <cg@exept.de>
parents:
355
diff
changeset
|
523 |
"/ |
14a45495e3d8
autoloaded classes must be read after the host.rc file;
Claus Gittinger <cg@exept.de>
parents:
355
diff
changeset
|
524 |
"/ 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
|
525 |
"/ |
14a45495e3d8
autoloaded classes must be read after the host.rc file;
Claus Gittinger <cg@exept.de>
parents:
355
diff
changeset
|
526 |
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
|
527 |
|
14a45495e3d8
autoloaded classes must be read after the host.rc file;
Claus Gittinger <cg@exept.de>
parents:
355
diff
changeset
|
528 |
Smalltalk at:#Browser put:SystemBrowser. |
14a45495e3d8
autoloaded classes must be read after the host.rc file;
Claus Gittinger <cg@exept.de>
parents:
355
diff
changeset
|
529 |
! |
686 | 530 |
|file| |
143
71dc5ec7ef26
Renamed NewLauncher to Launcher.
Stefan Vogel <sv@exept.de>
parents:
133
diff
changeset
|
531 |
|
71dc5ec7ef26
Renamed NewLauncher to Launcher.
Stefan Vogel <sv@exept.de>
parents:
133
diff
changeset
|
532 |
"/ |
41 | 533 |
"/ read private (per user) stuff |
25 | 534 |
"/ |
632
6cb9fe000c20
-F arg to allow other than private.rc
Claus Gittinger <cg@exept.de>
parents:
617
diff
changeset
|
535 |
(Smalltalk commandLine includes:'-F') ifTrue:[ |
6cb9fe000c20
-F arg to allow other than private.rc
Claus Gittinger <cg@exept.de>
parents:
617
diff
changeset
|
536 |
|idx file| |
6cb9fe000c20
-F arg to allow other than private.rc
Claus Gittinger <cg@exept.de>
parents:
617
diff
changeset
|
537 |
|
6cb9fe000c20
-F arg to allow other than private.rc
Claus Gittinger <cg@exept.de>
parents:
617
diff
changeset
|
538 |
idx := Smalltalk commandLine indexOf:'-F'. |
6cb9fe000c20
-F arg to allow other than private.rc
Claus Gittinger <cg@exept.de>
parents:
617
diff
changeset
|
539 |
file := Smalltalk commandLine at:idx + 1. |
6cb9fe000c20
-F arg to allow other than private.rc
Claus Gittinger <cg@exept.de>
parents:
617
diff
changeset
|
540 |
] ifFalse:[ |
686 | 541 |
file := 'private.rc'. |
632
6cb9fe000c20
-F arg to allow other than private.rc
Claus Gittinger <cg@exept.de>
parents:
617
diff
changeset
|
542 |
]. |
686 | 543 |
('smalltalk.rc [info]: reading ''' , file , '''...') infoPrintCR. |
544 |
Smalltalk fileIn:file. |
|
5 | 545 |
|
488
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
475
diff
changeset
|
546 |
Screen notNil ifTrue:[ |
441 | 547 |
"/ |
548 |
"/ read saved configuration settings (if any) |
|
549 |
"/ |
|
656 | 550 |
"/ 'smalltalk.rc [info]: reading ''settings.stx''...' infoPrintCR. |
686 | 551 |
AbortOperationRequest handle:[:ex | |
450 | 552 |
ex return |
441 | 553 |
] do:[ |
450 | 554 |
(Smalltalk fileIn:'settings.stx') ifTrue:[ |
441 | 555 |
'smalltalk.rc [info]: loaded preferences from ''settings.stx''' infoPrintCR. |
450 | 556 |
] |
369 | 557 |
] |
365 | 558 |
] |
355
007bd12bd854
check for source access possible AFTER reading private.rc
Claus Gittinger <cg@exept.de>
parents:
336
diff
changeset
|
559 |
! |
007bd12bd854
check for source access possible AFTER reading private.rc
Claus Gittinger <cg@exept.de>
parents:
336
diff
changeset
|
560 |
|
007bd12bd854
check for source access possible AFTER reading private.rc
Claus Gittinger <cg@exept.de>
parents:
336
diff
changeset
|
561 |
"/ |
007bd12bd854
check for source access possible AFTER reading private.rc
Claus Gittinger <cg@exept.de>
parents:
336
diff
changeset
|
562 |
"/ 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
|
563 |
"/ 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
|
564 |
"/ their source/resource directories were not installed) |
609 | 565 |
"/ - better to warn early ... |
355
007bd12bd854
check for source access possible AFTER reading private.rc
Claus Gittinger <cg@exept.de>
parents:
336
diff
changeset
|
566 |
"/ |
007bd12bd854
check for source access possible AFTER reading private.rc
Claus Gittinger <cg@exept.de>
parents:
336
diff
changeset
|
567 |
|anyWrong missing| |
007bd12bd854
check for source access possible AFTER reading private.rc
Claus Gittinger <cg@exept.de>
parents:
336
diff
changeset
|
568 |
Smalltalk isStandAloneApp ifFalse:[ |
007bd12bd854
check for source access possible AFTER reading private.rc
Claus Gittinger <cg@exept.de>
parents:
336
diff
changeset
|
569 |
anyWrong := false. |
007bd12bd854
check for source access possible AFTER reading private.rc
Claus Gittinger <cg@exept.de>
parents:
336
diff
changeset
|
570 |
missing := ''. |
409 | 571 |
|
572 |
"/ |
|
573 |
"/ no longer needed - if we have the package, |
|
574 |
"/ we also have the resources ... |
|
575 |
"/ |
|
576 |
"/ (Smalltalk getResourceFileName:'SystemBrowser.rs' forClass:SystemBrowser) isNil ifTrue:[ |
|
577 |
"/ '***********************************************************************' errorPrintCR. |
|
578 |
"/ '***** ATTENTION: please check installation of your >>resource<< files' errorPrintCR. |
|
579 |
"/ '***** I will not be able to give non-english messages' errorPrintCR. |
|
580 |
"/ anyWrong := true. |
|
581 |
"/ missing := '''resources'' '. |
|
582 |
"/ ]. |
|
583 |
||
584 |
"/ |
|
585 |
"/ no longer needed - if we have the package, |
|
586 |
"/ we also have the styles ... |
|
587 |
"/ |
|
588 |
"/ (Smalltalk getResourceFileName:'normal.style' forClass:View) isNil ifTrue:[ |
|
589 |
"/ '***********************************************************************' errorPrintCR. |
|
590 |
"/ '***** ATTENTION: please check installation of your >>style<< files' errorPrintCR. |
|
591 |
"/ '***** I will use a plain b&w viewStyle as a fallBack' errorPrintCR. |
|
592 |
"/ anyWrong := true. |
|
593 |
"/ missing := missing , '''resources'' '. |
|
594 |
"/ ]. |
|
595 |
||
686 | 596 |
(Smalltalk getPackageFileName:'stx/libbasic/source/Object.st') isNil and:[ |
597 |
(Smalltalk getPackageFileName:'stx/libbasic/Object.st') isNil and:[ |
|
598 |
(Smalltalk getSystemFileName:'source/Object.st') isNil and:[ |
|
599 |
(Smalltalk getSystemFileName:'source/source.zip') isNil and:[ |
|
600 |
(Smalltalk getSystemFileName:'source/libbasic.zip') isNil and:[ |
|
601 |
(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
|
602 |
"/ |
007bd12bd854
check for source access possible AFTER reading private.rc
Claus Gittinger <cg@exept.de>
parents:
336
diff
changeset
|
603 |
"/ 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
|
604 |
"/ |
007bd12bd854
check for source access possible AFTER reading private.rc
Claus Gittinger <cg@exept.de>
parents:
336
diff
changeset
|
605 |
(Smalltalk at:#SourceCodeManager) isNil ifTrue:[ |
007bd12bd854
check for source access possible AFTER reading private.rc
Claus Gittinger <cg@exept.de>
parents:
336
diff
changeset
|
606 |
'***********************************************************************' errorPrintCR. |
007bd12bd854
check for source access possible AFTER reading private.rc
Claus Gittinger <cg@exept.de>
parents:
336
diff
changeset
|
607 |
'***** 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
|
608 |
'***** ' errorPrintCR. |
007bd12bd854
check for source access possible AFTER reading private.rc
Claus Gittinger <cg@exept.de>
parents:
336
diff
changeset
|
609 |
'***** 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
|
610 |
'***** 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
|
611 |
anyWrong := true. |
007bd12bd854
check for source access possible AFTER reading private.rc
Claus Gittinger <cg@exept.de>
parents:
336
diff
changeset
|
612 |
missing := missing , '''source'' '. |
686 | 613 |
]]]]]]]. |
409 | 614 |
|
615 |
"/ |
|
616 |
"/ no longer needed - if we have the package, |
|
617 |
"/ we also have the bitmaps ... |
|
618 |
"/ |
|
619 |
"/ (Smalltalk bitmapFromFileNamed:'SmalltalkX.xbm' inPackage:'stx:libtool') isNil ifTrue:[ |
|
620 |
"/ '***********************************************************************' errorPrintCR. |
|
621 |
"/ '***** ATTENTION: please check installation of your >>bitmap<< files' errorPrintCR. |
|
622 |
"/ anyWrong := true. |
|
623 |
"/ missing := missing , '''bitmaps'' '. |
|
624 |
"/ ]. |
|
355
007bd12bd854
check for source access possible AFTER reading private.rc
Claus Gittinger <cg@exept.de>
parents:
336
diff
changeset
|
625 |
|
007bd12bd854
check for source access possible AFTER reading private.rc
Claus Gittinger <cg@exept.de>
parents:
336
diff
changeset
|
626 |
anyWrong ifTrue:[ |
007bd12bd854
check for source access possible AFTER reading private.rc
Claus Gittinger <cg@exept.de>
parents:
336
diff
changeset
|
627 |
'*****' errorPrintCR. |
007bd12bd854
check for source access possible AFTER reading private.rc
Claus Gittinger <cg@exept.de>
parents:
336
diff
changeset
|
628 |
'***** 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
|
629 |
'***** 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
|
630 |
'***** which is:' errorPrintCR. |
007bd12bd854
check for source access possible AFTER reading private.rc
Claus Gittinger <cg@exept.de>
parents:
336
diff
changeset
|
631 |
Smalltalk systemPath do:[:dir | |
007bd12bd854
check for source access possible AFTER reading private.rc
Claus Gittinger <cg@exept.de>
parents:
336
diff
changeset
|
632 |
('***** ' , dir storeString) errorPrintCR. |
007bd12bd854
check for source access possible AFTER reading private.rc
Claus Gittinger <cg@exept.de>
parents:
336
diff
changeset
|
633 |
]. |
007bd12bd854
check for source access possible AFTER reading private.rc
Claus Gittinger <cg@exept.de>
parents:
336
diff
changeset
|
634 |
|
007bd12bd854
check for source access possible AFTER reading private.rc
Claus Gittinger <cg@exept.de>
parents:
336
diff
changeset
|
635 |
'*****' errorPrintCR. |
007bd12bd854
check for source access possible AFTER reading private.rc
Claus Gittinger <cg@exept.de>
parents:
336
diff
changeset
|
636 |
'***** 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
|
637 |
'***** 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
|
638 |
'***********************************************************************' errorPrintCR. |
007bd12bd854
check for source access possible AFTER reading private.rc
Claus Gittinger <cg@exept.de>
parents:
336
diff
changeset
|
639 |
] |
007bd12bd854
check for source access possible AFTER reading private.rc
Claus Gittinger <cg@exept.de>
parents:
336
diff
changeset
|
640 |
] |
007bd12bd854
check for source access possible AFTER reading private.rc
Claus Gittinger <cg@exept.de>
parents:
336
diff
changeset
|
641 |
! |
169 | 642 |
|
643 |
"/ |
|
644 |
"/ set the package to some useful default |
|
645 |
"/ |
|
646 |
Project notNil ifTrue:[ |
|
647 |
Project setDefaultProject. |
|
443 | 648 |
"/ Project current package:#'private'. |
169 | 649 |
]. |
650 |
||
651 |
"/ |
|
152 | 652 |
"/ if error occurs, and debugger has problems coming up, |
653 |
"/ uncomment the following ... |
|
25 | 654 |
"/ |
10 | 655 |
"/ Debugger := MiniDebugger. |
0 | 656 |
|
152 | 657 |
"/ |
658 |
"/ save an initial image; this will speedup the next startup |
|
659 |
"/ (since all autoload-stuff will already be initialized) |
|
660 |
"/ |
|
672 | 661 |
((Smalltalk commandLineArguments includes:'--quick') |
686 | 662 |
or:[(Smalltalk commandLineArguments includes:'--faststart') |
663 |
or:[(Smalltalk commandLineArguments includes:'--fastStart') |
|
664 |
or:[(Smalltalk isPlugin) |
|
672 | 665 |
]]]) ifFalse:[ |
686 | 666 |
('st.img' asFilename exists not and:['.' asFilename isWritable]) ifTrue:[ |
667 |
|doneWithStartupStuff| |
|
153 | 668 |
|
686 | 669 |
doneWithStartupStuff := Semaphore new. |
609 | 670 |
|
686 | 671 |
Smalltalk addStartBlock:[ |
672 |
[ |
|
673 |
doneWithStartupStuff wait. |
|
674 |
'smalltalk.rc [info]: saving initial image for faster future startup...' infoPrintCR. |
|
675 |
ObjectMemory primSnapShotOn:'st.img' |
|
676 |
] forkAt:1. |
|
677 |
[ |
|
678 |
Delay waitForSeconds:10. |
|
679 |
doneWithStartupStuff signal |
|
680 |
] forkAt:1. |
|
681 |
]. |
|
682 |
]. |
|
672 | 683 |
]. |