STXInstaller.st
author ca
Fri, 14 Feb 1997 18:20:05 +0100
changeset 48 2fb81a3e0246
parent 31 0f95ba9204f6
child 73 2087134eea96
permissions -rw-r--r--
*** empty log message ***
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     1
Object subclass:#STXInstaller
24
2b61cca30b01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 23
diff changeset
     2
	instanceVariableNames:'stxLibDir stxLibBinDir stxBinDir installDocFiles
2b61cca30b01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 23
diff changeset
     3
		installSourceFiles installSTCFiles installGoodyFiles
2b61cca30b01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 23
diff changeset
     4
		actionPercentageHolder actionTextHolder commandTraceView
2b61cca30b01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 23
diff changeset
     5
		resources'
2b61cca30b01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 23
diff changeset
     6
	classVariableNames:'LastBinDir LastLibBinDir LastLibDir'
0
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     7
	poolDictionaries:''
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     8
	category:'eXept-tools'
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     9
!
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    10
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    11
28
b3a8378dd626 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 27
diff changeset
    12
!STXInstaller class methodsFor:'startup'!
0
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    13
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    14
open
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    15
    ^ self new open
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    16
11
9bc23682b68c national strings
Claus Gittinger <cg@exept.de>
parents: 10
diff changeset
    17
    "
9bc23682b68c national strings
Claus Gittinger <cg@exept.de>
parents: 10
diff changeset
    18
     STXInstaller open
9bc23682b68c national strings
Claus Gittinger <cg@exept.de>
parents: 10
diff changeset
    19
    "
1
7ebb34d8f3df checkin from browser
Claus Gittinger <cg@exept.de>
parents: 0
diff changeset
    20
! !
7ebb34d8f3df checkin from browser
Claus Gittinger <cg@exept.de>
parents: 0
diff changeset
    21
7ebb34d8f3df checkin from browser
Claus Gittinger <cg@exept.de>
parents: 0
diff changeset
    22
!STXInstaller methodsFor:'defaults'!
7ebb34d8f3df checkin from browser
Claus Gittinger <cg@exept.de>
parents: 0
diff changeset
    23
7ebb34d8f3df checkin from browser
Claus Gittinger <cg@exept.de>
parents: 0
diff changeset
    24
defaultBinDirs
7ebb34d8f3df checkin from browser
Claus Gittinger <cg@exept.de>
parents: 0
diff changeset
    25
    |dirs|
7ebb34d8f3df checkin from browser
Claus Gittinger <cg@exept.de>
parents: 0
diff changeset
    26
7ebb34d8f3df checkin from browser
Claus Gittinger <cg@exept.de>
parents: 0
diff changeset
    27
    dirs := OrderedCollection new.
7ebb34d8f3df checkin from browser
Claus Gittinger <cg@exept.de>
parents: 0
diff changeset
    28
    dirs add:'/usr/local/bin'.
7ebb34d8f3df checkin from browser
Claus Gittinger <cg@exept.de>
parents: 0
diff changeset
    29
    dirs add:'/usr/bin'.
7ebb34d8f3df checkin from browser
Claus Gittinger <cg@exept.de>
parents: 0
diff changeset
    30
    dirs add:(Filename homeDirectory constructString:'bin').
14
4c8640a78f2a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 13
diff changeset
    31
    dirs add:((Filename homeDirectory 
4c8640a78f2a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 13
diff changeset
    32
			    construct:'stx')
4c8640a78f2a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 13
diff changeset
    33
			    constructString:'bin').
1
7ebb34d8f3df checkin from browser
Claus Gittinger <cg@exept.de>
parents: 0
diff changeset
    34
    dirs add:'/tmp/stxbin'.
3
7b048cdcc856 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2
diff changeset
    35
    ('/home' asFilename exists and:['/home' asFilename isDirectory]) ifTrue:[
7b048cdcc856 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2
diff changeset
    36
        dirs add:'/home/stx/bin'.
7b048cdcc856 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2
diff changeset
    37
    ].
7b048cdcc856 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2
diff changeset
    38
    ('/home2' asFilename exists and:['/home2' asFilename isDirectory]) ifTrue:[
7b048cdcc856 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2
diff changeset
    39
        dirs add:'/home2/stx/bin'.
7b048cdcc856 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2
diff changeset
    40
    ].
7b048cdcc856 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2
diff changeset
    41
7b048cdcc856 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2
diff changeset
    42
"/    dirs := dirs select:[:path | 
7b048cdcc856 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2
diff changeset
    43
"/                            |f|
7b048cdcc856 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2
diff changeset
    44
"/
7b048cdcc856 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2
diff changeset
    45
"/                            f := path asFilename.
7b048cdcc856 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2
diff changeset
    46
"/                            f exists and:[f isDirectory]].
7b048cdcc856 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2
diff changeset
    47
    ^ dirs sort
1
7ebb34d8f3df checkin from browser
Claus Gittinger <cg@exept.de>
parents: 0
diff changeset
    48
7ebb34d8f3df checkin from browser
Claus Gittinger <cg@exept.de>
parents: 0
diff changeset
    49
    "Created: 18.7.1996 / 19:43:00 / cg"
7ebb34d8f3df checkin from browser
Claus Gittinger <cg@exept.de>
parents: 0
diff changeset
    50
    "Modified: 18.7.1996 / 19:45:08 / cg"
7ebb34d8f3df checkin from browser
Claus Gittinger <cg@exept.de>
parents: 0
diff changeset
    51
!
7ebb34d8f3df checkin from browser
Claus Gittinger <cg@exept.de>
parents: 0
diff changeset
    52
24
2b61cca30b01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 23
diff changeset
    53
defaultLibBinDirs
2b61cca30b01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 23
diff changeset
    54
    |dirs|
2b61cca30b01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 23
diff changeset
    55
2b61cca30b01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 23
diff changeset
    56
    dirs := OrderedCollection new.
2b61cca30b01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 23
diff changeset
    57
    dirs add:'/usr/local/lib'.
2b61cca30b01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 23
diff changeset
    58
    dirs add:'/usr/lib'.
2b61cca30b01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 23
diff changeset
    59
    dirs add:'/lib'.
2b61cca30b01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 23
diff changeset
    60
    dirs add:(Filename homeDirectory 
2b61cca30b01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 23
diff changeset
    61
                            constructString:'lib').
2b61cca30b01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 23
diff changeset
    62
2b61cca30b01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 23
diff changeset
    63
    dirs add:((Filename homeDirectory 
2b61cca30b01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 23
diff changeset
    64
                            construct:'stx')
2b61cca30b01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 23
diff changeset
    65
                            constructString:'lib').
2b61cca30b01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 23
diff changeset
    66
    dirs add:'/tmp/stxlib'.
2b61cca30b01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 23
diff changeset
    67
    dirs add:'/home/stx/lib'.
2b61cca30b01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 23
diff changeset
    68
    dirs add:'/home2/stx/lib'.
2b61cca30b01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 23
diff changeset
    69
2b61cca30b01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 23
diff changeset
    70
    ^ dirs sort
2b61cca30b01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 23
diff changeset
    71
2b61cca30b01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 23
diff changeset
    72
    "Created: 18.7.1996 / 19:43:21 / cg"
2b61cca30b01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 23
diff changeset
    73
    "Modified: 18.7.1996 / 19:46:04 / cg"
2b61cca30b01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 23
diff changeset
    74
!
2b61cca30b01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 23
diff changeset
    75
1
7ebb34d8f3df checkin from browser
Claus Gittinger <cg@exept.de>
parents: 0
diff changeset
    76
defaultLibDirs
7ebb34d8f3df checkin from browser
Claus Gittinger <cg@exept.de>
parents: 0
diff changeset
    77
    |dirs|
7ebb34d8f3df checkin from browser
Claus Gittinger <cg@exept.de>
parents: 0
diff changeset
    78
7ebb34d8f3df checkin from browser
Claus Gittinger <cg@exept.de>
parents: 0
diff changeset
    79
    dirs := OrderedCollection new.
7ebb34d8f3df checkin from browser
Claus Gittinger <cg@exept.de>
parents: 0
diff changeset
    80
    dirs add:'/usr/local/lib/smalltalk'.
7ebb34d8f3df checkin from browser
Claus Gittinger <cg@exept.de>
parents: 0
diff changeset
    81
    dirs add:'/usr/lib/smalltalk'.
7ebb34d8f3df checkin from browser
Claus Gittinger <cg@exept.de>
parents: 0
diff changeset
    82
    dirs add:((Filename homeDirectory 
7ebb34d8f3df checkin from browser
Claus Gittinger <cg@exept.de>
parents: 0
diff changeset
    83
                            construct:'lib')
7ebb34d8f3df checkin from browser
Claus Gittinger <cg@exept.de>
parents: 0
diff changeset
    84
                            constructString:'smalltalk').
15
ffe9991b03ba checkin from browser
Claus Gittinger <cg@exept.de>
parents: 14
diff changeset
    85
    dirs add:((Filename homeDirectory 
ffe9991b03ba checkin from browser
Claus Gittinger <cg@exept.de>
parents: 14
diff changeset
    86
                            construct:'stx')
ffe9991b03ba checkin from browser
Claus Gittinger <cg@exept.de>
parents: 14
diff changeset
    87
                            constructString:'lib').
1
7ebb34d8f3df checkin from browser
Claus Gittinger <cg@exept.de>
parents: 0
diff changeset
    88
    dirs add:'/tmp/stxlib'.
7ebb34d8f3df checkin from browser
Claus Gittinger <cg@exept.de>
parents: 0
diff changeset
    89
    dirs add:'/home/stx/lib'.
7ebb34d8f3df checkin from browser
Claus Gittinger <cg@exept.de>
parents: 0
diff changeset
    90
    dirs add:'/home2/stx/lib'.
3
7b048cdcc856 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2
diff changeset
    91
7b048cdcc856 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2
diff changeset
    92
"/    dirs := dirs select:[:path | 
7b048cdcc856 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2
diff changeset
    93
"/                            |f|
7b048cdcc856 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2
diff changeset
    94
"/
7b048cdcc856 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2
diff changeset
    95
"/                            f := path asFilename.
7b048cdcc856 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2
diff changeset
    96
"/                            f exists and:[f isDirectory]].
7b048cdcc856 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2
diff changeset
    97
    ^ dirs sort
1
7ebb34d8f3df checkin from browser
Claus Gittinger <cg@exept.de>
parents: 0
diff changeset
    98
7ebb34d8f3df checkin from browser
Claus Gittinger <cg@exept.de>
parents: 0
diff changeset
    99
    "Created: 18.7.1996 / 19:43:21 / cg"
7ebb34d8f3df checkin from browser
Claus Gittinger <cg@exept.de>
parents: 0
diff changeset
   100
    "Modified: 18.7.1996 / 19:46:04 / cg"
11
9bc23682b68c national strings
Claus Gittinger <cg@exept.de>
parents: 10
diff changeset
   101
!
0
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   102
11
9bc23682b68c national strings
Claus Gittinger <cg@exept.de>
parents: 10
diff changeset
   103
directoriesToMake
9bc23682b68c national strings
Claus Gittinger <cg@exept.de>
parents: 10
diff changeset
   104
    |dirsToMake|
0
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   105
11
9bc23682b68c national strings
Claus Gittinger <cg@exept.de>
parents: 10
diff changeset
   106
    dirsToMake := OrderedCollection new.
9bc23682b68c national strings
Claus Gittinger <cg@exept.de>
parents: 10
diff changeset
   107
    dirsToMake add:stxBinDir.
9bc23682b68c national strings
Claus Gittinger <cg@exept.de>
parents: 10
diff changeset
   108
    dirsToMake add:stxLibDir.
24
2b61cca30b01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 23
diff changeset
   109
    dirsToMake add:stxLibBinDir.
2b61cca30b01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 23
diff changeset
   110
    dirsToMake add:(stxLibDir asFilename constructString:'configurations').
11
9bc23682b68c national strings
Claus Gittinger <cg@exept.de>
parents: 10
diff changeset
   111
    dirsToMake add:(stxLibDir asFilename constructString:'doc').
12
6cb00d713d4d LICENSE texts must always be installed
Claus Gittinger <cg@exept.de>
parents: 11
diff changeset
   112
    dirsToMake add:(stxLibDir asFilename constructString:'doc/online').
6cb00d713d4d LICENSE texts must always be installed
Claus Gittinger <cg@exept.de>
parents: 11
diff changeset
   113
    dirsToMake add:(stxLibDir asFilename constructString:'doc/online/english').
6cb00d713d4d LICENSE texts must always be installed
Claus Gittinger <cg@exept.de>
parents: 11
diff changeset
   114
    dirsToMake add:(stxLibDir asFilename constructString:'doc/online/german').
19
504c3ad987d1 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 18
diff changeset
   115
    dirsToMake add:(stxLibDir asFilename constructString:'doc/online/french').
504c3ad987d1 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 18
diff changeset
   116
    dirsToMake add:(stxLibDir asFilename constructString:'doc/online/italian').
11
9bc23682b68c national strings
Claus Gittinger <cg@exept.de>
parents: 10
diff changeset
   117
    dirsToMake add:(stxLibDir asFilename constructString:'include').
9bc23682b68c national strings
Claus Gittinger <cg@exept.de>
parents: 10
diff changeset
   118
    dirsToMake add:(stxLibDir asFilename constructString:'resources').
9bc23682b68c national strings
Claus Gittinger <cg@exept.de>
parents: 10
diff changeset
   119
    dirsToMake add:(stxLibDir asFilename constructString:'binary').
9bc23682b68c national strings
Claus Gittinger <cg@exept.de>
parents: 10
diff changeset
   120
    dirsToMake add:(stxLibDir asFilename constructString:'bitmaps').
9bc23682b68c national strings
Claus Gittinger <cg@exept.de>
parents: 10
diff changeset
   121
    dirsToMake add:(stxLibDir asFilename constructString:'goodies').
0
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   122
11
9bc23682b68c national strings
Claus Gittinger <cg@exept.de>
parents: 10
diff changeset
   123
    ^ dirsToMake
9bc23682b68c national strings
Claus Gittinger <cg@exept.de>
parents: 10
diff changeset
   124
!
9bc23682b68c national strings
Claus Gittinger <cg@exept.de>
parents: 10
diff changeset
   125
9bc23682b68c national strings
Claus Gittinger <cg@exept.de>
parents: 10
diff changeset
   126
specOfFilesToCopy
9bc23682b68c national strings
Claus Gittinger <cg@exept.de>
parents: 10
diff changeset
   127
    |fileSpec|
0
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   128
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   129
    fileSpec := #(
27
8c5195f9508a also install stx.
Claus Gittinger <cg@exept.de>
parents: 26
diff changeset
   130
                "/ name                             destination  subDir             required mode      
12
6cb00d713d4d LICENSE texts must always be installed
Claus Gittinger <cg@exept.de>
parents: 11
diff changeset
   131
                ( 'projects/smalltalk/smalltalk'        #bin     nil                  true  '755' )
27
8c5195f9508a also install stx.
Claus Gittinger <cg@exept.de>
parents: 26
diff changeset
   132
                ( 'projects/smalltalk/stx'              #bin     nil                  true  '755' )
12
6cb00d713d4d LICENSE texts must always be installed
Claus Gittinger <cg@exept.de>
parents: 11
diff changeset
   133
                ( 'projects/smalltalk/include'          #lib     nil                  true  '644' )
6cb00d713d4d LICENSE texts must always be installed
Claus Gittinger <cg@exept.de>
parents: 11
diff changeset
   134
                ( 'projects/smalltalk/*.rc'             #lib     nil                  true  '644' )
6cb00d713d4d LICENSE texts must always be installed
Claus Gittinger <cg@exept.de>
parents: 11
diff changeset
   135
                ( 'projects/smalltalk/patches'          #lib     nil                  true  '644' )
6cb00d713d4d LICENSE texts must always be installed
Claus Gittinger <cg@exept.de>
parents: 11
diff changeset
   136
                ( 'projects/smalltalk/bitmaps'          #lib     nil                  true  '644' )
6cb00d713d4d LICENSE texts must always be installed
Claus Gittinger <cg@exept.de>
parents: 11
diff changeset
   137
                ( 'projects/smalltalk/resources'        #lib     nil                  true  '644' )
6cb00d713d4d LICENSE texts must always be installed
Claus Gittinger <cg@exept.de>
parents: 11
diff changeset
   138
                ( 'projects/smalltalk/lib'              #lib     nil                  true  '644' )
16
e41abdee193f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 15
diff changeset
   139
                ( 'doc/online/german/LICENCE.STX.html'  #lib     'doc/online/german'  true  '644' )
19
504c3ad987d1 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 18
diff changeset
   140
"/                ( 'doc/online/english/LICENCE.STX.html' #lib     'doc/online/english' true  '644' )
5
16cff74f42b0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4
diff changeset
   141
    ).
0
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   142
5
16cff74f42b0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4
diff changeset
   143
    installDocFiles ifTrue:[
16cff74f42b0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4
diff changeset
   144
        fileSpec := fileSpec , #(
24
2b61cca30b01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 23
diff changeset
   145
                ( 'doc'                                  #lib     nil        false '644' )
5
16cff74f42b0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4
diff changeset
   146
        ).
16cff74f42b0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4
diff changeset
   147
    ].
16cff74f42b0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4
diff changeset
   148
9
9f31213107b8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 8
diff changeset
   149
    installSourceFiles ifTrue:[
9f31213107b8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 8
diff changeset
   150
        fileSpec := fileSpec , #(
24
2b61cca30b01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 23
diff changeset
   151
                ( 'projects/smalltalk/source'                #lib        nil        false '644' )
9
9f31213107b8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 8
diff changeset
   152
        ).
9f31213107b8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 8
diff changeset
   153
    ].
9f31213107b8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 8
diff changeset
   154
5
16cff74f42b0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4
diff changeset
   155
    installSTCFiles ifTrue:[
16cff74f42b0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4
diff changeset
   156
        fileSpec := fileSpec , #(
24
2b61cca30b01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 23
diff changeset
   157
                ( 'stc/stc'                                  #bin        nil              false '755' )
2b61cca30b01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 23
diff changeset
   158
                ( 'rules/stmkmp'                             #bin        nil              false '755' )
2b61cca30b01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 23
diff changeset
   159
                ( 'rules/stmkmf'                             #bin        nil              false '755' )
2b61cca30b01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 23
diff changeset
   160
                ( 'include'                                  #lib        nil              false '644' )
2b61cca30b01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 23
diff changeset
   161
                ( 'configurations'                           #lib        nil              false '644' )
2b61cca30b01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 23
diff changeset
   162
                ( 'configurations/PACKS'                     #lib        'configurations' false '644' )
2b61cca30b01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 23
diff changeset
   163
                ( 'configurations/my*'                       #lib        'configurations' false '644' )
2b61cca30b01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 23
diff changeset
   164
                ( 'configurations/vendor*'                   #lib        'configurations' false '644' )
2b61cca30b01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 23
diff changeset
   165
                ( 'rules'                                    #lib        nil              false '644' )
5
16cff74f42b0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4
diff changeset
   166
24
2b61cca30b01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 23
diff changeset
   167
                ( 'support/VGL/vogl/src/libvogl.*'           #lib        'lib'       false '644' )
2b61cca30b01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 23
diff changeset
   168
                ( 'support/VGL/vogl/src/*.h'                 #lib        'include'   false '644' )
2b61cca30b01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 23
diff changeset
   169
                ( 'support/DLD/dld-3.2.5/libdld.*'           #lib        'lib'       false '644' )
2b61cca30b01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 23
diff changeset
   170
                ( 'goodies/persistency/db-1.6/PORT/libdb.*'  #lib        'lib'       false '644' )
0
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   171
24
2b61cca30b01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 23
diff changeset
   172
                ( 'librun/librun.*'                          #libBin     nil      false '644' )
2b61cca30b01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 23
diff changeset
   173
                ( 'libbasic/libbasic.*'                      #libBin     nil      false '644' )
2b61cca30b01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 23
diff changeset
   174
                ( 'libbasic2/libbasic2.*'                    #libBin     nil      false '644' )
2b61cca30b01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 23
diff changeset
   175
                ( 'libbasic3/libbasic3.*'                    #libBin     nil      false '644' )
2b61cca30b01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 23
diff changeset
   176
                ( 'libhtml/libhtml.*'                        #libBin     nil      false '644' )
2b61cca30b01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 23
diff changeset
   177
                ( 'libcomp/libcomp.*'                        #libBin     nil      false '644' )
2b61cca30b01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 23
diff changeset
   178
                ( 'libview/libview.*'                        #libBin     nil      false '644' )
2b61cca30b01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 23
diff changeset
   179
                ( 'libview2/libview2.*'                      #libBin     nil      false '644' )
2b61cca30b01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 23
diff changeset
   180
                ( 'libwidg/libwidg.*'                        #libBin     nil      false '644' )
2b61cca30b01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 23
diff changeset
   181
                ( 'libwidg2/libwidg2.*'                      #libBin     nil      false '644' )
2b61cca30b01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 23
diff changeset
   182
                ( 'libwidg3/libwidg3.*'                      #libBin     nil      false '644' )
27
8c5195f9508a also install stx.
Claus Gittinger <cg@exept.de>
parents: 26
diff changeset
   183
"/                ( 'libsnmp/libsnmp.*'                        #libBin     nil      false '644' )
8c5195f9508a also install stx.
Claus Gittinger <cg@exept.de>
parents: 26
diff changeset
   184
"/                ( 'contrib/libPVM/libPVM.*'                  #libBin     nil      false '644' )
24
2b61cca30b01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 23
diff changeset
   185
                ( 'goodies/persistency/libdbase.*'           #libBin     nil      false '644' )
27
8c5195f9508a also install stx.
Claus Gittinger <cg@exept.de>
parents: 26
diff changeset
   186
"/                ( 'libtable/libtable.*'                      #libBin     nil      false '644' )
24
2b61cca30b01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 23
diff changeset
   187
                ( 'libtool/libtool.*'                        #libBin     nil      false '644' )
27
8c5195f9508a also install stx.
Claus Gittinger <cg@exept.de>
parents: 26
diff changeset
   188
"/                ( 'libxt/libxt.*'                            #libBin     nil      false '644' )
8c5195f9508a also install stx.
Claus Gittinger <cg@exept.de>
parents: 26
diff changeset
   189
"/                ( 'librt/librt.*'                            #libBin     nil      false '644' )
5
16cff74f42b0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4
diff changeset
   190
        ).
16cff74f42b0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4
diff changeset
   191
    ].
0
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   192
5
16cff74f42b0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4
diff changeset
   193
    installGoodyFiles ifTrue:[
16cff74f42b0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4
diff changeset
   194
        fileSpec := fileSpec , #(
16cff74f42b0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4
diff changeset
   195
                ( 'goodies/*.st'                             #lib     'goodies'  false '644' )
16cff74f42b0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4
diff changeset
   196
                ( 'goodies/*.chg'                            #lib     'goodies'  false '644' )
16cff74f42b0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4
diff changeset
   197
                ( 'goodies/rdoit/rdoit'                      #bin     nil        false '755' )
16cff74f42b0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4
diff changeset
   198
        ).
16cff74f42b0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4
diff changeset
   199
    ].
0
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   200
11
9bc23682b68c national strings
Claus Gittinger <cg@exept.de>
parents: 10
diff changeset
   201
9bc23682b68c national strings
Claus Gittinger <cg@exept.de>
parents: 10
diff changeset
   202
    ^ fileSpec
9bc23682b68c national strings
Claus Gittinger <cg@exept.de>
parents: 10
diff changeset
   203
9bc23682b68c national strings
Claus Gittinger <cg@exept.de>
parents: 10
diff changeset
   204
! !
9bc23682b68c national strings
Claus Gittinger <cg@exept.de>
parents: 10
diff changeset
   205
9bc23682b68c national strings
Claus Gittinger <cg@exept.de>
parents: 10
diff changeset
   206
!STXInstaller methodsFor:'installing'!
9bc23682b68c national strings
Claus Gittinger <cg@exept.de>
parents: 10
diff changeset
   207
9bc23682b68c national strings
Claus Gittinger <cg@exept.de>
parents: 10
diff changeset
   208
copyFiles
9bc23682b68c national strings
Claus Gittinger <cg@exept.de>
parents: 10
diff changeset
   209
    |msg fileSpec filesToCopy numFiles nDone|
9bc23682b68c national strings
Claus Gittinger <cg@exept.de>
parents: 10
diff changeset
   210
9bc23682b68c national strings
Claus Gittinger <cg@exept.de>
parents: 10
diff changeset
   211
    msg := (resources array:#('ST/X Installation' '' 'copying:' '' 'to:' '')) asStringCollection.
9bc23682b68c national strings
Claus Gittinger <cg@exept.de>
parents: 10
diff changeset
   212
9bc23682b68c national strings
Claus Gittinger <cg@exept.de>
parents: 10
diff changeset
   213
    fileSpec := self specOfFilesToCopy.
9bc23682b68c national strings
Claus Gittinger <cg@exept.de>
parents: 10
diff changeset
   214
0
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   215
    filesToCopy := OrderedCollection new.
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   216
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   217
    fileSpec do:[:entry |
8
88df33224360 oops - did not copy file*
Claus Gittinger <cg@exept.de>
parents: 7
diff changeset
   218
        |fileNames dest subDir required destDir|
0
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   219
8
88df33224360 oops - did not copy file*
Claus Gittinger <cg@exept.de>
parents: 7
diff changeset
   220
        fileNames := entry at:1.
0
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   221
        dest := entry at:2.
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   222
        subDir := entry at:3.
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   223
        required := entry at:4.
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   224
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   225
        dest == #bin ifTrue:[
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   226
            destDir := stxBinDir
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   227
        ] ifFalse:[
24
2b61cca30b01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 23
diff changeset
   228
            dest == #libBin ifTrue:[
2b61cca30b01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 23
diff changeset
   229
                destDir := stxLibBinDir
2b61cca30b01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 23
diff changeset
   230
            ] ifFalse:[
2b61cca30b01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 23
diff changeset
   231
                destDir := stxLibDir
2b61cca30b01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 23
diff changeset
   232
            ]
0
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   233
        ].
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   234
        
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   235
        destDir := destDir asFilename.
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   236
        subDir notNil ifTrue:[
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   237
            destDir := destDir construct:subDir
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   238
        ].
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   239
8
88df33224360 oops - did not copy file*
Claus Gittinger <cg@exept.de>
parents: 7
diff changeset
   240
        filesToCopy add:(fileNames -> destDir pathName)
0
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   241
    ].
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   242
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   243
    numFiles := filesToCopy size.
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   244
    nDone := 0.
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   245
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   246
    filesToCopy do:[:entry |
11
9bc23682b68c national strings
Claus Gittinger <cg@exept.de>
parents: 10
diff changeset
   247
        |fileName destDir cmd p text line doneSemaphore|
0
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   248
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   249
        fileName := entry key.
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   250
        destDir := entry value.
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   251
8
88df33224360 oops - did not copy file*
Claus Gittinger <cg@exept.de>
parents: 7
diff changeset
   252
        ((fileName includes:$*)
88df33224360 oops - did not copy file*
Claus Gittinger <cg@exept.de>
parents: 7
diff changeset
   253
        or:[('../../' , fileName) asFilename exists])ifTrue:[
4
8b68fdf7c870 better looking; show command output
Claus Gittinger <cg@exept.de>
parents: 3
diff changeset
   254
            actionPercentageHolder value:(nDone / numFiles * 100) rounded.
0
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   255
4
8b68fdf7c870 better looking; show command output
Claus Gittinger <cg@exept.de>
parents: 3
diff changeset
   256
            msg at:4 put:'    ' , (fileName asText allBold).
8b68fdf7c870 better looking; show command output
Claus Gittinger <cg@exept.de>
parents: 3
diff changeset
   257
            msg at:6 put:'    ' , (destDir asText allBold).
8b68fdf7c870 better looking; show command output
Claus Gittinger <cg@exept.de>
parents: 3
diff changeset
   258
            actionTextHolder value:nil.
8b68fdf7c870 better looking; show command output
Claus Gittinger <cg@exept.de>
parents: 3
diff changeset
   259
            actionTextHolder value:msg.
8b68fdf7c870 better looking; show command output
Claus Gittinger <cg@exept.de>
parents: 3
diff changeset
   260
22
289347193c3e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 21
diff changeset
   261
            cmd := 'cp -r ../../' , fileName , ' ' , destDir.
4
8b68fdf7c870 better looking; show command output
Claus Gittinger <cg@exept.de>
parents: 3
diff changeset
   262
            commandTraceView showCR:cmd , ' ...'.
31
0f95ba9204f6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 30
diff changeset
   263
"/            cmd := 'sh -c "echo ; ' , cmd , ' 2>&1"' .
0f95ba9204f6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 30
diff changeset
   264
            cmd := cmd , ' 2>&1' .
1
7ebb34d8f3df checkin from browser
Claus Gittinger <cg@exept.de>
parents: 0
diff changeset
   265
11
9bc23682b68c national strings
Claus Gittinger <cg@exept.de>
parents: 10
diff changeset
   266
            doneSemaphore := Semaphore new.
9bc23682b68c national strings
Claus Gittinger <cg@exept.de>
parents: 10
diff changeset
   267
9bc23682b68c national strings
Claus Gittinger <cg@exept.de>
parents: 10
diff changeset
   268
            [   
9bc23682b68c national strings
Claus Gittinger <cg@exept.de>
parents: 10
diff changeset
   269
9bc23682b68c national strings
Claus Gittinger <cg@exept.de>
parents: 10
diff changeset
   270
                p := PipeStream readingFrom:cmd.
9bc23682b68c national strings
Claus Gittinger <cg@exept.de>
parents: 10
diff changeset
   271
                p isNil ifTrue:[
9bc23682b68c national strings
Claus Gittinger <cg@exept.de>
parents: 10
diff changeset
   272
                    self warn:('command error. Could not execute:\\' , cmd) withCRs.
9bc23682b68c national strings
Claus Gittinger <cg@exept.de>
parents: 10
diff changeset
   273
                ] ifFalse:[
9bc23682b68c national strings
Claus Gittinger <cg@exept.de>
parents: 10
diff changeset
   274
                    [p atEnd] whileFalse:[
30
7b6129ab86b0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 29
diff changeset
   275
                        (p readWaitWithTimeout:0.1) ifFalse:[
7b6129ab86b0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 29
diff changeset
   276
                            line := p nextLine.
7b6129ab86b0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 29
diff changeset
   277
                            (line notNil and:[line notEmpty]) ifTrue:[
7b6129ab86b0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 29
diff changeset
   278
                                commandTraceView showCR:(('  ' , line) asText emphasizeAllWith:(#color->Color red)).
7b6129ab86b0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 29
diff changeset
   279
                            ]
11
9bc23682b68c national strings
Claus Gittinger <cg@exept.de>
parents: 10
diff changeset
   280
                        ]
9bc23682b68c national strings
Claus Gittinger <cg@exept.de>
parents: 10
diff changeset
   281
                    ].
9bc23682b68c national strings
Claus Gittinger <cg@exept.de>
parents: 10
diff changeset
   282
                    p close.
4
8b68fdf7c870 better looking; show command output
Claus Gittinger <cg@exept.de>
parents: 3
diff changeset
   283
                ].
11
9bc23682b68c national strings
Claus Gittinger <cg@exept.de>
parents: 10
diff changeset
   284
                doneSemaphore signal.
9bc23682b68c national strings
Claus Gittinger <cg@exept.de>
parents: 10
diff changeset
   285
            ] forkAt:4.
9bc23682b68c national strings
Claus Gittinger <cg@exept.de>
parents: 10
diff changeset
   286
9bc23682b68c national strings
Claus Gittinger <cg@exept.de>
parents: 10
diff changeset
   287
            doneSemaphore wait.
9bc23682b68c national strings
Claus Gittinger <cg@exept.de>
parents: 10
diff changeset
   288
1
7ebb34d8f3df checkin from browser
Claus Gittinger <cg@exept.de>
parents: 0
diff changeset
   289
        ].
0
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   290
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   291
        nDone := nDone + 1
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   292
    ].
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   293
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   294
    ^ true
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   295
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   296
    "Created: 17.7.1996 / 15:16:20 / cg"
31
0f95ba9204f6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 30
diff changeset
   297
    "Modified: 9.1.1997 / 03:15:23 / cg"
0
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   298
!
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   299
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   300
createDirectories
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   301
    |msg dirsToMake numDirs nDone|
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   302
11
9bc23682b68c national strings
Claus Gittinger <cg@exept.de>
parents: 10
diff changeset
   303
    msg := (resources array:#('ST/X Installation' '' 'creating directory:' '' '' '')) asStringCollection.
0
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   304
11
9bc23682b68c national strings
Claus Gittinger <cg@exept.de>
parents: 10
diff changeset
   305
    dirsToMake := self directoriesToMake.
0
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   306
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   307
    numDirs := dirsToMake size.
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   308
    nDone := 0.
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   309
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   310
    dirsToMake do:[:dirName |
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   311
        |d errMsg stop box|
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   312
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   313
        actionPercentageHolder value:(nDone / numDirs * 100) rounded.
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   314
4
8b68fdf7c870 better looking; show command output
Claus Gittinger <cg@exept.de>
parents: 3
diff changeset
   315
        msg at:4 put:'    ' , (dirName asText allBold).
0
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   316
        actionTextHolder value:nil.
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   317
        actionTextHolder value:msg.
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   318
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   319
        d := dirName asFilename.
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   320
11
9bc23682b68c national strings
Claus Gittinger <cg@exept.de>
parents: 10
diff changeset
   321
        commandTraceView showCR:(resources string:'creating %1 ...' with:d pathName).
4
8b68fdf7c870 better looking; show command output
Claus Gittinger <cg@exept.de>
parents: 3
diff changeset
   322
0
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   323
        d exists ifFalse:[
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   324
            OperatingSystem recursiveCreateDirectory:d pathName
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   325
        ].
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   326
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   327
        d exists ifFalse:[
11
9bc23682b68c national strings
Claus Gittinger <cg@exept.de>
parents: 10
diff changeset
   328
            errMsg := resources string:'failed to create directory: %1' with: dirName.
0
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   329
            stop := true
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   330
        ] ifTrue:[
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   331
            d isDirectory ifFalse:[
11
9bc23682b68c national strings
Claus Gittinger <cg@exept.de>
parents: 10
diff changeset
   332
                errMsg := resources string:'not a directory: %1' with:dirName.
0
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   333
                stop := true
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   334
            ] ifTrue:[
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   335
                (d isReadable
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   336
                and:[d isWritable]) ifFalse:[
11
9bc23682b68c national strings
Claus Gittinger <cg@exept.de>
parents: 10
diff changeset
   337
                    errMsg := resources string:'no read/write access to directory: %1' with:dirName.
0
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   338
                    stop := false
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   339
                ] ifTrue:[
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   340
                    errMsg := nil
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   341
                ]
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   342
            ]
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   343
        ].
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   344
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   345
        errMsg notNil ifTrue:[
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   346
            box := WarningBox new.
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   347
            box title:errMsg.
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   348
            box showAtPointerNotCovering:(WindowGroup activeGroup topViews first).
1
7ebb34d8f3df checkin from browser
Claus Gittinger <cg@exept.de>
parents: 0
diff changeset
   349
            stop ifTrue:[^ false].
0
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   350
        ].
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   351
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   352
        Delay waitForSeconds:0.25.
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   353
        nDone := nDone + 1.
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   354
    ].
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   355
    ^ true
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   356
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   357
    "Created: 17.7.1996 / 15:24:19 / cg"
1
7ebb34d8f3df checkin from browser
Claus Gittinger <cg@exept.de>
parents: 0
diff changeset
   358
    "Modified: 18.7.1996 / 22:18:38 / cg"
19
504c3ad987d1 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 18
diff changeset
   359
!
504c3ad987d1 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 18
diff changeset
   360
504c3ad987d1 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 18
diff changeset
   361
createSymbolicLinks
504c3ad987d1 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 18
diff changeset
   362
    |msg dirsToMake numDirs nDone|
504c3ad987d1 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 18
diff changeset
   363
504c3ad987d1 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 18
diff changeset
   364
    msg := (resources array:#('ST/X Installation' '' 'creating symbolic links' '' '' '')) asStringCollection.
504c3ad987d1 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 18
diff changeset
   365
28
b3a8378dd626 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 27
diff changeset
   366
    commandTraceView showCR:(resources string:'setting up symbolic links in doc/online ...').
29
537410dfad60 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 28
diff changeset
   367
    OperatingSystem executeCommand:('(cd ' , stxLibDir , '/doc/online ; make links)').
19
504c3ad987d1 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 18
diff changeset
   368
    ^ true
504c3ad987d1 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 18
diff changeset
   369
504c3ad987d1 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 18
diff changeset
   370
    "Created: 17.7.1996 / 15:24:19 / cg"
504c3ad987d1 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 18
diff changeset
   371
    "Modified: 18.7.1996 / 22:18:38 / cg"
0
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   372
! !
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   373
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   374
!STXInstaller methodsFor:'startup'!
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   375
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   376
askAndInstall
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   377
    "/ check, if we are in the projects/smalltalk directory
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   378
11
9bc23682b68c national strings
Claus Gittinger <cg@exept.de>
parents: 10
diff changeset
   379
    resources := ResourcePack for:self class.
9bc23682b68c national strings
Claus Gittinger <cg@exept.de>
parents: 10
diff changeset
   380
0
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   381
    (Filename currentDirectory pathName endsWith:'projects/smalltalk') ifFalse:[
11
9bc23682b68c national strings
Claus Gittinger <cg@exept.de>
parents: 10
diff changeset
   382
        self warn:(resources string:'must be in the ''projects/smalltalk'' directory').
0
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   383
        ^ self
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   384
    ].
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   385
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   386
    [self askForDestination] whileTrue:[
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   387
        self checkForExistingInstallationAndConfirm ifFalse:[
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   388
            ^ self
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   389
        ].
25
42ee3e7ced09 remove local symbolic links (if any) in doc/online
Claus Gittinger <cg@exept.de>
parents: 24
diff changeset
   390
        self preInstall.
0
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   391
        self doInstall ifTrue:[
1
7ebb34d8f3df checkin from browser
Claus Gittinger <cg@exept.de>
parents: 0
diff changeset
   392
            self postInstall.
0
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   393
            ^ self
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   394
        ].
11
9bc23682b68c national strings
Claus Gittinger <cg@exept.de>
parents: 10
diff changeset
   395
        (self confirm:(resources string:'installation failed or aborted - retry ?'))
0
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   396
        ifFalse:[
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   397
            ^ self
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   398
        ]
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   399
    ].
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   400
1
7ebb34d8f3df checkin from browser
Claus Gittinger <cg@exept.de>
parents: 0
diff changeset
   401
    "Modified: 18.7.1996 / 21:20:56 / cg"
0
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   402
!
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   403
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   404
askForDestination
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   405
    "open a dialog to enter destination directories"
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   406
2
936a4407697b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1
diff changeset
   407
    |d cm l green dark img
24
2b61cca30b01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 23
diff changeset
   408
     stxLibDirHolder stxLibBinDirHolder stxBinDirHolder
5
16cff74f42b0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4
diff changeset
   409
     installDocHolder installSourceHolder installSTCHolder installGoodiesHolder
11
9bc23682b68c national strings
Claus Gittinger <cg@exept.de>
parents: 10
diff changeset
   410
     binMegabytes libMegabytes
0
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   411
    |
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   412
11
9bc23682b68c national strings
Claus Gittinger <cg@exept.de>
parents: 10
diff changeset
   413
    binMegabytes := 10.
9bc23682b68c national strings
Claus Gittinger <cg@exept.de>
parents: 10
diff changeset
   414
    libMegabytes := 10.
9bc23682b68c national strings
Claus Gittinger <cg@exept.de>
parents: 10
diff changeset
   415
0
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   416
    LastLibDir isNil ifTrue:[
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   417
        LastLibDir := '/usr/local/lib/smalltalk'
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   418
    ].
24
2b61cca30b01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 23
diff changeset
   419
    LastLibBinDir isNil ifTrue:[
2b61cca30b01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 23
diff changeset
   420
        LastLibBinDir := '/usr/local/lib'
2b61cca30b01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 23
diff changeset
   421
    ].
0
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   422
    LastBinDir isNil ifTrue:[
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   423
        LastBinDir := '/usr/local/bin'
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   424
    ].
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   425
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   426
    stxLibDirHolder := LastLibDir asValue.
24
2b61cca30b01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 23
diff changeset
   427
    stxLibBinDirHolder := LastLibBinDir asValue.
0
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   428
    stxBinDirHolder := LastBinDir asValue.
24
2b61cca30b01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 23
diff changeset
   429
5
16cff74f42b0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4
diff changeset
   430
    installDocHolder := true asValue.
16cff74f42b0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4
diff changeset
   431
    installSourceHolder := true asValue.
16cff74f42b0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4
diff changeset
   432
    installSTCHolder := true asValue.
16cff74f42b0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4
diff changeset
   433
    installGoodiesHolder := true asValue.
0
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   434
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   435
    Screen current hasColors ifTrue:[
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   436
        green := (Color red:0 green:80 blue:20) "darkened".
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   437
        dark := Color grey:10.
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   438
    ] ifFalse:[
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   439
        green := Color white.
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   440
        dark := Color black.
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   441
    ].
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   442
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   443
    d := DialogBox new.
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   444
11
9bc23682b68c national strings
Claus Gittinger <cg@exept.de>
parents: 10
diff changeset
   445
    d label:(resources string:'ST/X CD Installation').
2
936a4407697b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1
diff changeset
   446
    img := Image fromFile:'SmalltalkX.xbm'.
936a4407697b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1
diff changeset
   447
936a4407697b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1
diff changeset
   448
    l := d addTextLabel:img.
936a4407697b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1
diff changeset
   449
    l adjust:#left; foregroundColor:green backgroundColor:dark.
936a4407697b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1
diff changeset
   450
11
9bc23682b68c national strings
Claus Gittinger <cg@exept.de>
parents: 10
diff changeset
   451
    l := d addTextLabel:(resources string:'Smalltalk/X CD installation.').
0
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   452
    l adjust:#left; backgroundColor:dark; foregroundColor:Color white.
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   453
    d addVerticalSpace.
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   454
    d addVerticalSpace.
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   455
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   456
    d addHorizontalLine.
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   457
11
9bc23682b68c national strings
Claus Gittinger <cg@exept.de>
parents: 10
diff changeset
   458
    l := d addTextLabel:(resources string:'Destination directories:').
0
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   459
    l adjust:#left; backgroundColor:dark; foregroundColor:Color white.
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   460
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   461
    cm := ComboBoxView on:stxBinDirHolder.
1
7ebb34d8f3df checkin from browser
Claus Gittinger <cg@exept.de>
parents: 0
diff changeset
   462
    cm list:self defaultBinDirs.
0
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   463
    d 
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   464
        addLabelledField:cm 
11
9bc23682b68c national strings
Claus Gittinger <cg@exept.de>
parents: 10
diff changeset
   465
        label:(resources string:'binaries')
0
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   466
        adjust:#left 
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   467
        tabable:true 
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   468
        from:0.0 to:1.0 separateAtX:0.25
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   469
        nameAs:'binaryBox'.
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   470
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   471
    (d componentAt:'binaryBox.label') backgroundColor:dark; foregroundColor:Color white.
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   472
24
2b61cca30b01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 23
diff changeset
   473
    cm := ComboBoxView on:stxLibBinDirHolder.
2b61cca30b01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 23
diff changeset
   474
    cm list:self defaultLibBinDirs.
2b61cca30b01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 23
diff changeset
   475
    d 
2b61cca30b01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 23
diff changeset
   476
        addLabelledField:cm 
2b61cca30b01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 23
diff changeset
   477
        label:(resources string:'libraries') 
2b61cca30b01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 23
diff changeset
   478
        adjust:#left 
2b61cca30b01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 23
diff changeset
   479
        tabable:true 
2b61cca30b01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 23
diff changeset
   480
        from:0.0 to:1.0 separateAtX:0.25
2b61cca30b01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 23
diff changeset
   481
        nameAs:'libraryBinBox'.
2b61cca30b01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 23
diff changeset
   482
2b61cca30b01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 23
diff changeset
   483
    (d componentAt:'libraryBinBox.label') backgroundColor:dark; foregroundColor:Color white.
2b61cca30b01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 23
diff changeset
   484
0
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   485
    cm := ComboBoxView on:stxLibDirHolder.
1
7ebb34d8f3df checkin from browser
Claus Gittinger <cg@exept.de>
parents: 0
diff changeset
   486
    cm list:self defaultLibDirs.
0
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   487
    d 
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   488
        addLabelledField:cm 
24
2b61cca30b01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 23
diff changeset
   489
        label:(resources string:'help files') 
0
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   490
        adjust:#left 
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   491
        tabable:true 
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   492
        from:0.0 to:1.0 separateAtX:0.25
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   493
        nameAs:'libraryBox'.
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   494
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   495
    (d componentAt:'libraryBox.label') backgroundColor:dark; foregroundColor:Color white.
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   496
5
16cff74f42b0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4
diff changeset
   497
    d addVerticalSpace.
16cff74f42b0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4
diff changeset
   498
    d addHorizontalLine.
16cff74f42b0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4
diff changeset
   499
    d addVerticalSpace.
16cff74f42b0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4
diff changeset
   500
11
9bc23682b68c national strings
Claus Gittinger <cg@exept.de>
parents: 10
diff changeset
   501
    (d addTextLabel:(resources string:'required:'))
5
16cff74f42b0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4
diff changeset
   502
        adjust:#left; foregroundColor:Color white backgroundColor:dark.
16cff74f42b0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4
diff changeset
   503
16cff74f42b0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4
diff changeset
   504
    d leftIndent:35.
11
9bc23682b68c national strings
Claus Gittinger <cg@exept.de>
parents: 10
diff changeset
   505
    (d addTextLabel:(resources string:'binaries (approx. %1 Mb)' with:binMegabytes printString))
5
16cff74f42b0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4
diff changeset
   506
        adjust:#left; foregroundColor:Color white backgroundColor:dark.
11
9bc23682b68c national strings
Claus Gittinger <cg@exept.de>
parents: 10
diff changeset
   507
    (d addTextLabel:(resources string:'libraries (approx. %1 Mb)' with:libMegabytes printString))
5
16cff74f42b0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4
diff changeset
   508
        adjust:#left; foregroundColor:Color white backgroundColor:dark.
16cff74f42b0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4
diff changeset
   509
    d leftIndent:0.
16cff74f42b0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4
diff changeset
   510
16cff74f42b0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4
diff changeset
   511
    d addVerticalSpace.
16cff74f42b0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4
diff changeset
   512
    d addHorizontalLine.
16cff74f42b0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4
diff changeset
   513
    d addVerticalSpace.
16cff74f42b0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4
diff changeset
   514
11
9bc23682b68c national strings
Claus Gittinger <cg@exept.de>
parents: 10
diff changeset
   515
    (d addTextLabel:(resources string:'optional:'))
5
16cff74f42b0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4
diff changeset
   516
        adjust:#left; foregroundColor:Color white backgroundColor:dark.
16cff74f42b0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4
diff changeset
   517
11
9bc23682b68c national strings
Claus Gittinger <cg@exept.de>
parents: 10
diff changeset
   518
    (d addCheckBox:((resources string:'doc files') , ' (+8 Mb)') on:installDocHolder)
5
16cff74f42b0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4
diff changeset
   519
        labelView foregroundColor:Color white backgroundColor:dark.
11
9bc23682b68c national strings
Claus Gittinger <cg@exept.de>
parents: 10
diff changeset
   520
    (d addCheckBox:((resources string:'stc & support files') , ' (+2 Mb)') on:installSTCHolder)
10
c9574685e157 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 9
diff changeset
   521
        labelView foregroundColor:Color white backgroundColor:dark.
c9574685e157 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 9
diff changeset
   522
c9574685e157 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 9
diff changeset
   523
    d addVerticalSpace.
c9574685e157 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 9
diff changeset
   524
    d addHorizontalLine.
c9574685e157 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 9
diff changeset
   525
    d addVerticalSpace.
c9574685e157 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 9
diff changeset
   526
11
9bc23682b68c national strings
Claus Gittinger <cg@exept.de>
parents: 10
diff changeset
   527
    (d addTextLabel:(resources string:'optional (but highly recommended):'))
10
c9574685e157 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 9
diff changeset
   528
        adjust:#left; foregroundColor:Color white backgroundColor:dark.
c9574685e157 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 9
diff changeset
   529
11
9bc23682b68c national strings
Claus Gittinger <cg@exept.de>
parents: 10
diff changeset
   530
    (d addCheckBox:((resources string:'smalltalk source files') , ' (+12 Mb)') on:installSourceHolder)
5
16cff74f42b0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4
diff changeset
   531
        labelView foregroundColor:Color white backgroundColor:dark.
11
9bc23682b68c national strings
Claus Gittinger <cg@exept.de>
parents: 10
diff changeset
   532
    (d addCheckBox:((resources string:'goodies') , ' (+0.5 Mb)') on:installGoodiesHolder)
5
16cff74f42b0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4
diff changeset
   533
        labelView foregroundColor:Color white backgroundColor:dark.
16cff74f42b0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4
diff changeset
   534
16cff74f42b0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4
diff changeset
   535
    d addVerticalSpace.
16cff74f42b0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4
diff changeset
   536
    d addHorizontalLine.
16cff74f42b0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4
diff changeset
   537
24
2b61cca30b01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 23
diff changeset
   538
    d addHelpButtonFor:'STXInstaller/installHelp.html';
2b61cca30b01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 23
diff changeset
   539
      addAbortButton; 
2b61cca30b01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 23
diff changeset
   540
      addOkButtonLabelled:(resources string:'install').
0
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   541
    d extent:400@300.
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   542
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   543
    d allViewBackground:dark.
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   544
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   545
    d openAtCenter.
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   546
    d accepted ifTrue:[
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   547
        stxLibDir := LastLibDir := stxLibDirHolder value.
24
2b61cca30b01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 23
diff changeset
   548
        stxLibBinDir := LastLibBinDir := stxLibBinDirHolder value.
0
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   549
        stxBinDir := LastBinDir := stxBinDirHolder value.
5
16cff74f42b0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4
diff changeset
   550
        installDocFiles := installDocHolder value.
16cff74f42b0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4
diff changeset
   551
        installSourceFiles := installSourceHolder value.
16cff74f42b0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4
diff changeset
   552
        installSTCFiles := installSTCHolder value.
16cff74f42b0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4
diff changeset
   553
        installGoodyFiles := installGoodiesHolder value.
1
7ebb34d8f3df checkin from browser
Claus Gittinger <cg@exept.de>
parents: 0
diff changeset
   554
        d destroy.
0
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   555
        ^ true
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   556
    ].
1
7ebb34d8f3df checkin from browser
Claus Gittinger <cg@exept.de>
parents: 0
diff changeset
   557
    d destroy.
0
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   558
    ^ false
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   559
1
7ebb34d8f3df checkin from browser
Claus Gittinger <cg@exept.de>
parents: 0
diff changeset
   560
    "Modified: 18.7.1996 / 19:43:38 / cg"
0
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   561
!
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   562
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   563
checkForExistingInstallationAndConfirm
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   564
    "look if there is another installation and confirm
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   565
     reinstalling; return true if ok, false if not"
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   566
1
7ebb34d8f3df checkin from browser
Claus Gittinger <cg@exept.de>
parents: 0
diff changeset
   567
    |whatToDo|
7ebb34d8f3df checkin from browser
Claus Gittinger <cg@exept.de>
parents: 0
diff changeset
   568
0
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   569
    stxLibDir asFilename exists ifTrue:[
1
7ebb34d8f3df checkin from browser
Claus Gittinger <cg@exept.de>
parents: 0
diff changeset
   570
        whatToDo := Dialog 
11
9bc23682b68c national strings
Claus Gittinger <cg@exept.de>
parents: 10
diff changeset
   571
                        choose:(resources 
9bc23682b68c national strings
Claus Gittinger <cg@exept.de>
parents: 10
diff changeset
   572
                                    string:'detected existing ST/X installation in %1' 
9bc23682b68c national strings
Claus Gittinger <cg@exept.de>
parents: 10
diff changeset
   573
                                      with:stxLibDir asText allBold)
9bc23682b68c national strings
Claus Gittinger <cg@exept.de>
parents: 10
diff changeset
   574
                        label:(resources string:'Attention')
9bc23682b68c national strings
Claus Gittinger <cg@exept.de>
parents: 10
diff changeset
   575
                        labels:(resources array:#('remove first' 'overwrite' 'cancel')) 
1
7ebb34d8f3df checkin from browser
Claus Gittinger <cg@exept.de>
parents: 0
diff changeset
   576
                        values:#(remove over nil) 
7ebb34d8f3df checkin from browser
Claus Gittinger <cg@exept.de>
parents: 0
diff changeset
   577
                        default:nil.     
7ebb34d8f3df checkin from browser
Claus Gittinger <cg@exept.de>
parents: 0
diff changeset
   578
        whatToDo isNil ifTrue:[^false].
7ebb34d8f3df checkin from browser
Claus Gittinger <cg@exept.de>
parents: 0
diff changeset
   579
        whatToDo == #remove ifTrue:[
23
42997b231783 double confirm removal of directory, if its name
Claus Gittinger <cg@exept.de>
parents: 22
diff changeset
   580
            ((stxLibDir findString:'stx') == 0
42997b231783 double confirm removal of directory, if its name
Claus Gittinger <cg@exept.de>
parents: 22
diff changeset
   581
            and:[(stxLibDir findString:'smalltalk') == 0]) ifTrue:[
42997b231783 double confirm removal of directory, if its name
Claus Gittinger <cg@exept.de>
parents: 22
diff changeset
   582
                "/ confirm again
42997b231783 double confirm removal of directory, if its name
Claus Gittinger <cg@exept.de>
parents: 22
diff changeset
   583
                (self confirm:(resources 
42997b231783 double confirm removal of directory, if its name
Claus Gittinger <cg@exept.de>
parents: 22
diff changeset
   584
                                string:'are you certain that the directory to remove
42997b231783 double confirm removal of directory, if its name
Claus Gittinger <cg@exept.de>
parents: 22
diff changeset
   585
is really an smalltalk directory ?
42997b231783 double confirm removal of directory, if its name
Claus Gittinger <cg@exept.de>
parents: 22
diff changeset
   586
42997b231783 double confirm removal of directory, if its name
Claus Gittinger <cg@exept.de>
parents: 22
diff changeset
   587
Remove it now ?')) ifFalse:[ ^ true].
42997b231783 double confirm removal of directory, if its name
Claus Gittinger <cg@exept.de>
parents: 22
diff changeset
   588
            ].
42997b231783 double confirm removal of directory, if its name
Claus Gittinger <cg@exept.de>
parents: 22
diff changeset
   589
1
7ebb34d8f3df checkin from browser
Claus Gittinger <cg@exept.de>
parents: 0
diff changeset
   590
            (OperatingSystem recursiveRemoveDirectory:stxLibDir)
7ebb34d8f3df checkin from browser
Claus Gittinger <cg@exept.de>
parents: 0
diff changeset
   591
            ifFalse:[
11
9bc23682b68c national strings
Claus Gittinger <cg@exept.de>
parents: 10
diff changeset
   592
                self warn:(resources string:'mhmh - could not remove old installation.')
1
7ebb34d8f3df checkin from browser
Claus Gittinger <cg@exept.de>
parents: 0
diff changeset
   593
            ].
7ebb34d8f3df checkin from browser
Claus Gittinger <cg@exept.de>
parents: 0
diff changeset
   594
        ].
7ebb34d8f3df checkin from browser
Claus Gittinger <cg@exept.de>
parents: 0
diff changeset
   595
        ^ true
7ebb34d8f3df checkin from browser
Claus Gittinger <cg@exept.de>
parents: 0
diff changeset
   596
"/        ^ DialogBox
7ebb34d8f3df checkin from browser
Claus Gittinger <cg@exept.de>
parents: 0
diff changeset
   597
"/            confirm:('detected existing installation in ' 
7ebb34d8f3df checkin from browser
Claus Gittinger <cg@exept.de>
parents: 0
diff changeset
   598
"/                     , stxLibDir asText allBold
7ebb34d8f3df checkin from browser
Claus Gittinger <cg@exept.de>
parents: 0
diff changeset
   599
"/                     , '\\continue & overwrite ?') withCRs 
7ebb34d8f3df checkin from browser
Claus Gittinger <cg@exept.de>
parents: 0
diff changeset
   600
"/           yesLabel:'overwrite' noLabel:'cancel'
0
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   601
        
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   602
    ].
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   603
    ^ true
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   604
1
7ebb34d8f3df checkin from browser
Claus Gittinger <cg@exept.de>
parents: 0
diff changeset
   605
    "Modified: 18.7.1996 / 20:01:36 / cg"
0
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   606
!
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   607
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   608
doInstall
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   609
    "install ST/X; return true if ok, false if not"
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   610
4
8b68fdf7c870 better looking; show command output
Claus Gittinger <cg@exept.de>
parents: 3
diff changeset
   611
    |progressView ok textView|
8b68fdf7c870 better looking; show command output
Claus Gittinger <cg@exept.de>
parents: 3
diff changeset
   612
8b68fdf7c870 better looking; show command output
Claus Gittinger <cg@exept.de>
parents: 3
diff changeset
   613
    textView := HVScrollableView for:TextCollector.
8b68fdf7c870 better looking; show command output
Claus Gittinger <cg@exept.de>
parents: 3
diff changeset
   614
    textView preferredExtent:(100 @ 250).
8b68fdf7c870 better looking; show command output
Claus Gittinger <cg@exept.de>
parents: 3
diff changeset
   615
    commandTraceView := textView scrolledView.
0
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   616
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   617
    progressView := ProgressIndicator
26
6975669b213b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 25
diff changeset
   618
                        inBoxWithLabel:'ST/X Installation' icon:(Depth8Image fromImage:Launcher aboutIcon)
0
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   619
                        text:#('ST/X Installation' '' '' '' '' '' '' '') asStringCollection
4
8b68fdf7c870 better looking; show command output
Claus Gittinger <cg@exept.de>
parents: 3
diff changeset
   620
                        abortable:true
8b68fdf7c870 better looking; show command output
Claus Gittinger <cg@exept.de>
parents: 3
diff changeset
   621
                        view:textView
8b68fdf7c870 better looking; show command output
Claus Gittinger <cg@exept.de>
parents: 3
diff changeset
   622
                        closeWhenDone:false.
8b68fdf7c870 better looking; show command output
Claus Gittinger <cg@exept.de>
parents: 3
diff changeset
   623
    progressView topView extent:(500 min:Display width) @ 300.
0
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   624
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   625
    ok := false.
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   626
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   627
    progressView showProgressOf:
4
8b68fdf7c870 better looking; show command output
Claus Gittinger <cg@exept.de>
parents: 3
diff changeset
   628
            [:progressValue :currentAction| |msg|
8b68fdf7c870 better looking; show command output
Claus Gittinger <cg@exept.de>
parents: 3
diff changeset
   629
8b68fdf7c870 better looking; show command output
Claus Gittinger <cg@exept.de>
parents: 3
diff changeset
   630
              Processor activeProcess withPriority:7 do:[
8b68fdf7c870 better looking; show command output
Claus Gittinger <cg@exept.de>
parents: 3
diff changeset
   631
                  actionPercentageHolder := progressValue.
8b68fdf7c870 better looking; show command output
Claus Gittinger <cg@exept.de>
parents: 3
diff changeset
   632
                  actionTextHolder := currentAction.
0
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   633
4
8b68fdf7c870 better looking; show command output
Claus Gittinger <cg@exept.de>
parents: 3
diff changeset
   634
                  (self createDirectories) ifTrue:[
8b68fdf7c870 better looking; show command output
Claus Gittinger <cg@exept.de>
parents: 3
diff changeset
   635
                      ok := self copyFiles
8b68fdf7c870 better looking; show command output
Claus Gittinger <cg@exept.de>
parents: 3
diff changeset
   636
                  ].
19
504c3ad987d1 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 18
diff changeset
   637
                  self createSymbolicLinks.
504c3ad987d1 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 18
diff changeset
   638
6
e08461c725fd show 100% when finished
Claus Gittinger <cg@exept.de>
parents: 5
diff changeset
   639
                  progressValue value:100.
e08461c725fd show 100% when finished
Claus Gittinger <cg@exept.de>
parents: 5
diff changeset
   640
11
9bc23682b68c national strings
Claus Gittinger <cg@exept.de>
parents: 10
diff changeset
   641
                  progressView topView abortButton label:(resources string:'continue').
4
8b68fdf7c870 better looking; show command output
Claus Gittinger <cg@exept.de>
parents: 3
diff changeset
   642
                  progressView topView abortButton action:[progressView topView hide].
11
9bc23682b68c national strings
Claus Gittinger <cg@exept.de>
parents: 10
diff changeset
   643
                  msg := (resources 
9bc23682b68c national strings
Claus Gittinger <cg@exept.de>
parents: 10
diff changeset
   644
                             array:#('ST/X Installation finished.' '' 'press continue ...' '' '' ''))
9bc23682b68c national strings
Claus Gittinger <cg@exept.de>
parents: 10
diff changeset
   645
                                 asStringCollection.
4
8b68fdf7c870 better looking; show command output
Claus Gittinger <cg@exept.de>
parents: 3
diff changeset
   646
                  actionTextHolder value:nil.
8b68fdf7c870 better looking; show command output
Claus Gittinger <cg@exept.de>
parents: 3
diff changeset
   647
                  actionTextHolder value:msg.
8b68fdf7c870 better looking; show command output
Claus Gittinger <cg@exept.de>
parents: 3
diff changeset
   648
              ] 
0
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   649
            ].
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   650
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   651
    ^ ok
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   652
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   653
    "Created: 17.7.1996 / 15:11:27 / cg"
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   654
    "Modified: 17.7.1996 / 15:24:27 / cg"
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   655
!
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   656
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   657
open
1
7ebb34d8f3df checkin from browser
Claus Gittinger <cg@exept.de>
parents: 0
diff changeset
   658
    self askAndInstall.
0
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   659
5
16cff74f42b0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4
diff changeset
   660
    "
16cff74f42b0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4
diff changeset
   661
     STXInstaller open
16cff74f42b0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4
diff changeset
   662
    "
1
7ebb34d8f3df checkin from browser
Claus Gittinger <cg@exept.de>
parents: 0
diff changeset
   663
!
7ebb34d8f3df checkin from browser
Claus Gittinger <cg@exept.de>
parents: 0
diff changeset
   664
7ebb34d8f3df checkin from browser
Claus Gittinger <cg@exept.de>
parents: 0
diff changeset
   665
postInstall
7ebb34d8f3df checkin from browser
Claus Gittinger <cg@exept.de>
parents: 0
diff changeset
   666
    "some messages at the end ..."
7ebb34d8f3df checkin from browser
Claus Gittinger <cg@exept.de>
parents: 0
diff changeset
   667
4
8b68fdf7c870 better looking; show command output
Claus Gittinger <cg@exept.de>
parents: 3
diff changeset
   668
    |shInfo cshInfo msg havePath|
1
7ebb34d8f3df checkin from browser
Claus Gittinger <cg@exept.de>
parents: 0
diff changeset
   669
11
9bc23682b68c national strings
Claus Gittinger <cg@exept.de>
parents: 10
diff changeset
   670
    msg := (resources string:'ST/X Installation complete.\\') withCRs.
1
7ebb34d8f3df checkin from browser
Claus Gittinger <cg@exept.de>
parents: 0
diff changeset
   671
    shInfo := ''.
7ebb34d8f3df checkin from browser
Claus Gittinger <cg@exept.de>
parents: 0
diff changeset
   672
    cshInfo := ''.
7ebb34d8f3df checkin from browser
Claus Gittinger <cg@exept.de>
parents: 0
diff changeset
   673
7ebb34d8f3df checkin from browser
Claus Gittinger <cg@exept.de>
parents: 0
diff changeset
   674
    havePath := true.
7ebb34d8f3df checkin from browser
Claus Gittinger <cg@exept.de>
parents: 0
diff changeset
   675
    (((OperatingSystem getEnvironment:'PATH')
7ebb34d8f3df checkin from browser
Claus Gittinger <cg@exept.de>
parents: 0
diff changeset
   676
        asCollectionOfSubstringsSeparatedBy:$:)
7ebb34d8f3df checkin from browser
Claus Gittinger <cg@exept.de>
parents: 0
diff changeset
   677
            includes:stxBinDir) ifFalse:[
7ebb34d8f3df checkin from browser
Claus Gittinger <cg@exept.de>
parents: 0
diff changeset
   678
7ebb34d8f3df checkin from browser
Claus Gittinger <cg@exept.de>
parents: 0
diff changeset
   679
        havePath := false.
7ebb34d8f3df checkin from browser
Claus Gittinger <cg@exept.de>
parents: 0
diff changeset
   680
        shInfo  := 'PATH=$PATH:' , stxBinDir , ' ; export PATH\'.
7ebb34d8f3df checkin from browser
Claus Gittinger <cg@exept.de>
parents: 0
diff changeset
   681
        cshInfo := 'set path=($path ' , stxBinDir , ')\'.
11
9bc23682b68c national strings
Claus Gittinger <cg@exept.de>
parents: 10
diff changeset
   682
        msg := msg , (resources string:'%1 is not in your PATH.\You should change your ".login" and/or ".profile" files to include it.\\'
9bc23682b68c national strings
Claus Gittinger <cg@exept.de>
parents: 10
diff changeset
   683
                                  with:stxBinDir asText allBold) withCRs.
1
7ebb34d8f3df checkin from browser
Claus Gittinger <cg@exept.de>
parents: 0
diff changeset
   684
    ].
7ebb34d8f3df checkin from browser
Claus Gittinger <cg@exept.de>
parents: 0
diff changeset
   685
7ebb34d8f3df checkin from browser
Claus Gittinger <cg@exept.de>
parents: 0
diff changeset
   686
    (stxLibDir ~= '/usr/local/lib/smalltalk'
7ebb34d8f3df checkin from browser
Claus Gittinger <cg@exept.de>
parents: 0
diff changeset
   687
    and:[stxLibDir ~= '/usr/lib/smalltalk']) ifTrue:[
11
9bc23682b68c national strings
Claus Gittinger <cg@exept.de>
parents: 10
diff changeset
   688
        msg := msg , (resources string:'The library directory is not a standard ST/X library directory\("/usr/local/lib/smalltalk" or "/usr/lib/smalltalk").\You have to define the %1 environment variable\as %2 before ST/X can be started.\'
9bc23682b68c national strings
Claus Gittinger <cg@exept.de>
parents: 10
diff changeset
   689
                                  with:'STX_LIBDIR' asText allBold 
9bc23682b68c national strings
Claus Gittinger <cg@exept.de>
parents: 10
diff changeset
   690
                                  with:stxLibDir asText allBold) withCRs.
1
7ebb34d8f3df checkin from browser
Claus Gittinger <cg@exept.de>
parents: 0
diff changeset
   691
        havePath ifFalse:[
11
9bc23682b68c national strings
Claus Gittinger <cg@exept.de>
parents: 10
diff changeset
   692
            msg := msg , (resources string:'The above mentioned files are also a good place to do this.\') withCRs.
1
7ebb34d8f3df checkin from browser
Claus Gittinger <cg@exept.de>
parents: 0
diff changeset
   693
        ] ifTrue:[
11
9bc23682b68c national strings
Claus Gittinger <cg@exept.de>
parents: 10
diff changeset
   694
            msg := msg , (resources string:'The ".login" and/or ".profile" files are a good place to do this.\') withCRs.
1
7ebb34d8f3df checkin from browser
Claus Gittinger <cg@exept.de>
parents: 0
diff changeset
   695
        ].
7ebb34d8f3df checkin from browser
Claus Gittinger <cg@exept.de>
parents: 0
diff changeset
   696
7ebb34d8f3df checkin from browser
Claus Gittinger <cg@exept.de>
parents: 0
diff changeset
   697
        shInfo := shInfo , 'STX_LIBDIR=' , stxLibDir , ' ; export STX_LIBDIR\'.
7ebb34d8f3df checkin from browser
Claus Gittinger <cg@exept.de>
parents: 0
diff changeset
   698
        cshInfo := cshInfo , 'setenv STX_LIBDIR ' , stxLibDir , '\'.
7ebb34d8f3df checkin from browser
Claus Gittinger <cg@exept.de>
parents: 0
diff changeset
   699
    ].
7ebb34d8f3df checkin from browser
Claus Gittinger <cg@exept.de>
parents: 0
diff changeset
   700
7ebb34d8f3df checkin from browser
Claus Gittinger <cg@exept.de>
parents: 0
diff changeset
   701
    shInfo notEmpty ifTrue:[
11
9bc23682b68c national strings
Claus Gittinger <cg@exept.de>
parents: 10
diff changeset
   702
        '*********************************************************' errorPrintCR.
9bc23682b68c national strings
Claus Gittinger <cg@exept.de>
parents: 10
diff changeset
   703
        (resources string:'Message from the ST/X Installer:\\') withCRs errorPrintCR.
9bc23682b68c national strings
Claus Gittinger <cg@exept.de>
parents: 10
diff changeset
   704
        (resources string:'Please add the following to your ".profile" file:') withCRs errorPrintCR.
1
7ebb34d8f3df checkin from browser
Claus Gittinger <cg@exept.de>
parents: 0
diff changeset
   705
        '' errorPrintCR.
7ebb34d8f3df checkin from browser
Claus Gittinger <cg@exept.de>
parents: 0
diff changeset
   706
        shInfo withCRs errorPrintCR.
7ebb34d8f3df checkin from browser
Claus Gittinger <cg@exept.de>
parents: 0
diff changeset
   707
        '' errorPrintCR.
11
9bc23682b68c national strings
Claus Gittinger <cg@exept.de>
parents: 10
diff changeset
   708
        (resources string:'or (if you use csh/tcsh), add to your ".login" file:') withCRs errorPrintCR.
1
7ebb34d8f3df checkin from browser
Claus Gittinger <cg@exept.de>
parents: 0
diff changeset
   709
        '' errorPrintCR.
7ebb34d8f3df checkin from browser
Claus Gittinger <cg@exept.de>
parents: 0
diff changeset
   710
        cshInfo withCRs errorPrintCR.
7ebb34d8f3df checkin from browser
Claus Gittinger <cg@exept.de>
parents: 0
diff changeset
   711
        '' errorPrintCR.
11
9bc23682b68c national strings
Claus Gittinger <cg@exept.de>
parents: 10
diff changeset
   712
        '*********************************************************' errorPrintCR.
1
7ebb34d8f3df checkin from browser
Claus Gittinger <cg@exept.de>
parents: 0
diff changeset
   713
    ].
7ebb34d8f3df checkin from browser
Claus Gittinger <cg@exept.de>
parents: 0
diff changeset
   714
    self information:msg.
7ebb34d8f3df checkin from browser
Claus Gittinger <cg@exept.de>
parents: 0
diff changeset
   715
7ebb34d8f3df checkin from browser
Claus Gittinger <cg@exept.de>
parents: 0
diff changeset
   716
    "
7ebb34d8f3df checkin from browser
Claus Gittinger <cg@exept.de>
parents: 0
diff changeset
   717
     STXInstaller new postInstall
7ebb34d8f3df checkin from browser
Claus Gittinger <cg@exept.de>
parents: 0
diff changeset
   718
    "
7ebb34d8f3df checkin from browser
Claus Gittinger <cg@exept.de>
parents: 0
diff changeset
   719
7ebb34d8f3df checkin from browser
Claus Gittinger <cg@exept.de>
parents: 0
diff changeset
   720
    "Modified: 18.7.1996 / 22:10:42 / cg"
25
42ee3e7ced09 remove local symbolic links (if any) in doc/online
Claus Gittinger <cg@exept.de>
parents: 24
diff changeset
   721
!
42ee3e7ced09 remove local symbolic links (if any) in doc/online
Claus Gittinger <cg@exept.de>
parents: 24
diff changeset
   722
42ee3e7ced09 remove local symbolic links (if any) in doc/online
Claus Gittinger <cg@exept.de>
parents: 24
diff changeset
   723
preInstall
42ee3e7ced09 remove local symbolic links (if any) in doc/online
Claus Gittinger <cg@exept.de>
parents: 24
diff changeset
   724
    "clobber the doc directory, to avoid copying cyclic symbolic links"
42ee3e7ced09 remove local symbolic links (if any) in doc/online
Claus Gittinger <cg@exept.de>
parents: 24
diff changeset
   725
42ee3e7ced09 remove local symbolic links (if any) in doc/online
Claus Gittinger <cg@exept.de>
parents: 24
diff changeset
   726
    |f|
42ee3e7ced09 remove local symbolic links (if any) in doc/online
Claus Gittinger <cg@exept.de>
parents: 24
diff changeset
   727
42ee3e7ced09 remove local symbolic links (if any) in doc/online
Claus Gittinger <cg@exept.de>
parents: 24
diff changeset
   728
    f := '../../doc/online/english/german' asFilename.
42ee3e7ced09 remove local symbolic links (if any) in doc/online
Claus Gittinger <cg@exept.de>
parents: 24
diff changeset
   729
    f exists ifTrue:[
42ee3e7ced09 remove local symbolic links (if any) in doc/online
Claus Gittinger <cg@exept.de>
parents: 24
diff changeset
   730
        f isSymbolicLink ifTrue:[
42ee3e7ced09 remove local symbolic links (if any) in doc/online
Claus Gittinger <cg@exept.de>
parents: 24
diff changeset
   731
            OperatingSystem executeCommand:'(cd ../../doc/online; make clobber) >/dev/null 2>/dev/null'
42ee3e7ced09 remove local symbolic links (if any) in doc/online
Claus Gittinger <cg@exept.de>
parents: 24
diff changeset
   732
        ]
42ee3e7ced09 remove local symbolic links (if any) in doc/online
Claus Gittinger <cg@exept.de>
parents: 24
diff changeset
   733
    ]
42ee3e7ced09 remove local symbolic links (if any) in doc/online
Claus Gittinger <cg@exept.de>
parents: 24
diff changeset
   734
42ee3e7ced09 remove local symbolic links (if any) in doc/online
Claus Gittinger <cg@exept.de>
parents: 24
diff changeset
   735
    "
42ee3e7ced09 remove local symbolic links (if any) in doc/online
Claus Gittinger <cg@exept.de>
parents: 24
diff changeset
   736
     STXInstaller new preInstall
42ee3e7ced09 remove local symbolic links (if any) in doc/online
Claus Gittinger <cg@exept.de>
parents: 24
diff changeset
   737
    "
42ee3e7ced09 remove local symbolic links (if any) in doc/online
Claus Gittinger <cg@exept.de>
parents: 24
diff changeset
   738
42ee3e7ced09 remove local symbolic links (if any) in doc/online
Claus Gittinger <cg@exept.de>
parents: 24
diff changeset
   739
    "Modified: 18.7.1996 / 22:10:42 / cg"
0
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   740
! !
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   741
28
b3a8378dd626 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 27
diff changeset
   742
!STXInstaller class methodsFor:'documentation'!
0
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   743
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   744
version
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   745
    ^ '$Header$'
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   746
! !