#FEATURE by cg
authorClaus Gittinger <cg@exept.de>
Fri, 14 Oct 2016 03:14:12 +0200
changeset 20637 a9b41f05ca91
parent 20636 e3346053cd78
child 20638 7ee52feb8b63
#FEATURE by cg class: OSXOperatingSystem changed: #defaultPackagePath
OSXOperatingSystem.st
--- a/OSXOperatingSystem.st	Fri Oct 14 01:25:36 2016 +0200
+++ b/OSXOperatingSystem.st	Fri Oct 14 03:14:12 2016 +0200
@@ -75,26 +75,46 @@
 defaultPackagePath
     "redefined to add stx.app packages and /Library stuff"
 
-    |path executablePath executableDir packagesDir libDir vsnDirName vsnDir|
+    |path executablePath executableDir packagesDir 
+     libDir appDir versionsDir vsnDirName vsnDir|
 
     path := super defaultPackagePath.
 
     executablePath := OperatingSystem pathOfSTXExecutable.
     executablePath notNil ifTrue:[
-	executableDir := executablePath asFilename directory.
-	packagesDir := executableDir directory directory / 'Packages'.
-	packagesDir exists ifTrue:[
-	    path add:packagesDir.
-	].
-	libDir := '/Library/Smalltalk-x' asFilename.
-	libDir exists ifTrue:[
-	    vsnDirName := '%1.%2' bindWith:Smalltalk majorVersionNr
-				  with:Smalltalk minorVersionNr.
-	    vsnDir := libDir / vsnDirName.
-	    vsnDir exists ifTrue:[
-		path add:vsnDir.
-	    ].
-	].
+        executableDir := executablePath asFilename directory.
+        packagesDir := executableDir directory directory / 'Packages'.
+        packagesDir exists ifTrue:[
+            path add:packagesDir.
+        ].
+        libDir := '/Library/Frameworks/SmalltalkX.framework' asFilename.
+        libDir exists ifTrue:[
+            versionsDir := libDir / 'Versions'.
+            versionsDir exists ifTrue:[
+                vsnDirName := '%1.%2.%3' 
+                                    bindWith:Smalltalk majorVersionNr
+                                    with:Smalltalk minorVersionNr
+                                    with:Smalltalk revisionNr.
+                vsnDir := versionsDir / vsnDirName.
+                vsnDir exists ifTrue:[
+                    path add:vsnDir pathName.
+                ].
+            ].
+        ].
+        appDir := '/Applications/SmalltalkX/' asFilename.
+        appDir exists ifTrue:[
+            versionsDir := appDir / 'Versions'.
+            versionsDir exists ifTrue:[
+                vsnDirName := '%1.%2.%3' 
+                                    bindWith:Smalltalk majorVersionNr
+                                    with:Smalltalk minorVersionNr
+                                    with:Smalltalk revisionNr.
+                vsnDir := versionsDir / vsnDirName.
+                vsnDir exists ifTrue:[
+                    path add:vsnDir pathName.
+                ].
+            ].
+        ].
     ].
     ^ path
 !