--- a/OSXOperatingSystem.st Fri Apr 24 10:17:57 2015 +0200
+++ b/OSXOperatingSystem.st Fri Apr 24 10:18:41 2015 +0200
@@ -23,8 +23,8 @@
openApplicationHelperCommand
"Return a command line helper to open a default application for file or URL"
- (self canExecuteCommand: 'open') ifTrue:[
- ^ 'open'
+ (self canExecuteCommand: 'open') ifTrue:[
+ ^ 'open'
].
^ nil
@@ -39,16 +39,16 @@
cmd := 'osascript -e ''tell application "Terminal" to do script "%1"''' bindWith:shellCommand.
inBackground ifTrue:[
- ^ self
- startProcess:cmd
- inputFrom:nil
- outputTo:nil
- errorTo:nil
- auxFrom:nil
- environment:nil
- inDirectory:nil
+ ^ self
+ startProcess:cmd
+ inputFrom:nil
+ outputTo:nil
+ errorTo:nil
+ auxFrom:nil
+ environment:nil
+ inDirectory:nil
] ifFalse:[
- ^ self executeCommand:cmd
+ ^ self executeCommand:cmd
].
"
@@ -63,6 +63,8 @@
On MSDOS, this will return false;
on a real OS, we return true."
+ "/ actually, this is wrong and depends on the mounted volume;
+ "/ so we need a query for a particular directory (and/or volume).
^ false
"Modified: / 5.6.1998 / 18:35:18 / cg"
@@ -77,20 +79,20 @@
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/Smalltalk-x' asFilename.
+ libDir exists ifTrue:[
+ vsnDirName := '%1.%2' bindWith:Smalltalk majorVersionNr
+ with:Smalltalk minorVersionNr.
+ vsnDir := libDir / vsnDirName.
+ vsnDir exists ifTrue:[
+ path add:vsnDir.
+ ].
+ ].
].
^ path
!
@@ -122,7 +124,7 @@
!
supportsVolumes
- "return true if the os support a list of drives/volumes
+ "return true if the os support a list of drives/volumes
(here we can return a list of mounted drives in /Volumes)"
^ true
@@ -131,10 +133,9 @@
!OSXOperatingSystem class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic/OSXOperatingSystem.st,v 1.16 2015-02-18 17:45:08 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/OSXOperatingSystem.st,v 1.17 2015-04-24 08:18:41 cg Exp $'
!
version_CVS
- ^ '$Header: /cvs/stx/stx/libbasic/OSXOperatingSystem.st,v 1.16 2015-02-18 17:45:08 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/OSXOperatingSystem.st,v 1.17 2015-04-24 08:18:41 cg Exp $'
! !
-