STXInstaller.st
changeset 1508 ee75546c6820
parent 1503 fc8bbc760d17
child 1509 e00cdf43c001
equal deleted inserted replaced
1507:e65674cad5e5 1508:ee75546c6820
   451 "/      commandTraceView showCR:cmd , ' ...'.
   451 "/      commandTraceView showCR:cmd , ' ...'.
   452         commandTraceView showCR:'copying ...'.
   452         commandTraceView showCR:'copying ...'.
   453         commandTraceView endEntry.
   453         commandTraceView endEntry.
   454         cmd := cmd , ' 2>&1' .
   454         cmd := cmd , ' 2>&1' .
   455 
   455 
   456         self executeCommandAndShowOutput:cmd.
   456         self executeCommandAndShowOutput:cmd emphasize:false.
   457 
   457 
   458         ^ true
   458         ^ true
   459     ].
   459     ].
   460 
   460 
   461     fileSpec := self specOfFilesToCopy asOrderedCollection.
   461     fileSpec := self specOfFilesToCopy asOrderedCollection.
   657     actionTextHolder value:msg.
   657     actionTextHolder value:msg.
   658 
   658 
   659     installWhat == #full ifTrue:[
   659     installWhat == #full ifTrue:[
   660         commandTraceView showCR:(resources string:'setting up symbolic links in doc ...'); endEntry.
   660         commandTraceView showCR:(resources string:'setting up symbolic links in doc ...'); endEntry.
   661         OperatingSystem executeCommand:('(cd ' , fullDir , '/doc/online ; make links)').
   661         OperatingSystem executeCommand:('(cd ' , fullDir , '/doc/online ; make links)').
   662     ] ifFalse:[
   662         ^ self.
       
   663     ].
   663 "/        OperatingSystem executeCommand:('(cd ' , stxLibDir , '/doc/online ; make links)').
   664 "/        OperatingSystem executeCommand:('(cd ' , stxLibDir , '/doc/online ; make links)').
   664 
   665 
   665         commandTraceView showCR:(resources string:'setting up symbolic links in lib ...'); endEntry.
   666     commandTraceView showCR:(resources string:'setting up symbolic links in lib ...'); endEntry.
   666 
   667 
   667         #(
   668     #(
   668             'libbasic/libbasic.so'
   669         'libbasic/libbasic.so'
   669             'libbasic2/libbasic2.so'
   670         'libbasic2/libbasic2.so'
   670             'libbasic3/libbasic3.so'
   671         'libbasic3/libbasic3.so'
   671             'libcomp/libcomp.so'
   672         'libcomp/libcomp.so'
   672             'libboss/libboss.so'
   673         'libboss/libboss.so'
   673             'libview/*.so'
   674         'libview/*.so'
   674             'libview2/libview2.so'
   675         'libview2/libview2.so'
   675             'libwidg/libwidg.so'
   676         'libwidg/libwidg.so'
   676             'libwidg2/libwidg2.so'
   677         'libwidg2/libwidg2.so'
   677             'libwidg3/libwidg3.so'
   678         'libwidg3/libwidg3.so'
   678             'libhtml/libhtml.so'
   679         'libhtml/libhtml.so'
   679             'libui/libui.so'
   680         'libui/libui.so'
   680             'libtool/libtool.so'
   681         'libtool/libtool.so'
   681             'libtool2/libtool2.so'
   682         'libtool2/libtool2.so'
   682             'goodies/persistency/libdbase.so'
   683         'goodies/persistency/libdbase.so'
   683         ) do:[:src |  |cmd|
   684     ) do:[:src |  |cmd|
   684             cmd := '(cd ' , stxLibDir , '/lib ; ln -s ../../packages/stx/' , src , ' . )'.
   685         cmd := '(cd ' , stxLibDir , '/lib ; ln -s ../../packages/stx/' , src , ' . )'.
   685             commandTraceView showCR:cmd; endEntry.
   686         commandTraceView showCR:cmd; endEntry.
   686             OperatingSystem executeCommand:cmd.
   687         OperatingSystem executeCommand:cmd.
   687         ].
       
   688     ].
   688     ].
   689 
   689 
   690     installDocFiles ifTrue:[
   690     installDocFiles ifTrue:[
   691         msg := (resources array:#('ST/X Installation' '' 'creating symbolic links' '' '' '')) asStringCollection.
   691         msg := (resources array:#('ST/X Installation' '' 'creating symbolic links' '' '' '')) asStringCollection.
   692         actionTextHolder value:nil.
   692         actionTextHolder value:nil.
   728     "Created: / 17.7.1996 / 15:24:19 / cg"
   728     "Created: / 17.7.1996 / 15:24:19 / cg"
   729     "Modified: / 31.5.1999 / 14:46:36 / cg"
   729     "Modified: / 31.5.1999 / 14:46:36 / cg"
   730 !
   730 !
   731 
   731 
   732 executeCommandAndShowOutput:cmd
   732 executeCommandAndShowOutput:cmd
       
   733     ^ self executeCommandAndShowOutput:cmd emphasize:true
       
   734 !
       
   735 
       
   736 executeCommandAndShowOutput:cmd emphasize:doEmphasize
   733     |doneSemaphore line p|
   737     |doneSemaphore line p|
   734 
   738 
   735     OperatingSystem isMSWINDOWSlike ifTrue:[
   739     OperatingSystem isMSWINDOWSlike ifTrue:[
   736         ^ self
   740         ^ self
   737     ].
   741     ].
   747             [
   751             [
   748                 [p atEnd] whileFalse:[
   752                 [p atEnd] whileFalse:[
   749                     (p readWaitWithTimeout:0.1) ifFalse:[
   753                     (p readWaitWithTimeout:0.1) ifFalse:[
   750                         line := p nextLine.
   754                         line := p nextLine.
   751                         (line notNil and:[line notEmpty]) ifTrue:[
   755                         (line notNil and:[line notEmpty]) ifTrue:[
   752                             commandTraceView showCR:(('  ' , line) asText emphasizeAllWith:(#color->Color red)).
   756                             doEmphasize ifTrue:[
       
   757                                 line := line asText emphasizeAllWith:(#color->Color red).
       
   758                             ].
       
   759                             commandTraceView showCR:('  ' , line).
   753                             commandTraceView endEntry.
   760                             commandTraceView endEntry.
   754                         ]
   761                         ]
   755                     ]
   762                     ]
   756                 ].
   763                 ].
   757                 p close.
   764                 p close.
  1026     l := d addTextLabel:img.
  1033     l := d addTextLabel:img.
  1027     l adjust:#left; foregroundColor:green backgroundColor:dark.
  1034     l adjust:#left; foregroundColor:green backgroundColor:dark.
  1028 
  1035 
  1029     l := d addTextLabel:(resources string:'Smalltalk/X CD installation (full).').
  1036     l := d addTextLabel:(resources string:'Smalltalk/X CD installation (full).').
  1030     l adjust:#left; backgroundColor:dark; foregroundColor:Color white.
  1037     l adjust:#left; backgroundColor:dark; foregroundColor:Color white.
       
  1038 
       
  1039     l := d addTextLabel:(resources string:'\Notice: this simply copies all of the CD to the destination directory below.\If any problem is encountered, manually copy the CD to your harddisk.') withCRs.
       
  1040     l adjust:#left; backgroundColor:dark; foregroundColor:Color white.
       
  1041 
  1031     d addVerticalSpace.
  1042     d addVerticalSpace.
  1032     d addVerticalSpace.
  1043     d addVerticalSpace.
  1033 
  1044 
  1034     d addHorizontalLine.
  1045     d addHorizontalLine.
  1035 
  1046 
  1294     "Created: / 25.2.1998 / 17:11:26 / cg"
  1305     "Created: / 25.2.1998 / 17:11:26 / cg"
  1295     "Modified: / 31.5.1999 / 18:37:50 / cg"
  1306     "Modified: / 31.5.1999 / 18:37:50 / cg"
  1296 !
  1307 !
  1297 
  1308 
  1298 askForFullInstallation
  1309 askForFullInstallation
  1299     "open a dialog to enter destination directories"
  1310     "open a dialog to ask if a full installation is wanted;
       
  1311      Leave the result in installWhat (a symbol, either #full or #partial)."
  1300 
  1312 
  1301     |d cm l green dark img|
  1313     |d cm l green dark img|
  1302 
  1314 
  1303     Screen current hasColors ifTrue:[
  1315     Screen current hasColors ifTrue:[
  1304         green := (Color red:0 green:80 blue:20) "darkened".
  1316         green := (Color red:0 green:80 blue:20) "darkened".