smalltalk.rc
author Claus Gittinger <cg@exept.de>
Mon, 19 Dec 2005 19:04:13 +0100
changeset 672 43a67655f4f2
parent 668 2050356eb7a8
child 677 222fd88429a3
permissions -rw-r--r--
*** empty log message ***
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
609
f0f51d4a0066 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 568
diff changeset
     1
"/ Encoding: iso8859-1
25
claus
parents: 24
diff changeset
     2
"/
claus
parents: 24
diff changeset
     3
"/ $Header$
86
7cb0bbfd6431 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 80
diff changeset
     4
"/
399
5a842f5d7196 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 397
diff changeset
     5
"/ MIMEType: application/x-smalltalk-source
5a842f5d7196 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 397
diff changeset
     6
"/
209
22793de5d56e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 208
diff changeset
     7
"/ ST/X startup configuration & command file:
22793de5d56e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 208
diff changeset
     8
"/
25
claus
parents: 24
diff changeset
     9
"/ startup configuration for smalltalk
claus
parents: 24
diff changeset
    10
"/
claus
parents: 24
diff changeset
    11
"/ - everything in here are plain smalltalk expressions;
claus
parents: 24
diff changeset
    12
"/ - statements with in a group are separated by a period.
claus
parents: 24
diff changeset
    13
"/ - Each group of statements has to be delimited by an exclamation
claus
parents: 24
diff changeset
    14
"/   character.
claus
parents: 24
diff changeset
    15
"/ - avoid exclas in comments (or double them)
claus
parents: 24
diff changeset
    16
"/ - nested comments are not allowed - take care.
claus
parents: 24
diff changeset
    17
"/
claus
parents: 24
diff changeset
    18
"/ remember: this is fileOut-format
claus
parents: 24
diff changeset
    19
"/
claus
parents: 24
diff changeset
    20
"/ comments can be either:
claus
parents: 24
diff changeset
    21
"/ - standard smalltalk comments (i.e. from dquote to dquote)
claus
parents: 24
diff changeset
    22
"/ - ST/X end of line comments (i.e. dquote followed by /)
claus
parents: 24
diff changeset
    23
"/
claus
parents: 24
diff changeset
    24
"/    "this is a comment"
claus
parents: 24
diff changeset
    25
"/    "/ another comment
claus
parents: 24
diff changeset
    26
"/
claus
parents: 24
diff changeset
    27
"/***************************************************************
claus
parents: 24
diff changeset
    28
"/ PLEASE: only add things here, if they are of general interrest
claus
parents: 24
diff changeset
    29
"/         and NEITHER site specific NOT display specific.
claus
parents: 24
diff changeset
    30
"/
claus
parents: 24
diff changeset
    31
"/ site specific things are to be added to "h_<hostname>.rc"
claus
parents: 24
diff changeset
    32
"/ display specifics to "d_<displayName>.rc"
claus
parents: 24
diff changeset
    33
"/ and private user stuff in "private.rc"
claus
parents: 24
diff changeset
    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
33c547d1a706 *** empty log message ***
penk
parents: 637
diff changeset
    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
f0f51d4a0066 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 568
diff changeset
    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
33c547d1a706 *** empty log message ***
penk
parents: 637
diff changeset
    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
f0f51d4a0066 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 568
diff changeset
    85
Compiler allowUnderscoreInIdentifier:true.
f0f51d4a0066 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 568
diff changeset
    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
0cb137a77319 Initial revision
claus
parents:
diff changeset
    89
25
claus
parents: 24
diff changeset
    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
7cb0bbfd6431 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 80
diff changeset
    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
0c288e422494 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 195
diff changeset
    99
488
521e2d58f050 Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents: 475
diff changeset
   100
|path|
287
8151d262bd27 check for gnu-smalltalk sources along my path;
Claus Gittinger <cg@exept.de>
parents: 272
diff changeset
   101
672
43a67655f4f2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 668
diff changeset
   102
'systemPath before: ' print.
43a67655f4f2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 668
diff changeset
   103
Smalltalk systemPath printCR.
43a67655f4f2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 668
diff changeset
   104
53
00437bd1cfe7 allow systemPath to be set via a shell variable
Claus Gittinger <cg@exept.de>
parents: 42
diff changeset
   105
(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
   106
    Smalltalk systemPath:(path asCollectionOfSubstringsSeparatedBy:$:)
287
8151d262bd27 check for gnu-smalltalk sources along my path;
Claus Gittinger <cg@exept.de>
parents: 272
diff changeset
   107
] ifFalse:[
8151d262bd27 check for gnu-smalltalk sources along my path;
Claus Gittinger <cg@exept.de>
parents: 272
diff changeset
   108
    "/ 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
   109
    "/ 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
   110
    "/ autoloading wrong classes.
8151d262bd27 check for gnu-smalltalk sources along my path;
Claus Gittinger <cg@exept.de>
parents: 272
diff changeset
   111
    (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
   112
	path := path asFilename directoryName.
308
6e6d557009c7 dont loose windows keyboard setup after image restart
Claus Gittinger <cg@exept.de>
parents: 287
diff changeset
   113
	('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
   114
	Smalltalk systemPath:(Smalltalk systemPath remove:path; yourself).
672
43a67655f4f2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 668
diff changeset
   115
    ].
43a67655f4f2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 668
diff changeset
   116
].
43a67655f4f2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 668
diff changeset
   117
43a67655f4f2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 668
diff changeset
   118
(Smalltalk systemPath includes:(OperatingSystem pathOfSTXExecutable asFilename directoryName)) ifFalse:[
43a67655f4f2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 668
diff changeset
   119
    Smalltalk systemPath addFirst:(OperatingSystem pathOfSTXExecutable asFilename directoryName).
43a67655f4f2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 668
diff changeset
   120
].
43a67655f4f2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 668
diff changeset
   121
43a67655f4f2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 668
diff changeset
   122
'../../../stx/libbasic' asFilename exists ifTrue:[
43a67655f4f2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 668
diff changeset
   123
    (Smalltalk systemPath includes:'../../../stx' asFilename pathName) ifFalse:[
43a67655f4f2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 668
diff changeset
   124
	Smalltalk systemPath addFirst:'../../../stx' asFilename pathName.
287
8151d262bd27 check for gnu-smalltalk sources along my path;
Claus Gittinger <cg@exept.de>
parents: 272
diff changeset
   125
    ]
53
00437bd1cfe7 allow systemPath to be set via a shell variable
Claus Gittinger <cg@exept.de>
parents: 42
diff changeset
   126
].
409
3a136424d8e6 set packagePath earlier;
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
   127
672
43a67655f4f2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 668
diff changeset
   128
"/ the current directory should always be first...
409
3a136424d8e6 set packagePath earlier;
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
   129
(Smalltalk systemPath includes:'.') ifTrue:[
3a136424d8e6 set packagePath earlier;
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
   130
    Smalltalk systemPath remove:'.'.
3a136424d8e6 set packagePath earlier;
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
   131
].
672
43a67655f4f2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 668
diff changeset
   132
(Smalltalk systemPath includes:'.' asFilename pathName) ifTrue:[
43a67655f4f2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 668
diff changeset
   133
    Smalltalk systemPath remove:'.' asFilename pathName.
43a67655f4f2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 668
diff changeset
   134
].
43a67655f4f2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 668
diff changeset
   135
Smalltalk systemPath addFirst:'.' asFilename pathName.
488
521e2d58f050 Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents: 475
diff changeset
   136
521e2d58f050 Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents: 475
diff changeset
   137
(path := OperatingSystem getEnvironment:'STX_PACKAGEPATH') notNil ifTrue:[
521e2d58f050 Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents: 475
diff changeset
   138
    Smalltalk packagePath:(path asCollectionOfSubstringsSeparatedBy:$:).
521e2d58f050 Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents: 475
diff changeset
   139
    'smalltalk.rc [info]: setting packagePath from STX_PACKAGEPATH' printCR.
521e2d58f050 Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents: 475
diff changeset
   140
] ifFalse:[
521e2d58f050 Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents: 475
diff changeset
   141
    "/
521e2d58f050 Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents: 475
diff changeset
   142
    "/ if running in the development environment,
521e2d58f050 Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents: 475
diff changeset
   143
    "/ only use the local packages.
521e2d58f050 Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents: 475
diff changeset
   144
    "/
668
2050356eb7a8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 664
diff changeset
   145
    '../../../stx/projects/smalltalk' asFilename exists ifTrue:[
609
f0f51d4a0066 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 568
diff changeset
   146
	Smalltalk packagePath removeAll; add:'../../..'.
488
521e2d58f050 Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents: 475
diff changeset
   147
	'smalltalk.rc [info]: setting packagePath for local operation' printCR.
521e2d58f050 Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents: 475
diff changeset
   148
    ].
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
    "/
521e2d58f050 Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents: 475
diff changeset
   151
    "/ any additional local packages ?.
521e2d58f050 Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents: 475
diff changeset
   152
    "/
521e2d58f050 Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents: 475
diff changeset
   153
    'packages' asFilename exists ifTrue:[
609
f0f51d4a0066 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 568
diff changeset
   154
	 Smalltalk packagePath addFirst:'./packages'.
488
521e2d58f050 Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents: 475
diff changeset
   155
	 "/ 'additional local packages' printCR.
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
    "/ 'packagePath: ' print. Smalltalk packagePath printCR.
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
672
43a67655f4f2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 668
diff changeset
   160
'systemPath: ' errorPrint. Smalltalk systemPath errorPrintCR.
43a67655f4f2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 668
diff changeset
   161
'packagePath: ' errorPrint. Smalltalk packagePath errorPrintCR.
43a67655f4f2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 668
diff changeset
   162
409
3a136424d8e6 set packagePath earlier;
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
   163
Smalltalk flushPathCaches.
86
7cb0bbfd6431 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 80
diff changeset
   164
!
7cb0bbfd6431 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 80
diff changeset
   165
488
521e2d58f050 Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents: 475
diff changeset
   166
|args buildClasses openDisplay prevCatchSetting|
86
7cb0bbfd6431 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 80
diff changeset
   167
488
521e2d58f050 Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents: 475
diff changeset
   168
args := Smalltalk commandLineArguments ? #().
521e2d58f050 Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents: 475
diff changeset
   169
521e2d58f050 Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents: 475
diff changeset
   170
buildClasses := false.
126
565643e43074 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 123
diff changeset
   171
((args size > 0) and:[args last = '--buildClasses']) ifTrue:[
86
7cb0bbfd6431 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 80
diff changeset
   172
    'binary' asFilename isDirectory ifFalse:[
195
1cf850844da9 new infoMessage scheme
Claus Gittinger <cg@exept.de>
parents: 170
diff changeset
   173
	'smalltalk.rc [warning]: no binary directory for classes.' errorPrintCR.
488
521e2d58f050 Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents: 475
diff changeset
   174
	Smalltalk exit.
86
7cb0bbfd6431 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 80
diff changeset
   175
    ].
488
521e2d58f050 Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents: 475
diff changeset
   176
    buildClasses := true.
432
cc53b5447d56 showBanner now invoked by smalltalk.rc
ps
parents: 428
diff changeset
   177
].
cc53b5447d56 showBanner now invoked by smalltalk.rc
ps
parents: 428
diff changeset
   178
8
d82829c0d867 *** empty log message ***
claus
parents: 7
diff changeset
   179
488
521e2d58f050 Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents: 475
diff changeset
   180
"/ check for display-classes being required and compiled into the system;
521e2d58f050 Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents: 475
diff changeset
   181
"/ if not, load the display classes.
25
claus
parents: 24
diff changeset
   182
"/
488
521e2d58f050 Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents: 475
diff changeset
   183
openDisplay := false.
521e2d58f050 Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents: 475
diff changeset
   184
(Smalltalk isHeadless or:[args includes:'--noDisplay']) ifFalse:[
521e2d58f050 Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents: 475
diff changeset
   185
    (Smalltalk at:#DeviceWorkstation) isNil ifTrue:[
637
17edc607c922 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 632
diff changeset
   186
	 "no view classes compiled into the system.
488
521e2d58f050 Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents: 475
diff changeset
   187
	  Minimum smalltalk does only contain libbasic, libcomp and librun.
521e2d58f050 Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents: 475
diff changeset
   188
	  FileIn view stuff"
521e2d58f050 Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents: 475
diff changeset
   189
656
33c547d1a706 *** empty log message ***
penk
parents: 637
diff changeset
   190
	 'smalltalk.rc [info]: installing required class libraries...' infoPrintCR.
488
521e2d58f050 Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents: 475
diff changeset
   191
	 (Smalltalk isClassLibraryLoaded:'libbasic2') ifFalse:[
521e2d58f050 Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents: 475
diff changeset
   192
	      Smalltalk loadPackage:'stx:libbasic2'.
521e2d58f050 Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents: 475
diff changeset
   193
	 ].
521e2d58f050 Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents: 475
diff changeset
   194
	 Smalltalk loadPackage:'stx:libview'.
521e2d58f050 Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents: 475
diff changeset
   195
	 Smalltalk fileInClassLibrary:'XWorkstation' inPackage:'stx:libview'.
521e2d58f050 Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents: 475
diff changeset
   196
	 OperatingSystem isMSWINDOWSlike ifTrue:[
521e2d58f050 Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents: 475
diff changeset
   197
	     Smalltalk fileInClassLibrary:'WinWorkstation' inPackage:'stx:libview'.
609
f0f51d4a0066 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 568
diff changeset
   198
	 ].
488
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
    openDisplay := true.
521e2d58f050 Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents: 475
diff changeset
   201
].
521e2d58f050 Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents: 475
diff changeset
   202
521e2d58f050 Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents: 475
diff changeset
   203
521e2d58f050 Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents: 475
diff changeset
   204
"/ Install patches, once everything has been loaded.
521e2d58f050 Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents: 475
diff changeset
   205
"/ 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
   206
488
521e2d58f050 Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents: 475
diff changeset
   207
prevCatchSetting := Class catchMethodRedefinitions.
521e2d58f050 Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents: 475
diff changeset
   208
Class catchMethodRedefinitions:false.
521e2d58f050 Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents: 475
diff changeset
   209
(Smalltalk secureFileIn:(Smalltalk commandName asFilename withSuffix:'pch')) ifFalse:[
521e2d58f050 Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents: 475
diff changeset
   210
    Smalltalk isStandAloneApp ifFalse:[
521e2d58f050 Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents: 475
diff changeset
   211
	Smalltalk secureFileIn:'patches'.
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
Class catchMethodRedefinitions:prevCatchSetting.
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
openDisplay ifTrue:[
521e2d58f050 Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents: 475
diff changeset
   217
    "/ open the graphical display
521e2d58f050 Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents: 475
diff changeset
   218
    [
521e2d58f050 Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents: 475
diff changeset
   219
	Screen openDefaultDisplay:nil.
521e2d58f050 Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents: 475
diff changeset
   220
    ] on:Screen deviceOpenErrorSignal do:[:ex|
491
71ecb2b5851a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 489
diff changeset
   221
	('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
   222
	'smalltalk.rc [info]: Either set the DISPLAY environment variable,' infoPrintCR.
521e2d58f050 Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents: 475
diff changeset
   223
	'smalltalk.rc [info]: or start smalltalk with a -display argument.' infoPrintCR.
521e2d58f050 Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents: 475
diff changeset
   224
	Smalltalk isStandAloneApp ifFalse:[
394
70ecff920548 Fix DISPLAY access for headless servers.
Stefan Vogel <sv@exept.de>
parents: 387
diff changeset
   225
	    '' errorPrintCR.
70ecff920548 Fix DISPLAY access for headless servers.
Stefan Vogel <sv@exept.de>
parents: 387
diff changeset
   226
	    '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
   227
	    OperatingSystem isUNIXlike ifTrue:[
70ecff920548 Fix DISPLAY access for headless servers.
Stefan Vogel <sv@exept.de>
parents: 387
diff changeset
   228
		'          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
   229
	    ] ifFalse:[
70ecff920548 Fix DISPLAY access for headless servers.
Stefan Vogel <sv@exept.de>
parents: 387
diff changeset
   230
		'          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
   231
	    ].
70ecff920548 Fix DISPLAY access for headless servers.
Stefan Vogel <sv@exept.de>
parents: 387
diff changeset
   232
	    Smalltalk readEvalPrint.
355
007bd12bd854 check for source access possible AFTER reading private.rc
Claus Gittinger <cg@exept.de>
parents: 336
diff changeset
   233
	].
488
521e2d58f050 Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents: 475
diff changeset
   234
	Smalltalk exit
5
420e4af41733 *** empty log message ***
claus
parents: 0
diff changeset
   235
    ].
10
43d0db9ff204 *** empty log message ***
claus
parents: 8
diff changeset
   236
].
0
0cb137a77319 Initial revision
claus
parents:
diff changeset
   237
25
claus
parents: 24
diff changeset
   238
"/
claus
parents: 24
diff changeset
   239
"/ this makes X-errors be handled immediately (so you see,
claus
parents: 24
diff changeset
   240
"/ where it occured) but slows down the system soooo muuuucccchhh ..
claus
parents: 24
diff changeset
   241
"/ if commented out, errors will be reported asynchronously.
claus
parents: 24
diff changeset
   242
"/ (I enable this, when things go bad during startup)
claus
parents: 24
diff changeset
   243
"/
10
43d0db9ff204 *** empty log message ***
claus
parents: 8
diff changeset
   244
"/ Display unBuffered.
0
0cb137a77319 Initial revision
claus
parents:
diff changeset
   245
617
f6afee16b359 Add --quick options to come up without gimmicks
Stefan Vogel <sv@exept.de>
parents: 612
diff changeset
   246
(buildClasses
f6afee16b359 Add --quick options to come up without gimmicks
Stefan Vogel <sv@exept.de>
parents: 612
diff changeset
   247
 or:[(args includes:'--noBanner')
664
6c03c2633bcb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 663
diff changeset
   248
 or:[(args includes:'--quick')
6c03c2633bcb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 663
diff changeset
   249
 or:[(args includes:'--faststart')
672
43a67655f4f2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 668
diff changeset
   250
 or:[(args includes:'--fastStart')
43a67655f4f2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 668
diff changeset
   251
 or:[(args includes:'--browserWindow:')
43a67655f4f2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 668
diff changeset
   252
]]]]]) ifFalse:[
488
521e2d58f050 Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents: 475
diff changeset
   253
    Smalltalk fileIn:'showBanner.rc'.
521e2d58f050 Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents: 475
diff changeset
   254
].
521e2d58f050 Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents: 475
diff changeset
   255
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
"/ lazy loading
521e2d58f050 Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents: 475
diff changeset
   258
"/ (faster fileIn) - this is EXPERIMENTAL.
521e2d58f050 Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents: 475
diff changeset
   259
"/
521e2d58f050 Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents: 475
diff changeset
   260
"/ - if turned on, an autoload operation will only create methodStubs
521e2d58f050 Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents: 475
diff changeset
   261
"/   (uncompiled) which trap when called the first time.
521e2d58f050 Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents: 475
diff changeset
   262
"/   The bytecode compiler will compile them when first executen.
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
"/ - if turned off, an autoload will load & compile the whole class,
521e2d58f050 Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents: 475
diff changeset
   265
"/   which makes autoloading slower, but avoids the initial delays
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
"/ 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
   268
"/ If there are any problems with lazy methods, disable the following
521e2d58f050 Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents: 475
diff changeset
   269
"/ and let me (info@exept.de) know what happened.
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
Autoload compileLazy:true.
521e2d58f050 Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents: 475
diff changeset
   272
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
"/ read the abbrev.stc file, extract class names
521e2d58f050 Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents: 475
diff changeset
   275
"/ and install all nonExisting classes as autoloaded
521e2d58f050 Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents: 475
diff changeset
   276
"/
521e2d58f050 Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents: 475
diff changeset
   277
609
f0f51d4a0066 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 568
diff changeset
   278
Class withoutUpdatingChangesDo:[
568
15e0e2736c8b fileNameAbbrevs; make rules
Claus Gittinger <cg@exept.de>
parents: 566
diff changeset
   279
    |needToReactivate|
15e0e2736c8b fileNameAbbrevs; make rules
Claus Gittinger <cg@exept.de>
parents: 566
diff changeset
   280
15e0e2736c8b fileNameAbbrevs; make rules
Claus Gittinger <cg@exept.de>
parents: 566
diff changeset
   281
    HistoryManager notNil ifTrue:[
15e0e2736c8b fileNameAbbrevs; make rules
Claus Gittinger <cg@exept.de>
parents: 566
diff changeset
   282
	needToReactivate := HistoryManager isActive.
15e0e2736c8b fileNameAbbrevs; make rules
Claus Gittinger <cg@exept.de>
parents: 566
diff changeset
   283
	HistoryManager deactivate.
15e0e2736c8b fileNameAbbrevs; make rules
Claus Gittinger <cg@exept.de>
parents: 566
diff changeset
   284
    ] ifFalse:[
15e0e2736c8b fileNameAbbrevs; make rules
Claus Gittinger <cg@exept.de>
parents: 566
diff changeset
   285
	needToReactivate := false
15e0e2736c8b fileNameAbbrevs; make rules
Claus Gittinger <cg@exept.de>
parents: 566
diff changeset
   286
    ].
617
f6afee16b359 Add --quick options to come up without gimmicks
Stefan Vogel <sv@exept.de>
parents: 612
diff changeset
   287
663
6c2430ac1d44 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 656
diff changeset
   288
    ((Smalltalk commandLineArguments includes:'--quick')
6c2430ac1d44 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 656
diff changeset
   289
    or:[ (Smalltalk commandLineArguments includes:'--faststart')
6c2430ac1d44 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 656
diff changeset
   290
    or:[ (Smalltalk commandLineArguments includes:'--fastStart')
6c2430ac1d44 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 656
diff changeset
   291
    ]]) ifFalse:[
656
33c547d1a706 *** empty log message ***
penk
parents: 637
diff changeset
   292
	'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
   293
	Smalltalk installAutoloadedClasses.
f6afee16b359 Add --quick options to come up without gimmicks
Stefan Vogel <sv@exept.de>
parents: 612
diff changeset
   294
    ].
568
15e0e2736c8b fileNameAbbrevs; make rules
Claus Gittinger <cg@exept.de>
parents: 566
diff changeset
   295
    needToReactivate ifTrue:[HistoryManager activate].
15e0e2736c8b fileNameAbbrevs; make rules
Claus Gittinger <cg@exept.de>
parents: 566
diff changeset
   296
].
488
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
buildClasses ifTrue:[
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
    "/ load all lazy classes
521e2d58f050 Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents: 475
diff changeset
   301
    "/
521e2d58f050 Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents: 475
diff changeset
   302
    Autoload subclasses do:[:aClass |
521e2d58f050 Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents: 475
diff changeset
   303
	Autoload autoloadFailedSignal handle:[:ex |
521e2d58f050 Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents: 475
diff changeset
   304
	    'smalltalk.rc [warning]: autoload failed' errorPrintCR.
521e2d58f050 Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents: 475
diff changeset
   305
	    ex return.
521e2d58f050 Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents: 475
diff changeset
   306
	] do:[
656
33c547d1a706 *** empty log message ***
penk
parents: 637
diff changeset
   307
	    'smalltalk.rc [info]: loading ' infoPrint. aClass name infoPrint. '...' infoPrintCR.
488
521e2d58f050 Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents: 475
diff changeset
   308
	    aClass autoload.
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
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
    "/ binary save all classes
521e2d58f050 Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents: 475
diff changeset
   314
    "/
521e2d58f050 Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents: 475
diff changeset
   315
    Autoload loadedClasses do:[:cls |
656
33c547d1a706 *** empty log message ***
penk
parents: 637
diff changeset
   316
	'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
   317
	cls binaryFileOut.
521e2d58f050 Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents: 475
diff changeset
   318
	OperatingSystem executeCommand:'mv *.cls binary'.
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
    Smalltalk exit
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
25
claus
parents: 24
diff changeset
   324
"/
claus
parents: 24
diff changeset
   325
"/ this starts the incremental GC earlier
claus
parents: 24
diff changeset
   326
"/ (default is 500000)
claus
parents: 24
diff changeset
   327
"/ the number given is the number of bytes which have to be allocated
claus
parents: 24
diff changeset
   328
"/ since the last GC, to start the incremental GC running.
claus
parents: 24
diff changeset
   329
"/ (see ObjectMemory>>documentation)
claus
parents: 24
diff changeset
   330
"/ Claus: I moved this to the private.rc file
claus
parents: 24
diff changeset
   331
"/
609
f0f51d4a0066 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 568
diff changeset
   332
"/ ObjectMemory incrementalGCLimit:100000.
0
0cb137a77319 Initial revision
claus
parents:
diff changeset
   333
25
claus
parents: 24
diff changeset
   334
"/
claus
parents: 24
diff changeset
   335
"/ this starts the incremental GC when freeSpace drops below a limit
claus
parents: 24
diff changeset
   336
"/ (default is nil - i.e. dont look at freeSpace)
claus
parents: 24
diff changeset
   337
"/ (see ObjectMemory>>documentation)
claus
parents: 24
diff changeset
   338
"/ Claus: I moved this to the private.rc file
claus
parents: 24
diff changeset
   339
"/
609
f0f51d4a0066 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 568
diff changeset
   340
"/ ObjectMemory freeSpaceGCLimit:300000.
16
db5d473df9f0 *** empty log message ***
claus
parents: 12
diff changeset
   341
322
48f27b856cb9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 309
diff changeset
   342
"/ experimental: try to always keep some bytes in the pocket
48f27b856cb9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 309
diff changeset
   343
"/ this changes the memory policy, to start the background collector whenever
609
f0f51d4a0066 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 568
diff changeset
   344
"/ freespace drops below 250k or 500k have been allocated since the last GC.
322
48f27b856cb9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 309
diff changeset
   345
"/ AND to allocate more memory, if (after the collect) less than 1Mb is free.
48f27b856cb9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 309
diff changeset
   346
"/ Doing so makes the system behave better if lots of memory is required
48f27b856cb9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 309
diff changeset
   347
"/ for short periods of time, since it prepares itself for that situation
48f27b856cb9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 309
diff changeset
   348
"/ during idle time. (I often walk around in the fileBrowser, loading big
48f27b856cb9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 309
diff changeset
   349
"/ files like XWorkstation.st or SystemBrowser.st ....)
48f27b856cb9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 309
diff changeset
   350
609
f0f51d4a0066 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 568
diff changeset
   351
ObjectMemory freeSpaceGCAmount:1000000.
f0f51d4a0066 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 568
diff changeset
   352
ObjectMemory freeSpaceGCLimit:250000.
f0f51d4a0066 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 568
diff changeset
   353
ObjectMemory incrementalGCLimit:500000.
322
48f27b856cb9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 309
diff changeset
   354
ObjectMemory oldSpaceIncrement:500000.
457
de0d828c363c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 453
diff changeset
   355
ObjectMemory oldSpaceCompressLimit:0.   "/ temporary kludge
609
f0f51d4a0066 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 568
diff changeset
   356
ObjectMemory startBackgroundCollectorAt:5.
f0f51d4a0066 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 568
diff changeset
   357
ObjectMemory startBackgroundFinalizationAt:5.
566
fedb8719e3b6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 558
diff changeset
   358
fedb8719e3b6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 558
diff changeset
   359
"/ this limits the amount of memory which is allocated for oldSpace
fedb8719e3b6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 558
diff changeset
   360
"/ (for example to prevent ST/X from taking memory from other processes)
fedb8719e3b6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 558
diff changeset
   361
"/ The absolute maximum is a builtIn constant and OS specific.
fedb8719e3b6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 558
diff changeset
   362
fedb8719e3b6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 558
diff changeset
   363
"/ ObjectMemory maxOldSpace:1024*1024*128.
fedb8719e3b6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 558
diff changeset
   364
ObjectMemory maxOldSpace:1024*1024*256.
322
48f27b856cb9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 309
diff changeset
   365
48f27b856cb9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 309
diff changeset
   366
"/ experimental:
48f27b856cb9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 309
diff changeset
   367
"/ run the background collector at a dynamic priority - it will
48f27b856cb9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 309
diff changeset
   368
"/ now always get a chance to make some progress ...
48f27b856cb9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 309
diff changeset
   369
48f27b856cb9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 309
diff changeset
   370
Smalltalk addStartBlock:[
394
70ecff920548 Fix DISPLAY access for headless servers.
Stefan Vogel <sv@exept.de>
parents: 387
diff changeset
   371
    'smalltalk.rc [info]: start timeSlicing...' infoPrintCR.
322
48f27b856cb9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 309
diff changeset
   372
    Processor startTimeSlicing.
48f27b856cb9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 309
diff changeset
   373
    Processor supportDynamicPriorities:true.
48f27b856cb9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 309
diff changeset
   374
    ObjectMemory backgroundCollectProcess priorityRange:(4 to:9).
48f27b856cb9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 309
diff changeset
   375
    ObjectMemory backgroundFinalizationProcess priorityRange:(4 to:9).
48f27b856cb9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 309
diff changeset
   376
].
48f27b856cb9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 309
diff changeset
   377
48f27b856cb9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 309
diff changeset
   378
"/ experimental: configure the memory manager to quickly increase
48f27b856cb9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 309
diff changeset
   379
"/ its oldSpace, as long as it stays below 8Mb (i.e. do not enter
48f27b856cb9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 309
diff changeset
   380
"/ a blocking mark&sweep or compress, but go straight ahead increasing
48f27b856cb9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 309
diff changeset
   381
"/ the oldSpace). Above that, behave as usual, i.e. try a GC first,
48f27b856cb9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 309
diff changeset
   382
"/ then increase the oldSpace size if that did not help.
48f27b856cb9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 309
diff changeset
   383
"/ If you have a machine with lots of (real) memory, you may want to
48f27b856cb9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 309
diff changeset
   384
"/ increase the number. The value below should be ok for 16-32Mb machines.
48f27b856cb9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 309
diff changeset
   385
"/
48f27b856cb9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 309
diff changeset
   386
ObjectMemory fastMoreOldSpaceLimit:8*1024*1024.
48f27b856cb9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 309
diff changeset
   387
ObjectMemory fastMoreOldSpaceAllocation:true.
48f27b856cb9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 309
diff changeset
   388
!
48f27b856cb9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 309
diff changeset
   389
488
521e2d58f050 Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents: 475
diff changeset
   390
"/ another experimental (and a secret for now, since I don't want
322
48f27b856cb9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 309
diff changeset
   391
"/ you to play with those ;-)
48f27b856cb9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 309
diff changeset
   392
"/ For now, this is experimental. Once the best numbers
48f27b856cb9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 309
diff changeset
   393
"/ have been found, I'll hardwire them and document it ...
48f27b856cb9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 309
diff changeset
   394
426
74cc4af22873 install autoloaded classes BEFORE doing display.rc/host.rc
Claus Gittinger <cg@exept.de>
parents: 424
diff changeset
   395
|a needToReactivate|
74cc4af22873 install autoloaded classes BEFORE doing display.rc/host.rc
Claus Gittinger <cg@exept.de>
parents: 424
diff changeset
   396
322
48f27b856cb9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 309
diff changeset
   397
ObjectMemory newSpaceSize > (500*1024) ifTrue:[
48f27b856cb9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 309
diff changeset
   398
    a := #(nil nil nil nil -16 -4 -2 -2 0 0 16 nil) copy.
48f27b856cb9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 309
diff changeset
   399
] ifFalse:[
48f27b856cb9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 309
diff changeset
   400
"/         min max cpy /32 /16 /8 /4 /2 /4 /8 /16 /32 "
48f27b856cb9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 309
diff changeset
   401
    "/
48f27b856cb9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 309
diff changeset
   402
    "/ slow tenure - keeps objects longer in newSpace,
48f27b856cb9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 309
diff changeset
   403
    "/  producing more scavenge overhead, but releasing IGC somewhat
48f27b856cb9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 309
diff changeset
   404
    "/
48f27b856cb9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 309
diff changeset
   405
"/  a := #(nil nil nil -100 -8 -4 -1  1 2  4  8   16 nil) copy.
48f27b856cb9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 309
diff changeset
   406
"/  a := #(nil nil nil nil -16 -4  0  0  0 4 16 nil) copy.
48f27b856cb9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 309
diff changeset
   407
48f27b856cb9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 309
diff changeset
   408
    "fast tenure"
48f27b856cb9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 309
diff changeset
   409
    "/
48f27b856cb9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 309
diff changeset
   410
    "/ fast tenure - moves objects earlier into oldSpace,
48f27b856cb9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 309
diff changeset
   411
    "/ releasing newSpace collector; however, the oldSpace IGC
48f27b856cb9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 309
diff changeset
   412
    "/ may have more work to do.
48f27b856cb9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 309
diff changeset
   413
    "/
48f27b856cb9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 309
diff changeset
   414
    a := #(nil nil nil nil -20 -8 -3 -1 -1 1 16 nil) copy.
48f27b856cb9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 309
diff changeset
   415
].
48f27b856cb9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 309
diff changeset
   416
ObjectMemory tenureParameters:a.
488
521e2d58f050 Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents: 475
diff changeset
   417
!
0
0cb137a77319 Initial revision
claus
parents:
diff changeset
   418
25
claus
parents: 24
diff changeset
   419
"/
358
14a45495e3d8 autoloaded classes must be read after the host.rc file;
Claus Gittinger <cg@exept.de>
parents: 355
diff changeset
   420
"/ 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
   421
"/
656
33c547d1a706 *** empty log message ***
penk
parents: 637
diff changeset
   422
"/ '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
   423
Smalltalk fileIn:'host.rc'.
14a45495e3d8 autoloaded classes must be read after the host.rc file;
Claus Gittinger <cg@exept.de>
parents: 355
diff changeset
   424
14a45495e3d8 autoloaded classes must be read after the host.rc file;
Claus Gittinger <cg@exept.de>
parents: 355
diff changeset
   425
"/
25
claus
parents: 24
diff changeset
   426
"/ this handles all variant display stuff
claus
parents: 24
diff changeset
   427
"/ (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
   428
"/ 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
   429
"/ Host specific things are configured in host.rc.
25
claus
parents: 24
diff changeset
   430
"/
336
5eb44f3e88af do not output 'no sourceCode' warning messages
Claus Gittinger <cg@exept.de>
parents: 331
diff changeset
   431
Display notNil ifTrue:[
656
33c547d1a706 *** empty log message ***
penk
parents: 637
diff changeset
   432
    "/ '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
   433
    Smalltalk fileIn:'display.rc'.
5eb44f3e88af do not output 'no sourceCode' warning messages
Claus Gittinger <cg@exept.de>
parents: 331
diff changeset
   434
].
0
0cb137a77319 Initial revision
claus
parents:
diff changeset
   435
25
claus
parents: 24
diff changeset
   436
"/
143
71dc5ec7ef26 Renamed NewLauncher to Launcher.
Stefan Vogel <sv@exept.de>
parents: 133
diff changeset
   437
"/ Ask user to accept Licence.
71dc5ec7ef26 Renamed NewLauncher to Launcher.
Stefan Vogel <sv@exept.de>
parents: 133
diff changeset
   438
"/ exit, if rejected.
324
e8eb27061a3f llow for licenceBox to be suppressed
Claus Gittinger <cg@exept.de>
parents: 322
diff changeset
   439
"/
152
956f80caf731 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 144
diff changeset
   440
"/ You may find this annoying - but lawers say: "this is a must ..." ;-)
956f80caf731 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 144
diff changeset
   441
"/ (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
   442
"/ 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
   443
"/ 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
   444
"/ 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
   445
"/ read the code below).
220
8200018dbaee *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 209
diff changeset
   446
324
e8eb27061a3f llow for licenceBox to be suppressed
Claus Gittinger <cg@exept.de>
parents: 322
diff changeset
   447
"/
325
10f4f4024870 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 324
diff changeset
   448
"/ WARNING: read the licence text before you:
10f4f4024870 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 324
diff changeset
   449
"/      - disable the code below,
10f4f4024870 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 324
diff changeset
   450
"/      - or start stx with a suppress argument.
324
e8eb27061a3f llow for licenceBox to be suppressed
Claus Gittinger <cg@exept.de>
parents: 322
diff changeset
   451
"/
250
2d66cd491981 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 226
diff changeset
   452
488
521e2d58f050 Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents: 475
diff changeset
   453
(Smalltalk isStandAloneApp not and:[Display notNil]) ifTrue:[
617
f6afee16b359 Add --quick options to come up without gimmicks
Stefan Vogel <sv@exept.de>
parents: 612
diff changeset
   454
    ((Smalltalk commandLineArguments includes:'--noLicenceBox')
663
6c2430ac1d44 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 656
diff changeset
   455
     or:[(Smalltalk commandLineArguments includes:'--quick')
6c2430ac1d44 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 656
diff changeset
   456
     or:[(Smalltalk commandLineArguments includes:'--faststart')
6c2430ac1d44 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 656
diff changeset
   457
     or:[(Smalltalk commandLineArguments includes:'--fastStart')
672
43a67655f4f2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 668
diff changeset
   458
     or:[(Smalltalk commandLineArguments includes:'--browserWindow:')
43a67655f4f2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 668
diff changeset
   459
    ]]]]) ifFalse:[
488
521e2d58f050 Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents: 475
diff changeset
   460
	Smalltalk addStartBlock:[
656
33c547d1a706 *** empty log message ***
penk
parents: 637
diff changeset
   461
	    'smalltalk.rc [info]: show licence conditions...' infoPrintCR.
488
521e2d58f050 Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents: 475
diff changeset
   462
	    LicenceBox autoload.
521e2d58f050 Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents: 475
diff changeset
   463
	    LicenceBox licenceRejectSignal handle:[:ex|
521e2d58f050 Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents: 475
diff changeset
   464
		Smalltalk exit
521e2d58f050 Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents: 475
diff changeset
   465
	    ] do:[
656
33c547d1a706 *** empty log message ***
penk
parents: 637
diff changeset
   466
		(LicenceBox open) ifFalse:[
33c547d1a706 *** empty log message ***
penk
parents: 637
diff changeset
   467
		    'smalltalk.rc [info]: licence conditions not accepted.' infoPrintCR.
33c547d1a706 *** empty log message ***
penk
parents: 637
diff changeset
   468
		    Smalltalk exit
33c547d1a706 *** empty log message ***
penk
parents: 637
diff changeset
   469
		].
488
521e2d58f050 Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents: 475
diff changeset
   470
		Smalltalk at:#LicenceBox put:nil.
521e2d58f050 Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents: 475
diff changeset
   471
	    ].
336
5eb44f3e88af do not output 'no sourceCode' warning messages
Claus Gittinger <cg@exept.de>
parents: 331
diff changeset
   472
	]
324
e8eb27061a3f llow for licenceBox to be suppressed
Claus Gittinger <cg@exept.de>
parents: 322
diff changeset
   473
    ]
143
71dc5ec7ef26 Renamed NewLauncher to Launcher.
Stefan Vogel <sv@exept.de>
parents: 133
diff changeset
   474
].
358
14a45495e3d8 autoloaded classes must be read after the host.rc file;
Claus Gittinger <cg@exept.de>
parents: 355
diff changeset
   475
!
14a45495e3d8 autoloaded classes must be read after the host.rc file;
Claus Gittinger <cg@exept.de>
parents: 355
diff changeset
   476
14a45495e3d8 autoloaded classes must be read after the host.rc file;
Claus Gittinger <cg@exept.de>
parents: 355
diff changeset
   477
"/
14a45495e3d8 autoloaded classes must be read after the host.rc file;
Claus Gittinger <cg@exept.de>
parents: 355
diff changeset
   478
"/ some ST80 name aliases
14a45495e3d8 autoloaded classes must be read after the host.rc file;
Claus Gittinger <cg@exept.de>
parents: 355
diff changeset
   479
"/ (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
   480
"/
14a45495e3d8 autoloaded classes must be read after the host.rc file;
Claus Gittinger <cg@exept.de>
parents: 355
diff changeset
   481
(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
   482
    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
   483
].
14a45495e3d8 autoloaded classes must be read after the host.rc file;
Claus Gittinger <cg@exept.de>
parents: 355
diff changeset
   484
(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
   485
    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
   486
    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
   487
    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
   488
].
14a45495e3d8 autoloaded classes must be read after the host.rc file;
Claus Gittinger <cg@exept.de>
parents: 355
diff changeset
   489
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
   490
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
   491
(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
   492
    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
   493
    Smalltalk at:#DialogView put:cls.
397
5ad969d9ea05 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 396
diff changeset
   494
    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
   495
].
14a45495e3d8 autoloaded classes must be read after the host.rc file;
Claus Gittinger <cg@exept.de>
parents: 355
diff changeset
   496
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
   497
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
   498
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
   499
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
   500
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
   501
Smalltalk at:#SignalCollection put:SignalSet.
424
4b6de7399a42 ProgrsssWidgetSpec alias (VW compat)
Claus Gittinger <cg@exept.de>
parents: 416
diff changeset
   502
(cls := Smalltalk at:#ProgressIndicatorSpec) notNil ifTrue:[
4b6de7399a42 ProgrsssWidgetSpec alias (VW compat)
Claus Gittinger <cg@exept.de>
parents: 416
diff changeset
   503
    Smalltalk at:#ProgressWidgetSpec put:cls.
4b6de7399a42 ProgrsssWidgetSpec alias (VW compat)
Claus Gittinger <cg@exept.de>
parents: 416
diff changeset
   504
].
428
a73fe2bfa29e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 426
diff changeset
   505
(cls := Smalltalk at:#ProgressIndicator) notNil ifTrue:[
a73fe2bfa29e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 426
diff changeset
   506
    Smalltalk at:#ProgressWidgetView put:cls.
a73fe2bfa29e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 426
diff changeset
   507
].
358
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
"/ FileDirectory notNil ifTrue:[
14a45495e3d8 autoloaded classes must be read after the host.rc file;
Claus Gittinger <cg@exept.de>
parents: 355
diff changeset
   510
"/     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
   511
"/ ].
14a45495e3d8 autoloaded classes must be read after the host.rc file;
Claus Gittinger <cg@exept.de>
parents: 355
diff changeset
   512
488
521e2d58f050 Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents: 475
diff changeset
   513
Screen notNil ifTrue:[
521e2d58f050 Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents: 475
diff changeset
   514
    Smalltalk at:#Window put:Screen.
521e2d58f050 Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents: 475
diff changeset
   515
    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
   516
].
14a45495e3d8 autoloaded classes must be read after the host.rc file;
Claus Gittinger <cg@exept.de>
parents: 355
diff changeset
   517
14a45495e3d8 autoloaded classes must be read after the host.rc file;
Claus Gittinger <cg@exept.de>
parents: 355
diff changeset
   518
"/
14a45495e3d8 autoloaded classes must be read after the host.rc file;
Claus Gittinger <cg@exept.de>
parents: 355
diff changeset
   519
"/ 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
   520
"/
14a45495e3d8 autoloaded classes must be read after the host.rc file;
Claus Gittinger <cg@exept.de>
parents: 355
diff changeset
   521
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
   522
14a45495e3d8 autoloaded classes must be read after the host.rc file;
Claus Gittinger <cg@exept.de>
parents: 355
diff changeset
   523
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
   524
!
143
71dc5ec7ef26 Renamed NewLauncher to Launcher.
Stefan Vogel <sv@exept.de>
parents: 133
diff changeset
   525
71dc5ec7ef26 Renamed NewLauncher to Launcher.
Stefan Vogel <sv@exept.de>
parents: 133
diff changeset
   526
"/
41
d61cda45c461 separated keyboard macros
Claus Gittinger <cg@exept.de>
parents: 26
diff changeset
   527
"/ read private (per user) stuff
25
claus
parents: 24
diff changeset
   528
"/
632
6cb9fe000c20 -F arg to allow other than private.rc
Claus Gittinger <cg@exept.de>
parents: 617
diff changeset
   529
(Smalltalk commandLine includes:'-F') ifTrue:[
6cb9fe000c20 -F arg to allow other than private.rc
Claus Gittinger <cg@exept.de>
parents: 617
diff changeset
   530
    |idx file|
6cb9fe000c20 -F arg to allow other than private.rc
Claus Gittinger <cg@exept.de>
parents: 617
diff changeset
   531
6cb9fe000c20 -F arg to allow other than private.rc
Claus Gittinger <cg@exept.de>
parents: 617
diff changeset
   532
    idx := Smalltalk commandLine indexOf:'-F'.
6cb9fe000c20 -F arg to allow other than private.rc
Claus Gittinger <cg@exept.de>
parents: 617
diff changeset
   533
    file := Smalltalk commandLine at:idx + 1.
656
33c547d1a706 *** empty log message ***
penk
parents: 637
diff changeset
   534
    ('smalltalk.rc [info]: reading ''' , file , '''...') infoPrintCR.
632
6cb9fe000c20 -F arg to allow other than private.rc
Claus Gittinger <cg@exept.de>
parents: 617
diff changeset
   535
    Smalltalk fileIn:file.
6cb9fe000c20 -F arg to allow other than private.rc
Claus Gittinger <cg@exept.de>
parents: 617
diff changeset
   536
] ifFalse:[
656
33c547d1a706 *** empty log message ***
penk
parents: 637
diff changeset
   537
    'smalltalk.rc [info]: reading ''private.rc''...' infoPrintCR.
632
6cb9fe000c20 -F arg to allow other than private.rc
Claus Gittinger <cg@exept.de>
parents: 617
diff changeset
   538
    Smalltalk fileIn:'private.rc'.
6cb9fe000c20 -F arg to allow other than private.rc
Claus Gittinger <cg@exept.de>
parents: 617
diff changeset
   539
].
5
420e4af41733 *** empty log message ***
claus
parents: 0
diff changeset
   540
488
521e2d58f050 Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents: 475
diff changeset
   541
Screen notNil ifTrue:[
441
4602f96301f3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 437
diff changeset
   542
    "/
4602f96301f3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 437
diff changeset
   543
    "/ read saved configuration settings (if any)
4602f96301f3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 437
diff changeset
   544
    "/
656
33c547d1a706 *** empty log message ***
penk
parents: 637
diff changeset
   545
    "/ 'smalltalk.rc [info]: reading ''settings.stx''...' infoPrintCR.
441
4602f96301f3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 437
diff changeset
   546
    Object abortSignal handle:[:ex |
450
034e05ea7647 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
   547
	ex return
441
4602f96301f3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 437
diff changeset
   548
    ] do:[
450
034e05ea7647 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
   549
	(Smalltalk fileIn:'settings.stx') ifTrue:[
441
4602f96301f3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 437
diff changeset
   550
	    'smalltalk.rc [info]: loaded preferences from ''settings.stx''' infoPrintCR.
450
034e05ea7647 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
   551
	]
369
eb39a763d88e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
   552
    ]
365
3d661da3346d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 361
diff changeset
   553
]
355
007bd12bd854 check for source access possible AFTER reading private.rc
Claus Gittinger <cg@exept.de>
parents: 336
diff changeset
   554
!
007bd12bd854 check for source access possible AFTER reading private.rc
Claus Gittinger <cg@exept.de>
parents: 336
diff changeset
   555
007bd12bd854 check for source access possible AFTER reading private.rc
Claus Gittinger <cg@exept.de>
parents: 336
diff changeset
   556
"/
007bd12bd854 check for source access possible AFTER reading private.rc
Claus Gittinger <cg@exept.de>
parents: 336
diff changeset
   557
"/ 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
   558
"/ 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
   559
"/ their source/resource directories were not installed)
609
f0f51d4a0066 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 568
diff changeset
   560
"/ - better to warn early ...
355
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
|anyWrong missing|
007bd12bd854 check for source access possible AFTER reading private.rc
Claus Gittinger <cg@exept.de>
parents: 336
diff changeset
   563
Smalltalk isStandAloneApp ifFalse:[
007bd12bd854 check for source access possible AFTER reading private.rc
Claus Gittinger <cg@exept.de>
parents: 336
diff changeset
   564
    anyWrong := false.
007bd12bd854 check for source access possible AFTER reading private.rc
Claus Gittinger <cg@exept.de>
parents: 336
diff changeset
   565
    missing := ''.
409
3a136424d8e6 set packagePath earlier;
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
   566
3a136424d8e6 set packagePath earlier;
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
   567
"/
3a136424d8e6 set packagePath earlier;
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
   568
"/ no longer needed - if we have the package,
3a136424d8e6 set packagePath earlier;
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
   569
"/ we also have the resources ...
3a136424d8e6 set packagePath earlier;
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
   570
"/
3a136424d8e6 set packagePath earlier;
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
   571
"/    (Smalltalk getResourceFileName:'SystemBrowser.rs' forClass:SystemBrowser) isNil ifTrue:[
3a136424d8e6 set packagePath earlier;
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
   572
"/        '***********************************************************************' errorPrintCR.
3a136424d8e6 set packagePath earlier;
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
   573
"/        '***** ATTENTION: please check installation of your >>resource<< files' errorPrintCR.
3a136424d8e6 set packagePath earlier;
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
   574
"/        '***** I will not be able to give non-english messages' errorPrintCR.
3a136424d8e6 set packagePath earlier;
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
   575
"/        anyWrong := true.
3a136424d8e6 set packagePath earlier;
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
   576
"/        missing := '''resources'' '.
3a136424d8e6 set packagePath earlier;
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
   577
"/    ].
3a136424d8e6 set packagePath earlier;
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
   578
3a136424d8e6 set packagePath earlier;
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
   579
"/
3a136424d8e6 set packagePath earlier;
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
   580
"/ no longer needed - if we have the package,
3a136424d8e6 set packagePath earlier;
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
   581
"/ we also have the styles ...
3a136424d8e6 set packagePath earlier;
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
   582
"/
3a136424d8e6 set packagePath earlier;
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
   583
"/    (Smalltalk getResourceFileName:'normal.style' forClass:View) isNil ifTrue:[
3a136424d8e6 set packagePath earlier;
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
   584
"/        '***********************************************************************' errorPrintCR.
3a136424d8e6 set packagePath earlier;
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
   585
"/        '***** ATTENTION: please check installation of your >>style<< files' errorPrintCR.
3a136424d8e6 set packagePath earlier;
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
   586
"/        '***** I will use a plain b&w viewStyle as a fallBack' errorPrintCR.
3a136424d8e6 set packagePath earlier;
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
   587
"/        anyWrong := true.
3a136424d8e6 set packagePath earlier;
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
   588
"/        missing := missing , '''resources'' '.
3a136424d8e6 set packagePath earlier;
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
   589
"/    ].
3a136424d8e6 set packagePath earlier;
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
   590
436
33e0bef37066 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
   591
    (Smalltalk getPackageFileName:'stx/libbasic/source/Object.st') isNil ifTrue:[
33e0bef37066 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
   592
     (Smalltalk getSystemFileName:'source/Object.st') isNil ifTrue:[
355
007bd12bd854 check for source access possible AFTER reading private.rc
Claus Gittinger <cg@exept.de>
parents: 336
diff changeset
   593
      (Smalltalk getSystemFileName:'source/source.zip') isNil ifTrue:[
007bd12bd854 check for source access possible AFTER reading private.rc
Claus Gittinger <cg@exept.de>
parents: 336
diff changeset
   594
	(Smalltalk getSystemFileName:'source/libbasic.zip') isNil ifTrue:[
007bd12bd854 check for source access possible AFTER reading private.rc
Claus Gittinger <cg@exept.de>
parents: 336
diff changeset
   595
	  (Smalltalk getSourceFileName:'libbasic/Object.st') isNil ifTrue:[
007bd12bd854 check for source access possible AFTER reading private.rc
Claus Gittinger <cg@exept.de>
parents: 336
diff changeset
   596
	    "/
007bd12bd854 check for source access possible AFTER reading private.rc
Claus Gittinger <cg@exept.de>
parents: 336
diff changeset
   597
	    "/ 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
   598
	    "/
007bd12bd854 check for source access possible AFTER reading private.rc
Claus Gittinger <cg@exept.de>
parents: 336
diff changeset
   599
	    (Smalltalk at:#SourceCodeManager) isNil ifTrue:[
007bd12bd854 check for source access possible AFTER reading private.rc
Claus Gittinger <cg@exept.de>
parents: 336
diff changeset
   600
		'***********************************************************************' errorPrintCR.
007bd12bd854 check for source access possible AFTER reading private.rc
Claus Gittinger <cg@exept.de>
parents: 336
diff changeset
   601
		'***** 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
   602
		'***** ' errorPrintCR.
007bd12bd854 check for source access possible AFTER reading private.rc
Claus Gittinger <cg@exept.de>
parents: 336
diff changeset
   603
		'***** 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
   604
		'***** 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
   605
		anyWrong := true.
007bd12bd854 check for source access possible AFTER reading private.rc
Claus Gittinger <cg@exept.de>
parents: 336
diff changeset
   606
		missing := missing , '''source'' '.
007bd12bd854 check for source access possible AFTER reading private.rc
Claus Gittinger <cg@exept.de>
parents: 336
diff changeset
   607
	    ]
007bd12bd854 check for source access possible AFTER reading private.rc
Claus Gittinger <cg@exept.de>
parents: 336
diff changeset
   608
	  ]
007bd12bd854 check for source access possible AFTER reading private.rc
Claus Gittinger <cg@exept.de>
parents: 336
diff changeset
   609
	]
007bd12bd854 check for source access possible AFTER reading private.rc
Claus Gittinger <cg@exept.de>
parents: 336
diff changeset
   610
      ]
436
33e0bef37066 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
   611
     ]
355
007bd12bd854 check for source access possible AFTER reading private.rc
Claus Gittinger <cg@exept.de>
parents: 336
diff changeset
   612
    ].
409
3a136424d8e6 set packagePath earlier;
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
   613
3a136424d8e6 set packagePath earlier;
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
   614
"/
3a136424d8e6 set packagePath earlier;
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
   615
"/ no longer needed - if we have the package,
3a136424d8e6 set packagePath earlier;
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
   616
"/ we also have the bitmaps ...
3a136424d8e6 set packagePath earlier;
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
   617
"/
3a136424d8e6 set packagePath earlier;
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
   618
"/    (Smalltalk bitmapFromFileNamed:'SmalltalkX.xbm' inPackage:'stx:libtool') isNil ifTrue:[
3a136424d8e6 set packagePath earlier;
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
   619
"/        '***********************************************************************' errorPrintCR.
3a136424d8e6 set packagePath earlier;
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
   620
"/        '***** ATTENTION: please check installation of your >>bitmap<< files' errorPrintCR.
3a136424d8e6 set packagePath earlier;
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
   621
"/        anyWrong := true.
3a136424d8e6 set packagePath earlier;
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
   622
"/        missing := missing , '''bitmaps'' '.
3a136424d8e6 set packagePath earlier;
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
   623
"/    ].
355
007bd12bd854 check for source access possible AFTER reading private.rc
Claus Gittinger <cg@exept.de>
parents: 336
diff changeset
   624
007bd12bd854 check for source access possible AFTER reading private.rc
Claus Gittinger <cg@exept.de>
parents: 336
diff changeset
   625
    anyWrong ifTrue:[
007bd12bd854 check for source access possible AFTER reading private.rc
Claus Gittinger <cg@exept.de>
parents: 336
diff changeset
   626
	'*****' errorPrintCR.
007bd12bd854 check for source access possible AFTER reading private.rc
Claus Gittinger <cg@exept.de>
parents: 336
diff changeset
   627
	'***** 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
   628
	'***** 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
   629
	'***** which is:' errorPrintCR.
007bd12bd854 check for source access possible AFTER reading private.rc
Claus Gittinger <cg@exept.de>
parents: 336
diff changeset
   630
	Smalltalk systemPath do:[:dir |
007bd12bd854 check for source access possible AFTER reading private.rc
Claus Gittinger <cg@exept.de>
parents: 336
diff changeset
   631
	    ('*****        ' , dir storeString) errorPrintCR.
007bd12bd854 check for source access possible AFTER reading private.rc
Claus Gittinger <cg@exept.de>
parents: 336
diff changeset
   632
	].
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
	'*****' errorPrintCR.
007bd12bd854 check for source access possible AFTER reading private.rc
Claus Gittinger <cg@exept.de>
parents: 336
diff changeset
   635
	'***** 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
   636
	'*****  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
   637
	'***********************************************************************' errorPrintCR.
007bd12bd854 check for source access possible AFTER reading private.rc
Claus Gittinger <cg@exept.de>
parents: 336
diff changeset
   638
    ]
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
!
169
08055578224e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 153
diff changeset
   641
08055578224e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 153
diff changeset
   642
"/
08055578224e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 153
diff changeset
   643
"/ set the package to some useful default
08055578224e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 153
diff changeset
   644
"/
08055578224e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 153
diff changeset
   645
Project notNil ifTrue:[
08055578224e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 153
diff changeset
   646
    Project setDefaultProject.
443
3585f07bbf1d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 441
diff changeset
   647
    "/ Project current package:#'private'.
169
08055578224e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 153
diff changeset
   648
].
08055578224e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 153
diff changeset
   649
08055578224e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 153
diff changeset
   650
"/
152
956f80caf731 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 144
diff changeset
   651
"/ if error occurs, and debugger has problems coming up,
956f80caf731 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 144
diff changeset
   652
"/ uncomment the following ...
25
claus
parents: 24
diff changeset
   653
"/
10
43d0db9ff204 *** empty log message ***
claus
parents: 8
diff changeset
   654
"/ Debugger := MiniDebugger.
0
0cb137a77319 Initial revision
claus
parents:
diff changeset
   655
152
956f80caf731 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 144
diff changeset
   656
"/
956f80caf731 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 144
diff changeset
   657
"/ save an initial image; this will speedup the next startup
956f80caf731 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 144
diff changeset
   658
"/ (since all autoload-stuff will already be initialized)
956f80caf731 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 144
diff changeset
   659
"/
672
43a67655f4f2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 668
diff changeset
   660
((Smalltalk commandLineArguments includes:'--quick')
43a67655f4f2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 668
diff changeset
   661
or:[ (Smalltalk commandLineArguments includes:'--faststart')
43a67655f4f2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 668
diff changeset
   662
or:[ (Smalltalk commandLineArguments includes:'--fastStart')
43a67655f4f2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 668
diff changeset
   663
or:[ (Smalltalk commandLineArguments includes:'--browserWindow:')
43a67655f4f2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 668
diff changeset
   664
]]]) ifFalse:[
43a67655f4f2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 668
diff changeset
   665
    'st.img' asFilename exists ifFalse:[
43a67655f4f2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 668
diff changeset
   666
	'.' asFilename isWritable ifTrue:[
43a67655f4f2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 668
diff changeset
   667
	    |doneWithStartupStuff|
153
f42ccdad6f93 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 152
diff changeset
   668
672
43a67655f4f2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 668
diff changeset
   669
	    doneWithStartupStuff := Semaphore new.
609
f0f51d4a0066 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 568
diff changeset
   670
672
43a67655f4f2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 668
diff changeset
   671
	    Smalltalk
43a67655f4f2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 668
diff changeset
   672
		addStartBlock:
43a67655f4f2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 668
diff changeset
   673
		[
43a67655f4f2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 668
diff changeset
   674
		    [
43a67655f4f2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 668
diff changeset
   675
			doneWithStartupStuff wait.
43a67655f4f2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 668
diff changeset
   676
			   'smalltalk.rc [info]: saving initial image for faster future startup...' infoPrintCR.
43a67655f4f2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 668
diff changeset
   677
			   ObjectMemory primSnapShotOn:'st.img'
43a67655f4f2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 668
diff changeset
   678
		    ] forkAt:1
43a67655f4f2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 668
diff changeset
   679
		].
609
f0f51d4a0066 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 568
diff changeset
   680
672
43a67655f4f2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 668
diff changeset
   681
	    Smalltalk addStartBlock:
43a67655f4f2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 668
diff changeset
   682
		[
43a67655f4f2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 668
diff changeset
   683
		    [
43a67655f4f2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 668
diff changeset
   684
			Delay waitForSeconds:10.
43a67655f4f2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 668
diff changeset
   685
			doneWithStartupStuff signal
43a67655f4f2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 668
diff changeset
   686
		    ] forkAt:1
43a67655f4f2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 668
diff changeset
   687
		].
43a67655f4f2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 668
diff changeset
   688
	]
43a67655f4f2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 668
diff changeset
   689
    ]
43a67655f4f2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 668
diff changeset
   690
].