changes for win32.
authorClaus Gittinger <cg@exept.de>
Mon, 31 May 1999 14:18:38 +0200
changeset 1132 ef8fb42803b0
parent 1131 4721b93b9cdc
child 1133 763354d388ca
changes for win32.
STXInstaller.st
--- a/STXInstaller.st	Fri May 28 15:00:19 1999 +0200
+++ b/STXInstaller.st	Mon May 31 14:18:38 1999 +0200
@@ -3,7 +3,7 @@
 		installSourceFiles installSTCFiles installGoodyFiles fullDir
 		actionPercentageHolder actionTextHolder commandTraceView
 		resources dfHolder copyProcess installWhat'
-	classVariableNames:'LastBinDir LastLibBinDir LastLibDir LastFullDir'
+	classVariableNames:'LastPartialDir LastBinDir LastLibBinDir LastLibDir LastFullDir'
 	poolDictionaries:''
 	category:'eXept-tools'
 !
@@ -22,16 +22,17 @@
 !STXInstaller methodsFor:'defaults'!
 
 defaultBinDirs
-    |dirs|
+    |dirs stxRel|
 
+    stxRel := self smalltalkRelease.
     dirs := OrderedCollection new.
 
     OperatingSystem isMSWINDOWSlike ifTrue:[
-        dirs add:'\Programme\eXept\SmalltalkX\' , self smalltalkRelease , '\bin'.
-        dirs add:'\Programme\SmalltalkX\' , self smalltalkRelease , '\bin'.
-        dirs add:'\SmalltalkX\' , self smalltalkRelease , '\bin'.
+        dirs add:'c:\Programme\eXept\SmalltalkX\' , stxRel , '\bin'.
+        dirs add:'c:\Programme\SmalltalkX\' , stxRel , '\bin'.
+        dirs add:'c:\SmalltalkX\' , stxRel , '\bin'.
     ] ifFalse:[
-        dirs add:'/opt/smalltalk/' , self smalltalkRelease , '/bin'.
+        dirs add:'/opt/smalltalk/' , stxRel , '/bin'.
         dirs add:'/usr/local/bin'.
         dirs add:'/usr/bin'.
 
@@ -56,7 +57,7 @@
     ^ dirs "sort"
 
     "Created: / 18.7.1996 / 19:43:00 / cg"
-    "Modified: / 30.4.1999 / 11:56:03 / cg"
+    "Modified: / 31.5.1999 / 12:11:48 / cg"
 !
 
 defaultFullDirs
@@ -78,14 +79,16 @@
 !
 
 defaultLibBinDirs
-    |dirs|
+    |dirs stxRel|
 
+    stxRel := self smalltalkRelease.
     dirs := OrderedCollection new.
     OperatingSystem isMSWINDOWSlike ifTrue:[
-        dirs add:'\Programme\eXept\SmalltalkX\' , self smalltalkRelease , '\lib'.
-        dirs add:'\Programme\SmalltalkX\' , self smalltalkRelease , '\lib'.
-        dirs add:'\SmalltalkX\' , self smalltalkRelease , '\lib'.
+        dirs add:'c:\Programme\eXept\SmalltalkX\' , stxRel , '\lib'.
+        dirs add:'c:\Programme\SmalltalkX\' , stxRel , '\lib'.
+        dirs add:'c:\SmalltalkX\' , stxRel , '\lib'.
     ] ifFalse:[
+        dirs add:'/opt/smalltalk/' , stxRel , '/lib'.
         dirs add:'/usr/local/lib'.
         dirs add:'/usr/lib'.
         dirs add:'/lib'.
@@ -102,19 +105,20 @@
     ^ dirs sort
 
     "Created: / 18.7.1996 / 19:43:21 / cg"
-    "Modified: / 30.4.1999 / 11:56:48 / cg"
+    "Modified: / 31.5.1999 / 12:12:17 / cg"
 !
 
 defaultLibDirs
-    |dirs|
+    |dirs stxRel|
 
+    stxRel := self smalltalkRelease.
     dirs := OrderedCollection new.
     OperatingSystem isMSWINDOWSlike ifTrue:[
-        dirs add:'\Programme\eXept\SmalltalkX\' , self smalltalkRelease , '\lib'.
-        dirs add:'\Programme\SmalltalkX\' , self smalltalkRelease , '\lib'.
-        dirs add:'\SmalltalkX\' , self smalltalkRelease , '\lib'.
+        dirs add:'c:\Programme\eXept\SmalltalkX\' , stxRel , '\lib'.
+        dirs add:'c:\Programme\SmalltalkX\' , stxRel , '\lib'.
+        dirs add:'c:\SmalltalkX\' , stxRel , '\lib'.
     ] ifFalse:[
-        dirs add:'/opt/smalltalk/' , self smalltalkRelease , '/lib'.
+        dirs add:'/opt/smalltalk/' , stxRel , '/lib'.
         dirs add:'/usr/local/lib/smalltalk'.
         dirs add:'/usr/lib/smalltalk'.
         dirs add:((Filename homeDirectory 
@@ -136,7 +140,7 @@
     ^ dirs "sort"
 
     "Created: / 18.7.1996 / 19:43:21 / cg"
-    "Modified: / 30.4.1999 / 11:57:02 / cg"
+    "Modified: / 31.5.1999 / 12:12:30 / cg"
 !
 
 directoriesToMake
@@ -302,37 +306,57 @@
 
     fileSpec := #(
                 "/ name                             destination  subDir             required       
-"/                ( 'binbc\smalltalk'                     #bin     nil                  true   )
-                ( 'binbc\stx'                           #bin     nil                  true   )
-                ( 'binbc\include'                       #lib     nil                  true   )
-                ( 'binbc\lib*.dll'                      #bin     nil                  true   )
+                ( 'projects\smalltalk\smalltalk.bat'    #bin     nil                  true   )
+                ( 'projects\smalltalk\stx.exe'          #bin     nil                  true   )
+                ( 'projects\smalltalk\stxspawn.exe'     #bin     nil                  true   )
+                ( 'projects\smalltalk\include'          #lib     nil                  true   )
+                ( 'projects\smalltalk\lib*.dll'         #bin     nil                  true   )
+                ( 'projects\smalltalk\stxc3240.dll'     #bin     nil                  true   )
+                ( 'projects\smalltalk\X11.dll'          #bin     nil                  true   )
+                ( 'projects\smalltalk\Xext.dll'         #bin     nil                  true   )
+                ( 'projects\smalltalk\XWorkstat.dll'    #bin     nil                  true   )
+                ( 'projects\smalltalk\WinWorkstat.dll'  #bin     nil                  true   )
                 ( 'COPYRIGHT'                           #lib     nil                  true   )
-                ( 'binbc\*.rc'                          #lib     nil                  true   )
-                ( 'binbc\patches'                       #lib     nil                  true   )
-                ( 'binbc\bitmaps'                       #lib     nil                  true   )
-                ( 'binbc\resources'                     #lib     nil                  true   )
+                ( 'projects\smalltalk\*.rc'             #bin     nil                  true   )
+                ( 'projects\smalltalk\patches'          #bin     nil                  true   )
+                ( 'projects\smalltalk\bitmaps'          #lib     nil                  true   )
+                ( 'projects\smalltalk\resources'        #lib     nil                  true   )
                 ( 'doc\online\german\LICENCE.STX.html'  #lib     'doc\online\german'  true   )
                 ( 'doc\online\english\LICENCE.STX.html' #lib     'doc\online\english' true   )
     ).
 
     installDocFiles ifTrue:[
         fileSpec := fileSpec , #(
-                ( 'doc'                                  #lib     nil        false  )
+                ( 'doc'                                 #lib     nil        false  )
         ).
     ].
 
     installSourceFiles ifTrue:[
         fileSpec := fileSpec , #(
-                ( 'binbc\source'                         #lib     nil        false  )
+                ( 'projects\smalltalk\source'           #lib     nil                    false  )
+                ( 'projects\smalltalk\libbasic\*.st'    #lib     'source\libbasic'      false  )
+                ( 'projects\smalltalk\libbasic2\*.st'   #lib     'source\libbasic2'     false  )
+                ( 'projects\smalltalk\libbasic3\*.st'   #lib     'source\libbasic3'     false  )
+                ( 'projects\smalltalk\libcomp\*.st'     #lib     'source\libcomp'       false  )
+                ( 'projects\smalltalk\libview\*.st'     #lib     'source\libview'       false  )
+                ( 'projects\smalltalk\libview2\*.st'    #lib     'source\libview2'      false  )
+                ( 'projects\smalltalk\libwidg\*.st'     #lib     'source\libwidg'       false  )
+                ( 'projects\smalltalk\libwidg2\*.st'    #lib     'source\libwidg2'      false  )
+                ( 'projects\smalltalk\libwidg3\*.st'    #lib     'source\libwidg3'      false  )
+                ( 'projects\smalltalk\libtool\*.st'     #lib     'source\libtool'       false  )
+                ( 'projects\smalltalk\libtool2\*.st'    #lib     'source\libtool2'      false  )
+                ( 'projects\smalltalk\libui\*.st'       #lib     'source\libui'         false  )
+                ( 'projects\smalltalk\libhtml\*.st'     #lib     'source\libhtml'       false  )
+                ( 'projects\smalltalk\libodbc\*.st'     #lib     'source\libodbc'       false  )
+                ( 'projects\smalltalk\libopengl\*.st'   #lib     'source\libopengl'     false  )
         ).
     ].
 
     installSTCFiles ifTrue:[
         fileSpec := fileSpec , #(
-                ( 'binbc\stc'                            #bin        nil              false  )
+                ( 'projects\smalltalk\stc.exe'           #bin        nil              false  )
                 ( 'include'                              #lib        nil              false  )
-
-                ( 'binbc\*.lib'                          #libBin     nil              false  )
+                ( 'libbc\*.lib'                          #lib        nil              false  )
         ).
     ].
 
@@ -346,8 +370,8 @@
 
     ^ fileSpec
 
-    "Modified: / 30.4.1999 / 18:02:22 / cg"
     "Created: / 2.5.1999 / 13:23:06 / cg"
+    "Modified: / 31.5.1999 / 14:11:37 / cg"
 !
 
 xxspecOfFilesToCopy
@@ -470,9 +494,17 @@
 !
 
 copyFiles
-    |msg fileSpec filesToCopy numFiles nDone cmd|
+    |msg fileSpec filesToCopy numFiles nDone cmd topDir topDirPrefix|
+
+    msg := (resources array:#('ST/X Installation' '' 'copying:' '' 'to:' '')) asStringCollection.
 
-     msg := (resources array:#('ST/X Installation' '' 'copying:' '' 'to:' '')) asStringCollection.
+    OperatingSystem isUNIXlike ifTrue:[
+        topDir := '../..'.
+        topDirPrefix := '../../'.
+    ] ifFalse:[
+        topDir := '..\..'.
+        topDirPrefix := '..\..\'.
+    ].
 
     installWhat == #full ifTrue:[
         msg at:4 put:('    all from CD' asText allBold).
@@ -480,7 +512,7 @@
         actionTextHolder value:nil.
         actionTextHolder value:msg.
 
-        cmd := '(cd ../.. ; tar cf - .) | (cd ' , fullDir , ' ; tar xvf -)'.
+        cmd := '(cd ' , topDir , ' ; tar cf - .) | (cd ' , fullDir , ' ; tar xvf -)'.
 "/        "/
 "/        "/ not all systems have cp -rv
 "/        "/
@@ -537,7 +569,7 @@
         destDir := entry value.
 
         ((fileName includes:$*)
-        or:[('../../' , fileName) asFilename exists])ifTrue:[
+        or:[(topDirPrefix , fileName) asFilename exists])ifTrue:[
             actionPercentageHolder value:(nDone / numFiles * 100) rounded.
 
             msg at:4 put:'    ' , (fileName asText allBold).
@@ -552,12 +584,7 @@
                     commandTraceView endEntry.
                 ]
             ] ifFalse:[
-                cmd := 'cp -r ../../' , fileName , ' ' , destDir.
-                commandTraceView showCR:cmd , ' ...'.
-                commandTraceView endEntry.
-                cmd := cmd , ' 2>&1' .
-
-                self executeCommandAndShowOutput:cmd
+                self recursiveCopy:(topDirPrefix , fileName) to:destDir.
             ]
         ].
 
@@ -571,7 +598,7 @@
     "
 
     "Created: / 17.7.1996 / 15:16:20 / cg"
-    "Modified: / 20.4.1998 / 17:41:45 / cg"
+    "Modified: / 31.5.1999 / 13:05:23 / cg"
 !
 
 createDirectories
@@ -639,6 +666,8 @@
 createSymbolicLinks
     |msg dirsToMake numDirs nDone|
 
+    OperatingSystem isUNIXlike ifFalse:[^ self].
+
     msg := (resources array:#('ST/X Installation' '' 'creating symbolic links' '' '' '')) asStringCollection.
 
     commandTraceView showCR:(resources string:'setting up symbolic links in doc/online ...').
@@ -650,7 +679,7 @@
     ].
 
     "Created: / 17.7.1996 / 15:24:19 / cg"
-    "Modified: / 20.4.1998 / 15:40:11 / cg"
+    "Modified: / 31.5.1999 / 13:26:42 / cg"
 !
 
 executeCommandAndShowOutput:cmd
@@ -736,6 +765,35 @@
 
     "Created: 2.3.1997 / 12:49:52 / cg"
     "Modified: 8.8.1997 / 17:47:06 / cg"
+!
+
+recursiveCopy:src to:destDir
+    |cmd|
+
+    OperatingSystem isUNIXlike ifTrue:[
+        cmd := 'cp -r ' , src , ' ' , destDir.
+        commandTraceView showCR:cmd , ' ...'.
+        commandTraceView endEntry.
+        cmd := cmd , ' 2>&1' .
+
+        self executeCommandAndShowOutput:cmd
+    ] ifFalse:[
+        commandTraceView showCR:('copy ' , src , ' ' , destDir).
+        commandTraceView endEntry.
+        src includesMatchCharacters ifTrue:[
+            src asFilename directory directoryContents do:[:fileName |
+                ((src asFilename baseName) match:fileName) ifTrue:[
+                    (src asFilename directory construct:fileName)
+                        recursiveCopyTo:destDir
+                ]
+            ]
+        ] ifFalse:[
+            src asFilename recursiveCopyTo:destDir
+        ]
+    ]
+
+    "Created: / 31.5.1999 / 13:05:09 / cg"
+    "Modified: / 31.5.1999 / 13:14:19 / cg"
 ! !
 
 !STXInstaller methodsFor:'startup'!
@@ -747,11 +805,12 @@
 
     resources := ResourcePack for:self class.
 
-    ((here := Filename currentDirectory pathName) endsWith:'projects/smalltalk') ifFalse:[
-        (here endsWith:'stx\binbc') ifFalse:[
-            self warn:(resources string:'must be in the ''projects/smalltalk'' directory').
-            ^ self
-        ]
+    (((here := Filename currentDirectory pathName) endsWith:'projects/smalltalk') not
+    and:[(here asLowercase endsWith:'stx\binbc') not
+    and:[(here asLowercase endsWith:'projects\smalltalk') not
+    ]]) ifTrue:[
+        self warn:(resources string:'must be in the ''projects/smalltalk'' directory').
+        ^ self
     ].
 
     answer := self askForFullInstallation.
@@ -771,7 +830,7 @@
         ]
     ].
 
-    "Modified: / 30.4.1999 / 11:53:35 / cg"
+    "Modified: / 31.5.1999 / 12:04:14 / cg"
 !
 
 askForDestination
@@ -873,10 +932,10 @@
     "open a dialog to enter destination directories"
 
     |d cm l green dark img
-     stxLibDirHolder stxLibBinDirHolder stxBinDirHolder
+     stxInstDirHolder stxLibDirHolder stxLibBinDirHolder stxBinDirHolder
      installDocHolder installSourceHolder installSTCHolder installGoodiesHolder
      binMegabytes libMegabytes docMegabytes stcMegabytes srcMegabytes
-     goodyMegabytes
+     goodyMegabytes stxRel list stxInstDir
     |
 
     binMegabytes := 12.
@@ -886,31 +945,40 @@
     srcMegabytes := 25.
     goodyMegabytes := 2.
 
+    stxRel := self smalltalkRelease.
+
     OperatingSystem isMSWINDOWSlike ifTrue:[
-        LastLibDir isNil ifTrue:[
-            LastLibDir := '\Programme\SmalltalkX\' , self smalltalkRelease , '\lib'
-        ].
-        LastLibBinDir isNil ifTrue:[
-            LastLibBinDir := '\Programme\SmalltalkX\' , self smalltalkRelease , '\lib'
-        ].
-        LastBinDir isNil ifTrue:[
-            LastBinDir := '\Programme\SmalltalkX\' , self smalltalkRelease , '\lib'
+        LastPartialDir isNil ifTrue:[
+            LastPartialDir := 'c:\Programme\SmalltalkX\' , stxRel 
         ].
+"/        LastLibDir isNil ifTrue:[
+"/            LastLibDir := 'c:\Programme\SmalltalkX\' , stxRel , '\lib'
+"/        ].
+"/        LastLibBinDir isNil ifTrue:[
+"/            LastLibBinDir := 'c:\Programme\SmalltalkX\' , stxRel , '\lib'
+"/        ].
+"/        LastBinDir isNil ifTrue:[
+"/            LastBinDir := 'c:\Programme\SmalltalkX\' , stxRel , '\bin'
+"/        ].
     ] ifFalse:[
-        LastLibDir isNil ifTrue:[
-            LastLibDir := '/opt/smalltalk/' , self smalltalkRelease , '/lib'
+        LastPartialDir isNil ifTrue:[
+            LastPartialDir := '/opt/smalltalk/' , stxRel
         ].
-        LastLibBinDir isNil ifTrue:[
-            LastLibBinDir := '/opt/smalltalk/' , self smalltalkRelease , '/lib'
-        ].
-        LastBinDir isNil ifTrue:[
-            LastBinDir := '/opt/smalltalk/' , self smalltalkRelease , '/bin'
-        ].
+"/        LastLibDir isNil ifTrue:[
+"/            LastLibDir := '/opt/smalltalk/' , stxRel , '/lib'
+"/        ].
+"/        LastLibBinDir isNil ifTrue:[
+"/            LastLibBinDir := '/opt/smalltalk/' , stxRel , '/lib'
+"/        ].
+"/        LastBinDir isNil ifTrue:[
+"/            LastBinDir := '/opt/smalltalk/' , stxRel , '/bin'
+"/        ].
     ].
 
-    stxLibDirHolder := LastLibDir asValue.
-    stxLibBinDirHolder := LastLibBinDir asValue.
-    stxBinDirHolder := LastBinDir asValue.
+    stxInstDirHolder := LastPartialDir asValue.
+"/    stxLibDirHolder := LastLibDir asValue.
+"/    stxLibBinDirHolder := LastLibBinDir asValue.
+"/    stxBinDirHolder := LastBinDir asValue.
 
     installDocHolder := true asValue.
     installSourceHolder := true asValue.
@@ -943,44 +1011,62 @@
     l := d addTextLabel:(resources string:'Destination directories:').
     l adjust:#left; backgroundColor:dark; foregroundColor:Color white.
 
-    l := d addTextLabel:(resources string:'(the defaults below are recommended)').
+    l := d addTextLabel:(resources string:'(the default below is recommended)').
     l adjust:#right; backgroundColor:dark; foregroundColor:Color white.
 
-    cm := ComboBoxView on:stxBinDirHolder.
-    cm list:self defaultBinDirs.
+    cm := ComboBoxView on:stxInstDirHolder.
+    list := self defaultBinDirs collect:[:line |
+                line replChar:$\ withString:'\\'
+            ].
+    cm list:list.
     d 
         addLabelledField:cm 
-        label:(resources string:'binaries')
+        label:(resources string:'install into:')
         adjust:#left 
         tabable:true 
         from:0.0 to:1.0 separateAtX:0.25
-        nameAs:'binaryBox'.
-
-    (d componentAt:'binaryBox.label') backgroundColor:dark; foregroundColor:Color white.
+        nameAs:'instDirBox'.
 
-    cm := ComboBoxView on:stxLibBinDirHolder.
-    cm list:self defaultLibBinDirs.
-    d 
-        addLabelledField:cm 
-        label:(resources string:'libraries') 
-        adjust:#left 
-        tabable:true 
-        from:0.0 to:1.0 separateAtX:0.25
-        nameAs:'libraryBinBox'.
+    (d componentAt:'instDirBox.label') backgroundColor:dark; foregroundColor:Color white.
 
-    (d componentAt:'libraryBinBox.label') backgroundColor:dark; foregroundColor:Color white.
-
-    cm := ComboBoxView on:stxLibDirHolder.
-    cm list:self defaultLibDirs.
-    d 
-        addLabelledField:cm 
-        label:(resources string:'other files') 
-        adjust:#left 
-        tabable:true 
-        from:0.0 to:1.0 separateAtX:0.25
-        nameAs:'libraryBox'.
-
-    (d componentAt:'libraryBox.label') backgroundColor:dark; foregroundColor:Color white.
+"/    cm := ComboBoxView on:stxBinDirHolder.
+"/    list := self defaultBinDirs collect:[:line |
+"/                line replChar:$\ withString:'\\'
+"/            ].
+"/    cm list:list.
+"/    d 
+"/        addLabelledField:cm 
+"/        label:(resources string:'binaries')
+"/        adjust:#left 
+"/        tabable:true 
+"/        from:0.0 to:1.0 separateAtX:0.25
+"/        nameAs:'binaryBox'.
+"/
+"/    (d componentAt:'binaryBox.label') backgroundColor:dark; foregroundColor:Color white.
+"/
+"/    cm := ComboBoxView on:stxLibBinDirHolder.
+"/    cm list:self defaultLibBinDirs.
+"/    d 
+"/        addLabelledField:cm 
+"/        label:(resources string:'libraries') 
+"/        adjust:#left 
+"/        tabable:true 
+"/        from:0.0 to:1.0 separateAtX:0.25
+"/        nameAs:'libraryBinBox'.
+"/
+"/    (d componentAt:'libraryBinBox.label') backgroundColor:dark; foregroundColor:Color white.
+"/
+"/    cm := ComboBoxView on:stxLibDirHolder.
+"/    cm list:self defaultLibDirs.
+"/    d 
+"/        addLabelledField:cm 
+"/        label:(resources string:'other files') 
+"/        adjust:#left 
+"/        tabable:true 
+"/        from:0.0 to:1.0 separateAtX:0.25
+"/        nameAs:'libraryBox'.
+"/
+"/    (d componentAt:'libraryBox.label') backgroundColor:dark; foregroundColor:Color white.
 
     d addVerticalSpace.
     d addHorizontalLine.
@@ -1032,9 +1118,14 @@
 
     d openAtCenter.
     d accepted ifTrue:[
-        stxLibDir := LastLibDir := stxLibDirHolder value.
-        stxLibBinDir := LastLibBinDir := stxLibBinDirHolder value.
-        stxBinDir := LastBinDir := stxBinDirHolder value.
+        stxInstDir := LastPartialDir := stxInstDirHolder value.
+        stxLibDir := stxInstDir asFilename constructString:'lib'.
+        stxLibBinDir := stxInstDir asFilename constructString:'lib'.
+        stxBinDir := stxInstDir asFilename constructString:'bin'.
+
+"/        stxLibDir := LastLibDir := stxLibDirHolder value.
+"/        stxLibBinDir := LastLibBinDir := stxLibBinDirHolder value.
+"/        stxBinDir := LastBinDir := stxBinDirHolder value.
         installDocFiles := installDocHolder value.
         installSourceFiles := installSourceHolder value.
         installSTCFiles := installSTCHolder value.
@@ -1050,7 +1141,7 @@
     "
 
     "Created: / 25.2.1998 / 17:11:26 / cg"
-    "Modified: / 30.4.1999 / 11:58:33 / cg"
+    "Modified: / 31.5.1999 / 13:42:48 / cg"
 !
 
 askForFullInstallation
@@ -1201,7 +1292,7 @@
                 ifFalse:[
                     self warn:(resources string:'mhmh - could not remove old installation.
 
-Please remove it manually (using root privileges if required) 
+Please remove it manually (using administrator privileges if required) 
 and try again.').
                     box destroy.
                     ^ false
@@ -1217,14 +1308,14 @@
      STXInstaller open
     "
 
-    "Modified: / 25.2.1998 / 19:35:12 / cg"
+    "Modified: / 31.5.1999 / 13:23:03 / cg"
 !
 
 doInstall
     "install ST/X; return true if ok, false if not"
 
     |progressView ok v textView p l 
-     dirToMonitor doDfMonitoring dfMonitorProcess kB|
+     dirToMonitor doDfMonitoring dfMonitorProcess kB drive|
 
     doDfMonitoring := false.
 
@@ -1241,68 +1332,46 @@
         dirToMonitor := stxLibDir
     ].
 
-    (OperatingSystem isMSWINDOWSlike not
-    and:[OperatingSystem canExecuteCommand:'df ' , dirToMonitor]) ifTrue:[
-        p := HorizontalPanelView in:v.
-        p origin:0.0@1.0 corner:1.0@1.0.
-        p topInset:-30.
-        p horizontalLayout:#fit.
+    OperatingSystem isMSWINDOWSlike ifTrue:[
+        drive := Filename rootDirectoryOnVolume:(dirToMonitor asFilename volume)
+    ] ifFalse:[
+        drive := dirToMonitor
+    ].
 
-        l := Label label:'' in:p.
-        l labelChannel:(dfHolder := '' asValue).
-        l adjust:#left.
-        dfMonitorProcess := [
-            |ok p text keys values i l|
+    p := HorizontalPanelView in:v.
+    p origin:0.0@1.0 corner:1.0@1.0.
+    p topInset:-30.
+    p horizontalLayout:#fit.
+
+    l := Label label:'' in:p.
+    l labelChannel:(dfHolder := '' asValue).
+    l adjust:#left.
+    dfMonitorProcess := [
+        |ok info free kB i l|
 
-            ok := true.
-            [ok] whileTrue:[
-                doDfMonitoring ifTrue:[
-                    ok := false.
-                    p := PipeStream readingFrom:('df -k ' , dirToMonitor).
-                    p notNil ifTrue:[
-                       [
-                           text := p contentsOfEntireFile.
-                       ] valueNowOrOnUnwindDo:[
-                           p close.
-                       ].
-"/ Transcript showCR:text asString.
-                       text notNil ifTrue:[
-                           text := text asCollectionOfLines.
-                           text size >= 2 ifTrue:[
-                               keys := (text at:1) asCollectionOfWords.
-                               values := (text at:2) asCollectionOfWords.
-                               i := (keys indexOf:'Capacity').
-                               i == 0 ifTrue:[
-                                   i := (keys indexOf:'capacity').
-                               ].
-                               i ~~ 0 ifTrue:[
-                                   l := 'Used disk space: ' , (values at:i) withoutSeparators.
-                                   i := (keys indexOf:'Available').
-                                   i == 0 ifTrue:[
-                                       i := (keys indexOf:'available').
-                                       i == 0 ifTrue:[
-                                           i := (keys indexOf:'avail').
-                                           i == 0 ifTrue:[
-                                               i := (keys indexOf:'Avail').
-                                           ].
-                                       ].
-                                   ].
-                                   i ~~ 0 ifTrue:[
-                                        kB := (values at:i) withoutSeparators.
-                                        l := l , ' (' , kB , 'k available)'.
-                                   ].
-                                   dfHolder value:l.
-                                   ok := true.
-                                   Delay waitForSeconds:9.
-                               ]
-                           ]
+        ok := true.
+        [ok] whileTrue:[
+            doDfMonitoring ifTrue:[
+                ok := false.
+                info := OperatingSystem getDiskInfoOf:drive pathName.
+                info notNil ifTrue:[
+                    free := info at:#freeBytes ifAbsent:nil.
+                    free notNil ifTrue:[
+                        kB := free / 1024.
+                        kB > 10000 ifTrue:[
+                            l := (kB // 1024) printString, 'Mb available.'.
+                        ] ifFalse:[
+                            l := kB printString , 'Kb available.'.
                         ].
+                        dfHolder value:l.
+                        ok := true.
+                        Delay waitForSeconds:9.
                     ].
                 ].
-                Delay waitForSeconds:1.
-            ]
-        ] forkAt:(Processor activePriority+3)
-    ].
+            ].
+            Delay waitForSeconds:1.
+        ]
+    ] forkAt:(Processor activePriority+3).
 
     progressView := ProgressIndicator
                         inBoxWithLabel:'ST/X Installation' icon:(Icon stxIcon)
@@ -1375,7 +1444,7 @@
     "
 
     "Created: / 17.7.1996 / 15:11:27 / cg"
-    "Modified: / 30.4.1999 / 17:53:53 / cg"
+    "Modified: / 31.5.1999 / 14:05:38 / cg"
 !
 
 open
@@ -1383,11 +1452,12 @@
 
     "
      LastLibDir := LastBinDir := LastLibBinDir := nil.
+     LastPartialDir := nil.
 
      STXInstaller open
     "
 
-    "Modified: / 30.4.1999 / 11:59:00 / cg"
+    "Modified: / 31.5.1999 / 13:41:27 / cg"
 !
 
 postInstall