--- a/Smalltalk.st Tue Jan 07 12:08:49 1997 +0100
+++ b/Smalltalk.st Tue Jan 07 15:16:03 1997 +0100
@@ -1436,7 +1436,7 @@
"common start/restart action, if there is a Display, initialize it
and start dispatching; otherwise go into a read-eval-print loop."
- |mainProcess imageName|
+ |mainProcess standAloneProcess imageName|
imageName := ObjectMemory imageName.
@@ -1449,6 +1449,11 @@
Initializing := false.
+ "/ start a process, which evaluates all StartBlocks
+ "/ this used to be done right here (in this system-process),
+ "/ but lead to trouble, when it suspended.
+ "/ Therefore, it is now done by an extra user-process.
+
mainProcess := [
StartBlocks notNil ifTrue:[
StartBlocks do:[:aBlock|
@@ -1461,28 +1466,37 @@
aBlock value
].
].
- (SilentLoading == true) ifFalse:[ "i.e. undefined counts as false"
- imageName isNil ifTrue:[
- Transcript showCR:(self hello).
- Transcript showCR:(self copyrightString).
- Transcript cr.
- ] ifFalse:[
+ StandAlone ifFalse:[
+ (SilentLoading == true) ifFalse:[ "i.e. undefined counts as false"
+ imageName isNil ifTrue:[
+ Transcript showCR:(self hello).
+ Transcript showCR:(self copyrightString).
+ Transcript cr.
+ ] ifFalse:[
+ Transcript cr.
+ Transcript showCR:('Smalltalk restarted from:'
+ , imageName
+ , ' (saved '
+ , ObjectMemory imageSaveTime printString
+ , ')' ).
+ ].
Transcript cr.
- Transcript showCR:('Smalltalk restarted from:'
- , imageName
- , ' (saved '
- , ObjectMemory imageSaveTime printString
- , ')' ).
- ].
+ ].
+ ] ifTrue:[
+ (SilentLoading == true) ifFalse:[
+ imageName isNil ifTrue:[
+ Transcript showCR:(self copyrightString).
+ Transcript cr.
+ ]
+ ].
+ ].
+
+ DemoMode ifTrue:[
+ Transcript showCR:'*** Restricted use: ***'.
+ Transcript showCR:'*** This program may be used for education only. ***'.
+ Transcript showCR:'*** Please read the files COPYRIGHT and LICENSE ***'.
+ Transcript showCR:'*** for more details. ***'.
Transcript cr.
-
- DemoMode ifTrue:[
- Transcript showCR:'*** Restricted use: ***'.
- Transcript showCR:'*** This program may be used for education only. ***'.
- Transcript showCR:'*** Please read the files COPYRIGHT and LICENSE ***'.
- Transcript showCR:'*** for more details. ***'.
- Transcript cr.
- ].
].
] newProcess.
mainProcess priority:8.
@@ -1491,6 +1505,9 @@
mainProcess resume.
+ "/ start a process, which evaluates the startupClass>>startupSelector
+ "/ message.
+
(StartupClass notNil and:[StartupSelector notNil]) ifTrue:[
"
allow more customization by reading an image specific rc-file
@@ -1507,21 +1524,21 @@
"/ ].
"/ Processor exitWhenNoMoreUserProcesses:true.
- mainProcess := [
+ standAloneProcess := [
StartupClass perform:StartupSelector withArguments:StartupArguments.
Smalltalk exit.
] newProcess.
- mainProcess priority:8.
- mainProcess name:'main'.
- mainProcess beGroupLeader.
- mainProcess resume.
+ standAloneProcess priority:8.
+ standAloneProcess name:'main'.
+ standAloneProcess beGroupLeader.
+ standAloneProcess resume.
].
"
if view-classes exist, start dispatching;
otherwise go into a read-eval-print loop
"
- (Display notNil and:[graphicalMode]) ifTrue:[
+ ((Display notNil and:[graphicalMode]) or:[standAloneProcess notNil]) ifTrue:[
Processor dispatchLoop.
] ifFalse:[
StandAlone ifFalse:[
@@ -1824,6 +1841,10 @@
self initStandardTools.
].
+ Display isNil ifTrue:[
+ graphicalMode := false.
+ ].
+
self mainStartup:graphicalMode
"Modified: 29.7.1996 / 17:04:44 / cg"
@@ -3453,5 +3474,5 @@
!Smalltalk class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic/Smalltalk.st,v 1.199 1997-01-04 11:23:17 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/Smalltalk.st,v 1.200 1997-01-07 14:16:03 cg Exp $'
! !