STXInstaller.st
changeset 117 45af2b7a5eca
parent 73 2087134eea96
child 214 e5aaf5e3bbf9
equal deleted inserted replaced
116:61628bedc85a 117:45af2b7a5eca
   279             actionTextHolder value:msg.
   279             actionTextHolder value:msg.
   280 
   280 
   281             ((fileName includes:$*) not
   281             ((fileName includes:$*) not
   282             and:[('../../' , fileName) asFilename exists not]) ifTrue:[
   282             and:[('../../' , fileName) asFilename exists not]) ifTrue:[
   283                 (self listOfOptionalPackages includes:fileName) ifFalse:[
   283                 (self listOfOptionalPackages includes:fileName) ifFalse:[
   284                     commandTraceView showCR:('cannot copy ' , fileName , ' - not included in distribution')
   284                     commandTraceView showCR:('cannot copy ' , fileName , ' - not included in distribution').
       
   285                     commandTraceView endEntry.
   285                 ]
   286                 ]
   286             ] ifFalse:[
   287             ] ifFalse:[
   287                 cmd := 'cp -r ../../' , fileName , ' ' , destDir.
   288                 cmd := 'cp -r ../../' , fileName , ' ' , destDir.
   288                 commandTraceView showCR:cmd , ' ...'.
   289                 commandTraceView showCR:cmd , ' ...'.
       
   290                 commandTraceView endEntry.
   289                 cmd := cmd , ' 2>&1' .
   291                 cmd := cmd , ' 2>&1' .
   290 
   292 
   291                 doneSemaphore := Semaphore new.
   293                 doneSemaphore := Semaphore new.
   292 
   294 
   293                 [   
   295                 [   
   299                         [p atEnd] whileFalse:[
   301                         [p atEnd] whileFalse:[
   300                             (p readWaitWithTimeout:0.1) ifFalse:[
   302                             (p readWaitWithTimeout:0.1) ifFalse:[
   301                                 line := p nextLine.
   303                                 line := p nextLine.
   302                                 (line notNil and:[line notEmpty]) ifTrue:[
   304                                 (line notNil and:[line notEmpty]) ifTrue:[
   303                                     commandTraceView showCR:(('  ' , line) asText emphasizeAllWith:(#color->Color red)).
   305                                     commandTraceView showCR:(('  ' , line) asText emphasizeAllWith:(#color->Color red)).
       
   306                                     commandTraceView endEntry.
   304                                 ]
   307                                 ]
   305                             ]
   308                             ]
   306                         ].
   309                         ].
   307                         p close.
   310                         p close.
   308                     ].
   311                     ].
   317     ].
   320     ].
   318 
   321 
   319     ^ true
   322     ^ true
   320 
   323 
   321     "Created: 17.7.1996 / 15:16:20 / cg"
   324     "Created: 17.7.1996 / 15:16:20 / cg"
   322     "Modified: 2.3.1997 / 12:43:47 / cg"
   325     "Modified: 22.5.1997 / 15:06:33 / cg"
   323 !
   326 !
   324 
   327 
   325 createDirectories
   328 createDirectories
   326     |msg dirsToMake numDirs nDone|
   329     |msg dirsToMake numDirs nDone|
   327 
   330 
   342         actionTextHolder value:msg.
   345         actionTextHolder value:msg.
   343 
   346 
   344         d := dirName asFilename.
   347         d := dirName asFilename.
   345 
   348 
   346         commandTraceView showCR:(resources string:'creating %1 ...' with:d pathName).
   349         commandTraceView showCR:(resources string:'creating %1 ...' with:d pathName).
       
   350         commandTraceView endEntry.
   347 
   351 
   348         d exists ifFalse:[
   352         d exists ifFalse:[
   349             OperatingSystem recursiveCreateDirectory:d pathName
   353             OperatingSystem recursiveCreateDirectory:d pathName
   350         ].
   354         ].
   351 
   355 
   378         nDone := nDone + 1.
   382         nDone := nDone + 1.
   379     ].
   383     ].
   380     ^ true
   384     ^ true
   381 
   385 
   382     "Created: 17.7.1996 / 15:24:19 / cg"
   386     "Created: 17.7.1996 / 15:24:19 / cg"
   383     "Modified: 18.7.1996 / 22:18:38 / cg"
   387     "Modified: 22.5.1997 / 15:06:41 / cg"
   384 !
   388 !
   385 
   389 
   386 createSymbolicLinks
   390 createSymbolicLinks
   387     |msg dirsToMake numDirs nDone|
   391     |msg dirsToMake numDirs nDone|
   388 
   392 
   389     msg := (resources array:#('ST/X Installation' '' 'creating symbolic links' '' '' '')) asStringCollection.
   393     msg := (resources array:#('ST/X Installation' '' 'creating symbolic links' '' '' '')) asStringCollection.
   390 
   394 
   391     commandTraceView showCR:(resources string:'setting up symbolic links in doc/online ...').
   395     commandTraceView showCR:(resources string:'setting up symbolic links in doc/online ...').
       
   396     commandTraceView endEntry.
   392     OperatingSystem executeCommand:('(cd ' , stxLibDir , '/doc/online ; make links)').
   397     OperatingSystem executeCommand:('(cd ' , stxLibDir , '/doc/online ; make links)').
   393     ^ true
   398     ^ true
   394 
   399 
   395     "Created: 17.7.1996 / 15:24:19 / cg"
   400     "Created: 17.7.1996 / 15:24:19 / cg"
   396     "Modified: 18.7.1996 / 22:18:38 / cg"
   401     "Modified: 22.5.1997 / 15:06:48 / cg"
   397 !
   402 !
   398 
   403 
   399 outputInitialMessage
   404 outputInitialMessage
   400     #(
   405     #(
   401     'Notice:'
   406     'Notice:'
   553 
   558 
   554     cm := ComboBoxView on:stxLibDirHolder.
   559     cm := ComboBoxView on:stxLibDirHolder.
   555     cm list:self defaultLibDirs.
   560     cm list:self defaultLibDirs.
   556     d 
   561     d 
   557         addLabelledField:cm 
   562         addLabelledField:cm 
   558         label:(resources string:'help files') 
   563         label:(resources string:'other files') 
   559         adjust:#left 
   564         adjust:#left 
   560         tabable:true 
   565         tabable:true 
   561         from:0.0 to:1.0 separateAtX:0.25
   566         from:0.0 to:1.0 separateAtX:0.25
   562         nameAs:'libraryBox'.
   567         nameAs:'libraryBox'.
   563 
   568 
   624         ^ true
   629         ^ true
   625     ].
   630     ].
   626     d destroy.
   631     d destroy.
   627     ^ false
   632     ^ false
   628 
   633 
   629     "Modified: 2.3.1997 / 13:40:44 / cg"
   634     "Modified: 22.5.1997 / 15:04:29 / cg"
   630 !
   635 !
   631 
   636 
   632 checkForExistingInstallationAndConfirm
   637 checkForExistingInstallationAndConfirm
   633     "look if there is another installation and confirm
   638     "look if there is another installation and confirm
   634      reinstalling; return true if ok, false if not"
   639      reinstalling; return true if ok, false if not"