--- a/Smalltalk.st Sat Jun 28 09:52:23 2014 +0200
+++ b/Smalltalk.st Sun Jun 29 10:45:20 2014 +0200
@@ -6878,26 +6878,24 @@
"/ search along packagePath ...
f := self searchPath:self packagePath for:aFileName in:nil.
f isNil ifTrue:[
- "/ search under packages-directory along systemPath ...
- f := self searchPath:self realSystemPath for:aFileName in:PackageDirName.
- "/ kludge - allow for stx-directory to be named differently
- f isNil ifTrue:[
- (aFileName asString startsWith:('stx' , Filename separator)) ifTrue:[
- f := '..' asFilename / '..' / (aFileName copyFrom:5).
- f exists ifTrue:[
- ^ f pathName
- ].
- ]
- ].
+ "/ search under packages-directory along systemPath ...
+ f := self searchPath:self realSystemPath for:aFileName in:PackageDirName.
+ "/ kludge - allow for stx-directory to be named differently
+ f isNil ifTrue:[
+ (aFileName asString startsWith:('stx' , Filename separator)) ifTrue:[
+ f := '..' asFilename / '..' / (aFileName copyFrom:5).
+ ]
+ ].
].
(f notNil and:[(f := f asFilename) exists]) ifTrue:[
- ^ f pathName
+ ^ f pathName
].
^ nil
"
- Smalltalk getPackageFileName:'stx/libview/resources/normal.style'
- Smalltalk getPackageFileName:'stx/libview/source.zip'
+ Smalltalk getPackageFileName:'stx/libview/resources/normal.style'
+ Smalltalk getPackageFileName:'stx/libview/styles/normal.style'
+ Smalltalk getPackageFileName:'stx/libview/source.zip'
"
!
@@ -7270,22 +7268,25 @@
|prj prjDir|
+ ^ aPackage asPackageId packageDirectory.
+
"/ there might be a package specific resource directory ...
"/ in the directory, from which the project was loaded
prj := Project projectWithId:aPackage.
prj notNil ifTrue:[
- prjDir := prj directory.
+ prjDir := prj directory.
].
(prjDir notNil and:[prjDir asFilename exists]) ifFalse:[
- prjDir := Smalltalk getPackageFileName:(aPackage copyReplaceAll:$: with:$/).
+ prjDir := Smalltalk getPackageFileName:(aPackage copyReplaceAll:$: with:$/).
].
^ prjDir
"
- Smalltalk projectDirectoryForPackage:'stx:libbasic'
+ Smalltalk projectDirectoryForPackage:'stx:libbasic'
Smalltalk projectDirectoryForPackage:'exept:smartcard'
- Smalltalk projectDirectoryForPackage:'stx'
- Smalltalk projectDirectoryForPackage:'bosch'
+ Smalltalk projectDirectoryForPackage:'stx'
+ Smalltalk projectDirectoryForPackage:'bosch'
+ Smalltalk projectDirectoryForPackage:'bosch:foo'
"
"Modified: / 07-10-2006 / 17:45:58 / cg"
@@ -7322,41 +7323,41 @@
!
realSystemPath
- "return the realSystemPath - thats the directory names from
+ "return the realSystemPath - that's the directory names from
SystemPath which exist and are readable"
|nP|
RealSystemPath isNil ifTrue:[
- OperatingSystem isVMSlike ifTrue:[
- "/ temporary kludge: since we cannot currently
- "/ check for existance of a name like 'volume:',
- "/ leave those in the Path without a check.
- RealSystemPath := SystemPath select:[:dirName | |f|
- f := dirName asFilename.
- f isVolumeOnly or:[(f isDirectory) and:[f isReadable]]
- ]
- ] ifFalse:[
- RealSystemPath := SystemPath
- select:[:eachDirectoryName | |f|
- f := eachDirectoryName asFilename.
- (f isDirectory) and:[f isReadable]
- ] thenCollect:[:eachDirectoryName|
- eachDirectoryName asFilename pathName.
- ].
-
- "/ remove duplicates (but keep order)
- nP := OrderedCollection new.
- RealSystemPath do:[:p |
- (nP includes:p) ifFalse:[
- nP add:p
- ]
- ].
- (nP includes:'.') ifFalse:[
- nP add:'.'
- ].
- RealSystemPath := nP.
- ].
+ OperatingSystem isVMSlike ifTrue:[
+ "/ temporary kludge: since we cannot currently
+ "/ check for existence of a name like 'volume:',
+ "/ leave those in the Path without a check.
+ RealSystemPath := SystemPath select:[:dirName | |f|
+ f := dirName asFilename.
+ f isVolumeOnly or:[(f isDirectory) and:[f isReadable]]
+ ]
+ ] ifFalse:[
+ RealSystemPath := SystemPath
+ select:[:eachDirectoryName | |f|
+ f := eachDirectoryName asFilename.
+ (f isDirectory) and:[f isReadable]
+ ] thenCollect:[:eachDirectoryName|
+ eachDirectoryName asFilename pathName.
+ ].
+
+ "/ remove duplicates (but keep order)
+ nP := OrderedCollection new.
+ RealSystemPath do:[:p |
+ (nP includes:p) ifFalse:[
+ nP add:p
+ ]
+ ].
+ (nP includes:'.') ifFalse:[
+ nP add:'.'
+ ].
+ RealSystemPath := nP.
+ ].
].
^ RealSystemPath
!
@@ -8249,11 +8250,11 @@
!Smalltalk class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic/Smalltalk.st,v 1.1080 2014-06-19 17:52:23 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/Smalltalk.st,v 1.1081 2014-06-29 08:45:20 cg Exp $'
!
version_CVS
- ^ '$Header: /cvs/stx/stx/libbasic/Smalltalk.st,v 1.1080 2014-06-19 17:52:23 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/Smalltalk.st,v 1.1081 2014-06-29 08:45:20 cg Exp $'
!
version_SVN