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