STXInstaller.st
author Claus Gittinger <cg@exept.de>
Tue, 14 May 2019 09:46:21 +0200
changeset 3663 9d49ecf8661a
parent 1779 f3237e4844d9
permissions -rw-r--r--
#UI_ENHANCEMENT by cg
class: TabListEditor class
changed:
#canvasSpec
#menu
#windowSpec
cg@1503
     1
"{ Package: 'stx:libtool2' }"
cg@1503
     2
cg@0
     3
Object subclass:#STXInstaller
cg@1279
     4
	instanceVariableNames:'stxLibDir stxLibBinDir stxBinDir stxPkgDir stxDocDir stxTopDir
cg@1279
     5
		installDocFiles installSourceFiles installSTCFiles
cg@1279
     6
		installGoodyFiles fullDir actionPercentageHolder actionTextHolder
cg@1279
     7
		commandTraceView resources dfHolder copyProcess installWhat'
cg@1139
     8
	classVariableNames:'LastPartialDir LastFullDir'
cg@0
     9
	poolDictionaries:''
cg@0
    10
	category:'eXept-tools'
cg@0
    11
!
cg@0
    12
cg@0
    13
cg@28
    14
!STXInstaller class methodsFor:'startup'!
cg@0
    15
cg@0
    16
open
cg@0
    17
    ^ self new open
cg@0
    18
cg@11
    19
    "
cg@11
    20
     STXInstaller open
cg@11
    21
    "
cg@1
    22
! !
cg@1
    23
cg@1
    24
!STXInstaller methodsFor:'defaults'!
cg@1
    25
cg@1
    26
defaultBinDirs
cg@1132
    27
    |dirs stxRel|
cg@1
    28
cg@1132
    29
    stxRel := self smalltalkRelease.
cg@1
    30
    dirs := OrderedCollection new.
cg@1119
    31
cg@1119
    32
    OperatingSystem isMSWINDOWSlike ifTrue:[
cg@1132
    33
        dirs add:'c:\Programme\eXept\SmalltalkX\' , stxRel , '\bin'.
cg@1132
    34
        dirs add:'c:\Programme\SmalltalkX\' , stxRel , '\bin'.
cg@1132
    35
        dirs add:'c:\SmalltalkX\' , stxRel , '\bin'.
cg@1119
    36
    ] ifFalse:[
cg@1132
    37
        dirs add:'/opt/smalltalk/' , stxRel , '/bin'.
cg@1119
    38
        dirs add:'/usr/local/bin'.
cg@1119
    39
        dirs add:'/usr/bin'.
cg@1119
    40
cg@1119
    41
        dirs add:(Filename homeDirectory constructString:'bin').
cg@1281
    42
        dirs add:((Filename homeDirectory construct:'stx') constructString:'bin').
cg@1119
    43
        dirs add:'/tmp/stxbin'.
cg@1119
    44
        ('/home' asFilename exists and:['/home' asFilename isDirectory]) ifTrue:[
cg@1119
    45
            dirs add:'/home/stx/bin'.
cg@1119
    46
        ].
cg@1119
    47
        ('/home2' asFilename exists and:['/home2' asFilename isDirectory]) ifTrue:[
cg@1119
    48
            dirs add:'/home2/stx/bin'.
cg@1119
    49
        ].
cg@3
    50
    ].
cg@3
    51
cg@3
    52
"/    dirs := dirs select:[:path | 
cg@3
    53
"/                            |f|
cg@3
    54
"/
cg@3
    55
"/                            f := path asFilename.
cg@3
    56
"/                            f exists and:[f isDirectory]].
cg@1117
    57
    ^ dirs "sort"
cg@1
    58
cg@1119
    59
    "Created: / 18.7.1996 / 19:43:00 / cg"
cg@1132
    60
    "Modified: / 31.5.1999 / 12:11:48 / cg"
cg@1
    61
!
cg@1
    62
cg@678
    63
defaultFullDirs
cg@678
    64
    |dirs|
cg@678
    65
cg@678
    66
    dirs := OrderedCollection new.
cg@1515
    67
cg@1515
    68
    dirs add:((Filename homeDirectory constructString:'stxDevelop')).
cg@1515
    69
    dirs add:((Filename homeDirectory constructString:'develop')).
cg@1515
    70
    dirs add:((Filename homeDirectory constructString:'work')).
cg@1515
    71
cg@1515
    72
"/    ('/home' asFilename exists 
cg@1515
    73
"/    and:['/home' asFilename isDirectory]) ifTrue:[
cg@1515
    74
"/        dirs add:'/home/work'.
cg@1515
    75
"/    ].
cg@678
    76
cg@1117
    77
    ^ dirs "sort"
cg@678
    78
cg@678
    79
    "Modified: / 18.7.1996 / 19:45:08 / cg"
cg@678
    80
    "Created: / 25.2.1998 / 17:14:43 / cg"
cg@678
    81
!
cg@678
    82
cg@1139
    83
defaultInstDirs
cg@1139
    84
    |dirs d stxRel|
cg@1139
    85
cg@1139
    86
    stxRel := self smalltalkRelease.
cg@1139
    87
    dirs := OrderedCollection new.
cg@1139
    88
cg@1139
    89
    OperatingSystem isMSWINDOWSlike ifTrue:[
cg@1139
    90
        dirs add:'c:\Programme\eXept\SmalltalkX\' , stxRel.
cg@1139
    91
        dirs add:'c:\Programme\SmalltalkX\' , stxRel.
cg@1139
    92
        dirs add:'c:\SmalltalkX\' , stxRel.
cg@1139
    93
    ] ifFalse:[
cg@1139
    94
        dirs add:'/opt/smalltalk/' , stxRel.
cg@1139
    95
        dirs add:'/usr/local/smalltalkX'.
cg@1139
    96
cg@1139
    97
        d := (Filename homeDirectory constructString:'smalltalkX').
cg@1139
    98
        (dirs includes:d) ifFalse:[dirs add:d].
cg@1139
    99
        d := (Filename homeDirectory constructString:'stx').
cg@1139
   100
        (dirs includes:d) ifFalse:[dirs add:d].
cg@1139
   101
        d := '/tmp/stx'.
cg@1139
   102
        (dirs includes:d) ifFalse:[dirs add:d].
cg@1139
   103
        ('/home' asFilename exists and:['/home' asFilename isDirectory]) ifTrue:[
cg@1139
   104
            d := '/home/stx'.
cg@1139
   105
            (dirs includes:d) ifFalse:[dirs add:d].
cg@1139
   106
        ].
cg@1139
   107
        ('/home2' asFilename exists and:['/home2' asFilename isDirectory]) ifTrue:[
cg@1139
   108
            d := '/home2/stx'.
cg@1139
   109
            (dirs includes:d) ifFalse:[dirs add:d].
cg@1139
   110
        ].
cg@1139
   111
    ].
cg@1139
   112
cg@1139
   113
"/    dirs := dirs select:[:path | 
cg@1139
   114
"/                            |f|
cg@1139
   115
"/
cg@1139
   116
"/                            f := path asFilename.
cg@1139
   117
"/                            f exists and:[f isDirectory]].
cg@1139
   118
    ^ dirs "sort"
cg@1139
   119
cg@1139
   120
    "Created: / 18.7.1996 / 19:43:00 / cg"
cg@1139
   121
    "Modified: / 31.5.1999 / 18:32:17 / cg"
cg@1139
   122
!
cg@1139
   123
cg@24
   124
defaultLibBinDirs
cg@1132
   125
    |dirs stxRel|
cg@24
   126
cg@1132
   127
    stxRel := self smalltalkRelease.
cg@24
   128
    dirs := OrderedCollection new.
cg@1119
   129
    OperatingSystem isMSWINDOWSlike ifTrue:[
cg@1132
   130
        dirs add:'c:\Programme\eXept\SmalltalkX\' , stxRel , '\lib'.
cg@1132
   131
        dirs add:'c:\Programme\SmalltalkX\' , stxRel , '\lib'.
cg@1132
   132
        dirs add:'c:\SmalltalkX\' , stxRel , '\lib'.
cg@1119
   133
    ] ifFalse:[
cg@1132
   134
        dirs add:'/opt/smalltalk/' , stxRel , '/lib'.
cg@1119
   135
        dirs add:'/usr/local/lib'.
cg@1119
   136
        dirs add:'/usr/lib'.
cg@1119
   137
        dirs add:'/lib'.
cg@1281
   138
        dirs add:(Filename homeDirectory constructString:'lib').
cg@24
   139
cg@1281
   140
        dirs add:((Filename homeDirectory construct:'stx') constructString:'lib').
cg@1119
   141
        dirs add:'/tmp/stxlib'.
cg@1119
   142
        dirs add:'/home/stx/lib'.
cg@1119
   143
        dirs add:'/home2/stx/lib'.
cg@1119
   144
    ].
cg@24
   145
    ^ dirs sort
cg@24
   146
cg@1119
   147
    "Created: / 18.7.1996 / 19:43:21 / cg"
cg@1132
   148
    "Modified: / 31.5.1999 / 12:12:17 / cg"
cg@24
   149
!
cg@24
   150
cg@1
   151
defaultLibDirs
cg@1132
   152
    |dirs stxRel|
cg@1
   153
cg@1132
   154
    stxRel := self smalltalkRelease.
cg@1
   155
    dirs := OrderedCollection new.
cg@1119
   156
    OperatingSystem isMSWINDOWSlike ifTrue:[
cg@1132
   157
        dirs add:'c:\Programme\eXept\SmalltalkX\' , stxRel , '\lib'.
cg@1132
   158
        dirs add:'c:\Programme\SmalltalkX\' , stxRel , '\lib'.
cg@1132
   159
        dirs add:'c:\SmalltalkX\' , stxRel , '\lib'.
cg@1119
   160
    ] ifFalse:[
cg@1132
   161
        dirs add:'/opt/smalltalk/' , stxRel , '/lib'.
cg@1119
   162
        dirs add:'/usr/local/lib/smalltalk'.
cg@1119
   163
        dirs add:'/usr/lib/smalltalk'.
cg@1281
   164
        dirs add:((Filename homeDirectory construct:'lib') constructString:'smalltalk').
cg@1281
   165
        dirs add:((Filename homeDirectory construct:'stx') constructString:'lib').
cg@1119
   166
        dirs add:'/tmp/stxlib'.
cg@1119
   167
        dirs add:'/home/stx/lib'.
cg@1119
   168
        dirs add:'/home2/stx/lib'.
cg@1119
   169
    ].
cg@3
   170
cg@3
   171
"/    dirs := dirs select:[:path | 
cg@3
   172
"/                            |f|
cg@3
   173
"/
cg@3
   174
"/                            f := path asFilename.
cg@3
   175
"/                            f exists and:[f isDirectory]].
cg@1117
   176
    ^ dirs "sort"
cg@1
   177
cg@1119
   178
    "Created: / 18.7.1996 / 19:43:21 / cg"
cg@1132
   179
    "Modified: / 31.5.1999 / 12:12:30 / cg"
cg@11
   180
!
cg@0
   181
cg@11
   182
directoriesToMake
cg@1138
   183
    |dirsToMake docDir docOnlineDir|
cg@0
   184
cg@11
   185
    dirsToMake := OrderedCollection new.
cg@1010
   186
    installWhat == #full ifTrue:[
cg@678
   187
        dirsToMake add:fullDir.
cg@678
   188
    ] ifFalse:[
cg@678
   189
        dirsToMake add:stxBinDir.
cg@678
   190
        dirsToMake add:stxLibDir.
cg@1281
   191
        stxLibDir ~= stxLibBinDir ifTrue:[
cg@1281
   192
            dirsToMake add:stxLibBinDir.
cg@1281
   193
        ].
cg@1279
   194
        dirsToMake add:stxDocDir.
cg@1279
   195
        docOnlineDir := stxDocDir asFilename construct:'online'.
cg@1279
   196
        dirsToMake add:docOnlineDir name.
cg@1279
   197
        dirsToMake add:(docOnlineDir constructString:'english').
cg@1138
   198
        dirsToMake add:(docOnlineDir constructString:'german').
cg@1281
   199
        installDocFiles ifTrue:[
cg@1281
   200
            dirsToMake add:(docOnlineDir constructString:'french').
cg@1281
   201
            dirsToMake add:(docOnlineDir constructString:'italian').
cg@1281
   202
        ]
cg@678
   203
    ].
cg@678
   204
    ^ dirsToMake
cg@0
   205
cg@1138
   206
    "Modified: / 31.5.1999 / 17:52:03 / cg"
cg@11
   207
!
cg@11
   208
cg@73
   209
listOfOptionalPackages
cg@73
   210
    ^ #(
cg@73
   211
        'libDB'
cg@73
   212
        'clients/CBrowser'
cg@73
   213
        'libcompat'
cg@73
   214
        'libxt'
cg@73
   215
cg@73
   216
cg@73
   217
        "/ mhmh - these should not be needed here ...
cg@73
   218
cg@73
   219
        'projects/smalltalk/bitmaps/javaImages'
cg@73
   220
        'doc/online/english/overview/icons'
cg@73
   221
      )
cg@73
   222
cg@73
   223
    "Created: 2.3.1997 / 12:39:59 / cg"
cg@73
   224
    "Modified: 2.3.1997 / 13:24:41 / cg"
cg@73
   225
!
cg@73
   226
cg@1117
   227
smalltalkRelease
cg@1117
   228
    ^ Smalltalk majorVersionNr printString 
cg@1117
   229
               , '.' , Smalltalk minorVersionNr printString
cg@1117
   230
               , '.' , Smalltalk revisionNr printString.
cg@1117
   231
!
cg@1117
   232
cg@1279
   233
specOfCommonFilesToCopy
cg@1279
   234
    |fileSpec|
cg@1279
   235
cg@1279
   236
    fileSpec := #(
cg@1279
   237
                "/ name                             destination  subDir             required mode      
cg@1279
   238
                ( 'projects/smalltalk/include'          #lib     nil                  true  '644' )
cg@1279
   239
                ( 'projects/smalltalk/*.rc'             #lib     nil                  true  '644' )
cg@1519
   240
                ( 'projects/smalltalk/*.wsp'            #lib     nil                  true  '644' )
cg@1368
   241
                ( 'projects/smalltalk/banner*.xpm'      #lib     nil                  true  '644' )
cg@1279
   242
                ( 'projects/smalltalk/patches'          #lib     nil                  true  '644' )
cg@1284
   243
                ( 'COPYRIGHT'                           nil      nil                  true  '644' )
cg@1519
   244
                ( 'RELEASE'                             nil      nil                  true  '644' )
cg@1519
   245
                ( 'doc/online/german/LICENCE_STX.html'  nil           'doc/online/german'      true  '644' )
cg@1519
   246
                ( 'doc/online/english/LICENCE_STX.html' nil           'doc/online/english'     true  '644' )
cg@1284
   247
                ( 'doc/online/german/LICENCE_DEMO_STX.html'  nil      'doc/online/german'      true  '644' )
cg@1284
   248
                ( 'doc/online/english/LICENCE_DEMO_STX.html' nil      'doc/online/english'     true  '644' )
cg@1279
   249
    ).
cg@1279
   250
cg@1279
   251
    installDocFiles ifTrue:[
cg@1279
   252
        fileSpec := fileSpec , #(
cg@1281
   253
                ( 'doc'                                  nil     nil        false '644' )
cg@1279
   254
        ).
cg@1279
   255
    ].
cg@1279
   256
cg@1279
   257
    installSTCFiles ifTrue:[
cg@1279
   258
        fileSpec := fileSpec , #(
cg@1279
   259
                ( 'include'                                  #lib        nil              false '644' )
cg@1279
   260
                ( 'configurations'                           #lib        nil              false '644' )
cg@1279
   261
                ( 'configurations/PACKS'                     #lib        'configurations' false '644' )
cg@1279
   262
                ( 'configurations/my*'                       #lib        'configurations' false '644' )
cg@1279
   263
                ( 'configurations/vendor*'                   #lib        'configurations' false '644' )
cg@1279
   264
                ( 'rules'                                    #lib        nil              false '644' )
cg@1279
   265
        ).
cg@1279
   266
    ].
cg@1279
   267
cg@1279
   268
    installGoodyFiles ifTrue:[
cg@1279
   269
        fileSpec := fileSpec , #(
cg@1281
   270
                ( 'goodies/*.st'                  #pkg     'stx/goodies/source'       false '644' )
cg@1281
   271
                ( 'goodies/*.chg'                 #pkg     'stx/goodies/source'       false '644' )
cg@1279
   272
        ).
cg@1279
   273
    ].
cg@1279
   274
cg@1279
   275
cg@1279
   276
    ^ fileSpec
cg@1279
   277
cg@1279
   278
    "Created: / 2.5.1999 / 13:17:37 / cg"
cg@1284
   279
    "Modified: / 24.12.1999 / 01:16:42 / cg"
cg@1279
   280
!
cg@1279
   281
cg@11
   282
specOfFilesToCopy
cg@1119
   283
    OperatingSystem isMSWINDOWSlike ifTrue:[
cg@1119
   284
        ^ self specOfWindowsFilesToCopy
cg@1119
   285
    ].
cg@1119
   286
    ^ self specOfUnixFilesToCopy
cg@1119
   287
cg@1119
   288
    "Modified: / 2.5.1999 / 13:17:59 / cg"
cg@1119
   289
!
cg@1119
   290
cg@1119
   291
specOfUnixFilesToCopy
cg@11
   292
    |fileSpec|
cg@0
   293
cg@1279
   294
    fileSpec := self specOfCommonFilesToCopy.
cg@1279
   295
cg@1279
   296
    fileSpec := fileSpec , #(
cg@27
   297
                "/ name                             destination  subDir             required mode      
cg@12
   298
                ( 'projects/smalltalk/smalltalk'        #bin     nil                  true  '755' )
cg@27
   299
                ( 'projects/smalltalk/stx'              #bin     nil                  true  '755' )
cg@1281
   300
                ( 'librun/librun.so'                    #lib     'lib'                true  '644' )
cg@5
   301
    ).
cg@0
   302
cg@5
   303
    installSTCFiles ifTrue:[
cg@5
   304
        fileSpec := fileSpec , #(
cg@24
   305
                ( 'stc/stc'                                  #bin        nil              false '755' )
cg@24
   306
                ( 'rules/stmkmp'                             #bin        nil              false '755' )
cg@24
   307
                ( 'rules/stmkmf'                             #bin        nil              false '755' )
cg@1281
   308
                ( 'configurations/COMMON'                    #lib        'configurations' false '644' )
cg@24
   309
                ( 'configurations/PACKS'                     #lib        'configurations' false '644' )
cg@24
   310
                ( 'configurations/my*'                       #lib        'configurations' false '644' )
cg@24
   311
                ( 'configurations/vendor*'                   #lib        'configurations' false '644' )
cg@0
   312
cg@276
   313
                ( 'support/VGL/vogl/src/libvogl.*'           #lib        'lib'            false '644' )
cg@276
   314
                ( 'support/VGL/vogl/src/*.h'                 #lib        'include'        false '644' )
cg@276
   315
                ( 'support/DLD/dld-3.2.5/libdld.*'           #lib        'lib'            false '644' )
cg@0
   316
cg@1281
   317
                ( 'goodies/persistency/db-1.6/PORT/libdb.*'  #libBin     'lib'            false '644' )
cg@276
   318
cg@1281
   319
"/                ( 'librun/librun.o'                          #libBin     nil              false '644' )
cg@1281
   320
"/                ( 'librun/librun.a'                          #libBin     nil              false '644' )
cg@5
   321
        ).
cg@5
   322
    ].
cg@1
   323
cg@5
   324
    installGoodyFiles ifTrue:[
cg@5
   325
        fileSpec := fileSpec , #(
cg@1281
   326
                ( 'goodies/rdoit/rdoit'           #bin     nil        false '755' )
cg@1707
   327
                ( 'goodies/xml/indelv/abbrev.stc' #pkg     'stx/goodies/xml/indelv'   true  )
cg@1281
   328
        ).
cg@1281
   329
    ] ifFalse:[
cg@1281
   330
        fileSpec := fileSpec , #(
cg@1281
   331
                ( 'goodies/persistency/libdbase.so'  #pkg     'stx/goodies/persistency' true '644' )
cg@5
   332
        ).
cg@5
   333
    ].
cg@5
   334
cg@11
   335
    ^ fileSpec
cg@11
   336
cg@1119
   337
    "Modified: / 30.4.1999 / 18:02:22 / cg"
cg@1119
   338
    "Created: / 2.5.1999 / 13:17:37 / cg"
cg@1119
   339
!
cg@1119
   340
cg@1119
   341
specOfWindowsFilesToCopy
cg@1119
   342
    |fileSpec|
cg@1119
   343
cg@1279
   344
    fileSpec := self specOfCommonFilesToCopy.
cg@1279
   345
cg@1279
   346
    fileSpec := fileSpec , #(
cg@1119
   347
                "/ name                             destination  subDir             required       
cg@1132
   348
                ( 'projects\smalltalk\smalltalk.bat'    #bin     nil                  true   )
cg@1132
   349
                ( 'projects\smalltalk\stx.exe'          #bin     nil                  true   )
cg@1503
   350
                ( 'projects\smalltalk\winstx.exe'       #bin     nil                  true   )
cg@1132
   351
                ( 'projects\smalltalk\stxspawn.exe'     #bin     nil                  true   )
cg@1279
   352
                ( 'projects\smalltalk\*.dll'            #bin     nil                  true   )
cg@1119
   353
    ).
cg@1119
   354
cg@1119
   355
    installSTCFiles ifTrue:[
cg@1119
   356
        fileSpec := fileSpec , #(
cg@1132
   357
                ( 'projects\smalltalk\stc.exe'           #bin        nil              false  )
cg@1132
   358
                ( 'libbc\*.lib'                          #lib        nil              false  )
cg@1279
   359
                ( 'rules'                                #lib        nil              false  )
cg@1119
   360
        ).
cg@1119
   361
    ].
cg@1119
   362
cg@1119
   363
    installGoodyFiles ifTrue:[
cg@1119
   364
        fileSpec := fileSpec , #(
cg@1279
   365
                ( 'goodies/rdoit/rdoit.exe'              #bin     nil                 false )
cg@1119
   366
        ).
cg@1119
   367
    ].
cg@1119
   368
cg@1119
   369
    ^ fileSpec
cg@1119
   370
cg@1119
   371
    "Created: / 2.5.1999 / 13:23:06 / cg"
cg@1503
   372
    "Modified: / 16.10.2001 / 12:25:58 / cg"
cg@11
   373
! !
cg@11
   374
cg@11
   375
!STXInstaller methodsFor:'installing'!
cg@11
   376
cg@1519
   377
add:specEntry toFileSpec:fileSpec
cg@1519
   378
    (specEntry first startsWith:'./') ifTrue:[
cg@1519
   379
        specEntry at:1 put:(specEntry first copyFrom:3).
cg@1519
   380
    ].
cg@1519
   381
    (specEntry first startsWith:'.\') ifTrue:[
cg@1519
   382
        specEntry at:1 put:(specEntry first copyFrom:3).
cg@1519
   383
    ].
cg@1519
   384
    (fileSpec includes:specEntry) ifFalse:[
cg@1519
   385
        fileSpec add:specEntry
cg@1519
   386
    ] ifTrue:[
cg@1519
   387
        "/ self halt
cg@1519
   388
    ]
cg@1519
   389
!
cg@1519
   390
cg@1281
   391
addFilesToSpec:fileSpec relativeTo:rel fromINSTALLSpec:f
cg@1281
   392
    |s entry t cond dst|
cg@1281
   393
cg@1281
   394
    s := f asFilename readStream.
cg@1281
   395
    s isNil ifTrue:[^  self].
cg@1281
   396
    [s atEnd] whileFalse:[
cg@1281
   397
        entry := s nextLine.
cg@1281
   398
        (entry startsWith:$#) ifFalse:[
cg@1281
   399
            t := entry asCollectionOfWords.
cg@1281
   400
            t size >= 2 ifTrue:[
cg@1281
   401
                cond := t at:3 ifAbsent:nil.
cg@1281
   402
                (cond ~= 'optionalSource' 
cg@1281
   403
                 or:[installSourceFiles]) ifTrue:[
cg@1281
   404
                    ((rel startsWith:'goodies/') not
cg@1281
   405
                    or:[installGoodyFiles]) ifTrue:[
cg@1281
   406
                        dst := t at:2.
cg@1281
   407
                        (dst startsWith:'packages/stx/') ifTrue:[
cg@1519
   408
                            self add:(Array 
cg@1281
   409
                                            with:(rel asFilename constructString:(t at:1))
cg@1281
   410
                                            with:#pkg
cg@1281
   411
                                            with:('stx' asFilename constructString:(dst copyFrom:'packages/stx/' size+1))
cg@1519
   412
                                            with:true)
cg@1519
   413
                                 toFileSpec:fileSpec.
cg@1281
   414
                        ] ifFalse:[
cg@1519
   415
                            ((dst = 'bin') or:[dst startsWith:'bin/']) ifTrue:[
cg@1519
   416
                                (dst = 'bin') ifTrue:[
cg@1519
   417
                                    self add:(Array 
cg@1519
   418
                                                    with:(rel asFilename constructString:(t at:1))
cg@1519
   419
                                                    with:#bin
cg@1519
   420
                                                    with:nil
cg@1519
   421
                                                    with:true)
cg@1519
   422
                                         toFileSpec:fileSpec.
cg@1519
   423
                                ] ifFalse:[
cg@1519
   424
                                    self add:(Array 
cg@1519
   425
                                                    with:(rel asFilename constructString:(t at:1))
cg@1519
   426
                                                    with:#bin
cg@1519
   427
                                                    with:(dst copyFrom:'bin/' size+1)
cg@1519
   428
                                                    with:true)
cg@1519
   429
                                         toFileSpec:fileSpec.
cg@1519
   430
                                ].
cg@1519
   431
                            ] ifFalse:[
cg@1519
   432
                                ((dst = 'lib') or:[dst startsWith:'lib/']) ifTrue:[
cg@1519
   433
                                    (dst = 'lib') ifTrue:[
cg@1519
   434
                                        self add:(Array 
cg@1519
   435
                                                        with:(rel asFilename constructString:(t at:1))
cg@1519
   436
                                                        with:#lib
cg@1519
   437
                                                        with:nil
cg@1519
   438
                                                        with:true)
cg@1519
   439
                                             toFileSpec:fileSpec.
cg@1519
   440
                                    ] ifFalse:[
cg@1519
   441
                                        self add:(Array 
cg@1519
   442
                                                        with:(rel asFilename constructString:(t at:1))
cg@1519
   443
                                                        with:#lib
cg@1519
   444
                                                        with:(dst copyFrom:'lib/' size+1)
cg@1519
   445
                                                        with:true)
cg@1519
   446
                                             toFileSpec:fileSpec.
cg@1519
   447
                                    ]
cg@1519
   448
                                ] ifFalse:[
cg@1519
   449
                                    self halt:'unhandled destination: ' , dst.
cg@1519
   450
                                ]
cg@1281
   451
                            ]
cg@1281
   452
                        ]
cg@1281
   453
                    ]
cg@1281
   454
                ].
cg@1281
   455
            ].
cg@1281
   456
        ].
cg@1281
   457
    ].
cg@1281
   458
    s close.
cg@1281
   459
!
cg@1281
   460
cg@790
   461
changeWritability
cg@791
   462
    |msg|
cg@790
   463
cg@1010
   464
    installWhat == #full ifTrue:[
cg@792
   465
        msg := (resources array:#('ST/X Installation' '' 'making target dir writable' '' '' '')) asStringCollection.
cg@790
   466
cg@792
   467
        commandTraceView showCR:(resources string:'making target dir writable ...').
cg@792
   468
        commandTraceView endEntry.
cg@790
   469
        OperatingSystem executeCommand:('(cd ' , fullDir , ' ; find . -exec chmod u+w {} \;)').
cg@790
   470
    ].
cg@790
   471
cg@791
   472
    "Created: / 17.7.1996 / 15:24:19 / cg"
cg@792
   473
    "Modified: / 20.4.1998 / 15:40:00 / cg"
cg@790
   474
!
cg@790
   475
cg@11
   476
copyFiles
cg@1132
   477
    |msg fileSpec filesToCopy numFiles nDone cmd topDir topDirPrefix|
cg@11
   478
cg@1132
   479
    msg := (resources array:#('ST/X Installation' '' 'copying:' '' 'to:' '')) asStringCollection.
cg@1132
   480
cg@1132
   481
    OperatingSystem isUNIXlike ifTrue:[
cg@1132
   482
        topDir := '../..'.
cg@1132
   483
        topDirPrefix := '../../'.
cg@1132
   484
    ] ifFalse:[
cg@1132
   485
        topDir := '..\..'.
cg@1132
   486
        topDirPrefix := '..\..\'.
cg@1132
   487
    ].
cg@678
   488
cg@1010
   489
    installWhat == #full ifTrue:[
cg@1515
   490
        "/ MUST be under stx (for packagePath stuff)
cg@1516
   491
        fullDir asFilename baseName ~= 'stx' ifTrue:[
cg@1516
   492
            fullDir := fullDir asFilename constructString:'stx'.
cg@1516
   493
        ].
cg@1517
   494
        fullDir asFilename recursiveMakeDirectory.
cg@1517
   495
        fullDir asFilename exists ifFalse:[
cg@1517
   496
            self warn:'Oops - failed to create directory: ' , fullDir.
cg@1517
   497
            ^ false
cg@1517
   498
        ].
cg@1516
   499
cg@678
   500
        msg at:4 put:('    all from CD' asText allBold).
cg@678
   501
        msg at:6 put:'    ' , (fullDir asText allBold).
cg@678
   502
        actionTextHolder value:nil.
cg@678
   503
        actionTextHolder value:msg.
cg@678
   504
cg@1512
   505
        actionPercentageHolder value:-1.
cg@1512
   506
        OperatingSystem isUNIXlike ifTrue:[
cg@1516
   507
            cmd := '(cd ' , topDir , '/doc/online ; find . -type s -exec rm {} \; )'.
cg@1516
   508
            commandTraceView showCR:'removing symbolic links ...'.
cg@1516
   509
            commandTraceView endEntry.
cg@1516
   510
            self executeCommandAndShowOutput:cmd emphasize:false.
cg@1518
   511
cg@1512
   512
            cmd := '(cd ' , topDir , ' ; tar cf - .) | (cd ' , fullDir , ' ; tar xvf -)'.
cg@1512
   513
            commandTraceView showCR:'copying ...'.
cg@1512
   514
            commandTraceView endEntry.
cg@1512
   515
            cmd := cmd , ' 2>&1' .
cg@678
   516
cg@1512
   517
            self executeCommandAndShowOutput:cmd emphasize:false.
cg@1516
   518
cg@1516
   519
            cmd := '(cd ' , fullDir , '/doc/online ; make )'.
cg@1516
   520
            commandTraceView showCR:'creating symbolic links ...'.
cg@1516
   521
            commandTraceView endEntry.
cg@1516
   522
            self executeCommandAndShowOutput:cmd emphasize:false.
cg@1516
   523
cg@1512
   524
        ] ifFalse:[
cg@1512
   525
            fullDir asFilename exists ifFalse:[
cg@1512
   526
                commandTraceView showCR:(resources string:'creating %1 ...' with:fullDir asFilename pathName).
cg@1512
   527
                commandTraceView endEntry.
cg@1512
   528
                OperatingSystem recursiveCreateDirectory:fullDir asFilename pathName
cg@1512
   529
            ].
cg@1512
   530
            self recursiveCopy:(topDir , '\*') to:fullDir.
cg@1512
   531
        ].
cg@1512
   532
        actionPercentageHolder value:100.
cg@678
   533
        ^ true
cg@678
   534
    ].
cg@11
   535
cg@1281
   536
    fileSpec := self specOfFilesToCopy asOrderedCollection.
cg@1281
   537
cg@1281
   538
    actionPercentageHolder value:0.
cg@1281
   539
    "/ search for INSTALL.files specs, and add to list ...
cg@1281
   540
    actionTextHolder value:nil.
cg@1281
   541
    actionTextHolder value:(resources array:#('ST/X Installation' '' 'searching for packages to install...' '' '' '')) asStringCollection.
cg@1281
   542
cg@1281
   543
    topDir asFilename recursiveDirectoryContentsDo:[:f |
cg@1281
   544
        f asFilename baseName = 'INSTALL.files' ifTrue:[
cg@1281
   545
            self addFilesToSpec:fileSpec relativeTo:f asFilename directoryName fromINSTALLSpec:(topDir asFilename construct:f).
cg@1281
   546
        ]
cg@1281
   547
    ].
cg@11
   548
cg@0
   549
    filesToCopy := OrderedCollection new.
cg@0
   550
cg@0
   551
    fileSpec do:[:entry |
cg@8
   552
        |fileNames dest subDir required destDir|
cg@0
   553
cg@8
   554
        fileNames := entry at:1.
cg@0
   555
        dest := entry at:2.
cg@0
   556
        subDir := entry at:3.
cg@0
   557
        required := entry at:4.
cg@0
   558
cg@0
   559
        dest == #bin ifTrue:[
cg@0
   560
            destDir := stxBinDir
cg@0
   561
        ] ifFalse:[
cg@24
   562
            dest == #libBin ifTrue:[
cg@24
   563
                destDir := stxLibBinDir
cg@24
   564
            ] ifFalse:[
cg@1279
   565
                dest == #pkg ifTrue:[
cg@1279
   566
                    destDir := stxPkgDir
cg@1279
   567
                ] ifFalse:[
cg@1279
   568
                    dest == nil ifTrue:[
cg@1279
   569
                        destDir := stxTopDir
cg@1279
   570
                    ] ifFalse:[
cg@1279
   571
                        destDir := stxLibDir
cg@1279
   572
                    ]
cg@1279
   573
                ]
cg@24
   574
            ]
cg@0
   575
        ].
cg@0
   576
        
cg@0
   577
        destDir := destDir asFilename.
cg@0
   578
        subDir notNil ifTrue:[
cg@0
   579
            destDir := destDir construct:subDir
cg@0
   580
        ].
cg@0
   581
cg@8
   582
        filesToCopy add:(fileNames -> destDir pathName)
cg@0
   583
    ].
cg@0
   584
cg@0
   585
    numFiles := filesToCopy size.
cg@0
   586
    nDone := 0.
cg@0
   587
cg@0
   588
    filesToCopy do:[:entry |
cg@678
   589
        |fileName destDir cmd|
cg@0
   590
cg@0
   591
        fileName := entry key.
cg@0
   592
        destDir := entry value.
cg@0
   593
cg@8
   594
        ((fileName includes:$*)
cg@1132
   595
        or:[(topDirPrefix , fileName) asFilename exists])ifTrue:[
cg@4
   596
            actionPercentageHolder value:(nDone / numFiles * 100) rounded.
cg@0
   597
cg@4
   598
            msg at:4 put:'    ' , (fileName asText allBold).
cg@4
   599
            msg at:6 put:'    ' , (destDir asText allBold).
cg@4
   600
            actionTextHolder value:nil.
cg@4
   601
            actionTextHolder value:msg.
cg@1
   602
cg@73
   603
            ((fileName includes:$*) not
cg@1136
   604
            and:[(topDirPrefix , fileName) asFilename exists not]) ifTrue:[
cg@73
   605
                (self listOfOptionalPackages includes:fileName) ifFalse:[
cg@117
   606
                    commandTraceView showCR:('cannot copy ' , fileName , ' - not included in distribution').
cg@117
   607
                    commandTraceView endEntry.
cg@73
   608
                ]
cg@73
   609
            ] ifFalse:[
cg@1136
   610
                destDir asFilename exists ifFalse:[
cg@1136
   611
                    commandTraceView showCR:(resources string:'creating %1 ...' with:destDir asFilename pathName).
cg@1136
   612
                    commandTraceView endEntry.
cg@1136
   613
                    OperatingSystem recursiveCreateDirectory:destDir asFilename pathName
cg@1136
   614
                ].
cg@1132
   615
                self recursiveCopy:(topDirPrefix , fileName) to:destDir.
cg@73
   616
            ]
cg@1
   617
        ].
cg@0
   618
cg@0
   619
        nDone := nDone + 1
cg@0
   620
    ].
cg@0
   621
cg@0
   622
    ^ true
cg@0
   623
cg@678
   624
    "
cg@678
   625
     STXInstaller open
cg@678
   626
    "
cg@678
   627
cg@678
   628
    "Created: / 17.7.1996 / 15:16:20 / cg"
cg@1138
   629
    "Modified: / 31.5.1999 / 18:07:33 / cg"
cg@0
   630
!
cg@0
   631
cg@0
   632
createDirectories
cg@0
   633
    |msg dirsToMake numDirs nDone|
cg@0
   634
cg@11
   635
    msg := (resources array:#('ST/X Installation' '' 'creating directory:' '' '' '')) asStringCollection.
cg@0
   636
cg@11
   637
    dirsToMake := self directoriesToMake.
cg@0
   638
cg@0
   639
    numDirs := dirsToMake size.
cg@0
   640
    nDone := 0.
cg@0
   641
cg@0
   642
    dirsToMake do:[:dirName |
cg@0
   643
        |d errMsg stop box|
cg@0
   644
cg@0
   645
        actionPercentageHolder value:(nDone / numDirs * 100) rounded.
cg@0
   646
cg@4
   647
        msg at:4 put:'    ' , (dirName asText allBold).
cg@0
   648
        actionTextHolder value:nil.
cg@0
   649
        actionTextHolder value:msg.
cg@0
   650
cg@0
   651
        d := dirName asFilename.
cg@0
   652
cg@11
   653
        commandTraceView showCR:(resources string:'creating %1 ...' with:d pathName).
cg@117
   654
        commandTraceView endEntry.
cg@4
   655
cg@0
   656
        d exists ifFalse:[
cg@0
   657
            OperatingSystem recursiveCreateDirectory:d pathName
cg@0
   658
        ].
cg@0
   659
cg@0
   660
        d exists ifFalse:[
cg@1279
   661
            errMsg := (resources string:'failed to create directory: %1\\Please check your permissions.' with:dirName) withCRs.
cg@0
   662
            stop := true
cg@0
   663
        ] ifTrue:[
cg@0
   664
            d isDirectory ifFalse:[
cg@11
   665
                errMsg := resources string:'not a directory: %1' with:dirName.
cg@0
   666
                stop := true
cg@0
   667
            ] ifTrue:[
cg@0
   668
                (d isReadable
cg@0
   669
                and:[d isWritable]) ifFalse:[
cg@11
   670
                    errMsg := resources string:'no read/write access to directory: %1' with:dirName.
cg@0
   671
                    stop := false
cg@0
   672
                ] ifTrue:[
cg@0
   673
                    errMsg := nil
cg@0
   674
                ]
cg@0
   675
            ]
cg@0
   676
        ].
cg@0
   677
cg@0
   678
        errMsg notNil ifTrue:[
cg@0
   679
            box := WarningBox new.
cg@0
   680
            box title:errMsg.
cg@0
   681
            box showAtPointerNotCovering:(WindowGroup activeGroup topViews first).
cg@1
   682
            stop ifTrue:[^ false].
cg@0
   683
        ].
cg@0
   684
cg@0
   685
        Delay waitForSeconds:0.25.
cg@0
   686
        nDone := nDone + 1.
cg@0
   687
    ].
cg@0
   688
    ^ true
cg@0
   689
cg@0
   690
    "Created: 17.7.1996 / 15:24:19 / cg"
cg@117
   691
    "Modified: 22.5.1997 / 15:06:41 / cg"
cg@19
   692
!
cg@19
   693
cg@1134
   694
createRegistryEntries
cg@1134
   695
    |release msg k|
cg@1134
   696
cg@1134
   697
    msg := (resources array:#('ST/X Installation' '' 'creating registry entries' '' '' '')) asStringCollection.
cg@1134
   698
    actionTextHolder value:nil.
cg@1134
   699
    actionTextHolder value:msg.
cg@1134
   700
cg@1134
   701
    commandTraceView showCR:(resources string:'creating registry entries...').
cg@1134
   702
    commandTraceView endEntry.
cg@1134
   703
cg@1134
   704
    release := self smalltalkRelease.
cg@1134
   705
cg@1134
   706
    k := Win32OperatingSystem::RegistryEntry key:'HKEY_LOCAL_MACHINE\Software'.
cg@1282
   707
    k isNil ifTrue:[
cg@1282
   708
        self warn:'cannot update registry under HKEY_LOCAL_MACHINE\Software\eXept'.
cg@1282
   709
        ^ self.
cg@1282
   710
    ].
cg@1282
   711
cg@1134
   712
    k := k createSubKeyNamed:'eXept'.
cg@1134
   713
    k := k createSubKeyNamed:'Smalltalk/X'.
cg@1134
   714
    k valueNamed:'CurrentVersion' put:release.
cg@1134
   715
cg@1134
   716
    k := k createSubKeyNamed:release.
cg@1134
   717
    k valueNamed:'LibDir' put:stxLibDir.
cg@1134
   718
    k valueNamed:'BinDir' put:stxBinDir.
cg@1279
   719
    k valueNamed:'DocDir' put:stxDocDir.
cg@1279
   720
    k valueNamed:'PackageDirPath' put:stxPkgDir.
cg@1134
   721
cg@1282
   722
    "Modified: / 23.12.1999 / 22:21:18 / cg"
cg@1134
   723
!
cg@1134
   724
cg@19
   725
createSymbolicLinks
cg@1367
   726
    |msg dirsToMake numDirs nDone languages cmd|
cg@19
   727
cg@1132
   728
    OperatingSystem isUNIXlike ifFalse:[^ self].
cg@1132
   729
cg@19
   730
    msg := (resources array:#('ST/X Installation' '' 'creating symbolic links' '' '' '')) asStringCollection.
cg@1134
   731
    actionTextHolder value:nil.
cg@1134
   732
    actionTextHolder value:msg.
cg@19
   733
cg@1010
   734
    installWhat == #full ifTrue:[
cg@1511
   735
        commandTraceView showCR:(resources string:'setting up symbolic links in doc...'); endEntry.
cg@678
   736
        OperatingSystem executeCommand:('(cd ' , fullDir , '/doc/online ; make links)').
cg@1511
   737
cg@1511
   738
        commandTraceView showCR:(resources string:'setting up symbolic links in projects/smalltalk...'); endEntry.
cg@1511
   739
        OperatingSystem executeCommand:('(cd ' , fullDir , '/projects/smalltalk ; ln -s ../../lib*/*.so .)').
cg@1511
   740
        OperatingSystem executeCommand:('(cd ' , fullDir , '/projects/smalltalk ; ln -s ../../goodies/*/*.so .)').
cg@1508
   741
        ^ self.
cg@1508
   742
    ].
cg@1367
   743
"/        OperatingSystem executeCommand:('(cd ' , stxLibDir , '/doc/online ; make links)').
cg@1281
   744
cg@1511
   745
    commandTraceView showCR:(resources string:'setting up symbolic links in lib...'); endEntry.
cg@1281
   746
cg@1508
   747
    #(
cg@1508
   748
        'libbasic/libbasic.so'
cg@1508
   749
        'libbasic2/libbasic2.so'
cg@1508
   750
        'libbasic3/libbasic3.so'
cg@1508
   751
        'libcomp/libcomp.so'
cg@1508
   752
        'libboss/libboss.so'
cg@1508
   753
        'libview/*.so'
cg@1508
   754
        'libview2/libview2.so'
cg@1508
   755
        'libwidg/libwidg.so'
cg@1508
   756
        'libwidg2/libwidg2.so'
cg@1508
   757
        'libwidg3/libwidg3.so'
cg@1508
   758
        'libhtml/libhtml.so'
cg@1508
   759
        'libui/libui.so'
cg@1508
   760
        'libtool/libtool.so'
cg@1508
   761
        'libtool2/libtool2.so'
cg@1508
   762
        'goodies/persistency/libdbase.so'
cg@1508
   763
    ) do:[:src |  |cmd|
cg@1508
   764
        cmd := '(cd ' , stxLibDir , '/lib ; ln -s ../../packages/stx/' , src , ' . )'.
cg@1508
   765
        commandTraceView showCR:cmd; endEntry.
cg@1508
   766
        OperatingSystem executeCommand:cmd.
cg@678
   767
    ].
cg@19
   768
cg@1367
   769
    installDocFiles ifTrue:[
cg@1367
   770
        msg := (resources array:#('ST/X Installation' '' 'creating symbolic links' '' '' '')) asStringCollection.
cg@1367
   771
        actionTextHolder value:nil.
cg@1367
   772
        actionTextHolder value:msg.
cg@1367
   773
cg@1367
   774
        commandTraceView showCR:(resources string:'setting up symbolic links in doc/online ...'); endEntry.
cg@1367
   775
cg@1367
   776
        languages := #(
cg@1367
   777
                        'english'
cg@1367
   778
                        'german'
cg@1367
   779
                        'french'
cg@1367
   780
                        'italian'
cg@1367
   781
                        'spanish'
cg@1367
   782
                        'japanese'
cg@1367
   783
                      ).
cg@1367
   784
        languages := languages select:[:l | (stxDocDir , '/online/' , l) asFilename exists].
cg@1367
   785
cg@1367
   786
        languages do:[:thisLang |
cg@1367
   787
            |langDir|
cg@1367
   788
cg@1367
   789
            langDir := stxDocDir , '/online/' , thisLang.
cg@1367
   790
            languages do:[:otherLang |
cg@1367
   791
                otherLang ~= thisLang ifTrue:[
cg@1367
   792
                    cmd := '(cd ' , langDir , ' ; ln -s ../' , otherLang , ' .)'.
cg@1367
   793
                    commandTraceView showCR:cmd; endEntry.
cg@1367
   794
                    OperatingSystem executeCommand:cmd.
cg@1367
   795
                ]
cg@1367
   796
            ].
cg@1367
   797
cg@1367
   798
            cmd := '(cd ' , langDir , ' ; ln -s ../icons .)'.
cg@1367
   799
            commandTraceView showCR:cmd; endEntry.
cg@1367
   800
             OperatingSystem executeCommand:cmd.
cg@1367
   801
cg@1367
   802
            cmd := '(cd ' , langDir , ' ; ln -s ../pictures .)'.
cg@1367
   803
            commandTraceView showCR:cmd; endEntry.
cg@1367
   804
             OperatingSystem executeCommand:cmd.
cg@1367
   805
        ]
cg@1367
   806
    ]
cg@678
   807
    "Created: / 17.7.1996 / 15:24:19 / cg"
cg@1134
   808
    "Modified: / 31.5.1999 / 14:46:36 / cg"
cg@678
   809
!
cg@678
   810
cg@678
   811
executeCommandAndShowOutput:cmd
cg@1508
   812
    ^ self executeCommandAndShowOutput:cmd emphasize:true
cg@1508
   813
!
cg@1508
   814
cg@1508
   815
executeCommandAndShowOutput:cmd emphasize:doEmphasize
cg@678
   816
    |doneSemaphore line p|
cg@678
   817
cg@1119
   818
    OperatingSystem isMSWINDOWSlike ifTrue:[
cg@1119
   819
        ^ self
cg@1119
   820
    ].
cg@1119
   821
cg@678
   822
    doneSemaphore := Semaphore new.
cg@678
   823
cg@678
   824
    copyProcess := [   
cg@678
   825
cg@678
   826
        p := PipeStream readingFrom:cmd.
cg@678
   827
        p isNil ifTrue:[
cg@678
   828
            self warn:('command error. Could not execute:\\' , cmd) withCRs.
cg@678
   829
        ] ifFalse:[
cg@678
   830
            [
cg@678
   831
                [p atEnd] whileFalse:[
cg@678
   832
                    (p readWaitWithTimeout:0.1) ifFalse:[
cg@678
   833
                        line := p nextLine.
cg@678
   834
                        (line notNil and:[line notEmpty]) ifTrue:[
cg@1508
   835
                            doEmphasize ifTrue:[
cg@1508
   836
                                line := line asText emphasizeAllWith:(#color->Color red).
cg@1508
   837
                            ].
cg@1508
   838
                            commandTraceView showCR:('  ' , line).
cg@678
   839
                            commandTraceView endEntry.
cg@678
   840
                        ]
cg@678
   841
                    ]
cg@678
   842
                ].
cg@678
   843
                p close.
cg@678
   844
            ] valueOnUnwindDo:[
cg@678
   845
                p shutDown
cg@678
   846
            ]
cg@678
   847
        ].
cg@678
   848
        doneSemaphore signal.
cg@678
   849
        copyProcess := nil.
cg@678
   850
    ] forkAt:4.
cg@678
   851
cg@678
   852
    doneSemaphore wait.
cg@678
   853
cg@678
   854
    "Created: / 25.2.1998 / 17:46:06 / cg"
cg@1119
   855
    "Modified: / 30.4.1999 / 18:00:43 / cg"
cg@73
   856
!
cg@73
   857
cg@73
   858
outputInitialMessage
cg@1279
   859
^ self.
cg@1279
   860
cg@73
   861
    #(
cg@73
   862
    'Notice:'
cg@73
   863
    ''
cg@73
   864
    'During the installation, you may get error messages'
cg@73
   865
    'complaining that some files where not found'
cg@73
   866
    'and could therefore not be copied.'
cg@73
   867
    ) do:[:line |
cg@73
   868
        commandTraceView showCR:((resources string:line) asText emphasizeAllWith:(#color->Color blue)).
cg@73
   869
        commandTraceView endEntry. 
cg@73
   870
    ].
cg@73
   871
cg@73
   872
    Delay waitForSeconds:2.
cg@73
   873
cg@73
   874
    #(
cg@73
   875
    ''
cg@73
   876
    'This is normal behavior; since the CD may contain'
cg@73
   877
    'broken symbolic links to non-existing packages'
cg@73
   878
    'which are either not contained on your ordered'
cg@276
   879
    'package (i.e. non-commercial) or are not required'
cg@276
   880
    'for your architecture (and therefore not contained'
cg@276
   881
    'on the CD).'
cg@276
   882
    ''
cg@73
   883
    ) do:[:line |
cg@73
   884
        commandTraceView showCR:((resources string:line) asText emphasizeAllWith:(#color->Color blue)).
cg@73
   885
        commandTraceView endEntry.
cg@73
   886
    ].
cg@73
   887
cg@73
   888
    Delay waitForSeconds:2.
cg@73
   889
cg@73
   890
    #(
cg@73
   891
    ''
cg@73
   892
    'Please excuse this inconvenience.'
cg@73
   893
    ''
cg@73
   894
    ) do:[:line |
cg@73
   895
        commandTraceView showCR:((resources string:line) asText emphasizeAllWith:(#color->Color blue)).
cg@73
   896
        commandTraceView endEntry.
cg@73
   897
    ].
cg@73
   898
cg@73
   899
    Delay waitForSeconds:2.
cg@73
   900
cg@73
   901
    "Created: 2.3.1997 / 12:49:52 / cg"
cg@276
   902
    "Modified: 8.8.1997 / 17:47:06 / cg"
cg@1132
   903
!
cg@1132
   904
cg@1279
   905
recursiveCopy:src to:dst
cg@1281
   906
    self recursiveCopy:src to:dst print:true
cg@1281
   907
!
cg@1281
   908
cg@1281
   909
recursiveCopy:src to:dst print:doPrint
cg@1282
   910
    |cmd srcBaseName srcF dstF d|
cg@1132
   911
cg@1279
   912
    srcF := src asFilename.
cg@1279
   913
    dstF := dst asFilename.
cg@1282
   914
mb@1779
   915
    srcF directory exists ifFalse:[
mb@1779
   916
        ^ self
mb@1779
   917
    ].
mb@1779
   918
cg@1514
   919
    srcBaseName := srcF baseName.
cg@1514
   920
    (srcBaseName startsWith:'.#') ifTrue:[^ self].
cg@1282
   921
cg@1514
   922
    (#(
cg@1514
   923
        'CVS'
cg@1514
   924
        'not_delivered'
cg@1514
   925
        '.cvsignore'
cg@1514
   926
        '.dir.info'
cg@1514
   927
    ) includes:srcBaseName) ifTrue:[
cg@1514
   928
        ^ self
cg@1514
   929
    ].
cg@1514
   930
cg@1514
   931
    srcBaseName includesMatchCharacters ifTrue:[
cg@1514
   932
        doPrint ifTrue:[
cg@1514
   933
            OperatingSystem isUNIXlike ifTrue:[
cg@1514
   934
                commandTraceView showCR:('cp ' , srcF pathName , ' ' , dstF pathName).
cg@1279
   935
            ] ifFalse:[
cg@1514
   936
                commandTraceView showCR:('copy ' , srcF pathName , ' ' , dstF pathName).
cg@1514
   937
            ].
cg@1514
   938
            commandTraceView endEntry.
cg@1514
   939
        ].
mb@1779
   940
cg@1514
   941
        (srcF directory directoryContents ? #()) do:[:fileName |
cg@1514
   942
            (srcBaseName match:fileName) ifTrue:[
cg@1514
   943
                (#(
cg@1514
   944
                    'CVS'
cg@1514
   945
                    'not_delivered'
cg@1514
   946
                ) includes:fileName) ifFalse:[
cg@1514
   947
                    self 
cg@1514
   948
                        recursiveCopy:(srcF directory construct:fileName) 
cg@1514
   949
                        to:dstF
cg@1514
   950
                        print:doPrint
cg@1132
   951
                ]
cg@1132
   952
            ]
cg@1132
   953
        ]
cg@1514
   954
    ] ifFalse:[
cg@1514
   955
        srcF isDirectory ifFalse:[
cg@1514
   956
            (dstF exists and:[dstF isDirectory]) ifTrue:[
cg@1514
   957
                dstF := dstF construct:srcBaseName.
cg@1514
   958
            ].
cg@1514
   959
            "/ special check for windows bug
cg@1514
   960
            "/ (lists trans.tbl files, but wont find it later)
cg@1514
   961
            srcF exists ifTrue:[
cg@1514
   962
                Object errorSignal handle:[:ex |
cg@1514
   963
                    commandTraceView showCR:('*** Error: ' , ex errorString)
cg@1514
   964
                ] do:[
cg@1514
   965
                    srcF copyTo:dstF.
cg@1514
   966
                ]
cg@1514
   967
            ].
cg@1514
   968
            OperatingSystem isUNIXlike ifTrue:[
cg@1514
   969
                srcF isExecutable ifTrue:[
cg@1514
   970
                    dstF makeExecutableForAll
cg@1514
   971
                ]
cg@1514
   972
            ]
cg@1514
   973
        ] ifTrue:[
cg@1514
   974
            doPrint ifTrue:[
cg@1514
   975
                OperatingSystem isUNIXlike ifTrue:[
cg@1514
   976
                    commandTraceView showCR:('cp ' , srcF pathName , ' ' , dstF pathName).
cg@1514
   977
                ] ifFalse:[
cg@1514
   978
                    commandTraceView showCR:('copy ' , srcF pathName , ' ' , dstF pathName).
cg@1514
   979
                ].
cg@1514
   980
                commandTraceView endEntry.
cg@1514
   981
            ].
cg@1514
   982
            d := dstF asFilename construct:srcBaseName.
cg@1514
   983
            (d exists) ifFalse:[
cg@1514
   984
                d makeDirectory.
cg@1514
   985
            ].
cg@1514
   986
            (srcF directoryContents ? #()) do:[:fileName |
cg@1514
   987
                self recursiveCopy:(srcF construct:fileName) 
cg@1514
   988
                     to:d
cg@1514
   989
                     print:doPrint
cg@1514
   990
            ]
cg@1514
   991
        ]
cg@1514
   992
    ]
cg@1132
   993
cg@1132
   994
    "Created: / 31.5.1999 / 13:05:09 / cg"
cg@1369
   995
    "Modified: / 3.3.2000 / 01:51:54 / cg"
cg@1367
   996
!
cg@1367
   997
cg@1367
   998
removeMakefilesInDoc
cg@1367
   999
    |cmd msg|
cg@1367
  1000
cg@1367
  1001
    OperatingSystem isUNIXlike ifFalse:[ ^ self ].
cg@1509
  1002
    installWhat == #full ifTrue:[^ self].
cg@1367
  1003
cg@1367
  1004
    installDocFiles ifTrue:[
cg@1367
  1005
        msg := (resources array:#('ST/X Installation' '' 'removing useless makefiles in doc' '' '' '')) asStringCollection.
cg@1367
  1006
        actionTextHolder value:nil.
cg@1367
  1007
        actionTextHolder value:msg.
cg@1367
  1008
cg@1367
  1009
        commandTraceView showCR:(resources string:'removing useless makefiles in doc ...'); endEntry.
cg@1367
  1010
cg@1367
  1011
        #(
cg@1367
  1012
            'Make.proto'
cg@1367
  1013
            'nt.mak'
cg@1367
  1014
            'vms.mak'
cg@1367
  1015
            'Makefile'
cg@1367
  1016
        ) do:[:toRemove |
cg@1367
  1017
            cmd := '(cd ' , stxDocDir , ' ; find . -name ''' , toRemove , ''' -exec rm {} \; )'.
cg@1367
  1018
cg@1367
  1019
            commandTraceView showCR:cmd; endEntry.
cg@1367
  1020
             OperatingSystem executeCommand:cmd.
cg@1367
  1021
        ]
cg@1367
  1022
    ]
cg@0
  1023
! !
cg@0
  1024
cg@0
  1025
!STXInstaller methodsFor:'startup'!
cg@0
  1026
cg@0
  1027
askAndInstall
cg@0
  1028
    "/ check, if we are in the projects/smalltalk directory
cg@0
  1029
cg@1119
  1030
    |answer here|
cg@678
  1031
cg@11
  1032
    resources := ResourcePack for:self class.
cg@11
  1033
cg@1132
  1034
    (((here := Filename currentDirectory pathName) endsWith:'projects/smalltalk') not
cg@1132
  1035
    and:[(here asLowercase endsWith:'stx\binbc') not
cg@1132
  1036
    and:[(here asLowercase endsWith:'projects\smalltalk') not
cg@1132
  1037
    ]]) ifTrue:[
cg@1150
  1038
        "/ double - check if some of my expected files exists here ...
cg@1151
  1039
        ('../../libbasic' asFilename exists
cg@1151
  1040
        and:['../../libbasic' asFilename isDirectory]) ifTrue:[
cg@1150
  1041
            self warn:(resources string:'Oops - current directories name seems to not end with ''/projects/smalltalk''\\Assume its OK.' withCRs).
cg@1150
  1042
        ] ifFalse:[
cg@1150
  1043
            self warn:(resources string:'must be in the ''projects/smalltalk'' directory').
cg@1150
  1044
            ^ self
cg@1150
  1045
        ]
cg@0
  1046
    ].
cg@0
  1047
cg@678
  1048
    answer := self askForFullInstallation.
cg@678
  1049
    answer ifFalse:[^ self].
cg@678
  1050
cg@0
  1051
    [self askForDestination] whileTrue:[
cg@73
  1052
        self checkForExistingInstallationAndConfirm ifTrue:[
cg@73
  1053
            self preInstall.
cg@73
  1054
            self doInstall ifTrue:[
cg@73
  1055
                self postInstall.
cg@73
  1056
                ^ self
cg@73
  1057
            ].
cg@73
  1058
            (self confirm:(resources string:'installation failed or aborted - retry ?'))
cg@73
  1059
            ifFalse:[
cg@73
  1060
                ^ self
cg@73
  1061
            ]
cg@0
  1062
        ]
cg@0
  1063
    ].
cg@0
  1064
cg@1132
  1065
    "Modified: / 31.5.1999 / 12:04:14 / cg"
cg@0
  1066
!
cg@0
  1067
cg@0
  1068
askForDestination
cg@0
  1069
    "open a dialog to enter destination directories"
cg@0
  1070
cg@1010
  1071
    installWhat == #full ifTrue:[
cg@678
  1072
        ^ self askForDestinationForFullInstallation
cg@678
  1073
    ] ifFalse:[
cg@678
  1074
        ^ self askForDestinationForPartialInstallation
cg@678
  1075
    ]
cg@678
  1076
cg@678
  1077
    "
cg@678
  1078
     STXInstaller open
cg@678
  1079
    "
cg@678
  1080
cg@678
  1081
    "Modified: / 25.2.1998 / 17:12:45 / cg"
cg@678
  1082
!
cg@678
  1083
cg@678
  1084
askForDestinationForFullInstallation
cg@678
  1085
    "open a dialog to enter destination directories"
cg@678
  1086
cg@678
  1087
    |d cm l green dark img
cg@678
  1088
     fullDirHolder|
cg@678
  1089
cg@678
  1090
    LastFullDir isNil ifTrue:[
cg@1515
  1091
        LastFullDir := (Filename homeDirectory construct:'work') constructString:'stx'
cg@678
  1092
    ].
cg@678
  1093
cg@678
  1094
    fullDirHolder := LastFullDir asValue.
cg@678
  1095
cg@678
  1096
    Screen current hasColors ifTrue:[
cg@678
  1097
        green := (Color red:0 green:80 blue:20) "darkened".
cg@678
  1098
        dark := Color grey:10.
cg@678
  1099
    ] ifFalse:[
cg@678
  1100
        green := Color white.
cg@678
  1101
        dark := Color black.
cg@678
  1102
    ].
cg@678
  1103
cg@678
  1104
    d := DialogBox new.
cg@678
  1105
cg@678
  1106
    d label:(resources string:'ST/X Full Installation').
cg@678
  1107
    img := Image fromFile:'SmalltalkX.xbm'.
cg@678
  1108
cg@678
  1109
    l := d addTextLabel:img.
cg@678
  1110
    l adjust:#left; foregroundColor:green backgroundColor:dark.
cg@678
  1111
cg@678
  1112
    l := d addTextLabel:(resources string:'Smalltalk/X CD installation (full).').
cg@678
  1113
    l adjust:#left; backgroundColor:dark; foregroundColor:Color white.
cg@1508
  1114
cg@1508
  1115
    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.
cg@1508
  1116
    l adjust:#left; backgroundColor:dark; foregroundColor:Color white.
cg@1508
  1117
cg@678
  1118
    d addVerticalSpace.
cg@678
  1119
    d addVerticalSpace.
cg@678
  1120
cg@678
  1121
    d addHorizontalLine.
cg@678
  1122
cg@678
  1123
    l := d addTextLabel:(resources string:'ST/X development directory:').
cg@678
  1124
    l adjust:#left; backgroundColor:dark; foregroundColor:Color white.
cg@678
  1125
cg@678
  1126
    cm := ComboBoxView on:fullDirHolder.
cg@678
  1127
    cm list:self defaultFullDirs.
cg@678
  1128
    d 
cg@678
  1129
        addLabelledField:cm 
cg@678
  1130
        label:(resources string:'stx develop')
cg@678
  1131
        adjust:#left 
cg@678
  1132
        tabable:true 
cg@678
  1133
        from:0.0 to:1.0 separateAtX:0.25
cg@678
  1134
        nameAs:'fullBox'.
cg@678
  1135
cg@678
  1136
    (d componentAt:'fullBox.label') backgroundColor:dark; foregroundColor:Color white.
cg@678
  1137
cg@678
  1138
    d addVerticalSpace.
cg@678
  1139
    d addHorizontalLine.
cg@678
  1140
cg@678
  1141
    d addHelpButtonFor:'STXInstaller/installHelp.html';
cg@678
  1142
      addAbortButton; 
cg@678
  1143
      addOkButtonLabelled:(resources string:'install').
cg@678
  1144
    d extent:500@400.
cg@1151
  1145
    d resize. "/ compute best size
cg@678
  1146
cg@678
  1147
    d allViewBackground:dark.
cg@678
  1148
cg@678
  1149
    d openAtCenter.
cg@678
  1150
    d accepted ifTrue:[
cg@678
  1151
        fullDir := LastFullDir := fullDirHolder value.
cg@678
  1152
        d destroy.
cg@678
  1153
        ^ true
cg@678
  1154
    ].
cg@678
  1155
    d destroy.
cg@678
  1156
    ^ false
cg@678
  1157
cg@678
  1158
    "
cg@678
  1159
     STXInstaller open
cg@678
  1160
    "
cg@678
  1161
cg@678
  1162
    "Created: / 25.2.1998 / 17:11:37 / cg"
cg@678
  1163
    "Modified: / 25.2.1998 / 17:29:07 / cg"
cg@678
  1164
!
cg@678
  1165
cg@678
  1166
askForDestinationForPartialInstallation
cg@678
  1167
    "open a dialog to enter destination directories"
cg@678
  1168
cg@2
  1169
    |d cm l green dark img
cg@1132
  1170
     stxInstDirHolder stxLibDirHolder stxLibBinDirHolder stxBinDirHolder
cg@5
  1171
     installDocHolder installSourceHolder installSTCHolder installGoodiesHolder
cg@73
  1172
     binMegabytes libMegabytes docMegabytes stcMegabytes srcMegabytes
cg@1132
  1173
     goodyMegabytes stxRel list stxInstDir
cg@0
  1174
    |
cg@0
  1175
cg@1139
  1176
    binMegabytes := 20.
cg@73
  1177
    libMegabytes := 30.
cg@1139
  1178
    docMegabytes := 12.
cg@1117
  1179
    stcMegabytes := 2.
cg@1139
  1180
    srcMegabytes := 20.
cg@1139
  1181
    goodyMegabytes := 10.
cg@11
  1182
cg@1132
  1183
    stxRel := self smalltalkRelease.
cg@1132
  1184
cg@1119
  1185
    OperatingSystem isMSWINDOWSlike ifTrue:[
cg@1132
  1186
        LastPartialDir isNil ifTrue:[
cg@1139
  1187
            LastPartialDir := 'c:\Programme\eXept\SmalltalkX\' , stxRel 
cg@1119
  1188
        ].
cg@1132
  1189
"/        LastLibDir isNil ifTrue:[
cg@1132
  1190
"/            LastLibDir := 'c:\Programme\SmalltalkX\' , stxRel , '\lib'
cg@1132
  1191
"/        ].
cg@1132
  1192
"/        LastLibBinDir isNil ifTrue:[
cg@1132
  1193
"/            LastLibBinDir := 'c:\Programme\SmalltalkX\' , stxRel , '\lib'
cg@1132
  1194
"/        ].
cg@1132
  1195
"/        LastBinDir isNil ifTrue:[
cg@1132
  1196
"/            LastBinDir := 'c:\Programme\SmalltalkX\' , stxRel , '\bin'
cg@1132
  1197
"/        ].
cg@1132
  1198
    ] ifFalse:[
cg@1132
  1199
        LastPartialDir isNil ifTrue:[
cg@1132
  1200
            LastPartialDir := '/opt/smalltalk/' , stxRel
cg@1119
  1201
        ].
cg@1132
  1202
"/        LastLibDir isNil ifTrue:[
cg@1132
  1203
"/            LastLibDir := '/opt/smalltalk/' , stxRel , '/lib'
cg@1132
  1204
"/        ].
cg@1132
  1205
"/        LastLibBinDir isNil ifTrue:[
cg@1132
  1206
"/            LastLibBinDir := '/opt/smalltalk/' , stxRel , '/lib'
cg@1132
  1207
"/        ].
cg@1132
  1208
"/        LastBinDir isNil ifTrue:[
cg@1132
  1209
"/            LastBinDir := '/opt/smalltalk/' , stxRel , '/bin'
cg@1132
  1210
"/        ].
cg@0
  1211
    ].
cg@0
  1212
cg@1132
  1213
    stxInstDirHolder := LastPartialDir asValue.
cg@1132
  1214
"/    stxLibDirHolder := LastLibDir asValue.
cg@1132
  1215
"/    stxLibBinDirHolder := LastLibBinDir asValue.
cg@1132
  1216
"/    stxBinDirHolder := LastBinDir asValue.
cg@24
  1217
cg@5
  1218
    installDocHolder := true asValue.
cg@5
  1219
    installSourceHolder := true asValue.
cg@5
  1220
    installSTCHolder := true asValue.
cg@5
  1221
    installGoodiesHolder := true asValue.
cg@0
  1222
cg@0
  1223
    Screen current hasColors ifTrue:[
cg@0
  1224
        green := (Color red:0 green:80 blue:20) "darkened".
cg@0
  1225
        dark := Color grey:10.
cg@0
  1226
    ] ifFalse:[
cg@0
  1227
        green := Color white.
cg@0
  1228
        dark := Color black.
cg@0
  1229
    ].
cg@0
  1230
cg@0
  1231
    d := DialogBox new.
cg@0
  1232
cg@1279
  1233
    d label:(resources string:'ST/X Standard Installation').
cg@2
  1234
    img := Image fromFile:'SmalltalkX.xbm'.
cg@2
  1235
cg@2
  1236
    l := d addTextLabel:img.
cg@2
  1237
    l adjust:#left; foregroundColor:green backgroundColor:dark.
cg@2
  1238
cg@1279
  1239
    l := d addTextLabel:(resources string:'Smalltalk/X Standard installation (partial).').
cg@0
  1240
    l adjust:#left; backgroundColor:dark; foregroundColor:Color white.
cg@0
  1241
    d addVerticalSpace.
cg@0
  1242
    d addVerticalSpace.
cg@0
  1243
cg@0
  1244
    d addHorizontalLine.
cg@0
  1245
cg@11
  1246
    l := d addTextLabel:(resources string:'Destination directories:').
cg@0
  1247
    l adjust:#left; backgroundColor:dark; foregroundColor:Color white.
cg@0
  1248
cg@1132
  1249
    l := d addTextLabel:(resources string:'(the default below is recommended)').
cg@678
  1250
    l adjust:#right; backgroundColor:dark; foregroundColor:Color white.
cg@678
  1251
cg@1132
  1252
    cm := ComboBoxView on:stxInstDirHolder.
cg@1139
  1253
    list := self defaultInstDirs collect:[:line |
cg@1132
  1254
                line replChar:$\ withString:'\\'
cg@1132
  1255
            ].
cg@1132
  1256
    cm list:list.
cg@0
  1257
    d 
cg@0
  1258
        addLabelledField:cm 
cg@1132
  1259
        label:(resources string:'install into:')
cg@0
  1260
        adjust:#left 
cg@0
  1261
        tabable:true 
cg@0
  1262
        from:0.0 to:1.0 separateAtX:0.25
cg@1132
  1263
        nameAs:'instDirBox'.
cg@0
  1264
cg@1132
  1265
    (d componentAt:'instDirBox.label') backgroundColor:dark; foregroundColor:Color white.
cg@0
  1266
cg@1132
  1267
"/    cm := ComboBoxView on:stxBinDirHolder.
cg@1132
  1268
"/    list := self defaultBinDirs collect:[:line |
cg@1132
  1269
"/                line replChar:$\ withString:'\\'
cg@1132
  1270
"/            ].
cg@1132
  1271
"/    cm list:list.
cg@1132
  1272
"/    d 
cg@1132
  1273
"/        addLabelledField:cm 
cg@1132
  1274
"/        label:(resources string:'binaries')
cg@1132
  1275
"/        adjust:#left 
cg@1132
  1276
"/        tabable:true 
cg@1132
  1277
"/        from:0.0 to:1.0 separateAtX:0.25
cg@1132
  1278
"/        nameAs:'binaryBox'.
cg@1132
  1279
"/
cg@1132
  1280
"/    (d componentAt:'binaryBox.label') backgroundColor:dark; foregroundColor:Color white.
cg@1132
  1281
"/
cg@1132
  1282
"/    cm := ComboBoxView on:stxLibBinDirHolder.
cg@1132
  1283
"/    cm list:self defaultLibBinDirs.
cg@1132
  1284
"/    d 
cg@1132
  1285
"/        addLabelledField:cm 
cg@1132
  1286
"/        label:(resources string:'libraries') 
cg@1132
  1287
"/        adjust:#left 
cg@1132
  1288
"/        tabable:true 
cg@1132
  1289
"/        from:0.0 to:1.0 separateAtX:0.25
cg@1132
  1290
"/        nameAs:'libraryBinBox'.
cg@1132
  1291
"/
cg@1132
  1292
"/    (d componentAt:'libraryBinBox.label') backgroundColor:dark; foregroundColor:Color white.
cg@1132
  1293
"/
cg@1132
  1294
"/    cm := ComboBoxView on:stxLibDirHolder.
cg@1132
  1295
"/    cm list:self defaultLibDirs.
cg@1132
  1296
"/    d 
cg@1132
  1297
"/        addLabelledField:cm 
cg@1132
  1298
"/        label:(resources string:'other files') 
cg@1132
  1299
"/        adjust:#left 
cg@1132
  1300
"/        tabable:true 
cg@1132
  1301
"/        from:0.0 to:1.0 separateAtX:0.25
cg@1132
  1302
"/        nameAs:'libraryBox'.
cg@1132
  1303
"/
cg@1132
  1304
"/    (d componentAt:'libraryBox.label') backgroundColor:dark; foregroundColor:Color white.
cg@0
  1305
cg@5
  1306
    d addVerticalSpace.
cg@5
  1307
    d addHorizontalLine.
cg@5
  1308
    d addVerticalSpace.
cg@5
  1309
cg@11
  1310
    (d addTextLabel:(resources string:'required:'))
cg@5
  1311
        adjust:#left; foregroundColor:Color white backgroundColor:dark.
cg@5
  1312
cg@5
  1313
    d leftIndent:35.
cg@11
  1314
    (d addTextLabel:(resources string:'binaries (approx. %1 Mb)' with:binMegabytes printString))
cg@5
  1315
        adjust:#left; foregroundColor:Color white backgroundColor:dark.
cg@11
  1316
    (d addTextLabel:(resources string:'libraries (approx. %1 Mb)' with:libMegabytes printString))
cg@5
  1317
        adjust:#left; foregroundColor:Color white backgroundColor:dark.
cg@5
  1318
    d leftIndent:0.
cg@5
  1319
cg@5
  1320
    d addVerticalSpace.
cg@5
  1321
    d addHorizontalLine.
cg@5
  1322
    d addVerticalSpace.
cg@5
  1323
cg@11
  1324
    (d addTextLabel:(resources string:'optional:'))
cg@5
  1325
        adjust:#left; foregroundColor:Color white backgroundColor:dark.
cg@5
  1326
cg@73
  1327
    (d addCheckBox:((resources string:'doc files (+%1 Mb)' with:docMegabytes)) on:installDocHolder)
cg@5
  1328
        labelView foregroundColor:Color white backgroundColor:dark.
cg@73
  1329
    (d addCheckBox:((resources string:'stc & support files (+%1 Mb)' with:stcMegabytes)) on:installSTCHolder)
cg@10
  1330
        labelView foregroundColor:Color white backgroundColor:dark.
cg@10
  1331
cg@10
  1332
    d addVerticalSpace.
cg@10
  1333
    d addHorizontalLine.
cg@10
  1334
    d addVerticalSpace.
cg@10
  1335
cg@11
  1336
    (d addTextLabel:(resources string:'optional (but highly recommended):'))
cg@10
  1337
        adjust:#left; foregroundColor:Color white backgroundColor:dark.
cg@10
  1338
cg@73
  1339
    (d addCheckBox:((resources string:'smalltalk source files (+%1 Mb)' with:srcMegabytes)) on:installSourceHolder)
cg@5
  1340
        labelView foregroundColor:Color white backgroundColor:dark.
cg@1117
  1341
    (d addCheckBox:((resources string:'goodies (+%1 Mb)' with:goodyMegabytes)) on:installGoodiesHolder)
cg@5
  1342
        labelView foregroundColor:Color white backgroundColor:dark.
cg@5
  1343
cg@5
  1344
    d addVerticalSpace.
cg@5
  1345
    d addHorizontalLine.
cg@5
  1346
cg@24
  1347
    d addHelpButtonFor:'STXInstaller/installHelp.html';
cg@24
  1348
      addAbortButton; 
cg@24
  1349
      addOkButtonLabelled:(resources string:'install').
cg@73
  1350
    d extent:500@400.
cg@1151
  1351
    d resize. "/ compute best size
cg@0
  1352
cg@0
  1353
    d allViewBackground:dark.
cg@0
  1354
cg@0
  1355
    d openAtCenter.
cg@0
  1356
    d accepted ifTrue:[
cg@1279
  1357
        stxInstDir := LastPartialDir := stxTopDir := stxInstDirHolder value.
cg@1279
  1358
        stxDocDir := stxInstDir asFilename constructString:'doc'.
cg@1132
  1359
        stxLibDir := stxInstDir asFilename constructString:'lib'.
cg@1132
  1360
        stxLibBinDir := stxInstDir asFilename constructString:'lib'.
cg@1132
  1361
        stxBinDir := stxInstDir asFilename constructString:'bin'.
cg@1279
  1362
        stxPkgDir := stxInstDir asFilename constructString:'packages'.
cg@1132
  1363
cg@1132
  1364
"/        stxLibDir := LastLibDir := stxLibDirHolder value.
cg@1132
  1365
"/        stxLibBinDir := LastLibBinDir := stxLibBinDirHolder value.
cg@1132
  1366
"/        stxBinDir := LastBinDir := stxBinDirHolder value.
cg@5
  1367
        installDocFiles := installDocHolder value.
cg@5
  1368
        installSourceFiles := installSourceHolder value.
cg@5
  1369
        installSTCFiles := installSTCHolder value.
cg@5
  1370
        installGoodyFiles := installGoodiesHolder value.
cg@1
  1371
        d destroy.
cg@0
  1372
        ^ true
cg@0
  1373
    ].
cg@1
  1374
    d destroy.
cg@0
  1375
    ^ false
cg@0
  1376
cg@678
  1377
    "
cg@678
  1378
     STXInstaller open
cg@678
  1379
    "
cg@678
  1380
cg@678
  1381
    "Created: / 25.2.1998 / 17:11:26 / cg"
cg@1139
  1382
    "Modified: / 31.5.1999 / 18:37:50 / cg"
cg@678
  1383
!
cg@678
  1384
cg@678
  1385
askForFullInstallation
cg@1508
  1386
    "open a dialog to ask if a full installation is wanted;
cg@1508
  1387
     Leave the result in installWhat (a symbol, either #full or #partial)."
cg@678
  1388
cg@678
  1389
    |d cm l green dark img|
cg@678
  1390
cg@678
  1391
    Screen current hasColors ifTrue:[
cg@678
  1392
        green := (Color red:0 green:80 blue:20) "darkened".
cg@678
  1393
        dark := Color grey:10.
cg@678
  1394
    ] ifFalse:[
cg@678
  1395
        green := Color white.
cg@678
  1396
        dark := Color black.
cg@678
  1397
    ].
cg@678
  1398
cg@678
  1399
    d := DialogBox new.
cg@678
  1400
cg@678
  1401
    d label:(resources string:'ST/X CD Installation').
cg@678
  1402
    img := Image fromFile:'SmalltalkX.xbm'.
cg@678
  1403
cg@678
  1404
    l := d addTextLabel:img.
cg@678
  1405
    l adjust:#left; foregroundColor:green backgroundColor:dark.
cg@678
  1406
cg@678
  1407
    l := d addTextLabel:(resources string:'Smalltalk/X CD installation.').
cg@678
  1408
    l adjust:#left; backgroundColor:dark; foregroundColor:Color white.
cg@678
  1409
    d addVerticalSpace.
cg@678
  1410
    d addVerticalSpace.
cg@678
  1411
cg@678
  1412
    d addHorizontalLine.
cg@678
  1413
cg@678
  1414
    l := d addTextLabel:(resources string:
cg@1279
  1415
'You can either perform a ' , 'full' asText allBold , ' installation, or a ' , 'standard' asText allBold ,' (partial) installation.').
cg@678
  1416
    l adjust:#left; backgroundColor:dark; foregroundColor:Color white.
cg@678
  1417
cg@678
  1418
    d addVerticalSpace.
cg@678
  1419
    d addHorizontalLine.
cg@678
  1420
cg@678
  1421
    d leftIndent:20.
cg@678
  1422
    l := d addTextLabel:(resources string:
cg@1117
  1423
'full:' asText allBold , '
cg@1117
  1424
The full installation is required if you want to build your own
cg@1117
  1425
customized smalltalk executable. It allows you to create and include 
cg@1117
  1426
additional precompiled binary classes or classLibraries. 
cg@678
  1427
This is also required if you want to link your own standalone executables.
cg@678
  1428
cg@678
  1429
It consists of a directory hierachy, including makefiles for a customizeable 
cg@678
  1430
rebuild of the whole smalltalk system.
cg@678
  1431
(Actually, it simply copies the whole CD contents onto your disk).
cg@1510
  1432
This requires roughly 200-300Mb of hard disk space (dep. upon architecture).').
cg@678
  1433
    l adjust:#left; backgroundColor:dark; foregroundColor:Color white.
cg@678
  1434
cg@678
  1435
    d addVerticalSpace.
cg@678
  1436
    d addHorizontalLine.
cg@678
  1437
cg@678
  1438
    l := d addTextLabel:(resources string:
cg@1279
  1439
'standard:' asText allBold , '
cg@1279
  1440
The standard (runTime) installation requires less disk space and only copies the
cg@678
  1441
smalltalk executable, shared libraries and support files onto your hard disk.
cg@1117
  1442
This setup allows normal smalltalk development and is also useful as a runtime
cg@1117
  1443
environment for smalltalk applications.
cg@1151
  1444
However, it does not support recreation of a new smalltalk executable and/or
cg@1117
  1445
shared binary classLibraries.
cg@1151
  1446
This setup also saves a lot of disk space, if multiple users are going to
cg@1151
  1447
use smalltalk, since most of the code is shared (both on disk and in memory).
cg@1151
  1448
This requires roughly 70-120Mb of hard disk space (dep. upon architecture).
cg@678
  1449
cg@678
  1450
cg@678
  1451
 ').
cg@678
  1452
    l adjust:#left; backgroundColor:dark; foregroundColor:Color white.
cg@678
  1453
cg@678
  1454
cg@678
  1455
    d leftIndent:0.
cg@678
  1456
    d addVerticalSpace.
cg@678
  1457
    d addHorizontalLine.
cg@678
  1458
cg@678
  1459
cg@678
  1460
    d addHelpButtonFor:'STXInstaller/installHelp.html';
cg@678
  1461
      addAbortButton; 
cg@1010
  1462
      addOkButton:(Button label:(resources string:'full') action:[installWhat := #full]);
cg@1279
  1463
      addOkButtonLabelled:(resources string:'standard').
cg@1151
  1464
    d extent:500@500.
cg@1151
  1465
    d resize.    "/ compute best size ...
cg@678
  1466
cg@678
  1467
    d allViewBackground:dark.
cg@678
  1468
cg@1010
  1469
    installWhat := #partial.
cg@678
  1470
    d openAtCenter.
cg@678
  1471
    d accepted ifTrue:[
cg@678
  1472
        d destroy.
cg@678
  1473
        ^ true
cg@678
  1474
    ].
cg@678
  1475
    d destroy.
cg@678
  1476
    ^ false
cg@678
  1477
cg@678
  1478
    "
cg@678
  1479
     STXInstaller open
cg@678
  1480
    "
cg@678
  1481
cg@678
  1482
    "Created: / 25.2.1998 / 16:50:16 / cg"
cg@678
  1483
    "Modified: / 25.2.1998 / 19:42:31 / cg"
cg@0
  1484
!
cg@0
  1485
cg@0
  1486
checkForExistingInstallationAndConfirm
cg@0
  1487
    "look if there is another installation and confirm
cg@0
  1488
     reinstalling; return true if ok, false if not"
cg@0
  1489
cg@678
  1490
    |whichDir canOverWrite whatToDo box|
cg@1
  1491
cg@1010
  1492
    installWhat == #full ifTrue:[
cg@678
  1493
        whichDir := fullDir.
cg@678
  1494
        canOverWrite := false.
cg@678
  1495
    ] ifFalse:[
cg@678
  1496
        whichDir := stxLibDir.
cg@678
  1497
        canOverWrite := true.
cg@678
  1498
    ].
cg@73
  1499
cg@678
  1500
    whichDir asFilename exists ifTrue:[
cg@678
  1501
            whatToDo := Dialog 
cg@678
  1502
                            choose:(resources 
cg@678
  1503
                                        string:'detected existing ST/X installation in %1' 
cg@678
  1504
                                          with:whichDir asText allBold)
cg@678
  1505
                            label:(resources string:'Attention')
cg@678
  1506
                            labels:(resources array:(canOverWrite 
cg@678
  1507
                                                    ifFalse:[#('remove first' 'cancel')] 
cg@678
  1508
                                                    ifTrue:[#('remove first' 'overwrite' 'cancel')] )) 
cg@678
  1509
                            values:(canOverWrite ifFalse:[#(remove nil)] ifTrue:[#(remove over nil)])
cg@678
  1510
                            default:nil.     
cg@678
  1511
cg@678
  1512
            whatToDo isNil ifTrue:[^false].
cg@678
  1513
            whatToDo == #remove ifTrue:[
cg@678
  1514
                ((whichDir findString:'stx') == 0
cg@678
  1515
                and:[(whichDir findString:'smalltalk') == 0]) ifTrue:[
cg@678
  1516
                    "/ confirm again
cg@678
  1517
                    (self confirm:(resources 
cg@678
  1518
                                    string:'are you certain that the directory to remove
cg@678
  1519
(' , whichDir , ') is really a smalltalk directory ?
cg@23
  1520
cg@73
  1521
Remove it now ?')) ifFalse:[ 
cg@678
  1522
                        ^ false
cg@678
  1523
                    ]
cg@678
  1524
                ].
cg@678
  1525
cg@678
  1526
                [
cg@678
  1527
                    box := DialogBox new label:'please wait'.
cg@678
  1528
                    box addTextLabel:'removing ' , whichDir , ' ...'.
cg@678
  1529
                    box showAtPointer.
cg@678
  1530
                ] forkAt:(Processor activePriority+1).
cg@678
  1531
                box waitUntilVisible.
cg@678
  1532
cg@678
  1533
                (OperatingSystem recursiveRemoveDirectory:whichDir)
cg@678
  1534
                ifFalse:[
cg@1512
  1535
                    OperatingSystem removeDirectory:whichDir.
cg@1512
  1536
                    whichDir asFilename exists ifTrue:[
cg@1512
  1537
                        self warn:(resources string:'mhmh - could not remove old installation.
cg@678
  1538
cg@1132
  1539
Please remove it manually (using administrator privileges if required) 
cg@678
  1540
and try again.').
cg@1512
  1541
                        box destroy.
cg@1512
  1542
                        ^ false
cg@1512
  1543
                    ]
cg@678
  1544
                ].
cg@678
  1545
cg@678
  1546
                box destroy
cg@23
  1547
            ].
cg@678
  1548
    ].
cg@23
  1549
cg@0
  1550
    ^ true
cg@0
  1551
cg@678
  1552
    "
cg@678
  1553
     STXInstaller open
cg@678
  1554
    "
cg@678
  1555
cg@1132
  1556
    "Modified: / 31.5.1999 / 13:23:03 / cg"
cg@0
  1557
!
cg@0
  1558
cg@0
  1559
doInstall
cg@0
  1560
    "install ST/X; return true if ok, false if not"
cg@0
  1561
cg@678
  1562
    |progressView ok v textView p l 
cg@1132
  1563
     dirToMonitor doDfMonitoring dfMonitorProcess kB drive|
cg@4
  1564
cg@678
  1565
    doDfMonitoring := false.
cg@678
  1566
cg@678
  1567
    v := View new preferredExtent:(250 @ 350).
cg@678
  1568
cg@678
  1569
    textView := HVScrollableView for:TextCollector in:v.
cg@678
  1570
    textView origin:0.0@0.0 corner:1.0@1.0.
cg@678
  1571
    textView bottomInset:30.
cg@1516
  1572
    textView lineLimit:10000.
cg@4
  1573
    commandTraceView := textView scrolledView.
cg@0
  1574
cg@1010
  1575
    installWhat == #full ifTrue:[
cg@678
  1576
        dirToMonitor := fullDir.
cg@678
  1577
    ] ifFalse:[
cg@678
  1578
        dirToMonitor := stxLibDir
cg@678
  1579
    ].
cg@678
  1580
cg@1132
  1581
    OperatingSystem isMSWINDOWSlike ifTrue:[
cg@1132
  1582
        drive := Filename rootDirectoryOnVolume:(dirToMonitor asFilename volume)
cg@1132
  1583
    ] ifFalse:[
cg@1132
  1584
        drive := dirToMonitor
cg@1132
  1585
    ].
cg@1152
  1586
    drive := drive asFilename.
cg@678
  1587
cg@1132
  1588
    p := HorizontalPanelView in:v.
cg@1132
  1589
    p origin:0.0@1.0 corner:1.0@1.0.
cg@1132
  1590
    p topInset:-30.
cg@1132
  1591
    p horizontalLayout:#fit.
cg@678
  1592
cg@1132
  1593
    l := Label label:'' in:p.
cg@1132
  1594
    l labelChannel:(dfHolder := '' asValue).
cg@1132
  1595
    l adjust:#left.
cg@1132
  1596
    dfMonitorProcess := [
cg@1132
  1597
        |ok info free kB i l|
cg@1132
  1598
cg@1132
  1599
        ok := true.
cg@1132
  1600
        [ok] whileTrue:[
cg@1132
  1601
            doDfMonitoring ifTrue:[
cg@1132
  1602
                ok := false.
cg@1132
  1603
                info := OperatingSystem getDiskInfoOf:drive pathName.
cg@1132
  1604
                info notNil ifTrue:[
cg@1132
  1605
                    free := info at:#freeBytes ifAbsent:nil.
cg@1132
  1606
                    free notNil ifTrue:[
cg@1132
  1607
                        kB := free / 1024.
cg@1132
  1608
                        kB > 10000 ifTrue:[
cg@1132
  1609
                            l := (kB // 1024) printString, 'Mb available.'.
cg@1132
  1610
                        ] ifFalse:[
cg@1132
  1611
                            l := kB printString , 'Kb available.'.
cg@678
  1612
                        ].
cg@1132
  1613
                        dfHolder value:l.
cg@1132
  1614
                        ok := true.
cg@1132
  1615
                        Delay waitForSeconds:9.
cg@678
  1616
                    ].
cg@678
  1617
                ].
cg@1132
  1618
            ].
cg@1132
  1619
            Delay waitForSeconds:1.
cg@1132
  1620
        ]
cg@1132
  1621
    ] forkAt:(Processor activePriority+3).
cg@678
  1622
cg@0
  1623
    progressView := ProgressIndicator
cg@1118
  1624
                        inBoxWithLabel:'ST/X Installation' icon:(Icon stxIcon)
cg@0
  1625
                        text:#('ST/X Installation' '' '' '' '' '' '' '') asStringCollection
cg@4
  1626
                        abortable:true
cg@678
  1627
                        view:v
cg@4
  1628
                        closeWhenDone:false.
cg@73
  1629
    progressView topView extent:(640 min:Display width) @ (500 min:Display height).
cg@0
  1630
cg@0
  1631
    ok := false.
cg@0
  1632
cg@0
  1633
    progressView showProgressOf:
cg@4
  1634
            [:progressValue :currentAction| |msg|
cg@0
  1635
cg@4
  1636
              Processor activeProcess withPriority:7 do:[
cg@682
  1637
                  [
cg@682
  1638
                      actionPercentageHolder := progressValue.
cg@682
  1639
                      actionTextHolder := currentAction.
cg@0
  1640
cg@1010
  1641
                      installWhat == #full ifFalse:[
cg@682
  1642
                            self outputInitialMessage.
cg@682
  1643
                      ].
cg@73
  1644
cg@682
  1645
                      (self createDirectories) ifTrue:[
cg@682
  1646
                          doDfMonitoring := true.
cg@682
  1647
                          ok := self copyFiles
cg@682
  1648
                      ].
cg@790
  1649
                      self changeWritability.
cg@682
  1650
                      self createSymbolicLinks.
cg@1367
  1651
                      self removeMakefilesInDoc.
cg@1367
  1652
cg@1134
  1653
                      OperatingSystem isMSWINDOWSlike ifTrue:[
cg@1134
  1654
                          self createRegistryEntries.
cg@1134
  1655
                      ].
cg@19
  1656
cg@682
  1657
                      progressValue value:100.
cg@6
  1658
cg@1117
  1659
                      progressView topView raise.
cg@1117
  1660
                      commandTraceView showCR:'Installation finished.' asText allBold.
cg@1117
  1661
                      commandTraceView endEntry. 
cg@1117
  1662
                      textView flash.
cg@1117
  1663
cg@682
  1664
                      progressView topView abortButton label:(resources string:'continue').
cg@682
  1665
                      progressView topView abortButton action:[progressView topView hide].
cg@682
  1666
                      msg := (resources 
cg@682
  1667
                                 array:#('ST/X Installation finished.' '' 'press continue ...' '' '' ''))
cg@682
  1668
                                     asStringCollection.
cg@682
  1669
                      actionTextHolder value:nil.
cg@682
  1670
                      actionTextHolder value:msg.
cg@682
  1671
                 ] valueOnUnwindDo:[
cg@682
  1672
                    dfMonitorProcess notNil ifTrue:[
cg@682
  1673
                        dfMonitorProcess terminate.
cg@682
  1674
                        dfMonitorProcess := nil.
cg@682
  1675
                    ].
cg@682
  1676
                    copyProcess notNil ifTrue:[
cg@682
  1677
                        copyProcess terminate.
cg@682
  1678
                        copyProcess := nil.
cg@682
  1679
                    ].
cg@682
  1680
                 ]
cg@4
  1681
              ] 
cg@0
  1682
            ].
cg@0
  1683
cg@678
  1684
    dfMonitorProcess notNil ifTrue:[
cg@682
  1685
        dfMonitorProcess terminate.
cg@682
  1686
        dfMonitorProcess := nil.
cg@678
  1687
    ].
cg@678
  1688
    copyProcess notNil ifTrue:[
cg@678
  1689
        copyProcess terminate.
cg@678
  1690
        copyProcess := nil.
cg@678
  1691
    ].
cg@0
  1692
    ^ ok
cg@0
  1693
cg@678
  1694
    "
cg@678
  1695
     STXInstaller open
cg@678
  1696
    "
cg@678
  1697
cg@678
  1698
    "Created: / 17.7.1996 / 15:11:27 / cg"
cg@1134
  1699
    "Modified: / 31.5.1999 / 14:45:12 / cg"
cg@0
  1700
!
cg@0
  1701
cg@0
  1702
open
cg@1
  1703
    self askAndInstall.
cg@0
  1704
cg@5
  1705
    "
cg@1119
  1706
     LastLibDir := LastBinDir := LastLibBinDir := nil.
cg@1139
  1707
     LastPartialDir := LastFullDir := nil.
cg@1119
  1708
cg@5
  1709
     STXInstaller open
cg@5
  1710
    "
cg@1119
  1711
cg@1139
  1712
    "Modified: / 31.5.1999 / 18:28:10 / cg"
cg@1
  1713
!
cg@1
  1714
cg@1
  1715
postInstall
cg@1
  1716
    "some messages at the end ..."
cg@1
  1717
cg@4
  1718
    |shInfo cshInfo msg havePath|
cg@1
  1719
cg@678
  1720
    resources isNil ifTrue:[
cg@678
  1721
        resources := ResourcePack for:self class.
cg@678
  1722
    ].
cg@678
  1723
cg@11
  1724
    msg := (resources string:'ST/X Installation complete.\\') withCRs.
cg@1
  1725
    shInfo := ''.
cg@1
  1726
    cshInfo := ''.
cg@1
  1727
cg@1119
  1728
    OperatingSystem isMSWINDOWSlike ifFalse:[
cg@1119
  1729
cg@1119
  1730
        installWhat == #full ifTrue:[
cg@1119
  1731
            msg := msg , 'You will now find a development directory hierarchy
cg@678
  1732
in ''' , fullDir asText allBold , '''.
cg@1
  1733
cg@678
  1734
To try it, ''cd'' to ''' , fullDir , '/projects/smalltalk''
cg@678
  1735
and start smalltalk with the command: ''./smalltalk''.
cg@1
  1736
cg@678
  1737
To perform a partial installation of your customized smalltalk later,
cg@678
  1738
use the INSTALL script found in ''' , fullDir , ''''.
cg@678
  1739
cg@1119
  1740
        ] ifFalse:[
cg@1119
  1741
            havePath := true.
cg@1119
  1742
            (((OperatingSystem getEnvironment:'PATH')
cg@1119
  1743
                asCollectionOfSubstringsSeparatedBy:$:)
cg@1119
  1744
                    includes:stxBinDir) ifFalse:[
cg@678
  1745
cg@1119
  1746
                havePath := false.
cg@1119
  1747
                shInfo  := 'PATH=$PATH:' , stxBinDir , ' ; export PATH\'.
cg@1119
  1748
                cshInfo := 'set path=($path ' , stxBinDir , ')\'.
cg@1119
  1749
                msg := msg , (resources string:'%1 is not in your PATH.\You should change your ".login" and/or ".profile" files to include it.\\'
cg@1119
  1750
                                          with:stxBinDir asText allBold) withCRs.
cg@678
  1751
            ].
cg@1
  1752
cg@1119
  1753
            (stxLibDir ~= '/usr/local/lib/smalltalk'
cg@1119
  1754
            and:[stxLibDir ~= '/usr/lib/smalltalk'
cg@1119
  1755
            and:[stxLibDir ~= ('/opt/smalltalk/' , self smalltalkRelease , '/lib')]]) ifTrue:[
cg@1119
  1756
                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").
cg@1119
  1757
You may have to define the %1 environment variable\as %2 if ST/X complains about not finding its files.\'
cg@1119
  1758
                                          with:'STX_LIBDIR' asText allBold 
cg@1119
  1759
                                          with:stxLibDir asText allBold) withCRs.
cg@1119
  1760
                havePath ifFalse:[
cg@1119
  1761
                    msg := msg , (resources string:'The above mentioned files are also a good place to do this.\') withCRs.
cg@1119
  1762
                ] ifTrue:[
cg@1119
  1763
                    msg := msg , (resources string:'The ".login" and/or ".profile" files are a good place to do this.\') withCRs.
cg@1119
  1764
                ].
cg@678
  1765
cg@1119
  1766
                shInfo := shInfo , 'STX_LIBDIR=' , stxLibDir , ' ; export STX_LIBDIR\'.
cg@1119
  1767
                cshInfo := cshInfo , 'setenv STX_LIBDIR ' , stxLibDir , '\'.
cg@1119
  1768
            ].
cg@1119
  1769
cg@1119
  1770
            shInfo notEmpty ifTrue:[
cg@1119
  1771
                '*********************************************************' errorPrintCR.
cg@1119
  1772
                (resources string:'Message from the ST/X Installer:\\') withCRs errorPrintCR.
cg@1119
  1773
                (resources string:'Please add the following to your ".profile" file:') withCRs errorPrintCR.
cg@1119
  1774
                '' errorPrintCR.
cg@1119
  1775
                shInfo withCRs errorPrintCR.
cg@1119
  1776
                '' errorPrintCR.
cg@1119
  1777
                (resources string:'or (if you use csh/tcsh), add to your ".login" file:') withCRs errorPrintCR.
cg@1119
  1778
                '' errorPrintCR.
cg@1119
  1779
                cshInfo withCRs errorPrintCR.
cg@1119
  1780
                '' errorPrintCR.
cg@1119
  1781
                '*********************************************************' errorPrintCR.
cg@1119
  1782
            ].
cg@678
  1783
        ].
cg@1
  1784
    ].
cg@73
  1785
    msg := msg , '\\Have fun using ST/X !!'.
cg@73
  1786
cg@73
  1787
    self information:msg withCRs.
cg@1
  1788
cg@1119
  1789
    "Modified: / 30.4.1999 / 17:59:39 / cg"
cg@25
  1790
!
cg@25
  1791
cg@25
  1792
preInstall
cg@678
  1793
    "clobber the doc directory, to avoid copying cyclic symbolic links.
cg@678
  1794
     Notice, the CD does not contain symlinks, but checking for them
cg@678
  1795
     allows installing from a development dir."
cg@25
  1796
cg@25
  1797
    |f|
cg@25
  1798
cg@1119
  1799
    OperatingSystem isMSWINDOWSlike ifFalse:[
cg@1119
  1800
        f := '../../doc/online/english/german' asFilename.
cg@1119
  1801
        f exists ifTrue:[
cg@1119
  1802
            f isSymbolicLink ifTrue:[
cg@1119
  1803
                OperatingSystem executeCommand:'(cd ../../doc/online; make clobber) >/dev/null 2>/dev/null'
cg@1119
  1804
            ]
cg@25
  1805
        ]
cg@25
  1806
    ]
cg@25
  1807
cg@25
  1808
    "
cg@25
  1809
     STXInstaller new preInstall
cg@25
  1810
    "
cg@25
  1811
cg@1119
  1812
    "Modified: / 30.4.1999 / 17:54:38 / cg"
cg@0
  1813
! !
cg@0
  1814
cg@28
  1815
!STXInstaller class methodsFor:'documentation'!
cg@0
  1816
cg@0
  1817
version
cg@0
  1818
    ^ '$Header$'
cg@0
  1819
! !