smalltalk.rc
changeset 672 43a67655f4f2
parent 668 2050356eb7a8
child 677 222fd88429a3
--- a/smalltalk.rc	Fri Dec 16 16:43:29 2005 +0100
+++ b/smalltalk.rc	Mon Dec 19 19:04:13 2005 +0100
@@ -99,6 +99,9 @@
 
 |path|
 
+'systemPath before: ' print.
+Smalltalk systemPath printCR.
+
 (path := OperatingSystem getEnvironment:'STX_SYSTEMPATH') notNil ifTrue:[
     Smalltalk systemPath:(path asCollectionOfSubstringsSeparatedBy:$:)
 ] ifFalse:[
@@ -109,17 +112,27 @@
 	path := path asFilename directoryName.
 	('smalltalk.rc [info]: found gnu-smalltalk sources in ' , path , '; removed from systemPath.') infoPrintCR.
 	Smalltalk systemPath:(Smalltalk systemPath remove:path; yourself).
+    ].
+].
+
+(Smalltalk systemPath includes:(OperatingSystem pathOfSTXExecutable asFilename directoryName)) ifFalse:[
+    Smalltalk systemPath addFirst:(OperatingSystem pathOfSTXExecutable asFilename directoryName).
+].
+
+'../../../stx/libbasic' asFilename exists ifTrue:[
+    (Smalltalk systemPath includes:'../../../stx' asFilename pathName) ifFalse:[
+	Smalltalk systemPath addFirst:'../../../stx' asFilename pathName.
     ]
 ].
-'../../../stx/libbasic' asFilename exists ifTrue:[
-    Smalltalk systemPath addFirst:'../../../stx'.
-].
 
-"/ but, the current directory should always be first...
+"/ the current directory should always be first...
 (Smalltalk systemPath includes:'.') ifTrue:[
     Smalltalk systemPath remove:'.'.
 ].
-Smalltalk systemPath addFirst:'.'.
+(Smalltalk systemPath includes:'.' asFilename pathName) ifTrue:[
+    Smalltalk systemPath remove:'.' asFilename pathName.
+].
+Smalltalk systemPath addFirst:'.' asFilename pathName.
 
 (path := OperatingSystem getEnvironment:'STX_PACKAGEPATH') notNil ifTrue:[
     Smalltalk packagePath:(path asCollectionOfSubstringsSeparatedBy:$:).
@@ -144,6 +157,9 @@
     "/ 'packagePath: ' print. Smalltalk packagePath printCR.
 ].
 
+'systemPath: ' errorPrint. Smalltalk systemPath errorPrintCR.
+'packagePath: ' errorPrint. Smalltalk packagePath errorPrintCR.
+
 Smalltalk flushPathCaches.
 !
 
@@ -231,7 +247,9 @@
  or:[(args includes:'--noBanner')
  or:[(args includes:'--quick')
  or:[(args includes:'--faststart')
- or:[(args includes:'--fastStart')]]]]) ifFalse:[
+ or:[(args includes:'--fastStart')
+ or:[(args includes:'--browserWindow:')
+]]]]]) ifFalse:[
     Smalltalk fileIn:'showBanner.rc'.
 ].
 
@@ -437,7 +455,8 @@
      or:[(Smalltalk commandLineArguments includes:'--quick')
      or:[(Smalltalk commandLineArguments includes:'--faststart')
      or:[(Smalltalk commandLineArguments includes:'--fastStart')
-    ]]]) ifFalse:[
+     or:[(Smalltalk commandLineArguments includes:'--browserWindow:')
+    ]]]]) ifFalse:[
 	Smalltalk addStartBlock:[
 	    'smalltalk.rc [info]: show licence conditions...' infoPrintCR.
 	    LicenceBox autoload.
@@ -638,26 +657,34 @@
 "/ save an initial image; this will speedup the next startup
 "/ (since all autoload-stuff will already be initialized)
 "/
+((Smalltalk commandLineArguments includes:'--quick')
+or:[ (Smalltalk commandLineArguments includes:'--faststart')
+or:[ (Smalltalk commandLineArguments includes:'--fastStart')
+or:[ (Smalltalk commandLineArguments includes:'--browserWindow:')
+]]]) ifFalse:[
+    'st.img' asFilename exists ifFalse:[
+	'.' asFilename isWritable ifTrue:[
+	    |doneWithStartupStuff|
 
- 'st.img' asFilename exists ifFalse:[
-   '.' asFilename isWritable ifTrue:[
-     |doneWithStartupStuff|
-
-     doneWithStartupStuff := Semaphore new.
+	    doneWithStartupStuff := Semaphore new.
 
-     Smalltalk addStartBlock:[
-      [
-	  doneWithStartupStuff wait.
-	     'smalltalk.rc [info]: saving initial image for faster future startup...' infoPrintCR.
-	     ObjectMemory primSnapShotOn:'st.img'
-      ] forkAt:1
-     ].
+	    Smalltalk
+		addStartBlock:
+		[
+		    [
+			doneWithStartupStuff wait.
+			   'smalltalk.rc [info]: saving initial image for faster future startup...' infoPrintCR.
+			   ObjectMemory primSnapShotOn:'st.img'
+		    ] forkAt:1
+		].
 
-     Smalltalk addStartBlock:[
-      [
-	  Delay waitForSeconds:10.
-	  doneWithStartupStuff signal
-      ] forkAt:1
-     ].
-   ]
- ].
+	    Smalltalk addStartBlock:
+		[
+		    [
+			Delay waitForSeconds:10.
+			doneWithStartupStuff signal
+		    ] forkAt:1
+		].
+	]
+    ]
+].