STXInstaller.st
changeset 1281 e83c14253471
parent 1279 b531a4cf201a
child 1282 7fa3b3c668f3
equal deleted inserted replaced
1280:d9e41d5640ab 1281:e83c14253471
    35         dirs add:'/opt/smalltalk/' , stxRel , '/bin'.
    35         dirs add:'/opt/smalltalk/' , stxRel , '/bin'.
    36         dirs add:'/usr/local/bin'.
    36         dirs add:'/usr/local/bin'.
    37         dirs add:'/usr/bin'.
    37         dirs add:'/usr/bin'.
    38 
    38 
    39         dirs add:(Filename homeDirectory constructString:'bin').
    39         dirs add:(Filename homeDirectory constructString:'bin').
    40         dirs add:((Filename homeDirectory 
    40         dirs add:((Filename homeDirectory construct:'stx') constructString:'bin').
    41                                 construct:'stx')
       
    42                                 constructString:'bin').
       
    43         dirs add:'/tmp/stxbin'.
    41         dirs add:'/tmp/stxbin'.
    44         ('/home' asFilename exists and:['/home' asFilename isDirectory]) ifTrue:[
    42         ('/home' asFilename exists and:['/home' asFilename isDirectory]) ifTrue:[
    45             dirs add:'/home/stx/bin'.
    43             dirs add:'/home/stx/bin'.
    46         ].
    44         ].
    47         ('/home2' asFilename exists and:['/home2' asFilename isDirectory]) ifTrue:[
    45         ('/home2' asFilename exists and:['/home2' asFilename isDirectory]) ifTrue:[
    63 defaultFullDirs
    61 defaultFullDirs
    64     |dirs|
    62     |dirs|
    65 
    63 
    66     dirs := OrderedCollection new.
    64     dirs := OrderedCollection new.
    67     dirs add:(Filename homeDirectory constructString:'stxDevelop').
    65     dirs add:(Filename homeDirectory constructString:'stxDevelop').
    68     dirs add:((Filename homeDirectory 
    66     dirs add:((Filename homeDirectory construct:'stx') constructString:'develop').
    69                             construct:'stx')
       
    70                             constructString:'develop').
       
    71     ('/home' asFilename exists and:['/home' asFilename isDirectory]) ifTrue:[
    67     ('/home' asFilename exists and:['/home' asFilename isDirectory]) ifTrue:[
    72         dirs add:'/home/stx/develop'.
    68         dirs add:'/home/stx/develop'.
    73     ].
    69     ].
    74 
    70 
    75     ^ dirs "sort"
    71     ^ dirs "sort"
   131     ] ifFalse:[
   127     ] ifFalse:[
   132         dirs add:'/opt/smalltalk/' , stxRel , '/lib'.
   128         dirs add:'/opt/smalltalk/' , stxRel , '/lib'.
   133         dirs add:'/usr/local/lib'.
   129         dirs add:'/usr/local/lib'.
   134         dirs add:'/usr/lib'.
   130         dirs add:'/usr/lib'.
   135         dirs add:'/lib'.
   131         dirs add:'/lib'.
   136         dirs add:(Filename homeDirectory 
   132         dirs add:(Filename homeDirectory constructString:'lib').
   137                                 constructString:'lib').
   133 
   138 
   134         dirs add:((Filename homeDirectory construct:'stx') constructString:'lib').
   139         dirs add:((Filename homeDirectory 
       
   140                                 construct:'stx')
       
   141                                 constructString:'lib').
       
   142         dirs add:'/tmp/stxlib'.
   135         dirs add:'/tmp/stxlib'.
   143         dirs add:'/home/stx/lib'.
   136         dirs add:'/home/stx/lib'.
   144         dirs add:'/home2/stx/lib'.
   137         dirs add:'/home2/stx/lib'.
   145     ].
   138     ].
   146     ^ dirs sort
   139     ^ dirs sort
   160         dirs add:'c:\SmalltalkX\' , stxRel , '\lib'.
   153         dirs add:'c:\SmalltalkX\' , stxRel , '\lib'.
   161     ] ifFalse:[
   154     ] ifFalse:[
   162         dirs add:'/opt/smalltalk/' , stxRel , '/lib'.
   155         dirs add:'/opt/smalltalk/' , stxRel , '/lib'.
   163         dirs add:'/usr/local/lib/smalltalk'.
   156         dirs add:'/usr/local/lib/smalltalk'.
   164         dirs add:'/usr/lib/smalltalk'.
   157         dirs add:'/usr/lib/smalltalk'.
   165         dirs add:((Filename homeDirectory 
   158         dirs add:((Filename homeDirectory construct:'lib') constructString:'smalltalk').
   166                                 construct:'lib')
   159         dirs add:((Filename homeDirectory construct:'stx') constructString:'lib').
   167                                 constructString:'smalltalk').
       
   168         dirs add:((Filename homeDirectory 
       
   169                                 construct:'stx')
       
   170                                 constructString:'lib').
       
   171         dirs add:'/tmp/stxlib'.
   160         dirs add:'/tmp/stxlib'.
   172         dirs add:'/home/stx/lib'.
   161         dirs add:'/home/stx/lib'.
   173         dirs add:'/home2/stx/lib'.
   162         dirs add:'/home2/stx/lib'.
   174     ].
   163     ].
   175 
   164 
   191     installWhat == #full ifTrue:[
   180     installWhat == #full ifTrue:[
   192         dirsToMake add:fullDir.
   181         dirsToMake add:fullDir.
   193     ] ifFalse:[
   182     ] ifFalse:[
   194         dirsToMake add:stxBinDir.
   183         dirsToMake add:stxBinDir.
   195         dirsToMake add:stxLibDir.
   184         dirsToMake add:stxLibDir.
   196         dirsToMake add:stxLibBinDir.
   185         stxLibDir ~= stxLibBinDir ifTrue:[
       
   186             dirsToMake add:stxLibBinDir.
       
   187         ].
   197         dirsToMake add:stxDocDir.
   188         dirsToMake add:stxDocDir.
   198         docOnlineDir := stxDocDir asFilename construct:'online'.
   189         docOnlineDir := stxDocDir asFilename construct:'online'.
   199         dirsToMake add:docOnlineDir name.
   190         dirsToMake add:docOnlineDir name.
   200         dirsToMake add:(docOnlineDir constructString:'english').
   191         dirsToMake add:(docOnlineDir constructString:'english').
   201         dirsToMake add:(docOnlineDir constructString:'german').
   192         dirsToMake add:(docOnlineDir constructString:'german').
   202         dirsToMake add:(docOnlineDir constructString:'french').
   193         installDocFiles ifTrue:[
   203         dirsToMake add:(docOnlineDir constructString:'italian').
   194             dirsToMake add:(docOnlineDir constructString:'french').
   204         installGoodyFiles ifTrue:[
   195             dirsToMake add:(docOnlineDir constructString:'italian').
   205             dirsToMake add:(stxLibDir asFilename constructString:'goodies').
   196         ]
   206         ].
       
   207     ].
   197     ].
   208     ^ dirsToMake
   198     ^ dirsToMake
   209 
   199 
   210     "Modified: / 31.5.1999 / 17:52:03 / cg"
   200     "Modified: / 31.5.1999 / 17:52:03 / cg"
   211 !
   201 !
   243                 ( 'projects/smalltalk/*.rc'             #lib     nil                  true  '644' )
   233                 ( 'projects/smalltalk/*.rc'             #lib     nil                  true  '644' )
   244                 ( 'projects/smalltalk/patches'          #lib     nil                  true  '644' )
   234                 ( 'projects/smalltalk/patches'          #lib     nil                  true  '644' )
   245                 ( 'COPYRIGHT'                           #lib     nil                  true  '644' )
   235                 ( 'COPYRIGHT'                           #lib     nil                  true  '644' )
   246                 ( 'doc/online/german/LICENCE.STX.html'  nil      'doc/online/german'      true  '644' )
   236                 ( 'doc/online/german/LICENCE.STX.html'  nil      'doc/online/german'      true  '644' )
   247                 ( 'doc/online/english/LICENCE.STX.html' nil      'doc/online/english'     true  '644' )
   237                 ( 'doc/online/english/LICENCE.STX.html' nil      'doc/online/english'     true  '644' )
   248 
       
   249                 ( 'libbasic/abbrev.stc'                 #pkg     'stx/libbasic'      true  )
       
   250                 ( 'libbasic/bitmaps'                    #pkg     'stx/libbasic'      true  )
       
   251                 ( 'libbasic/resources'                  #pkg     'stx/libbasic'      true  )
       
   252 
       
   253                 ( 'libbasic2/abbrev.stc'                #pkg     'stx/libbasic2'     true  )
       
   254                 ( 'libbasic2/bitmaps'                   #pkg     'stx/libbasic2'     true  )
       
   255                 ( 'libbasic2/resources'                 #pkg     'stx/libbasic2'     true  )
       
   256 
       
   257                 ( 'libbasic3/abbrev.stc'                #pkg     'stx/libbasic3'     true  )
       
   258                 ( 'libbasic3/bitmaps'                   #pkg     'stx/libbasic3'     true  )
       
   259                 ( 'libbasic3/resources'                 #pkg     'stx/libbasic3'     true  )
       
   260 
       
   261                 ( 'libboss/abbrev.stc'                  #pkg     'stx/libboss'       true  )
       
   262                 ( 'libboss/bitmaps'                     #pkg     'stx/libboss'       true  )
       
   263                 ( 'libboss/resources'                   #pkg     'stx/libboss'       true  )
       
   264 
       
   265                 ( 'libcomp/abbrev.stc'                  #pkg     'stx/libcomp'       true  )
       
   266                 ( 'libcomp/bitmaps'                     #pkg     'stx/libcomp'       true  )
       
   267                 ( 'libcomp/resources'                   #pkg     'stx/libcomp'       true  )
       
   268 
       
   269                 ( 'libview/abbrev.stc'                  #pkg     'stx/libview'       true  )
       
   270                 ( 'libview/bitmaps'                     #pkg     'stx/libview'       true  )
       
   271                 ( 'libview/resources'                   #pkg     'stx/libview'       true  )
       
   272 
       
   273                 ( 'libview2/abbrev.stc'                 #pkg     'stx/libview2'      true  )
       
   274                 ( 'libview2/bitmaps'                    #pkg     'stx/libview2'      true  )
       
   275                 ( 'libview2/resources'                  #pkg     'stx/libview2'      true  )
       
   276 
       
   277                 ( 'libwidg/abbrev.stc'                  #pkg     'stx/libwidg'       true  )
       
   278                 ( 'libwidg/bitmaps'                     #pkg     'stx/libwidg'       true  )
       
   279                 ( 'libwidg/resources'                   #pkg     'stx/libwidg'       true  )
       
   280 
       
   281                 ( 'libwidg2/abbrev.stc'                 #pkg     'stx/libwidg2'      true  )
       
   282                 ( 'libwidg2/bitmaps'                    #pkg     'stx/libwidg2'      true  )
       
   283                 ( 'libwidg2/resources'                  #pkg     'stx/libwidg2'      true  )
       
   284 
       
   285                 ( 'libwidg3/abbrev.stc'                 #pkg     'stx/libwidg3'      true  )
       
   286                 ( 'libwidg3/bitmaps'                    #pkg     'stx/libwidg2'      true  )
       
   287                 ( 'libwidg3/resources'                  #pkg     'stx/libwidg2'      true  )
       
   288 
       
   289                 ( 'libtool/abbrev.stc'                  #pkg     'stx/libtool'       true  )
       
   290                 ( 'libtool/bitmaps'                     #pkg     'stx/libtool'       true  )
       
   291                 ( 'libtool/resources'                   #pkg     'stx/libtool'       true  )
       
   292 
       
   293                 ( 'libtool2/abbrev.stc'                 #pkg     'stx/libtool2'      true  )
       
   294                 ( 'libtool2/bitmaps'                    #pkg     'stx/libtool2'      true  )
       
   295                 ( 'libtool2/resources'                  #pkg     'stx/libtool2'      true  )
       
   296 
       
   297                 ( 'libui/abbrev.stc'                    #pkg     'stx/libui'         true  )
       
   298                 ( 'libui/bitmaps'                       #pkg     'stx/libui'         true  )
       
   299                 ( 'libui/resources'                     #pkg     'stx/libui'         true  )
       
   300 
       
   301                 ( 'libhtml/abbrev.stc'                  #pkg     'stx/libhtml'       true  )
       
   302                 ( 'libhtml/bitmaps'                     #pkg     'stx/libhtml'       true  )
       
   303                 ( 'libhtml/resources'                   #pkg     'stx/libhtml'       true  )
       
   304 
       
   305                 ( 'libodbc/abbrev.stc'                  #pkg     'stx/libodbc'       true  )
       
   306                 ( 'libodbc/bitmaps'                     #pkg     'stx/libodbc'       true  )
       
   307                 ( 'libodbc/resources'                   #pkg     'stx/libodbc'       true  )
       
   308 
       
   309                 ( 'libopengl/abbrev.stc'                #pkg     'stx/libopengl'     true  )
       
   310                 ( 'libopengl/bitmaps'                   #pkg     'stx/libopengl'     true  )
       
   311                 ( 'libopengl/resources'                 #pkg     'stx/libopengl'     true  )
       
   312 
       
   313                 ( 'libjava/abbrev.stc'                  #pkg     'stx/libjava'     true  )
       
   314                 ( 'libjava/bitmaps'                     #pkg     'stx/libjava'     true  )
       
   315                 ( 'libjava/resources'                   #pkg     'stx/libjava'     true  )
       
   316     ).
   238     ).
   317 
   239 
   318     installDocFiles ifTrue:[
   240     installDocFiles ifTrue:[
   319         fileSpec := fileSpec , #(
   241         fileSpec := fileSpec , #(
   320                 ( 'doc'                                  #lib     nil        false '644' )
   242                 ( 'doc'                                  nil     nil        false '644' )
   321         ).
       
   322     ].
       
   323 
       
   324     installSourceFiles ifTrue:[
       
   325         fileSpec := fileSpec , #(
       
   326                 ( 'libbasic/*.st'               #pkg     'stx/libbasic/source'      false  )
       
   327                 ( 'libbasic2/*.st'              #pkg     'stx/libbasic2/source'     false  )
       
   328                 ( 'libbasic3/*.st'              #pkg     'stx/libbasic3/source'     false  )
       
   329                 ( 'libboss/*.st'                #pkg     'stx/libboss/source'       false  )
       
   330                 ( 'libcomp/*.st'                #pkg     'stx/libcomp/source'       false  )
       
   331                 ( 'libview/*.st'                #pkg     'stx/libview/source'       false  )
       
   332                 ( 'libview2/*.st'               #pkg     'stx/libview2/source'      false  )
       
   333                 ( 'libwidg/*.st'                #pkg     'stx/libwidg/source'       false  )
       
   334                 ( 'libwidg2/*.st'               #pkg     'stx/libwidg2/source'      false  )
       
   335                 ( 'libwidg3/*.st'               #pkg     'stx/libwidg3/source'      false  )
       
   336                 ( 'libtool/*.st'                #pkg     'stx/libtool/source'       false  )
       
   337                 ( 'libtool2/*.st'               #pkg     'stx/libtool2/source'      false  )
       
   338                 ( 'libui/*.st'                  #pkg     'stx/libui/source'         false  )
       
   339                 ( 'libhtml/*.st'                #pkg     'stx/libhtml/source'       false  )
       
   340                 ( 'libodbc/*.st'                #pkg     'stx/libodbc/source'       false  )
       
   341                 ( 'libopengl/*.st'              #pkg     'stx/libopengl/source'     false  )
       
   342                 ( 'libjava/*.st'                #pkg     'stx/libjava/source'     false  )
       
   343         ).
   243         ).
   344     ].
   244     ].
   345 
   245 
   346     installSTCFiles ifTrue:[
   246     installSTCFiles ifTrue:[
   347         fileSpec := fileSpec , #(
   247         fileSpec := fileSpec , #(
   354         ).
   254         ).
   355     ].
   255     ].
   356 
   256 
   357     installGoodyFiles ifTrue:[
   257     installGoodyFiles ifTrue:[
   358         fileSpec := fileSpec , #(
   258         fileSpec := fileSpec , #(
   359                 ( 'goodies/*.st'                 #pkg     'stx/goodies/source'  false '644' )
   259                 ( 'goodies/*.st'                  #pkg     'stx/goodies/source'       false '644' )
   360                 ( 'goodies/*.chg'                #pkg     'stx/goodies/source'  false '644' )
   260                 ( 'goodies/*.chg'                 #pkg     'stx/goodies/source'       false '644' )
   361                 ( 'goodies/rdoit/rdoit'          #bin     nil               false '755' )
       
   362         ).
   261         ).
   363     ].
   262     ].
   364 
   263 
   365 
   264 
   366     ^ fileSpec
   265     ^ fileSpec
   385 
   284 
   386     fileSpec := fileSpec , #(
   285     fileSpec := fileSpec , #(
   387                 "/ name                             destination  subDir             required mode      
   286                 "/ name                             destination  subDir             required mode      
   388                 ( 'projects/smalltalk/smalltalk'        #bin     nil                  true  '755' )
   287                 ( 'projects/smalltalk/smalltalk'        #bin     nil                  true  '755' )
   389                 ( 'projects/smalltalk/stx'              #bin     nil                  true  '755' )
   288                 ( 'projects/smalltalk/stx'              #bin     nil                  true  '755' )
       
   289                 ( 'librun/librun.so'                    #lib     'lib'                true  '644' )
   390     ).
   290     ).
   391 
   291 
   392     installSTCFiles ifTrue:[
   292     installSTCFiles ifTrue:[
   393         fileSpec := fileSpec , #(
   293         fileSpec := fileSpec , #(
   394                 ( 'stc/stc'                                  #bin        nil              false '755' )
   294                 ( 'stc/stc'                                  #bin        nil              false '755' )
   395                 ( 'rules/stmkmp'                             #bin        nil              false '755' )
   295                 ( 'rules/stmkmp'                             #bin        nil              false '755' )
   396                 ( 'rules/stmkmf'                             #bin        nil              false '755' )
   296                 ( 'rules/stmkmf'                             #bin        nil              false '755' )
   397                 ( 'configurations'                           #lib        nil              false '644' )
   297                 ( 'configurations/COMMON'                    #lib        'configurations' false '644' )
   398                 ( 'configurations/PACKS'                     #lib        'configurations' false '644' )
   298                 ( 'configurations/PACKS'                     #lib        'configurations' false '644' )
   399                 ( 'configurations/my*'                       #lib        'configurations' false '644' )
   299                 ( 'configurations/my*'                       #lib        'configurations' false '644' )
   400                 ( 'configurations/vendor*'                   #lib        'configurations' false '644' )
   300                 ( 'configurations/vendor*'                   #lib        'configurations' false '644' )
   401 
   301 
   402                 ( 'support/VGL/vogl/src/libvogl.*'           #lib        'lib'            false '644' )
   302                 ( 'support/VGL/vogl/src/libvogl.*'           #lib        'lib'            false '644' )
   403                 ( 'support/VGL/vogl/src/*.h'                 #lib        'include'        false '644' )
   303                 ( 'support/VGL/vogl/src/*.h'                 #lib        'include'        false '644' )
   404                 ( 'support/DLD/dld-3.2.5/libdld.*'           #lib        'lib'            false '644' )
   304                 ( 'support/DLD/dld-3.2.5/libdld.*'           #lib        'lib'            false '644' )
   405 
   305 
   406                 ( 'goodies/persistency/db-1.6/PORT/libdb.*'  #lib        'lib'            false '644' )
   306                 ( 'goodies/persistency/db-1.6/PORT/libdb.*'  #libBin     'lib'            false '644' )
   407 
   307 
   408                 ( 'librun/librun.o'                          #libBin     nil              false '644' )
   308 "/                ( 'librun/librun.o'                          #libBin     nil              false '644' )
   409                 ( 'librun/librun.a'                          #libBin     nil              false '644' )
   309 "/                ( 'librun/librun.a'                          #libBin     nil              false '644' )
   410                 ( 'libbasic/libbasic.o'                      #libBin     nil              false '644' )
       
   411                 ( 'libbasic2/libbasic2.o'                    #libBin     nil              false '644' )
       
   412                 ( 'libbasic3/libbasic3.o'                    #libBin     nil              false '644' )
       
   413                 ( 'libhtml/libhtml.o'                        #libBin     nil              false '644' )
       
   414                 ( 'libcomp/libcomp.o'                        #libBin     nil              false '644' )
       
   415                 ( 'libcomp/ObjFL*.o'                         #libBin     nil              false '644' )
       
   416                 ( 'libcomp/ObjFL*.obj'                       #libBin     nil              false '644' )
       
   417                 ( 'libcomp/ObjFL*.so'                        #libBin     nil              false '644' )
       
   418                 ( 'libview/libview.o'                        #libBin     nil              false '644' )
       
   419                 ( 'libview/GLX*.o'                           #libBin     nil              false '644' )
       
   420                 ( 'libview/GLX*.obj'                         #libBin     nil              false '644' )
       
   421                 ( 'libview/GLX*.so'                          #libBin     nil              false '644' )
       
   422                 ( 'libview/XW*.o'                            #libBin     nil              false '644' )
       
   423                 ( 'libview/XW*.obj'                          #libBin     nil              false '644' )
       
   424                 ( 'libview/XW*.so'                           #libBin     nil              false '644' )
       
   425                 ( 'libview2/libview2.o'                      #libBin     nil              false '644' )
       
   426                 ( 'libwidg/libwidg.o'                        #libBin     nil              false '644' )
       
   427                 ( 'libwidg2/libwidg2.o'                      #libBin     nil              false '644' )
       
   428                 ( 'libwidg3/libwidg3.o'                      #libBin     nil              false '644' )
       
   429                 ( 'libui/libui.o'                            #libBin     nil              false '644' )
       
   430                 ( 'libjava/libjava.o'                        #libBin     nil              false '644' )
       
   431 
       
   432 "/                ( 'libsnmp/libsnmp.*'                        #libBin     nil      false '644' )
       
   433 "/                ( 'contrib/libPVM/libPVM.*'                  #libBin     nil      false '644' )
       
   434                 ( 'goodies/persistency/libdbase.o'           #libBin     nil      false '644' )
       
   435 "/                ( 'libtable/libtable.*'                      #libBin     nil      false '644' )
       
   436                 ( 'libtool/libtool.o'                        #libBin     nil      false '644' )
       
   437                 ( 'libtool2/libtool2.o'                      #libBin     nil      false '644' )
       
   438 "/                ( 'libxt/libxt.*'                            #libBin     nil      false '644' )
       
   439 "/                ( 'librt/librt.*'                            #libBin     nil      false '644' )
       
   440         ).
   310         ).
   441     ].
   311     ].
   442 
   312 
   443     installGoodyFiles ifTrue:[
   313     installGoodyFiles ifTrue:[
   444         fileSpec := fileSpec , #(
   314         fileSpec := fileSpec , #(
   445                 ( 'goodies/rdoit/rdoit'                      #bin     nil        false '755' )
   315                 ( 'goodies/rdoit/rdoit'           #bin     nil        false '755' )
       
   316                 ( 'goodies/xml-indelv/abbrev.stc' #pkg     'stx/goodies/xml-indelv'   true  )
       
   317         ).
       
   318     ] ifFalse:[
       
   319         fileSpec := fileSpec , #(
       
   320                 ( 'goodies/persistency/libdbase.so'  #pkg     'stx/goodies/persistency' true '644' )
   446         ).
   321         ).
   447     ].
   322     ].
   448 
   323 
   449     ^ fileSpec
   324     ^ fileSpec
   450 
   325 
   484     "Created: / 2.5.1999 / 13:23:06 / cg"
   359     "Created: / 2.5.1999 / 13:23:06 / cg"
   485     "Modified: / 31.5.1999 / 17:39:58 / cg"
   360     "Modified: / 31.5.1999 / 17:39:58 / cg"
   486 ! !
   361 ! !
   487 
   362 
   488 !STXInstaller methodsFor:'installing'!
   363 !STXInstaller methodsFor:'installing'!
       
   364 
       
   365 addFilesToSpec:fileSpec relativeTo:rel fromINSTALLSpec:f
       
   366     |s entry t cond dst|
       
   367 
       
   368     s := f asFilename readStream.
       
   369     s isNil ifTrue:[^  self].
       
   370     [s atEnd] whileFalse:[
       
   371         entry := s nextLine.
       
   372         (entry startsWith:$#) ifFalse:[
       
   373             t := entry asCollectionOfWords.
       
   374             t size >= 2 ifTrue:[
       
   375                 cond := t at:3 ifAbsent:nil.
       
   376                 (cond ~= 'optionalSource' 
       
   377                  or:[installSourceFiles]) ifTrue:[
       
   378                     ((rel startsWith:'goodies/') not
       
   379                     or:[installGoodyFiles]) ifTrue:[
       
   380                         dst := t at:2.
       
   381                         (dst startsWith:'packages/stx/') ifTrue:[
       
   382                             fileSpec add:(Array 
       
   383                                             with:(rel asFilename constructString:(t at:1))
       
   384                                             with:#pkg
       
   385                                             with:('stx' asFilename constructString:(dst copyFrom:'packages/stx/' size+1))
       
   386                                             with:true).
       
   387                         ] ifFalse:[
       
   388                             (dst = 'bin') ifTrue:[
       
   389                                 fileSpec add:(Array 
       
   390                                                 with:(rel asFilename constructString:(t at:1))
       
   391                                                 with:#bin
       
   392                                                 with:nil
       
   393                                                 with:true).
       
   394                             ]
       
   395                         ]
       
   396                     ]
       
   397                 ].
       
   398             ].
       
   399         ].
       
   400     ].
       
   401     s close.
       
   402 !
   489 
   403 
   490 changeWritability
   404 changeWritability
   491     |msg|
   405     |msg|
   492 
   406 
   493     installWhat == #full ifTrue:[
   407     installWhat == #full ifTrue:[
   536         self executeCommandAndShowOutput:cmd.
   450         self executeCommandAndShowOutput:cmd.
   537 
   451 
   538         ^ true
   452         ^ true
   539     ].
   453     ].
   540 
   454 
   541     fileSpec := self specOfFilesToCopy.
   455     fileSpec := self specOfFilesToCopy asOrderedCollection.
       
   456 
       
   457     actionPercentageHolder value:0.
       
   458     "/ search for INSTALL.files specs, and add to list ...
       
   459     actionTextHolder value:nil.
       
   460     actionTextHolder value:(resources array:#('ST/X Installation' '' 'searching for packages to install...' '' '' '')) asStringCollection.
       
   461 
       
   462     topDir asFilename recursiveDirectoryContentsDo:[:f |
       
   463         f asFilename baseName = 'INSTALL.files' ifTrue:[
       
   464             self addFilesToSpec:fileSpec relativeTo:f asFilename directoryName fromINSTALLSpec:(topDir asFilename construct:f).
       
   465         ]
       
   466     ].
   542 
   467 
   543     filesToCopy := OrderedCollection new.
   468     filesToCopy := OrderedCollection new.
   544 
   469 
   545     fileSpec do:[:entry |
   470     fileSpec do:[:entry |
   546         |fileNames dest subDir required destDir|
   471         |fileNames dest subDir required destDir|
   718 
   643 
   719     msg := (resources array:#('ST/X Installation' '' 'creating symbolic links' '' '' '')) asStringCollection.
   644     msg := (resources array:#('ST/X Installation' '' 'creating symbolic links' '' '' '')) asStringCollection.
   720     actionTextHolder value:nil.
   645     actionTextHolder value:nil.
   721     actionTextHolder value:msg.
   646     actionTextHolder value:msg.
   722 
   647 
   723     commandTraceView showCR:(resources string:'setting up symbolic links in doc/online ...').
   648     commandTraceView showCR:(resources string:'setting up symbolic links in doc/online ...'); endEntry.
   724     commandTraceView endEntry.
   649 
   725     installWhat == #full ifTrue:[
   650     installWhat == #full ifTrue:[
   726         OperatingSystem executeCommand:('(cd ' , fullDir , '/doc/online ; make links)').
   651         OperatingSystem executeCommand:('(cd ' , fullDir , '/doc/online ; make links)').
   727     ] ifFalse:[
   652     ] ifFalse:[
   728         OperatingSystem executeCommand:('(cd ' , stxLibDir , '/doc/online ; make links)').
   653         OperatingSystem executeCommand:('(cd ' , stxLibDir , '/doc/online ; make links)').
       
   654 
       
   655         commandTraceView showCR:(resources string:'setting up symbolic links in lib ...'); endEntry.
       
   656 
       
   657         #(
       
   658             'libbasic/libbasic.so'
       
   659             'libbasic2/libbasic2.so'
       
   660             'libbasic3/libbasic3.so'
       
   661             'libcomp/libcomp.so'
       
   662             'libboss/libboss.so'
       
   663             'libview/*.so'
       
   664             'libview2/libview2.so'
       
   665             'libwidg/libwidg.so'
       
   666             'libwidg2/libwidg2.so'
       
   667             'libwidg3/libwidg3.so'
       
   668             'libhtml/libhtml.so'
       
   669             'libui/libui.so'
       
   670             'libtool/libtool.so'
       
   671             'libtool2/libtool2.so'
       
   672             'goodies/persistency/libdbase.so'
       
   673         ) do:[:src |  |cmd|
       
   674             cmd := '(cd ' , stxLibDir , '/lib ; ln -s ../../packages/stx/' , src , ' . )'.
       
   675             commandTraceView showCR:cmd; endEntry.
       
   676             OperatingSystem executeCommand:cmd.
       
   677         ].
   729     ].
   678     ].
   730 
   679 
   731     "Created: / 17.7.1996 / 15:24:19 / cg"
   680     "Created: / 17.7.1996 / 15:24:19 / cg"
   732     "Modified: / 31.5.1999 / 14:46:36 / cg"
   681     "Modified: / 31.5.1999 / 14:46:36 / cg"
   733 !
   682 !
   818     "Created: 2.3.1997 / 12:49:52 / cg"
   767     "Created: 2.3.1997 / 12:49:52 / cg"
   819     "Modified: 8.8.1997 / 17:47:06 / cg"
   768     "Modified: 8.8.1997 / 17:47:06 / cg"
   820 !
   769 !
   821 
   770 
   822 recursiveCopy:src to:dst
   771 recursiveCopy:src to:dst
       
   772     self recursiveCopy:src to:dst print:true
       
   773 !
       
   774 
       
   775 recursiveCopy:src to:dst print:doPrint
   823     |cmd srcF dstF d|
   776     |cmd srcF dstF d|
   824 
   777 
   825     srcF := src asFilename.
   778     srcF := src asFilename.
   826     dstF := dst asFilename.
   779     dstF := dst asFilename.
   827 "/    OperatingSystem isUNIXlike ifTrue:[
   780 "/    OperatingSystem isUNIXlike ifTrue:[
   835         (#(
   788         (#(
   836             'CVS'
   789             'CVS'
   837             'not_delivered'
   790             'not_delivered'
   838         ) includes:srcF baseName) ifFalse:[
   791         ) includes:srcF baseName) ifFalse:[
   839             srcF baseName includesMatchCharacters ifTrue:[
   792             srcF baseName includesMatchCharacters ifTrue:[
       
   793                 doPrint ifTrue:[
       
   794                     OperatingSystem isUNIXlike ifTrue:[
       
   795                         commandTraceView showCR:('cp ' , srcF pathName , ' ' , dstF pathName).
       
   796                     ] ifFalse:[
       
   797                         commandTraceView showCR:('copy ' , srcF pathName , ' ' , dstF pathName).
       
   798                     ].
       
   799                     commandTraceView endEntry.
       
   800                 ].
   840                 srcF directory directoryContents do:[:fileName |
   801                 srcF directory directoryContents do:[:fileName |
   841                     ((srcF baseName) match:fileName) ifTrue:[
   802                     ((srcF baseName) match:fileName) ifTrue:[
   842                         (#(
   803                         (#(
   843                             'CVS'
   804                             'CVS'
   844                             'not_delivered'
   805                             'not_delivered'
   845                         ) includes:fileName) ifFalse:[
   806                         ) includes:fileName) ifFalse:[
   846                             self recursiveCopy:(srcF directory construct:fileName) to:dstF
   807                             self 
       
   808                                 recursiveCopy:(srcF directory construct:fileName) 
       
   809                                 to:dstF
       
   810                                 print:false
   847                         ]
   811                         ]
   848                     ]
   812                     ]
   849                 ]
   813                 ]
   850             ] ifFalse:[
   814             ] ifFalse:[
   851                 OperatingSystem isUNIXlike ifTrue:[
   815                 doPrint ifTrue:[
   852                     commandTraceView showCR:('cp ' , srcF pathName , ' ' , dstF pathName).
   816                     OperatingSystem isUNIXlike ifTrue:[
   853                 ] ifFalse:[
   817                         commandTraceView showCR:('cp ' , srcF pathName , ' ' , dstF pathName).
   854                     commandTraceView showCR:('copy ' , srcF pathName , ' ' , dstF pathName).
   818                     ] ifFalse:[
       
   819                         commandTraceView showCR:('copy ' , srcF pathName , ' ' , dstF pathName).
       
   820                     ].
       
   821                     commandTraceView endEntry.
   855                 ].
   822                 ].
   856                 commandTraceView endEntry.
       
   857 
       
   858                 srcF isDirectory ifFalse:[
   823                 srcF isDirectory ifFalse:[
   859                     (dstF exists and:[dstF isDirectory]) ifTrue:[
   824                     (dstF exists and:[dstF isDirectory]) ifTrue:[
   860                         dstF := dstF construct:srcF baseName.
   825                         dstF := dstF construct:srcF baseName.
   861                     ].
   826                     ].
   862                     srcF copyTo:dstF
   827                     srcF copyTo:dstF.
       
   828                     OperatingSystem isUNIXlike ifTrue:[
       
   829                         srcF isExecutable ifTrue:[
       
   830                             dstF makeExecutableForAll
       
   831                         ]
       
   832                     ]
   863                 ] ifTrue:[
   833                 ] ifTrue:[
   864                     d := dstF asFilename construct:srcF baseName.
   834                     d := dstF asFilename construct:srcF baseName.
   865                     (d exists) ifFalse:[
   835                     (d exists) ifFalse:[
   866                         d makeDirectory.
   836                         d makeDirectory.
   867                     ].
   837                     ].
   868                     srcF directoryContents do:[:fileName |
   838                     srcF directoryContents do:[:fileName |
   869                         self recursiveCopy:(srcF construct:fileName) 
   839                         self recursiveCopy:(srcF construct:fileName) 
   870                              to:d
   840                              to:d
       
   841                              print:false
   871                     ]
   842                     ]
   872                 ]
   843                 ]
   873             ]
   844             ]
   874         ]
   845         ]
   875 "/    ]
   846 "/    ]