Smalltalk.st
changeset 23450 704f8e20673d
parent 23449 a03c056447f2
child 23462 3936518a03ef
--- a/Smalltalk.st	Mon Oct 15 01:06:59 2018 +0200
+++ b/Smalltalk.st	Mon Oct 15 01:31:22 2018 +0200
@@ -511,10 +511,14 @@
         BitmapDirName := 'bitmaps'.
         BinaryDirName := 'binary'.
         SourceDirName := 'source'.
-        ResourceDirName := 'resources'.
+        "/ ResourceDirName := 'resources'.
         ResourceDirName := '.resources'.
         FileInDirName := 'fileIn'.
         PackageDirName := 'packages'.
+        OperatingSystem isOSXlike ifTrue:[
+            PackageDirName := 'Packages'.
+            ResourceDirName := 'Resources'.
+        ].
     ].
 
     SystemPath isEmptyOrNil ifTrue:[
@@ -7647,17 +7651,17 @@
     "/ 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).
-	    ]
-	].
+        "/ 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
 
@@ -7764,6 +7768,15 @@
 
     packageDir := aPackageIDOrNil copyReplaceAll:$: with:$/.
 
+    "/ search under resources-directory along systemPath ...
+    pF := self 
+            searchPath:(self realSystemPath) 
+            for:(packageDir asFilename / 'resources' / f) 
+            in:ResourceDirName.
+    pF notNil ifTrue:[
+        ^ pF.
+    ].
+    
     #('../Resources' '.resources' 'resources') do:[:eachPossibleRsrcDir |
         pF := self searchPath:(self realSystemPath) 
                    for:aFileName 
@@ -8641,7 +8654,7 @@
 
     packageDir := self getPackageFileName:packageDirName.
     packageDir isNil ifTrue:[
-	^ nil.
+        ^ nil.
     ].
     ^ packageDir asFilename
 
@@ -8649,6 +8662,7 @@
      Smalltalk packageDirectoryForPackageId:'stx:libbasic'
      Smalltalk packageDirectoryForPackageId:'stx:goodies/persistency'
      Smalltalk packageDirectoryForPackageId:'exept:ctypes'
+     Smalltalk getPackageFileName:'stx/libview'
     "
 !