--- a/AbstractOperatingSystem.st Thu Dec 23 23:59:25 1999 +0100
+++ b/AbstractOperatingSystem.st Fri Dec 24 00:19:39 1999 +0100
@@ -3417,6 +3417,63 @@
!AbstractOperatingSystem class methodsFor:'path queries'!
+defaultPackagePath
+ "return a default packagePath - thats a collection of
+ dirnames, where ST/X searches for its package subdirs.
+ This method is redefined in concrete OS's to add
+ OS-specific directory names."
+
+ |pPath p homePath priv userPrivateSTXDir|
+
+ "
+ the path is set to search files first locally
+ - this allows private stuff to override global stuff
+ "
+ pPath := OrderedCollection new.
+
+ "/
+ "/ the current (default) directory
+ "/
+ pPath add:(Filename currentDirectory name).
+
+ "/
+ "/ the users home (login) directory
+ "/
+ homePath := OperatingSystem getHomeDirectory.
+ homePath notNil ifTrue:[
+ pPath add:homePath.
+
+ "/
+ "/ a users private smalltalk directory in its home (login) directory
+ "/
+ OperatingSystem isUNIXlike ifTrue:[
+ priv := '.smalltalk'.
+ ] ifFalse:[
+ priv := 'smalltalk'.
+ ].
+ userPrivateSTXDir := homePath asFilename constructString:priv.
+ (userPrivateSTXDir asFilename isDirectory) ifTrue:[
+ pPath add:userPrivateSTXDir
+ ].
+ ].
+
+ "/
+ "/ TX_TOPDIR from the environment
+ "/
+ p := OperatingSystem getEnvironment:'STX_TOPDIR'.
+ p notNil ifTrue:[
+ pPath add:p
+ ].
+ pPath := pPath select:[:p | (p asFilename construct:'packages') exists].
+ ^ pPath
+
+ "
+ self defaultPackagePath
+ "
+
+ "Modified: / 24.12.1999 / 00:15:03 / cg"
+!
+
defaultSystemPath
"return a default systemPath - thats a collection of
dirnames, where ST/X searches for its files.
@@ -4098,6 +4155,6 @@
!AbstractOperatingSystem class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic/AbstractOperatingSystem.st,v 1.32 1999-12-14 18:42:48 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/AbstractOperatingSystem.st,v 1.33 1999-12-23 23:19:39 cg Exp $'
! !
AbstractOperatingSystem initialize!