STXInstaller.st
changeset 1367 e761ba85d5ac
parent 1284 9f4ba1b3b604
child 1368 ce2820258d1b
equal deleted inserted replaced
1366:ffb95ba845ec 1367:e761ba85d5ac
   642 
   642 
   643     "Modified: / 23.12.1999 / 22:21:18 / cg"
   643     "Modified: / 23.12.1999 / 22:21:18 / cg"
   644 !
   644 !
   645 
   645 
   646 createSymbolicLinks
   646 createSymbolicLinks
   647     |msg dirsToMake numDirs nDone|
   647     |msg dirsToMake numDirs nDone languages cmd|
   648 
   648 
   649     OperatingSystem isUNIXlike ifFalse:[^ self].
   649     OperatingSystem isUNIXlike ifFalse:[^ self].
   650 
   650 
   651     msg := (resources array:#('ST/X Installation' '' 'creating symbolic links' '' '' '')) asStringCollection.
   651     msg := (resources array:#('ST/X Installation' '' 'creating symbolic links' '' '' '')) asStringCollection.
   652     actionTextHolder value:nil.
   652     actionTextHolder value:nil.
   653     actionTextHolder value:msg.
   653     actionTextHolder value:msg.
   654 
   654 
   655     commandTraceView showCR:(resources string:'setting up symbolic links in doc/online ...'); endEntry.
       
   656 
       
   657     installWhat == #full ifTrue:[
   655     installWhat == #full ifTrue:[
       
   656         commandTraceView showCR:(resources string:'setting up symbolic links in doc ...'); endEntry.
   658         OperatingSystem executeCommand:('(cd ' , fullDir , '/doc/online ; make links)').
   657         OperatingSystem executeCommand:('(cd ' , fullDir , '/doc/online ; make links)').
   659     ] ifFalse:[
   658     ] ifFalse:[
   660         OperatingSystem executeCommand:('(cd ' , stxLibDir , '/doc/online ; make links)').
   659 "/        OperatingSystem executeCommand:('(cd ' , stxLibDir , '/doc/online ; make links)').
   661 
   660 
   662         commandTraceView showCR:(resources string:'setting up symbolic links in lib ...'); endEntry.
   661         commandTraceView showCR:(resources string:'setting up symbolic links in lib ...'); endEntry.
   663 
   662 
   664         #(
   663         #(
   665             'libbasic/libbasic.so'
   664             'libbasic/libbasic.so'
   682             commandTraceView showCR:cmd; endEntry.
   681             commandTraceView showCR:cmd; endEntry.
   683             OperatingSystem executeCommand:cmd.
   682             OperatingSystem executeCommand:cmd.
   684         ].
   683         ].
   685     ].
   684     ].
   686 
   685 
       
   686     installDocFiles ifTrue:[
       
   687         msg := (resources array:#('ST/X Installation' '' 'creating symbolic links' '' '' '')) asStringCollection.
       
   688         actionTextHolder value:nil.
       
   689         actionTextHolder value:msg.
       
   690 
       
   691         commandTraceView showCR:(resources string:'setting up symbolic links in doc/online ...'); endEntry.
       
   692 
       
   693         languages := #(
       
   694                         'english'
       
   695                         'german'
       
   696                         'french'
       
   697                         'italian'
       
   698                         'spanish'
       
   699                         'japanese'
       
   700                       ).
       
   701         languages := languages select:[:l | (stxDocDir , '/online/' , l) asFilename exists].
       
   702 
       
   703         languages do:[:thisLang |
       
   704             |langDir|
       
   705 
       
   706             langDir := stxDocDir , '/online/' , thisLang.
       
   707             languages do:[:otherLang |
       
   708                 otherLang ~= thisLang ifTrue:[
       
   709                     cmd := '(cd ' , langDir , ' ; ln -s ../' , otherLang , ' .)'.
       
   710                     commandTraceView showCR:cmd; endEntry.
       
   711                     OperatingSystem executeCommand:cmd.
       
   712                 ]
       
   713             ].
       
   714 
       
   715             cmd := '(cd ' , langDir , ' ; ln -s ../icons .)'.
       
   716             commandTraceView showCR:cmd; endEntry.
       
   717              OperatingSystem executeCommand:cmd.
       
   718 
       
   719             cmd := '(cd ' , langDir , ' ; ln -s ../pictures .)'.
       
   720             commandTraceView showCR:cmd; endEntry.
       
   721              OperatingSystem executeCommand:cmd.
       
   722         ]
       
   723     ]
   687     "Created: / 17.7.1996 / 15:24:19 / cg"
   724     "Created: / 17.7.1996 / 15:24:19 / cg"
   688     "Modified: / 31.5.1999 / 14:46:36 / cg"
   725     "Modified: / 31.5.1999 / 14:46:36 / cg"
   689 !
   726 !
   690 
   727 
   691 executeCommandAndShowOutput:cmd
   728 executeCommandAndShowOutput:cmd
   858         ]
   895         ]
   859 "/    ]
   896 "/    ]
   860 
   897 
   861     "Created: / 31.5.1999 / 13:05:09 / cg"
   898     "Created: / 31.5.1999 / 13:05:09 / cg"
   862     "Modified: / 23.12.1999 / 23:36:53 / cg"
   899     "Modified: / 23.12.1999 / 23:36:53 / cg"
       
   900 !
       
   901 
       
   902 removeMakefilesInDoc
       
   903     |cmd msg|
       
   904 
       
   905     OperatingSystem isUNIXlike ifFalse:[ ^ self ].
       
   906 
       
   907     installDocFiles ifTrue:[
       
   908         msg := (resources array:#('ST/X Installation' '' 'removing useless makefiles in doc' '' '' '')) asStringCollection.
       
   909         actionTextHolder value:nil.
       
   910         actionTextHolder value:msg.
       
   911 
       
   912         commandTraceView showCR:(resources string:'removing useless makefiles in doc ...'); endEntry.
       
   913 
       
   914         #(
       
   915             'Make.proto'
       
   916             'nt.mak'
       
   917             'vms.mak'
       
   918             'Makefile'
       
   919         ) do:[:toRemove |
       
   920             cmd := '(cd ' , stxDocDir , ' ; find . -name ''' , toRemove , ''' -exec rm {} \; )'.
       
   921 
       
   922             commandTraceView showCR:cmd; endEntry.
       
   923              OperatingSystem executeCommand:cmd.
       
   924         ]
       
   925     ]
   863 ! !
   926 ! !
   864 
   927 
   865 !STXInstaller methodsFor:'startup'!
   928 !STXInstaller methodsFor:'startup'!
   866 
   929 
   867 askAndInstall
   930 askAndInstall
  1479                           doDfMonitoring := true.
  1542                           doDfMonitoring := true.
  1480                           ok := self copyFiles
  1543                           ok := self copyFiles
  1481                       ].
  1544                       ].
  1482                       self changeWritability.
  1545                       self changeWritability.
  1483                       self createSymbolicLinks.
  1546                       self createSymbolicLinks.
       
  1547                       self removeMakefilesInDoc.
       
  1548 
  1484                       OperatingSystem isMSWINDOWSlike ifTrue:[
  1549                       OperatingSystem isMSWINDOWSlike ifTrue:[
  1485                           self createRegistryEntries.
  1550                           self createRegistryEntries.
  1486                       ].
  1551                       ].
  1487 
  1552 
  1488                       progressValue value:100.
  1553                       progressValue value:100.