STXInstaller.st
changeset 1117 657dde1e749d
parent 1010 d744cc925443
child 1118 ebecbe5d4b6b
--- a/STXInstaller.st	Tue Apr 27 09:42:31 1999 +0200
+++ b/STXInstaller.st	Tue Apr 27 12:27:24 1999 +0200
@@ -25,12 +25,13 @@
     |dirs|
 
     dirs := OrderedCollection new.
+    dirs add:'/opt/smalltalk/' , self smalltalkRelease , '/bin'.
     dirs add:'/usr/local/bin'.
     dirs add:'/usr/bin'.
     dirs add:(Filename homeDirectory constructString:'bin').
     dirs add:((Filename homeDirectory 
-			    construct:'stx')
-			    constructString:'bin').
+                            construct:'stx')
+                            constructString:'bin').
     dirs add:'/tmp/stxbin'.
     ('/home' asFilename exists and:['/home' asFilename isDirectory]) ifTrue:[
         dirs add:'/home/stx/bin'.
@@ -44,7 +45,7 @@
 "/
 "/                            f := path asFilename.
 "/                            f exists and:[f isDirectory]].
-    ^ dirs sort
+    ^ dirs "sort"
 
     "Created: 18.7.1996 / 19:43:00 / cg"
     "Modified: 18.7.1996 / 19:45:08 / cg"
@@ -62,7 +63,7 @@
         dirs add:'/home/stx/develop'.
     ].
 
-    ^ dirs sort
+    ^ dirs "sort"
 
     "Modified: / 18.7.1996 / 19:45:08 / cg"
     "Created: / 25.2.1998 / 17:14:43 / cg"
@@ -95,6 +96,7 @@
     |dirs|
 
     dirs := OrderedCollection new.
+    dirs add:'/opt/smalltalk/' , self smalltalkRelease , '/lib'.
     dirs add:'/usr/local/lib/smalltalk'.
     dirs add:'/usr/lib/smalltalk'.
     dirs add:((Filename homeDirectory 
@@ -112,7 +114,7 @@
 "/
 "/                            f := path asFilename.
 "/                            f exists and:[f isDirectory]].
-    ^ dirs sort
+    ^ dirs "sort"
 
     "Created: 18.7.1996 / 19:43:21 / cg"
     "Modified: 18.7.1996 / 19:46:04 / cg"
@@ -164,6 +166,12 @@
     "Modified: 2.3.1997 / 13:24:41 / cg"
 !
 
+smalltalkRelease
+    ^ Smalltalk majorVersionNr printString 
+               , '.' , Smalltalk minorVersionNr printString
+               , '.' , Smalltalk revisionNr printString.
+!
+
 specOfFilesToCopy
     |fileSpec|
 
@@ -678,22 +686,24 @@
      stxLibDirHolder stxLibBinDirHolder stxBinDirHolder
      installDocHolder installSourceHolder installSTCHolder installGoodiesHolder
      binMegabytes libMegabytes docMegabytes stcMegabytes srcMegabytes
+     goodyMegabytes
     |
 
     binMegabytes := 12.
     libMegabytes := 30.
     docMegabytes := 15.
-    stcMegabytes := 1.
-    srcMegabytes := 20.
+    stcMegabytes := 2.
+    srcMegabytes := 25.
+    goodyMegabytes := 2.
 
     LastLibDir isNil ifTrue:[
-        LastLibDir := '/usr/local/lib/smalltalk'
+        LastLibDir := '/opt/smalltalk/' , self smalltalkRelease , '/lib'
     ].
     LastLibBinDir isNil ifTrue:[
-        LastLibBinDir := '/usr/local/lib'
+        LastLibBinDir := '/opt/smalltalk/' , self smalltalkRelease , '/lib'
     ].
     LastBinDir isNil ifTrue:[
-        LastBinDir := '/usr/local/bin'
+        LastBinDir := '/opt/smalltalk/' , self smalltalkRelease , '/bin'
     ].
 
     stxLibDirHolder := LastLibDir asValue.
@@ -805,7 +815,7 @@
 
     (d addCheckBox:((resources string:'smalltalk source files (+%1 Mb)' with:srcMegabytes)) on:installSourceHolder)
         labelView foregroundColor:Color white backgroundColor:dark.
-    (d addCheckBox:((resources string:'goodies (+0.5 Mb)')) on:installGoodiesHolder)
+    (d addCheckBox:((resources string:'goodies (+%1 Mb)' with:goodyMegabytes)) on:installGoodiesHolder)
         labelView foregroundColor:Color white backgroundColor:dark.
 
     d addVerticalSpace.
@@ -878,9 +888,10 @@
 
     d leftIndent:20.
     l := d addTextLabel:(resources string:
-'The full installation is required if you want to build your own
-customized smalltalk executable. It allows you to include additional 
-precompiled classes or classLibraries. 
+'full:' asText allBold , '
+The full installation is required if you want to build your own
+customized smalltalk executable. It allows you to create and include 
+additional precompiled binary classes or classLibraries. 
 This is also required if you want to link your own standalone executables.
 
 It consists of a directory hierachy, including makefiles for a customizeable 
@@ -893,8 +904,13 @@
     d addHorizontalLine.
 
     l := d addTextLabel:(resources string:
-'The partial installation requires less disk space and only copies the
+'partial:' asText allBold , '
+The partial (runTime) installation requires less disk space and only copies the
 smalltalk executable, shared libraries and support files onto your hard disk.
+This setup allows normal smalltalk development and is also useful as a runtime
+environment for smalltalk applications.
+However, it does not support recreation of a new smalltal executable and/or
+shared binary classLibraries.
 This requires roughly 70-90Mb of hard disk space.
 
 
@@ -1006,7 +1022,7 @@
     "install ST/X; return true if ok, false if not"
 
     |progressView ok v textView p l 
-     dirToMonitor doDfMonitoring dfMonitorProcess|
+     dirToMonitor doDfMonitoring dfMonitorProcess kB|
 
     doDfMonitoring := false.
 
@@ -1069,7 +1085,8 @@
                                        ].
                                    ].
                                    i ~~ 0 ifTrue:[
-                                        l := l , ' (' , (values at:i) withoutSeparators , 'k available)'.
+                                        kB := (values at:i) withoutSeparators.
+                                        l := l , ' (' , kB , 'k available)'.
                                    ].
                                    dfHolder value:l.
                                    ok := true.
@@ -1115,6 +1132,11 @@
 
                       progressValue value:100.
 
+                      progressView topView raise.
+                      commandTraceView showCR:'Installation finished.' asText allBold.
+                      commandTraceView endEntry. 
+                      textView flash.
+
                       progressView topView abortButton label:(resources string:'continue').
                       progressView topView abortButton action:[progressView topView hide].
                       msg := (resources 
@@ -1198,8 +1220,10 @@
         ].
 
         (stxLibDir ~= '/usr/local/lib/smalltalk'
-        and:[stxLibDir ~= '/usr/lib/smalltalk']) ifTrue:[
-            msg := msg , (resources string:'The library directory is not a standard ST/X library directory\("/usr/local/lib/smalltalk" or "/usr/lib/smalltalk").\You have to define the %1 environment variable\as %2 before ST/X can be started.\'
+        and:[stxLibDir ~= '/usr/lib/smalltalk'
+        and:[stxLibDir ~= ('/opt/smalltalk/' , self smalltalkRelease , '/lib')]]) ifTrue:[
+            msg := msg , (resources string:'The library directory is not a standard ST/X library directory\("/opt/smalltalk/' , self smalltalkRelease , '/lib", "/usr/local/lib/smalltalk" or "/usr/lib/smalltalk").
+You may have to define the %1 environment variable\as %2 if ST/X complains about not finding its files.\'
                                       with:'STX_LIBDIR' asText allBold 
                                       with:stxLibDir asText allBold) withCRs.
             havePath ifFalse:[