set packagePath earlier;
authorClaus Gittinger <cg@exept.de>
Wed, 15 Dec 1999 20:32:05 +0100
changeset 409 3a136424d8e6
parent 408 ddf371d470bc
child 410 abb01ec3a9b6
set packagePath earlier; changed check for existing resources
smalltalk.rc
--- a/smalltalk.rc	Wed Dec 15 20:31:39 1999 +0100
+++ b/smalltalk.rc	Wed Dec 15 20:32:05 1999 +0100
@@ -58,7 +58,34 @@
 ].
 (path := OperatingSystem getEnvironment:'STX_PACKAGEPATH') notNil ifTrue:[
     Smalltalk packagePath:(path asCollectionOfSubstringsSeparatedBy:$:)
+] ifFalse:[
+    "/
+    "/ if running in the development environment,
+    "/ only use the local packages.
+    "/
+    '../../../stx/doc' asFilename exists ifTrue:[
+	Smalltalk packagePath removeAll; add:'../../..'.    
+    ].
+    "/
+    "/ any additional local packages ?.
+    "/
+    'packages' asFilename exists ifTrue:[
+	 Smalltalk packagePath addFirst:'./packages'.    
+    ].
 ].
+
+'../../doc' asFilename exists ifTrue:[
+    Smalltalk systemPath addFirst:'../..'.
+].
+
+"/ but, the current directory should always be first ...
+(Smalltalk systemPath includes:'.') ifTrue:[
+    Smalltalk systemPath remove:'.'.
+    Smalltalk systemPath addFirst:'.'.
+] ifFalse:[
+    Smalltalk systemPath addFirst:'.'.
+].
+Smalltalk flushPathCaches.
 !
 
 |args|
@@ -326,36 +353,6 @@
     needToReactivate := false
 ].
 
-"/
-"/ if running in the development environment,
-"/ make certain, that the current work-dirs come first.
-"/
-'../../doc' asFilename exists ifTrue:[
-    Smalltalk systemPath addFirst:'../..'.
-    '../../../stx' asFilename exists ifTrue:[
-	Smalltalk packagePath addFirst:'../../..'.    
-    ]
-].
-'../doc' asFilename exists ifTrue:[
-    Smalltalk systemPath addFirst:'..'.
-    '../../stx' asFilename exists ifTrue:[
-	Smalltalk packagePath addFirst:'../..'.    
-    ]
-].
-
-'packages' asFilename exists ifTrue:[
- Smalltalk packagePath addFirst:'./packages'.    
-].
-
-"/ but, the current directory should always be first ...
-(Smalltalk systemPath includes:'.') ifTrue:[
-    Smalltalk systemPath remove:'.'.
-    Smalltalk systemPath addFirst:'.'.
-] ifFalse:[
-    Smalltalk systemPath addFirst:'.'.
-].
-Smalltalk flushPathCaches.
-
 Class withoutUpdatingChangesDo:[   
    'smalltalk.rc [info]: installing autoloaded classes ...' infoPrintCR.
    Smalltalk installAutoloadedClasses.
@@ -440,20 +437,31 @@
 Smalltalk isStandAloneApp ifFalse:[
     anyWrong := false.
     missing := ''.
-    (Smalltalk getResourceFileName:'SystemBrowser.rs' forClass:SystemBrowser) isNil ifTrue:[
-	'***********************************************************************' errorPrintCR.
-	'***** ATTENTION: please check installation of your >>resource<< files' errorPrintCR.
-	'***** I will not be able to give non-english messages' errorPrintCR.
-	anyWrong := true.
-	missing := '''resources'' '.
-    ].
-    (Smalltalk getResourceFileName:'normal.style' forClass:View) isNil ifTrue:[
-	'***********************************************************************' errorPrintCR.
-	'***** ATTENTION: please check installation of your >>style<< files' errorPrintCR.
-	'***** I will use a plain b&w viewStyle as a fallBack' errorPrintCR.
-	anyWrong := true.
-	missing := missing , '''resources'' '.
-    ].
+
+"/
+"/ no longer needed - if we have the package,
+"/ we also have the resources ...
+"/
+"/    (Smalltalk getResourceFileName:'SystemBrowser.rs' forClass:SystemBrowser) isNil ifTrue:[
+"/        '***********************************************************************' errorPrintCR.
+"/        '***** ATTENTION: please check installation of your >>resource<< files' errorPrintCR.
+"/        '***** I will not be able to give non-english messages' errorPrintCR.
+"/        anyWrong := true.
+"/        missing := '''resources'' '.
+"/    ].
+
+"/
+"/ no longer needed - if we have the package,
+"/ we also have the styles ...
+"/
+"/    (Smalltalk getResourceFileName:'normal.style' forClass:View) isNil ifTrue:[
+"/        '***********************************************************************' errorPrintCR.
+"/        '***** ATTENTION: please check installation of your >>style<< files' errorPrintCR.
+"/        '***** I will use a plain b&w viewStyle as a fallBack' errorPrintCR.
+"/        anyWrong := true.
+"/        missing := missing , '''resources'' '.
+"/    ].
+
     (Smalltalk getSystemFileName:'source/Object.st') isNil ifTrue:[
       (Smalltalk getSystemFileName:'source/source.zip') isNil ifTrue:[
 	(Smalltalk getSystemFileName:'source/libbasic.zip') isNil ifTrue:[
@@ -474,12 +482,17 @@
 	]
       ]
     ].
-    (Smalltalk bitmapFromFileNamed:'SmalltalkX.xbm' inPackage:'stx:libtool') isNil ifTrue:[
-	'***********************************************************************' errorPrintCR.
-	'***** ATTENTION: please check installation of your >>bitmap<< files' errorPrintCR.
-	anyWrong := true.
-	missing := missing , '''bitmaps'' '.
-    ].
+
+"/
+"/ no longer needed - if we have the package,
+"/ we also have the bitmaps ...
+"/
+"/    (Smalltalk bitmapFromFileNamed:'SmalltalkX.xbm' inPackage:'stx:libtool') isNil ifTrue:[
+"/        '***********************************************************************' errorPrintCR.
+"/        '***** ATTENTION: please check installation of your >>bitmap<< files' errorPrintCR.
+"/        anyWrong := true.
+"/        missing := missing , '''bitmaps'' '.
+"/    ].
 
     anyWrong ifTrue:[
 	'*****' errorPrintCR.