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