--- a/smalltalk.rc Tue Jan 16 12:04:20 2007 +0100
+++ b/smalltalk.rc Tue Jan 16 12:13:39 2007 +0100
@@ -99,13 +99,14 @@
"/ funny viewStyles, colors and stupid strings if wrong.
"/
-|path pathOfSTXExecutable|
+|path pathOfSTXExecutable pathOfCurrentDir|
"/ 'systemPath before: ' infoPrint. Smalltalk systemPath infoPrintCR.
"/ 'exec: ' infoPrint. OperatingSystem nameOfSTXExecutable infoPrintCR.
"/ 'execPath: ' infoPrint. OperatingSystem pathOfSTXExecutable infoPrintCR.
pathOfSTXExecutable := OperatingSystem pathOfSTXExecutable asFilename directory.
+pathOfCurrentDir := Filename currentDirectory asAbsoluteFilename.
(path := OperatingSystem getEnvironment:'STX_SYSTEMPATH') notNil ifTrue:[
Smalltalk systemPath:(path asCollectionOfSubstringsSeparatedBy:$:)
@@ -122,6 +123,9 @@
(Smalltalk systemPath includes:pathOfSTXExecutable name) ifFalse:[
Smalltalk systemPath addFirst:pathOfSTXExecutable name.
].
+ (Smalltalk systemPath includes:pathOfCurrentDir name) ifFalse:[
+ Smalltalk systemPath addFirst:pathOfCurrentDir name.
+ ].
"/ the current directory should always be first...
(Smalltalk systemPath includes:'.') ifTrue:[
@@ -144,6 +148,11 @@
(pathOfSTXExecutable construct:'../../../stx/projects/smalltalk') exists ifTrue:[
Smalltalk packagePath removeAll; add:(pathOfSTXExecutable construct:'../../..') pathName.
'smalltalk.rc [info]: setting packagePath for local operation' infoPrintCR.
+ ] ifFalse:[
+ (pathOfCurrentDir construct:'../../../stx/projects/smalltalk') exists ifTrue:[
+ Smalltalk packagePath removeAll; add:(pathOfCurrentDir construct:'../../..') pathName.
+ 'smalltalk.rc [info]: setting packagePath for local operation' infoPrintCR.
+ ]
].
"/
@@ -158,6 +167,9 @@
"/ 'systemPath: ' errorPrint. Smalltalk systemPath errorPrintCR.
"/ 'packagePath: ' errorPrint. Smalltalk packagePath errorPrintCR.
+Smalltalk packagePath isEmpty ifTrue:[
+ 'smalltalk.rc [warning]: packagePath is empty' errorPrintCR.
+].
Smalltalk flushPathCaches.
!