STXInstaller.st
author Claus Gittinger <cg@exept.de>
Wed, 28 Apr 1999 09:57:39 +0200
changeset 1118 ebecbe5d4b6b
parent 1117 657dde1e749d
child 1119 556bb6c9e36c
permissions -rw-r--r--
checkin from browser
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
678
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
     3
		installSourceFiles installSTCFiles installGoodyFiles fullDir
24
2b61cca30b01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 23
diff changeset
     4
		actionPercentageHolder actionTextHolder commandTraceView
1010
d744cc925443 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 793
diff changeset
     5
		resources dfHolder copyProcess installWhat'
678
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
     6
	classVariableNames:'LastBinDir LastLibBinDir LastLibDir LastFullDir'
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.
1117
657dde1e749d new default destination: /opt/smalltalk/<RELEASE>
Claus Gittinger <cg@exept.de>
parents: 1010
diff changeset
    28
    dirs add:'/opt/smalltalk/' , self smalltalkRelease , '/bin'.
1
7ebb34d8f3df checkin from browser
Claus Gittinger <cg@exept.de>
parents: 0
diff changeset
    29
    dirs add:'/usr/local/bin'.
7ebb34d8f3df checkin from browser
Claus Gittinger <cg@exept.de>
parents: 0
diff changeset
    30
    dirs add:'/usr/bin'.
7ebb34d8f3df checkin from browser
Claus Gittinger <cg@exept.de>
parents: 0
diff changeset
    31
    dirs add:(Filename homeDirectory constructString:'bin').
14
4c8640a78f2a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 13
diff changeset
    32
    dirs add:((Filename homeDirectory 
1117
657dde1e749d new default destination: /opt/smalltalk/<RELEASE>
Claus Gittinger <cg@exept.de>
parents: 1010
diff changeset
    33
                            construct:'stx')
657dde1e749d new default destination: /opt/smalltalk/<RELEASE>
Claus Gittinger <cg@exept.de>
parents: 1010
diff changeset
    34
                            constructString:'bin').
1
7ebb34d8f3df checkin from browser
Claus Gittinger <cg@exept.de>
parents: 0
diff changeset
    35
    dirs add:'/tmp/stxbin'.
3
7b048cdcc856 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2
diff changeset
    36
    ('/home' asFilename exists and:['/home' asFilename isDirectory]) ifTrue:[
7b048cdcc856 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2
diff changeset
    37
        dirs add:'/home/stx/bin'.
7b048cdcc856 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2
diff changeset
    38
    ].
7b048cdcc856 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2
diff changeset
    39
    ('/home2' asFilename exists and:['/home2' asFilename isDirectory]) ifTrue:[
7b048cdcc856 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2
diff changeset
    40
        dirs add:'/home2/stx/bin'.
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
7b048cdcc856 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2
diff changeset
    43
"/    dirs := dirs select:[:path | 
7b048cdcc856 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2
diff changeset
    44
"/                            |f|
7b048cdcc856 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2
diff changeset
    45
"/
7b048cdcc856 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2
diff changeset
    46
"/                            f := path asFilename.
7b048cdcc856 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2
diff changeset
    47
"/                            f exists and:[f isDirectory]].
1117
657dde1e749d new default destination: /opt/smalltalk/<RELEASE>
Claus Gittinger <cg@exept.de>
parents: 1010
diff changeset
    48
    ^ dirs "sort"
1
7ebb34d8f3df checkin from browser
Claus Gittinger <cg@exept.de>
parents: 0
diff changeset
    49
7ebb34d8f3df checkin from browser
Claus Gittinger <cg@exept.de>
parents: 0
diff changeset
    50
    "Created: 18.7.1996 / 19:43:00 / cg"
7ebb34d8f3df checkin from browser
Claus Gittinger <cg@exept.de>
parents: 0
diff changeset
    51
    "Modified: 18.7.1996 / 19:45:08 / cg"
7ebb34d8f3df checkin from browser
Claus Gittinger <cg@exept.de>
parents: 0
diff changeset
    52
!
7ebb34d8f3df checkin from browser
Claus Gittinger <cg@exept.de>
parents: 0
diff changeset
    53
678
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
    54
defaultFullDirs
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
    55
    |dirs|
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
    56
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
    57
    dirs := OrderedCollection new.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
    58
    dirs add:(Filename homeDirectory constructString:'stxDevelop').
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
    59
    dirs add:((Filename homeDirectory 
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
    60
                            construct:'stx')
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
    61
                            constructString:'develop').
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
    62
    ('/home' asFilename exists and:['/home' asFilename isDirectory]) ifTrue:[
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
    63
        dirs add:'/home/stx/develop'.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
    64
    ].
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
    65
1117
657dde1e749d new default destination: /opt/smalltalk/<RELEASE>
Claus Gittinger <cg@exept.de>
parents: 1010
diff changeset
    66
    ^ dirs "sort"
678
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
    67
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
    68
    "Modified: / 18.7.1996 / 19:45:08 / cg"
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
    69
    "Created: / 25.2.1998 / 17:14:43 / cg"
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
    70
!
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
    71
24
2b61cca30b01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 23
diff changeset
    72
defaultLibBinDirs
2b61cca30b01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 23
diff changeset
    73
    |dirs|
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
    dirs := OrderedCollection new.
2b61cca30b01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 23
diff changeset
    76
    dirs add:'/usr/local/lib'.
2b61cca30b01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 23
diff changeset
    77
    dirs add:'/usr/lib'.
2b61cca30b01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 23
diff changeset
    78
    dirs add:'/lib'.
2b61cca30b01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 23
diff changeset
    79
    dirs add:(Filename homeDirectory 
2b61cca30b01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 23
diff changeset
    80
                            constructString:'lib').
2b61cca30b01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 23
diff changeset
    81
2b61cca30b01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 23
diff changeset
    82
    dirs add:((Filename homeDirectory 
2b61cca30b01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 23
diff changeset
    83
                            construct:'stx')
2b61cca30b01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 23
diff changeset
    84
                            constructString:'lib').
2b61cca30b01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 23
diff changeset
    85
    dirs add:'/tmp/stxlib'.
2b61cca30b01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 23
diff changeset
    86
    dirs add:'/home/stx/lib'.
2b61cca30b01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 23
diff changeset
    87
    dirs add:'/home2/stx/lib'.
2b61cca30b01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 23
diff changeset
    88
2b61cca30b01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 23
diff changeset
    89
    ^ dirs sort
2b61cca30b01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 23
diff changeset
    90
2b61cca30b01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 23
diff changeset
    91
    "Created: 18.7.1996 / 19:43:21 / cg"
2b61cca30b01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 23
diff changeset
    92
    "Modified: 18.7.1996 / 19:46:04 / cg"
2b61cca30b01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 23
diff changeset
    93
!
2b61cca30b01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 23
diff changeset
    94
1
7ebb34d8f3df checkin from browser
Claus Gittinger <cg@exept.de>
parents: 0
diff changeset
    95
defaultLibDirs
7ebb34d8f3df checkin from browser
Claus Gittinger <cg@exept.de>
parents: 0
diff changeset
    96
    |dirs|
7ebb34d8f3df checkin from browser
Claus Gittinger <cg@exept.de>
parents: 0
diff changeset
    97
7ebb34d8f3df checkin from browser
Claus Gittinger <cg@exept.de>
parents: 0
diff changeset
    98
    dirs := OrderedCollection new.
1117
657dde1e749d new default destination: /opt/smalltalk/<RELEASE>
Claus Gittinger <cg@exept.de>
parents: 1010
diff changeset
    99
    dirs add:'/opt/smalltalk/' , self smalltalkRelease , '/lib'.
1
7ebb34d8f3df checkin from browser
Claus Gittinger <cg@exept.de>
parents: 0
diff changeset
   100
    dirs add:'/usr/local/lib/smalltalk'.
7ebb34d8f3df checkin from browser
Claus Gittinger <cg@exept.de>
parents: 0
diff changeset
   101
    dirs add:'/usr/lib/smalltalk'.
7ebb34d8f3df checkin from browser
Claus Gittinger <cg@exept.de>
parents: 0
diff changeset
   102
    dirs add:((Filename homeDirectory 
7ebb34d8f3df checkin from browser
Claus Gittinger <cg@exept.de>
parents: 0
diff changeset
   103
                            construct:'lib')
7ebb34d8f3df checkin from browser
Claus Gittinger <cg@exept.de>
parents: 0
diff changeset
   104
                            constructString:'smalltalk').
15
ffe9991b03ba checkin from browser
Claus Gittinger <cg@exept.de>
parents: 14
diff changeset
   105
    dirs add:((Filename homeDirectory 
ffe9991b03ba checkin from browser
Claus Gittinger <cg@exept.de>
parents: 14
diff changeset
   106
                            construct:'stx')
ffe9991b03ba checkin from browser
Claus Gittinger <cg@exept.de>
parents: 14
diff changeset
   107
                            constructString:'lib').
1
7ebb34d8f3df checkin from browser
Claus Gittinger <cg@exept.de>
parents: 0
diff changeset
   108
    dirs add:'/tmp/stxlib'.
7ebb34d8f3df checkin from browser
Claus Gittinger <cg@exept.de>
parents: 0
diff changeset
   109
    dirs add:'/home/stx/lib'.
7ebb34d8f3df checkin from browser
Claus Gittinger <cg@exept.de>
parents: 0
diff changeset
   110
    dirs add:'/home2/stx/lib'.
3
7b048cdcc856 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2
diff changeset
   111
7b048cdcc856 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2
diff changeset
   112
"/    dirs := dirs select:[:path | 
7b048cdcc856 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2
diff changeset
   113
"/                            |f|
7b048cdcc856 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2
diff changeset
   114
"/
7b048cdcc856 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2
diff changeset
   115
"/                            f := path asFilename.
7b048cdcc856 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2
diff changeset
   116
"/                            f exists and:[f isDirectory]].
1117
657dde1e749d new default destination: /opt/smalltalk/<RELEASE>
Claus Gittinger <cg@exept.de>
parents: 1010
diff changeset
   117
    ^ dirs "sort"
1
7ebb34d8f3df checkin from browser
Claus Gittinger <cg@exept.de>
parents: 0
diff changeset
   118
7ebb34d8f3df checkin from browser
Claus Gittinger <cg@exept.de>
parents: 0
diff changeset
   119
    "Created: 18.7.1996 / 19:43:21 / cg"
7ebb34d8f3df checkin from browser
Claus Gittinger <cg@exept.de>
parents: 0
diff changeset
   120
    "Modified: 18.7.1996 / 19:46:04 / cg"
11
9bc23682b68c national strings
Claus Gittinger <cg@exept.de>
parents: 10
diff changeset
   121
!
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
directoriesToMake
9bc23682b68c national strings
Claus Gittinger <cg@exept.de>
parents: 10
diff changeset
   124
    |dirsToMake|
0
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   125
11
9bc23682b68c national strings
Claus Gittinger <cg@exept.de>
parents: 10
diff changeset
   126
    dirsToMake := OrderedCollection new.
1010
d744cc925443 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 793
diff changeset
   127
    installWhat == #full ifTrue:[
678
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   128
        dirsToMake add:fullDir.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   129
    ] ifFalse:[
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   130
        dirsToMake add:stxBinDir.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   131
        dirsToMake add:stxLibDir.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   132
        dirsToMake add:stxLibBinDir.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   133
        dirsToMake add:(stxLibDir asFilename constructString:'configurations').
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   134
        dirsToMake add:(stxLibDir asFilename constructString:'doc').
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   135
        dirsToMake add:(stxLibDir asFilename constructString:'doc/online').
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   136
        dirsToMake add:(stxLibDir asFilename constructString:'doc/online/english').
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   137
        dirsToMake add:(stxLibDir asFilename constructString:'doc/online/german').
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   138
        dirsToMake add:(stxLibDir asFilename constructString:'doc/online/french').
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   139
        dirsToMake add:(stxLibDir asFilename constructString:'doc/online/italian').
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   140
        dirsToMake add:(stxLibDir asFilename constructString:'include').
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   141
        dirsToMake add:(stxLibDir asFilename constructString:'resources').
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   142
        dirsToMake add:(stxLibDir asFilename constructString:'binary').
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   143
        dirsToMake add:(stxLibDir asFilename constructString:'bitmaps').
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   144
        dirsToMake add:(stxLibDir asFilename constructString:'goodies').
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   145
    ].
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   146
    ^ dirsToMake
0
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   147
678
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   148
    "Modified: / 25.2.1998 / 17:15:19 / cg"
11
9bc23682b68c national strings
Claus Gittinger <cg@exept.de>
parents: 10
diff changeset
   149
!
9bc23682b68c national strings
Claus Gittinger <cg@exept.de>
parents: 10
diff changeset
   150
73
2087134eea96 better messages;
Claus Gittinger <cg@exept.de>
parents: 31
diff changeset
   151
listOfOptionalPackages
2087134eea96 better messages;
Claus Gittinger <cg@exept.de>
parents: 31
diff changeset
   152
    ^ #(
2087134eea96 better messages;
Claus Gittinger <cg@exept.de>
parents: 31
diff changeset
   153
        'libDB'
2087134eea96 better messages;
Claus Gittinger <cg@exept.de>
parents: 31
diff changeset
   154
        'clients/CBrowser'
2087134eea96 better messages;
Claus Gittinger <cg@exept.de>
parents: 31
diff changeset
   155
        'libcompat'
2087134eea96 better messages;
Claus Gittinger <cg@exept.de>
parents: 31
diff changeset
   156
        'libxt'
2087134eea96 better messages;
Claus Gittinger <cg@exept.de>
parents: 31
diff changeset
   157
2087134eea96 better messages;
Claus Gittinger <cg@exept.de>
parents: 31
diff changeset
   158
2087134eea96 better messages;
Claus Gittinger <cg@exept.de>
parents: 31
diff changeset
   159
        "/ mhmh - these should not be needed here ...
2087134eea96 better messages;
Claus Gittinger <cg@exept.de>
parents: 31
diff changeset
   160
2087134eea96 better messages;
Claus Gittinger <cg@exept.de>
parents: 31
diff changeset
   161
        'projects/smalltalk/bitmaps/javaImages'
2087134eea96 better messages;
Claus Gittinger <cg@exept.de>
parents: 31
diff changeset
   162
        'doc/online/english/overview/icons'
2087134eea96 better messages;
Claus Gittinger <cg@exept.de>
parents: 31
diff changeset
   163
      )
2087134eea96 better messages;
Claus Gittinger <cg@exept.de>
parents: 31
diff changeset
   164
2087134eea96 better messages;
Claus Gittinger <cg@exept.de>
parents: 31
diff changeset
   165
    "Created: 2.3.1997 / 12:39:59 / cg"
2087134eea96 better messages;
Claus Gittinger <cg@exept.de>
parents: 31
diff changeset
   166
    "Modified: 2.3.1997 / 13:24:41 / cg"
2087134eea96 better messages;
Claus Gittinger <cg@exept.de>
parents: 31
diff changeset
   167
!
2087134eea96 better messages;
Claus Gittinger <cg@exept.de>
parents: 31
diff changeset
   168
1117
657dde1e749d new default destination: /opt/smalltalk/<RELEASE>
Claus Gittinger <cg@exept.de>
parents: 1010
diff changeset
   169
smalltalkRelease
657dde1e749d new default destination: /opt/smalltalk/<RELEASE>
Claus Gittinger <cg@exept.de>
parents: 1010
diff changeset
   170
    ^ Smalltalk majorVersionNr printString 
657dde1e749d new default destination: /opt/smalltalk/<RELEASE>
Claus Gittinger <cg@exept.de>
parents: 1010
diff changeset
   171
               , '.' , Smalltalk minorVersionNr printString
657dde1e749d new default destination: /opt/smalltalk/<RELEASE>
Claus Gittinger <cg@exept.de>
parents: 1010
diff changeset
   172
               , '.' , Smalltalk revisionNr printString.
657dde1e749d new default destination: /opt/smalltalk/<RELEASE>
Claus Gittinger <cg@exept.de>
parents: 1010
diff changeset
   173
!
657dde1e749d new default destination: /opt/smalltalk/<RELEASE>
Claus Gittinger <cg@exept.de>
parents: 1010
diff changeset
   174
11
9bc23682b68c national strings
Claus Gittinger <cg@exept.de>
parents: 10
diff changeset
   175
specOfFilesToCopy
9bc23682b68c national strings
Claus Gittinger <cg@exept.de>
parents: 10
diff changeset
   176
    |fileSpec|
0
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   177
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   178
    fileSpec := #(
27
8c5195f9508a also install stx.
Claus Gittinger <cg@exept.de>
parents: 26
diff changeset
   179
                "/ name                             destination  subDir             required mode      
12
6cb00d713d4d LICENSE texts must always be installed
Claus Gittinger <cg@exept.de>
parents: 11
diff changeset
   180
                ( 'projects/smalltalk/smalltalk'        #bin     nil                  true  '755' )
27
8c5195f9508a also install stx.
Claus Gittinger <cg@exept.de>
parents: 26
diff changeset
   181
                ( 'projects/smalltalk/stx'              #bin     nil                  true  '755' )
12
6cb00d713d4d LICENSE texts must always be installed
Claus Gittinger <cg@exept.de>
parents: 11
diff changeset
   182
                ( 'projects/smalltalk/include'          #lib     nil                  true  '644' )
277
935f9a055594 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 276
diff changeset
   183
                ( 'COPYRIGHT'                           #lib     nil                  true  '644' )
12
6cb00d713d4d LICENSE texts must always be installed
Claus Gittinger <cg@exept.de>
parents: 11
diff changeset
   184
                ( 'projects/smalltalk/*.rc'             #lib     nil                  true  '644' )
6cb00d713d4d LICENSE texts must always be installed
Claus Gittinger <cg@exept.de>
parents: 11
diff changeset
   185
                ( 'projects/smalltalk/patches'          #lib     nil                  true  '644' )
6cb00d713d4d LICENSE texts must always be installed
Claus Gittinger <cg@exept.de>
parents: 11
diff changeset
   186
                ( 'projects/smalltalk/bitmaps'          #lib     nil                  true  '644' )
6cb00d713d4d LICENSE texts must always be installed
Claus Gittinger <cg@exept.de>
parents: 11
diff changeset
   187
                ( 'projects/smalltalk/resources'        #lib     nil                  true  '644' )
6cb00d713d4d LICENSE texts must always be installed
Claus Gittinger <cg@exept.de>
parents: 11
diff changeset
   188
                ( 'projects/smalltalk/lib'              #lib     nil                  true  '644' )
16
e41abdee193f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 15
diff changeset
   189
                ( 'doc/online/german/LICENCE.STX.html'  #lib     'doc/online/german'  true  '644' )
277
935f9a055594 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 276
diff changeset
   190
                ( '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
   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
    installDocFiles ifTrue:[
16cff74f42b0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4
diff changeset
   194
        fileSpec := fileSpec , #(
24
2b61cca30b01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 23
diff changeset
   195
                ( 'doc'                                  #lib     nil        false '644' )
5
16cff74f42b0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4
diff changeset
   196
        ).
16cff74f42b0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4
diff changeset
   197
    ].
16cff74f42b0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4
diff changeset
   198
9
9f31213107b8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 8
diff changeset
   199
    installSourceFiles ifTrue:[
9f31213107b8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 8
diff changeset
   200
        fileSpec := fileSpec , #(
24
2b61cca30b01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 23
diff changeset
   201
                ( 'projects/smalltalk/source'                #lib        nil        false '644' )
9
9f31213107b8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 8
diff changeset
   202
        ).
9f31213107b8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 8
diff changeset
   203
    ].
9f31213107b8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 8
diff changeset
   204
5
16cff74f42b0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4
diff changeset
   205
    installSTCFiles ifTrue:[
16cff74f42b0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4
diff changeset
   206
        fileSpec := fileSpec , #(
24
2b61cca30b01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 23
diff changeset
   207
                ( 'stc/stc'                                  #bin        nil              false '755' )
2b61cca30b01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 23
diff changeset
   208
                ( 'rules/stmkmp'                             #bin        nil              false '755' )
2b61cca30b01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 23
diff changeset
   209
                ( 'rules/stmkmf'                             #bin        nil              false '755' )
2b61cca30b01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 23
diff changeset
   210
                ( 'include'                                  #lib        nil              false '644' )
2b61cca30b01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 23
diff changeset
   211
                ( 'configurations'                           #lib        nil              false '644' )
2b61cca30b01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 23
diff changeset
   212
                ( 'configurations/PACKS'                     #lib        'configurations' false '644' )
2b61cca30b01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 23
diff changeset
   213
                ( 'configurations/my*'                       #lib        'configurations' false '644' )
2b61cca30b01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 23
diff changeset
   214
                ( 'configurations/vendor*'                   #lib        'configurations' false '644' )
2b61cca30b01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 23
diff changeset
   215
                ( 'rules'                                    #lib        nil              false '644' )
5
16cff74f42b0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4
diff changeset
   216
276
c8b7fd1fcec5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 237
diff changeset
   217
                ( 'support/VGL/vogl/src/libvogl.*'           #lib        'lib'            false '644' )
c8b7fd1fcec5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 237
diff changeset
   218
                ( 'support/VGL/vogl/src/*.h'                 #lib        'include'        false '644' )
c8b7fd1fcec5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 237
diff changeset
   219
                ( 'support/DLD/dld-3.2.5/libdld.*'           #lib        'lib'            false '644' )
c8b7fd1fcec5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 237
diff changeset
   220
c8b7fd1fcec5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 237
diff changeset
   221
                ( 'goodies/persistency/db-1.6/PORT/libdb.*'  #lib        'lib'            false '644' )
0
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   222
276
c8b7fd1fcec5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 237
diff changeset
   223
                ( 'librun/librun.*'                          #libBin     nil              false '644' )
c8b7fd1fcec5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 237
diff changeset
   224
                ( 'libbasic/libbasic.*'                      #libBin     nil              false '644' )
c8b7fd1fcec5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 237
diff changeset
   225
                ( 'libbasic2/libbasic2.*'                    #libBin     nil              false '644' )
c8b7fd1fcec5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 237
diff changeset
   226
                ( 'libbasic3/libbasic3.*'                    #libBin     nil              false '644' )
c8b7fd1fcec5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 237
diff changeset
   227
                ( 'libhtml/libhtml.*'                        #libBin     nil              false '644' )
c8b7fd1fcec5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 237
diff changeset
   228
                ( 'libcomp/libcomp.*'                        #libBin     nil              false '644' )
c8b7fd1fcec5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 237
diff changeset
   229
                ( 'libcomp/ObjFL*.o'                         #libBin     nil              false '644' )
c8b7fd1fcec5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 237
diff changeset
   230
                ( 'libcomp/ObjFL*.obj'                       #libBin     nil              false '644' )
c8b7fd1fcec5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 237
diff changeset
   231
                ( 'libcomp/ObjFL*.so'                        #libBin     nil              false '644' )
c8b7fd1fcec5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 237
diff changeset
   232
                ( 'libview/libview.*'                        #libBin     nil              false '644' )
c8b7fd1fcec5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 237
diff changeset
   233
                ( 'libview/GLX*.o'                           #libBin     nil              false '644' )
c8b7fd1fcec5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 237
diff changeset
   234
                ( 'libview/GLX*.obj'                         #libBin     nil              false '644' )
c8b7fd1fcec5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 237
diff changeset
   235
                ( 'libview/GLX*.so'                          #libBin     nil              false '644' )
c8b7fd1fcec5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 237
diff changeset
   236
                ( 'libview/XW*.o'                            #libBin     nil              false '644' )
c8b7fd1fcec5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 237
diff changeset
   237
                ( 'libview/XW*.obj'                          #libBin     nil              false '644' )
c8b7fd1fcec5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 237
diff changeset
   238
                ( 'libview/XW*.so'                           #libBin     nil              false '644' )
c8b7fd1fcec5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 237
diff changeset
   239
                ( 'libview2/libview2.*'                      #libBin     nil              false '644' )
c8b7fd1fcec5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 237
diff changeset
   240
                ( 'libwidg/libwidg.*'                        #libBin     nil              false '644' )
c8b7fd1fcec5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 237
diff changeset
   241
                ( 'libwidg2/libwidg2.*'                      #libBin     nil              false '644' )
c8b7fd1fcec5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 237
diff changeset
   242
                ( 'libwidg3/libwidg3.*'                      #libBin     nil              false '644' )
c8b7fd1fcec5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 237
diff changeset
   243
                ( 'libui/libui.*'                            #libBin     nil              false '644' )
c8b7fd1fcec5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 237
diff changeset
   244
27
8c5195f9508a also install stx.
Claus Gittinger <cg@exept.de>
parents: 26
diff changeset
   245
"/                ( 'libsnmp/libsnmp.*'                        #libBin     nil      false '644' )
8c5195f9508a also install stx.
Claus Gittinger <cg@exept.de>
parents: 26
diff changeset
   246
"/                ( 'contrib/libPVM/libPVM.*'                  #libBin     nil      false '644' )
24
2b61cca30b01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 23
diff changeset
   247
                ( 'goodies/persistency/libdbase.*'           #libBin     nil      false '644' )
27
8c5195f9508a also install stx.
Claus Gittinger <cg@exept.de>
parents: 26
diff changeset
   248
"/                ( 'libtable/libtable.*'                      #libBin     nil      false '644' )
24
2b61cca30b01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 23
diff changeset
   249
                ( 'libtool/libtool.*'                        #libBin     nil      false '644' )
214
e5aaf5e3bbf9 also install libtool2 & libui
Claus Gittinger <cg@exept.de>
parents: 117
diff changeset
   250
                ( 'libtool2/libtool2.*'                      #libBin     nil      false '644' )
27
8c5195f9508a also install stx.
Claus Gittinger <cg@exept.de>
parents: 26
diff changeset
   251
"/                ( 'libxt/libxt.*'                            #libBin     nil      false '644' )
8c5195f9508a also install stx.
Claus Gittinger <cg@exept.de>
parents: 26
diff changeset
   252
"/                ( 'librt/librt.*'                            #libBin     nil      false '644' )
5
16cff74f42b0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4
diff changeset
   253
        ).
16cff74f42b0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4
diff changeset
   254
    ].
0
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   255
5
16cff74f42b0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4
diff changeset
   256
    installGoodyFiles ifTrue:[
16cff74f42b0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4
diff changeset
   257
        fileSpec := fileSpec , #(
16cff74f42b0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4
diff changeset
   258
                ( 'goodies/*.st'                             #lib     'goodies'  false '644' )
16cff74f42b0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4
diff changeset
   259
                ( 'goodies/*.chg'                            #lib     'goodies'  false '644' )
16cff74f42b0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4
diff changeset
   260
                ( 'goodies/rdoit/rdoit'                      #bin     nil        false '755' )
236
622b9a04eb9b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 214
diff changeset
   261
                ( 'goodies/bitmaps/rdoit'                    #lib     'goodies/bitmaps'  false '755' )
5
16cff74f42b0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4
diff changeset
   262
        ).
16cff74f42b0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4
diff changeset
   263
    ].
0
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   264
11
9bc23682b68c national strings
Claus Gittinger <cg@exept.de>
parents: 10
diff changeset
   265
9bc23682b68c national strings
Claus Gittinger <cg@exept.de>
parents: 10
diff changeset
   266
    ^ fileSpec
9bc23682b68c national strings
Claus Gittinger <cg@exept.de>
parents: 10
diff changeset
   267
277
935f9a055594 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 276
diff changeset
   268
    "Modified: 8.8.1997 / 18:39:06 / cg"
11
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
9bc23682b68c national strings
Claus Gittinger <cg@exept.de>
parents: 10
diff changeset
   271
!STXInstaller methodsFor:'installing'!
9bc23682b68c national strings
Claus Gittinger <cg@exept.de>
parents: 10
diff changeset
   272
790
79bc027907ee checkin from browser
Claus Gittinger <cg@exept.de>
parents: 682
diff changeset
   273
changeWritability
791
108f933f9385 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 790
diff changeset
   274
    |msg|
790
79bc027907ee checkin from browser
Claus Gittinger <cg@exept.de>
parents: 682
diff changeset
   275
1010
d744cc925443 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 793
diff changeset
   276
    installWhat == #full ifTrue:[
792
bffad322b0bb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 791
diff changeset
   277
        msg := (resources array:#('ST/X Installation' '' 'making target dir writable' '' '' '')) asStringCollection.
790
79bc027907ee checkin from browser
Claus Gittinger <cg@exept.de>
parents: 682
diff changeset
   278
792
bffad322b0bb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 791
diff changeset
   279
        commandTraceView showCR:(resources string:'making target dir writable ...').
bffad322b0bb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 791
diff changeset
   280
        commandTraceView endEntry.
790
79bc027907ee checkin from browser
Claus Gittinger <cg@exept.de>
parents: 682
diff changeset
   281
        OperatingSystem executeCommand:('(cd ' , fullDir , ' ; find . -exec chmod u+w {} \;)').
79bc027907ee checkin from browser
Claus Gittinger <cg@exept.de>
parents: 682
diff changeset
   282
    ].
79bc027907ee checkin from browser
Claus Gittinger <cg@exept.de>
parents: 682
diff changeset
   283
791
108f933f9385 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 790
diff changeset
   284
    "Created: / 17.7.1996 / 15:24:19 / cg"
792
bffad322b0bb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 791
diff changeset
   285
    "Modified: / 20.4.1998 / 15:40:00 / cg"
790
79bc027907ee checkin from browser
Claus Gittinger <cg@exept.de>
parents: 682
diff changeset
   286
!
79bc027907ee checkin from browser
Claus Gittinger <cg@exept.de>
parents: 682
diff changeset
   287
11
9bc23682b68c national strings
Claus Gittinger <cg@exept.de>
parents: 10
diff changeset
   288
copyFiles
678
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   289
    |msg fileSpec filesToCopy numFiles nDone cmd|
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   290
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   291
     msg := (resources array:#('ST/X Installation' '' 'copying:' '' 'to:' '')) asStringCollection.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   292
1010
d744cc925443 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 793
diff changeset
   293
    installWhat == #full ifTrue:[
678
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   294
        msg at:4 put:('    all from CD' asText allBold).
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   295
        msg at:6 put:'    ' , (fullDir asText allBold).
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   296
        actionTextHolder value:nil.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   297
        actionTextHolder value:msg.
11
9bc23682b68c national strings
Claus Gittinger <cg@exept.de>
parents: 10
diff changeset
   298
793
43a9a195b0f3 use tar instead of cp to copy full
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
   299
        cmd := '(cd ../.. ; tar cf - .) | (cd ' , fullDir , ' ; tar xvf -)'.
43a9a195b0f3 use tar instead of cp to copy full
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
   300
"/        "/
43a9a195b0f3 use tar instead of cp to copy full
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
   301
"/        "/ not all systems have cp -rv
43a9a195b0f3 use tar instead of cp to copy full
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
   302
"/        "/
43a9a195b0f3 use tar instead of cp to copy full
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
   303
"/        OperatingSystem getOSType = 'linux' ifTrue:[
43a9a195b0f3 use tar instead of cp to copy full
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
   304
"/            cmd := 'cp -rv ../../* ' , fullDir.
43a9a195b0f3 use tar instead of cp to copy full
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
   305
"/        ].
43a9a195b0f3 use tar instead of cp to copy full
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
   306
"/      commandTraceView showCR:cmd , ' ...'.
43a9a195b0f3 use tar instead of cp to copy full
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
   307
        commandTraceView showCR:'copying ...'.
678
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   308
        commandTraceView endEntry.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   309
        cmd := cmd , ' 2>&1' .
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   310
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   311
        self executeCommandAndShowOutput:cmd.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   312
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   313
        ^ true
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   314
    ].
11
9bc23682b68c national strings
Claus Gittinger <cg@exept.de>
parents: 10
diff changeset
   315
9bc23682b68c national strings
Claus Gittinger <cg@exept.de>
parents: 10
diff changeset
   316
    fileSpec := self specOfFilesToCopy.
9bc23682b68c national strings
Claus Gittinger <cg@exept.de>
parents: 10
diff changeset
   317
0
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   318
    filesToCopy := OrderedCollection new.
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   319
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   320
    fileSpec do:[:entry |
8
88df33224360 oops - did not copy file*
Claus Gittinger <cg@exept.de>
parents: 7
diff changeset
   321
        |fileNames dest subDir required destDir|
0
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   322
8
88df33224360 oops - did not copy file*
Claus Gittinger <cg@exept.de>
parents: 7
diff changeset
   323
        fileNames := entry at:1.
0
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   324
        dest := entry at:2.
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   325
        subDir := entry at:3.
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   326
        required := entry at:4.
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   327
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   328
        dest == #bin ifTrue:[
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   329
            destDir := stxBinDir
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   330
        ] ifFalse:[
24
2b61cca30b01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 23
diff changeset
   331
            dest == #libBin ifTrue:[
2b61cca30b01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 23
diff changeset
   332
                destDir := stxLibBinDir
2b61cca30b01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 23
diff changeset
   333
            ] ifFalse:[
2b61cca30b01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 23
diff changeset
   334
                destDir := stxLibDir
2b61cca30b01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 23
diff changeset
   335
            ]
0
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   336
        ].
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   337
        
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   338
        destDir := destDir asFilename.
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   339
        subDir notNil ifTrue:[
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   340
            destDir := destDir construct:subDir
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   341
        ].
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   342
8
88df33224360 oops - did not copy file*
Claus Gittinger <cg@exept.de>
parents: 7
diff changeset
   343
        filesToCopy add:(fileNames -> destDir pathName)
0
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   344
    ].
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   345
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   346
    numFiles := filesToCopy size.
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   347
    nDone := 0.
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   348
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   349
    filesToCopy do:[:entry |
678
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   350
        |fileName destDir cmd|
0
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   351
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   352
        fileName := entry key.
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   353
        destDir := entry value.
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   354
8
88df33224360 oops - did not copy file*
Claus Gittinger <cg@exept.de>
parents: 7
diff changeset
   355
        ((fileName includes:$*)
88df33224360 oops - did not copy file*
Claus Gittinger <cg@exept.de>
parents: 7
diff changeset
   356
        or:[('../../' , fileName) asFilename exists])ifTrue:[
4
8b68fdf7c870 better looking; show command output
Claus Gittinger <cg@exept.de>
parents: 3
diff changeset
   357
            actionPercentageHolder value:(nDone / numFiles * 100) rounded.
0
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   358
4
8b68fdf7c870 better looking; show command output
Claus Gittinger <cg@exept.de>
parents: 3
diff changeset
   359
            msg at:4 put:'    ' , (fileName asText allBold).
8b68fdf7c870 better looking; show command output
Claus Gittinger <cg@exept.de>
parents: 3
diff changeset
   360
            msg at:6 put:'    ' , (destDir asText allBold).
8b68fdf7c870 better looking; show command output
Claus Gittinger <cg@exept.de>
parents: 3
diff changeset
   361
            actionTextHolder value:nil.
8b68fdf7c870 better looking; show command output
Claus Gittinger <cg@exept.de>
parents: 3
diff changeset
   362
            actionTextHolder value:msg.
8b68fdf7c870 better looking; show command output
Claus Gittinger <cg@exept.de>
parents: 3
diff changeset
   363
73
2087134eea96 better messages;
Claus Gittinger <cg@exept.de>
parents: 31
diff changeset
   364
            ((fileName includes:$*) not
2087134eea96 better messages;
Claus Gittinger <cg@exept.de>
parents: 31
diff changeset
   365
            and:[('../../' , fileName) asFilename exists not]) ifTrue:[
2087134eea96 better messages;
Claus Gittinger <cg@exept.de>
parents: 31
diff changeset
   366
                (self listOfOptionalPackages includes:fileName) ifFalse:[
117
45af2b7a5eca checkin from browser
Claus Gittinger <cg@exept.de>
parents: 73
diff changeset
   367
                    commandTraceView showCR:('cannot copy ' , fileName , ' - not included in distribution').
45af2b7a5eca checkin from browser
Claus Gittinger <cg@exept.de>
parents: 73
diff changeset
   368
                    commandTraceView endEntry.
73
2087134eea96 better messages;
Claus Gittinger <cg@exept.de>
parents: 31
diff changeset
   369
                ]
2087134eea96 better messages;
Claus Gittinger <cg@exept.de>
parents: 31
diff changeset
   370
            ] ifFalse:[
2087134eea96 better messages;
Claus Gittinger <cg@exept.de>
parents: 31
diff changeset
   371
                cmd := 'cp -r ../../' , fileName , ' ' , destDir.
2087134eea96 better messages;
Claus Gittinger <cg@exept.de>
parents: 31
diff changeset
   372
                commandTraceView showCR:cmd , ' ...'.
117
45af2b7a5eca checkin from browser
Claus Gittinger <cg@exept.de>
parents: 73
diff changeset
   373
                commandTraceView endEntry.
73
2087134eea96 better messages;
Claus Gittinger <cg@exept.de>
parents: 31
diff changeset
   374
                cmd := cmd , ' 2>&1' .
1
7ebb34d8f3df checkin from browser
Claus Gittinger <cg@exept.de>
parents: 0
diff changeset
   375
678
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   376
                self executeCommandAndShowOutput:cmd
73
2087134eea96 better messages;
Claus Gittinger <cg@exept.de>
parents: 31
diff changeset
   377
            ]
1
7ebb34d8f3df checkin from browser
Claus Gittinger <cg@exept.de>
parents: 0
diff changeset
   378
        ].
0
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   379
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   380
        nDone := nDone + 1
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   381
    ].
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   382
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   383
    ^ true
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   384
678
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   385
    "
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   386
     STXInstaller open
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   387
    "
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   388
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   389
    "Created: / 17.7.1996 / 15:16:20 / cg"
793
43a9a195b0f3 use tar instead of cp to copy full
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
   390
    "Modified: / 20.4.1998 / 17:41:45 / cg"
0
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   391
!
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   392
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   393
createDirectories
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   394
    |msg dirsToMake numDirs nDone|
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   395
11
9bc23682b68c national strings
Claus Gittinger <cg@exept.de>
parents: 10
diff changeset
   396
    msg := (resources array:#('ST/X Installation' '' 'creating directory:' '' '' '')) asStringCollection.
0
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   397
11
9bc23682b68c national strings
Claus Gittinger <cg@exept.de>
parents: 10
diff changeset
   398
    dirsToMake := self directoriesToMake.
0
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   399
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   400
    numDirs := dirsToMake size.
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   401
    nDone := 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
    dirsToMake do:[:dirName |
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   404
        |d errMsg stop box|
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   405
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   406
        actionPercentageHolder value:(nDone / numDirs * 100) rounded.
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   407
4
8b68fdf7c870 better looking; show command output
Claus Gittinger <cg@exept.de>
parents: 3
diff changeset
   408
        msg at:4 put:'    ' , (dirName asText allBold).
0
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   409
        actionTextHolder value:nil.
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   410
        actionTextHolder value:msg.
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   411
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   412
        d := dirName asFilename.
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   413
11
9bc23682b68c national strings
Claus Gittinger <cg@exept.de>
parents: 10
diff changeset
   414
        commandTraceView showCR:(resources string:'creating %1 ...' with:d pathName).
117
45af2b7a5eca checkin from browser
Claus Gittinger <cg@exept.de>
parents: 73
diff changeset
   415
        commandTraceView endEntry.
4
8b68fdf7c870 better looking; show command output
Claus Gittinger <cg@exept.de>
parents: 3
diff changeset
   416
0
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   417
        d exists ifFalse:[
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   418
            OperatingSystem recursiveCreateDirectory:d pathName
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   419
        ].
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   420
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   421
        d exists ifFalse:[
11
9bc23682b68c national strings
Claus Gittinger <cg@exept.de>
parents: 10
diff changeset
   422
            errMsg := resources string:'failed to create directory: %1' with: dirName.
0
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   423
            stop := true
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   424
        ] ifTrue:[
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   425
            d isDirectory ifFalse:[
11
9bc23682b68c national strings
Claus Gittinger <cg@exept.de>
parents: 10
diff changeset
   426
                errMsg := resources string:'not a directory: %1' with:dirName.
0
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   427
                stop := true
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   428
            ] ifTrue:[
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   429
                (d isReadable
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   430
                and:[d isWritable]) ifFalse:[
11
9bc23682b68c national strings
Claus Gittinger <cg@exept.de>
parents: 10
diff changeset
   431
                    errMsg := resources string:'no read/write access to directory: %1' with:dirName.
0
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   432
                    stop := false
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   433
                ] ifTrue:[
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   434
                    errMsg := nil
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   435
                ]
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   436
            ]
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   437
        ].
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   438
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   439
        errMsg notNil ifTrue:[
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   440
            box := WarningBox new.
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   441
            box title:errMsg.
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   442
            box showAtPointerNotCovering:(WindowGroup activeGroup topViews first).
1
7ebb34d8f3df checkin from browser
Claus Gittinger <cg@exept.de>
parents: 0
diff changeset
   443
            stop ifTrue:[^ false].
0
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   444
        ].
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   445
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   446
        Delay waitForSeconds:0.25.
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   447
        nDone := nDone + 1.
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   448
    ].
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   449
    ^ true
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   450
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   451
    "Created: 17.7.1996 / 15:24:19 / cg"
117
45af2b7a5eca checkin from browser
Claus Gittinger <cg@exept.de>
parents: 73
diff changeset
   452
    "Modified: 22.5.1997 / 15:06:41 / cg"
19
504c3ad987d1 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 18
diff changeset
   453
!
504c3ad987d1 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 18
diff changeset
   454
504c3ad987d1 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 18
diff changeset
   455
createSymbolicLinks
504c3ad987d1 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 18
diff changeset
   456
    |msg dirsToMake numDirs nDone|
504c3ad987d1 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 18
diff changeset
   457
504c3ad987d1 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 18
diff changeset
   458
    msg := (resources array:#('ST/X Installation' '' 'creating symbolic links' '' '' '')) asStringCollection.
504c3ad987d1 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 18
diff changeset
   459
28
b3a8378dd626 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 27
diff changeset
   460
    commandTraceView showCR:(resources string:'setting up symbolic links in doc/online ...').
117
45af2b7a5eca checkin from browser
Claus Gittinger <cg@exept.de>
parents: 73
diff changeset
   461
    commandTraceView endEntry.
1010
d744cc925443 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 793
diff changeset
   462
    installWhat == #full ifTrue:[
678
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   463
        OperatingSystem executeCommand:('(cd ' , fullDir , '/doc/online ; make links)').
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   464
    ] ifFalse:[
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   465
        OperatingSystem executeCommand:('(cd ' , stxLibDir , '/doc/online ; make links)').
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   466
    ].
19
504c3ad987d1 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 18
diff changeset
   467
678
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   468
    "Created: / 17.7.1996 / 15:24:19 / cg"
792
bffad322b0bb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 791
diff changeset
   469
    "Modified: / 20.4.1998 / 15:40:11 / cg"
678
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   470
!
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   471
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   472
executeCommandAndShowOutput:cmd
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   473
    |doneSemaphore line p|
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   474
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   475
    doneSemaphore := Semaphore new.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   476
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   477
    copyProcess := [   
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   478
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   479
        p := PipeStream readingFrom:cmd.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   480
        p isNil ifTrue:[
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   481
            self warn:('command error. Could not execute:\\' , cmd) withCRs.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   482
        ] ifFalse:[
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   483
            [
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   484
                [p atEnd] whileFalse:[
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   485
                    (p readWaitWithTimeout:0.1) ifFalse:[
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   486
                        line := p nextLine.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   487
                        (line notNil and:[line notEmpty]) ifTrue:[
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   488
                            commandTraceView showCR:(('  ' , line) asText emphasizeAllWith:(#color->Color red)).
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   489
                            commandTraceView endEntry.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   490
                        ]
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   491
                    ]
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   492
                ].
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   493
                p close.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   494
            ] valueOnUnwindDo:[
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   495
                p shutDown
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   496
            ]
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   497
        ].
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   498
        doneSemaphore signal.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   499
        copyProcess := nil.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   500
    ] forkAt:4.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   501
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   502
    doneSemaphore wait.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   503
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   504
    "Created: / 25.2.1998 / 17:46:06 / cg"
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   505
    "Modified: / 25.2.1998 / 18:36:50 / cg"
73
2087134eea96 better messages;
Claus Gittinger <cg@exept.de>
parents: 31
diff changeset
   506
!
2087134eea96 better messages;
Claus Gittinger <cg@exept.de>
parents: 31
diff changeset
   507
2087134eea96 better messages;
Claus Gittinger <cg@exept.de>
parents: 31
diff changeset
   508
outputInitialMessage
2087134eea96 better messages;
Claus Gittinger <cg@exept.de>
parents: 31
diff changeset
   509
    #(
2087134eea96 better messages;
Claus Gittinger <cg@exept.de>
parents: 31
diff changeset
   510
    'Notice:'
2087134eea96 better messages;
Claus Gittinger <cg@exept.de>
parents: 31
diff changeset
   511
    ''
2087134eea96 better messages;
Claus Gittinger <cg@exept.de>
parents: 31
diff changeset
   512
    'During the installation, you may get error messages'
2087134eea96 better messages;
Claus Gittinger <cg@exept.de>
parents: 31
diff changeset
   513
    'complaining that some files where not found'
2087134eea96 better messages;
Claus Gittinger <cg@exept.de>
parents: 31
diff changeset
   514
    'and could therefore not be copied.'
2087134eea96 better messages;
Claus Gittinger <cg@exept.de>
parents: 31
diff changeset
   515
    ) do:[:line |
2087134eea96 better messages;
Claus Gittinger <cg@exept.de>
parents: 31
diff changeset
   516
        commandTraceView showCR:((resources string:line) asText emphasizeAllWith:(#color->Color blue)).
2087134eea96 better messages;
Claus Gittinger <cg@exept.de>
parents: 31
diff changeset
   517
        commandTraceView endEntry. 
2087134eea96 better messages;
Claus Gittinger <cg@exept.de>
parents: 31
diff changeset
   518
    ].
2087134eea96 better messages;
Claus Gittinger <cg@exept.de>
parents: 31
diff changeset
   519
2087134eea96 better messages;
Claus Gittinger <cg@exept.de>
parents: 31
diff changeset
   520
    Delay waitForSeconds:2.
2087134eea96 better messages;
Claus Gittinger <cg@exept.de>
parents: 31
diff changeset
   521
2087134eea96 better messages;
Claus Gittinger <cg@exept.de>
parents: 31
diff changeset
   522
    #(
2087134eea96 better messages;
Claus Gittinger <cg@exept.de>
parents: 31
diff changeset
   523
    ''
2087134eea96 better messages;
Claus Gittinger <cg@exept.de>
parents: 31
diff changeset
   524
    'This is normal behavior; since the CD may contain'
2087134eea96 better messages;
Claus Gittinger <cg@exept.de>
parents: 31
diff changeset
   525
    'broken symbolic links to non-existing packages'
2087134eea96 better messages;
Claus Gittinger <cg@exept.de>
parents: 31
diff changeset
   526
    'which are either not contained on your ordered'
276
c8b7fd1fcec5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 237
diff changeset
   527
    'package (i.e. non-commercial) or are not required'
c8b7fd1fcec5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 237
diff changeset
   528
    'for your architecture (and therefore not contained'
c8b7fd1fcec5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 237
diff changeset
   529
    'on the CD).'
c8b7fd1fcec5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 237
diff changeset
   530
    ''
73
2087134eea96 better messages;
Claus Gittinger <cg@exept.de>
parents: 31
diff changeset
   531
    ) do:[:line |
2087134eea96 better messages;
Claus Gittinger <cg@exept.de>
parents: 31
diff changeset
   532
        commandTraceView showCR:((resources string:line) asText emphasizeAllWith:(#color->Color blue)).
2087134eea96 better messages;
Claus Gittinger <cg@exept.de>
parents: 31
diff changeset
   533
        commandTraceView endEntry.
2087134eea96 better messages;
Claus Gittinger <cg@exept.de>
parents: 31
diff changeset
   534
    ].
2087134eea96 better messages;
Claus Gittinger <cg@exept.de>
parents: 31
diff changeset
   535
2087134eea96 better messages;
Claus Gittinger <cg@exept.de>
parents: 31
diff changeset
   536
    Delay waitForSeconds:2.
2087134eea96 better messages;
Claus Gittinger <cg@exept.de>
parents: 31
diff changeset
   537
2087134eea96 better messages;
Claus Gittinger <cg@exept.de>
parents: 31
diff changeset
   538
    #(
2087134eea96 better messages;
Claus Gittinger <cg@exept.de>
parents: 31
diff changeset
   539
    ''
2087134eea96 better messages;
Claus Gittinger <cg@exept.de>
parents: 31
diff changeset
   540
    'Please excuse this inconvenience.'
2087134eea96 better messages;
Claus Gittinger <cg@exept.de>
parents: 31
diff changeset
   541
    ''
2087134eea96 better messages;
Claus Gittinger <cg@exept.de>
parents: 31
diff changeset
   542
    ) do:[:line |
2087134eea96 better messages;
Claus Gittinger <cg@exept.de>
parents: 31
diff changeset
   543
        commandTraceView showCR:((resources string:line) asText emphasizeAllWith:(#color->Color blue)).
2087134eea96 better messages;
Claus Gittinger <cg@exept.de>
parents: 31
diff changeset
   544
        commandTraceView endEntry.
2087134eea96 better messages;
Claus Gittinger <cg@exept.de>
parents: 31
diff changeset
   545
    ].
2087134eea96 better messages;
Claus Gittinger <cg@exept.de>
parents: 31
diff changeset
   546
2087134eea96 better messages;
Claus Gittinger <cg@exept.de>
parents: 31
diff changeset
   547
    Delay waitForSeconds:2.
2087134eea96 better messages;
Claus Gittinger <cg@exept.de>
parents: 31
diff changeset
   548
2087134eea96 better messages;
Claus Gittinger <cg@exept.de>
parents: 31
diff changeset
   549
    "Created: 2.3.1997 / 12:49:52 / cg"
276
c8b7fd1fcec5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 237
diff changeset
   550
    "Modified: 8.8.1997 / 17:47:06 / cg"
0
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   551
! !
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   552
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   553
!STXInstaller methodsFor:'startup'!
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   554
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   555
askAndInstall
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   556
    "/ check, if we are in the projects/smalltalk directory
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   557
678
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   558
    |answer|
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   559
11
9bc23682b68c national strings
Claus Gittinger <cg@exept.de>
parents: 10
diff changeset
   560
    resources := ResourcePack for:self class.
9bc23682b68c national strings
Claus Gittinger <cg@exept.de>
parents: 10
diff changeset
   561
0
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   562
    (Filename currentDirectory pathName endsWith:'projects/smalltalk') ifFalse:[
11
9bc23682b68c national strings
Claus Gittinger <cg@exept.de>
parents: 10
diff changeset
   563
        self warn:(resources string:'must be in the ''projects/smalltalk'' directory').
0
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   564
        ^ self
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   565
    ].
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   566
678
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   567
    answer := self askForFullInstallation.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   568
    answer ifFalse:[^ self].
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   569
0
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   570
    [self askForDestination] whileTrue:[
73
2087134eea96 better messages;
Claus Gittinger <cg@exept.de>
parents: 31
diff changeset
   571
        self checkForExistingInstallationAndConfirm ifTrue:[
2087134eea96 better messages;
Claus Gittinger <cg@exept.de>
parents: 31
diff changeset
   572
            self preInstall.
2087134eea96 better messages;
Claus Gittinger <cg@exept.de>
parents: 31
diff changeset
   573
            self doInstall ifTrue:[
2087134eea96 better messages;
Claus Gittinger <cg@exept.de>
parents: 31
diff changeset
   574
                self postInstall.
2087134eea96 better messages;
Claus Gittinger <cg@exept.de>
parents: 31
diff changeset
   575
                ^ self
2087134eea96 better messages;
Claus Gittinger <cg@exept.de>
parents: 31
diff changeset
   576
            ].
2087134eea96 better messages;
Claus Gittinger <cg@exept.de>
parents: 31
diff changeset
   577
            (self confirm:(resources string:'installation failed or aborted - retry ?'))
2087134eea96 better messages;
Claus Gittinger <cg@exept.de>
parents: 31
diff changeset
   578
            ifFalse:[
2087134eea96 better messages;
Claus Gittinger <cg@exept.de>
parents: 31
diff changeset
   579
                ^ self
2087134eea96 better messages;
Claus Gittinger <cg@exept.de>
parents: 31
diff changeset
   580
            ]
0
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   581
        ]
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   582
    ].
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   583
678
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   584
    "Modified: / 25.2.1998 / 16:54:51 / cg"
0
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   585
!
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   586
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   587
askForDestination
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   588
    "open a dialog to enter destination directories"
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   589
1010
d744cc925443 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 793
diff changeset
   590
    installWhat == #full ifTrue:[
678
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   591
        ^ self askForDestinationForFullInstallation
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   592
    ] ifFalse:[
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   593
        ^ self askForDestinationForPartialInstallation
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   594
    ]
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   595
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   596
    "
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   597
     STXInstaller open
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   598
    "
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   599
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   600
    "Modified: / 25.2.1998 / 17:12:45 / cg"
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   601
!
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   602
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   603
askForDestinationForFullInstallation
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   604
    "open a dialog to enter destination directories"
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   605
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   606
    |d cm l green dark img
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   607
     fullDirHolder|
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   608
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   609
    LastFullDir isNil ifTrue:[
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   610
        LastFullDir := (Filename homeDirectory 
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   611
                            construct:'stx')
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   612
                            constructString:'develop'
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   613
    ].
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   614
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   615
    fullDirHolder := LastFullDir asValue.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   616
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   617
    Screen current hasColors ifTrue:[
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   618
        green := (Color red:0 green:80 blue:20) "darkened".
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   619
        dark := Color grey:10.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   620
    ] ifFalse:[
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   621
        green := Color white.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   622
        dark := Color black.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   623
    ].
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   624
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   625
    d := DialogBox new.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   626
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   627
    d label:(resources string:'ST/X Full Installation').
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   628
    img := Image fromFile:'SmalltalkX.xbm'.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   629
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   630
    l := d addTextLabel:img.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   631
    l adjust:#left; foregroundColor:green backgroundColor:dark.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   632
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   633
    l := d addTextLabel:(resources string:'Smalltalk/X CD installation (full).').
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   634
    l adjust:#left; backgroundColor:dark; foregroundColor:Color white.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   635
    d addVerticalSpace.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   636
    d addVerticalSpace.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   637
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   638
    d addHorizontalLine.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   639
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   640
    l := d addTextLabel:(resources string:'ST/X development directory:').
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   641
    l adjust:#left; backgroundColor:dark; foregroundColor:Color white.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   642
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   643
    cm := ComboBoxView on:fullDirHolder.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   644
    cm list:self defaultFullDirs.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   645
    d 
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   646
        addLabelledField:cm 
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   647
        label:(resources string:'stx develop')
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   648
        adjust:#left 
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   649
        tabable:true 
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   650
        from:0.0 to:1.0 separateAtX:0.25
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   651
        nameAs:'fullBox'.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   652
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   653
    (d componentAt:'fullBox.label') backgroundColor:dark; foregroundColor:Color white.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   654
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   655
    d addVerticalSpace.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   656
    d addHorizontalLine.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   657
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   658
    d addHelpButtonFor:'STXInstaller/installHelp.html';
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   659
      addAbortButton; 
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   660
      addOkButtonLabelled:(resources string:'install').
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   661
    d extent:500@400.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   662
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   663
    d allViewBackground:dark.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   664
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   665
    d openAtCenter.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   666
    d accepted ifTrue:[
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   667
        fullDir := LastFullDir := fullDirHolder value.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   668
        d destroy.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   669
        ^ true
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   670
    ].
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   671
    d destroy.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   672
    ^ false
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   673
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   674
    "
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   675
     STXInstaller open
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   676
    "
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   677
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   678
    "Created: / 25.2.1998 / 17:11:37 / cg"
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   679
    "Modified: / 25.2.1998 / 17:29:07 / cg"
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   680
!
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   681
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   682
askForDestinationForPartialInstallation
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   683
    "open a dialog to enter destination directories"
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   684
2
936a4407697b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1
diff changeset
   685
    |d cm l green dark img
24
2b61cca30b01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 23
diff changeset
   686
     stxLibDirHolder stxLibBinDirHolder stxBinDirHolder
5
16cff74f42b0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4
diff changeset
   687
     installDocHolder installSourceHolder installSTCHolder installGoodiesHolder
73
2087134eea96 better messages;
Claus Gittinger <cg@exept.de>
parents: 31
diff changeset
   688
     binMegabytes libMegabytes docMegabytes stcMegabytes srcMegabytes
1117
657dde1e749d new default destination: /opt/smalltalk/<RELEASE>
Claus Gittinger <cg@exept.de>
parents: 1010
diff changeset
   689
     goodyMegabytes
0
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   690
    |
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   691
678
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   692
    binMegabytes := 12.
73
2087134eea96 better messages;
Claus Gittinger <cg@exept.de>
parents: 31
diff changeset
   693
    libMegabytes := 30.
678
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   694
    docMegabytes := 15.
1117
657dde1e749d new default destination: /opt/smalltalk/<RELEASE>
Claus Gittinger <cg@exept.de>
parents: 1010
diff changeset
   695
    stcMegabytes := 2.
657dde1e749d new default destination: /opt/smalltalk/<RELEASE>
Claus Gittinger <cg@exept.de>
parents: 1010
diff changeset
   696
    srcMegabytes := 25.
657dde1e749d new default destination: /opt/smalltalk/<RELEASE>
Claus Gittinger <cg@exept.de>
parents: 1010
diff changeset
   697
    goodyMegabytes := 2.
11
9bc23682b68c national strings
Claus Gittinger <cg@exept.de>
parents: 10
diff changeset
   698
0
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   699
    LastLibDir isNil ifTrue:[
1117
657dde1e749d new default destination: /opt/smalltalk/<RELEASE>
Claus Gittinger <cg@exept.de>
parents: 1010
diff changeset
   700
        LastLibDir := '/opt/smalltalk/' , self smalltalkRelease , '/lib'
0
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   701
    ].
24
2b61cca30b01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 23
diff changeset
   702
    LastLibBinDir isNil ifTrue:[
1117
657dde1e749d new default destination: /opt/smalltalk/<RELEASE>
Claus Gittinger <cg@exept.de>
parents: 1010
diff changeset
   703
        LastLibBinDir := '/opt/smalltalk/' , self smalltalkRelease , '/lib'
24
2b61cca30b01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 23
diff changeset
   704
    ].
0
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   705
    LastBinDir isNil ifTrue:[
1117
657dde1e749d new default destination: /opt/smalltalk/<RELEASE>
Claus Gittinger <cg@exept.de>
parents: 1010
diff changeset
   706
        LastBinDir := '/opt/smalltalk/' , self smalltalkRelease , '/bin'
0
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   707
    ].
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   708
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   709
    stxLibDirHolder := LastLibDir asValue.
24
2b61cca30b01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 23
diff changeset
   710
    stxLibBinDirHolder := LastLibBinDir asValue.
0
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   711
    stxBinDirHolder := LastBinDir asValue.
24
2b61cca30b01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 23
diff changeset
   712
5
16cff74f42b0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4
diff changeset
   713
    installDocHolder := true asValue.
16cff74f42b0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4
diff changeset
   714
    installSourceHolder := true asValue.
16cff74f42b0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4
diff changeset
   715
    installSTCHolder := true asValue.
16cff74f42b0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4
diff changeset
   716
    installGoodiesHolder := true asValue.
0
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   717
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   718
    Screen current hasColors ifTrue:[
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   719
        green := (Color red:0 green:80 blue:20) "darkened".
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   720
        dark := Color grey:10.
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   721
    ] ifFalse:[
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   722
        green := Color white.
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   723
        dark := Color black.
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   724
    ].
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   725
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   726
    d := DialogBox new.
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   727
678
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   728
    d label:(resources string:'ST/X Partial Installation').
2
936a4407697b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1
diff changeset
   729
    img := Image fromFile:'SmalltalkX.xbm'.
936a4407697b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1
diff changeset
   730
936a4407697b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1
diff changeset
   731
    l := d addTextLabel:img.
936a4407697b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1
diff changeset
   732
    l adjust:#left; foregroundColor:green backgroundColor:dark.
936a4407697b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1
diff changeset
   733
678
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   734
    l := d addTextLabel:(resources string:'Smalltalk/X CD installation (partial).').
0
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   735
    l adjust:#left; backgroundColor:dark; foregroundColor:Color white.
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   736
    d addVerticalSpace.
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   737
    d addVerticalSpace.
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   738
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   739
    d addHorizontalLine.
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   740
11
9bc23682b68c national strings
Claus Gittinger <cg@exept.de>
parents: 10
diff changeset
   741
    l := d addTextLabel:(resources string:'Destination directories:').
0
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   742
    l adjust:#left; backgroundColor:dark; foregroundColor:Color white.
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   743
678
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   744
    l := d addTextLabel:(resources string:'(the defaults below are recommended)').
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   745
    l adjust:#right; backgroundColor:dark; foregroundColor:Color white.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   746
0
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   747
    cm := ComboBoxView on:stxBinDirHolder.
1
7ebb34d8f3df checkin from browser
Claus Gittinger <cg@exept.de>
parents: 0
diff changeset
   748
    cm list:self defaultBinDirs.
0
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   749
    d 
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   750
        addLabelledField:cm 
11
9bc23682b68c national strings
Claus Gittinger <cg@exept.de>
parents: 10
diff changeset
   751
        label:(resources string:'binaries')
0
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   752
        adjust:#left 
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   753
        tabable:true 
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   754
        from:0.0 to:1.0 separateAtX:0.25
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   755
        nameAs:'binaryBox'.
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   756
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   757
    (d componentAt:'binaryBox.label') backgroundColor:dark; foregroundColor:Color white.
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   758
24
2b61cca30b01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 23
diff changeset
   759
    cm := ComboBoxView on:stxLibBinDirHolder.
2b61cca30b01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 23
diff changeset
   760
    cm list:self defaultLibBinDirs.
2b61cca30b01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 23
diff changeset
   761
    d 
2b61cca30b01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 23
diff changeset
   762
        addLabelledField:cm 
2b61cca30b01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 23
diff changeset
   763
        label:(resources string:'libraries') 
2b61cca30b01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 23
diff changeset
   764
        adjust:#left 
2b61cca30b01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 23
diff changeset
   765
        tabable:true 
2b61cca30b01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 23
diff changeset
   766
        from:0.0 to:1.0 separateAtX:0.25
2b61cca30b01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 23
diff changeset
   767
        nameAs:'libraryBinBox'.
2b61cca30b01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 23
diff changeset
   768
2b61cca30b01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 23
diff changeset
   769
    (d componentAt:'libraryBinBox.label') backgroundColor:dark; foregroundColor:Color white.
2b61cca30b01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 23
diff changeset
   770
0
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   771
    cm := ComboBoxView on:stxLibDirHolder.
1
7ebb34d8f3df checkin from browser
Claus Gittinger <cg@exept.de>
parents: 0
diff changeset
   772
    cm list:self defaultLibDirs.
0
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   773
    d 
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   774
        addLabelledField:cm 
117
45af2b7a5eca checkin from browser
Claus Gittinger <cg@exept.de>
parents: 73
diff changeset
   775
        label:(resources string:'other files') 
0
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   776
        adjust:#left 
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   777
        tabable:true 
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   778
        from:0.0 to:1.0 separateAtX:0.25
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   779
        nameAs:'libraryBox'.
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   780
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   781
    (d componentAt:'libraryBox.label') backgroundColor:dark; foregroundColor:Color white.
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   782
5
16cff74f42b0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4
diff changeset
   783
    d addVerticalSpace.
16cff74f42b0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4
diff changeset
   784
    d addHorizontalLine.
16cff74f42b0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4
diff changeset
   785
    d addVerticalSpace.
16cff74f42b0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4
diff changeset
   786
11
9bc23682b68c national strings
Claus Gittinger <cg@exept.de>
parents: 10
diff changeset
   787
    (d addTextLabel:(resources string:'required:'))
5
16cff74f42b0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4
diff changeset
   788
        adjust:#left; foregroundColor:Color white backgroundColor:dark.
16cff74f42b0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4
diff changeset
   789
16cff74f42b0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4
diff changeset
   790
    d leftIndent:35.
11
9bc23682b68c national strings
Claus Gittinger <cg@exept.de>
parents: 10
diff changeset
   791
    (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
   792
        adjust:#left; foregroundColor:Color white backgroundColor:dark.
11
9bc23682b68c national strings
Claus Gittinger <cg@exept.de>
parents: 10
diff changeset
   793
    (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
   794
        adjust:#left; foregroundColor:Color white backgroundColor:dark.
16cff74f42b0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4
diff changeset
   795
    d leftIndent:0.
16cff74f42b0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4
diff changeset
   796
16cff74f42b0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4
diff changeset
   797
    d addVerticalSpace.
16cff74f42b0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4
diff changeset
   798
    d addHorizontalLine.
16cff74f42b0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4
diff changeset
   799
    d addVerticalSpace.
16cff74f42b0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4
diff changeset
   800
11
9bc23682b68c national strings
Claus Gittinger <cg@exept.de>
parents: 10
diff changeset
   801
    (d addTextLabel:(resources string:'optional:'))
5
16cff74f42b0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4
diff changeset
   802
        adjust:#left; foregroundColor:Color white backgroundColor:dark.
16cff74f42b0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4
diff changeset
   803
73
2087134eea96 better messages;
Claus Gittinger <cg@exept.de>
parents: 31
diff changeset
   804
    (d addCheckBox:((resources string:'doc files (+%1 Mb)' with:docMegabytes)) on:installDocHolder)
5
16cff74f42b0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4
diff changeset
   805
        labelView foregroundColor:Color white backgroundColor:dark.
73
2087134eea96 better messages;
Claus Gittinger <cg@exept.de>
parents: 31
diff changeset
   806
    (d addCheckBox:((resources string:'stc & support files (+%1 Mb)' with:stcMegabytes)) on:installSTCHolder)
10
c9574685e157 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 9
diff changeset
   807
        labelView foregroundColor:Color white backgroundColor:dark.
c9574685e157 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 9
diff changeset
   808
c9574685e157 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 9
diff changeset
   809
    d addVerticalSpace.
c9574685e157 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 9
diff changeset
   810
    d addHorizontalLine.
c9574685e157 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 9
diff changeset
   811
    d addVerticalSpace.
c9574685e157 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 9
diff changeset
   812
11
9bc23682b68c national strings
Claus Gittinger <cg@exept.de>
parents: 10
diff changeset
   813
    (d addTextLabel:(resources string:'optional (but highly recommended):'))
10
c9574685e157 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 9
diff changeset
   814
        adjust:#left; foregroundColor:Color white backgroundColor:dark.
c9574685e157 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 9
diff changeset
   815
73
2087134eea96 better messages;
Claus Gittinger <cg@exept.de>
parents: 31
diff changeset
   816
    (d addCheckBox:((resources string:'smalltalk source files (+%1 Mb)' with:srcMegabytes)) on:installSourceHolder)
5
16cff74f42b0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4
diff changeset
   817
        labelView foregroundColor:Color white backgroundColor:dark.
1117
657dde1e749d new default destination: /opt/smalltalk/<RELEASE>
Claus Gittinger <cg@exept.de>
parents: 1010
diff changeset
   818
    (d addCheckBox:((resources string:'goodies (+%1 Mb)' with:goodyMegabytes)) on:installGoodiesHolder)
5
16cff74f42b0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4
diff changeset
   819
        labelView foregroundColor:Color white backgroundColor:dark.
16cff74f42b0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4
diff changeset
   820
16cff74f42b0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4
diff changeset
   821
    d addVerticalSpace.
16cff74f42b0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4
diff changeset
   822
    d addHorizontalLine.
16cff74f42b0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4
diff changeset
   823
24
2b61cca30b01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 23
diff changeset
   824
    d addHelpButtonFor:'STXInstaller/installHelp.html';
2b61cca30b01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 23
diff changeset
   825
      addAbortButton; 
2b61cca30b01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 23
diff changeset
   826
      addOkButtonLabelled:(resources string:'install').
73
2087134eea96 better messages;
Claus Gittinger <cg@exept.de>
parents: 31
diff changeset
   827
    d extent:500@400.
0
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   828
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   829
    d allViewBackground:dark.
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   830
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   831
    d openAtCenter.
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   832
    d accepted ifTrue:[
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   833
        stxLibDir := LastLibDir := stxLibDirHolder value.
24
2b61cca30b01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 23
diff changeset
   834
        stxLibBinDir := LastLibBinDir := stxLibBinDirHolder value.
0
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   835
        stxBinDir := LastBinDir := stxBinDirHolder value.
5
16cff74f42b0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4
diff changeset
   836
        installDocFiles := installDocHolder value.
16cff74f42b0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4
diff changeset
   837
        installSourceFiles := installSourceHolder value.
16cff74f42b0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4
diff changeset
   838
        installSTCFiles := installSTCHolder value.
16cff74f42b0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4
diff changeset
   839
        installGoodyFiles := installGoodiesHolder value.
1
7ebb34d8f3df checkin from browser
Claus Gittinger <cg@exept.de>
parents: 0
diff changeset
   840
        d destroy.
0
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   841
        ^ true
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   842
    ].
1
7ebb34d8f3df checkin from browser
Claus Gittinger <cg@exept.de>
parents: 0
diff changeset
   843
    d destroy.
0
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   844
    ^ false
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   845
678
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   846
    "
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   847
     STXInstaller open
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   848
    "
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   849
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   850
    "Created: / 25.2.1998 / 17:11:26 / cg"
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   851
    "Modified: / 25.2.1998 / 19:43:30 / cg"
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   852
!
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   853
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   854
askForFullInstallation
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   855
    "open a dialog to enter destination directories"
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   856
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   857
    |d cm l green dark img|
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   858
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   859
    Screen current hasColors ifTrue:[
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   860
        green := (Color red:0 green:80 blue:20) "darkened".
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   861
        dark := Color grey:10.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   862
    ] ifFalse:[
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   863
        green := Color white.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   864
        dark := Color black.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   865
    ].
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   866
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   867
    d := DialogBox new.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   868
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   869
    d label:(resources string:'ST/X CD Installation').
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   870
    img := Image fromFile:'SmalltalkX.xbm'.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   871
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   872
    l := d addTextLabel:img.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   873
    l adjust:#left; foregroundColor:green backgroundColor:dark.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   874
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   875
    l := d addTextLabel:(resources string:'Smalltalk/X CD installation.').
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   876
    l adjust:#left; backgroundColor:dark; foregroundColor:Color white.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   877
    d addVerticalSpace.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   878
    d addVerticalSpace.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   879
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   880
    d addHorizontalLine.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   881
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   882
    l := d addTextLabel:(resources string:
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   883
'You can either perform a ' , 'full' asText allBold , ' installation, or a ' , 'partial' asText allBold ,' installation.').
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   884
    l adjust:#left; backgroundColor:dark; foregroundColor:Color white.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   885
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   886
    d addVerticalSpace.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   887
    d addHorizontalLine.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   888
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   889
    d leftIndent:20.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   890
    l := d addTextLabel:(resources string:
1117
657dde1e749d new default destination: /opt/smalltalk/<RELEASE>
Claus Gittinger <cg@exept.de>
parents: 1010
diff changeset
   891
'full:' asText allBold , '
657dde1e749d new default destination: /opt/smalltalk/<RELEASE>
Claus Gittinger <cg@exept.de>
parents: 1010
diff changeset
   892
The full installation is required if you want to build your own
657dde1e749d new default destination: /opt/smalltalk/<RELEASE>
Claus Gittinger <cg@exept.de>
parents: 1010
diff changeset
   893
customized smalltalk executable. It allows you to create and include 
657dde1e749d new default destination: /opt/smalltalk/<RELEASE>
Claus Gittinger <cg@exept.de>
parents: 1010
diff changeset
   894
additional precompiled binary classes or classLibraries. 
678
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   895
This is also required if you want to link your own standalone executables.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   896
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   897
It consists of a directory hierachy, including makefiles for a customizeable 
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   898
rebuild of the whole smalltalk system.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   899
(Actually, it simply copies the whole CD contents onto your disk).
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   900
This requires roughly 120-200Mb of hard disk space.').
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   901
    l adjust:#left; backgroundColor:dark; foregroundColor:Color white.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   902
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   903
    d addVerticalSpace.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   904
    d addHorizontalLine.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   905
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   906
    l := d addTextLabel:(resources string:
1117
657dde1e749d new default destination: /opt/smalltalk/<RELEASE>
Claus Gittinger <cg@exept.de>
parents: 1010
diff changeset
   907
'partial:' asText allBold , '
657dde1e749d new default destination: /opt/smalltalk/<RELEASE>
Claus Gittinger <cg@exept.de>
parents: 1010
diff changeset
   908
The partial (runTime) installation requires less disk space and only copies the
678
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   909
smalltalk executable, shared libraries and support files onto your hard disk.
1117
657dde1e749d new default destination: /opt/smalltalk/<RELEASE>
Claus Gittinger <cg@exept.de>
parents: 1010
diff changeset
   910
This setup allows normal smalltalk development and is also useful as a runtime
657dde1e749d new default destination: /opt/smalltalk/<RELEASE>
Claus Gittinger <cg@exept.de>
parents: 1010
diff changeset
   911
environment for smalltalk applications.
657dde1e749d new default destination: /opt/smalltalk/<RELEASE>
Claus Gittinger <cg@exept.de>
parents: 1010
diff changeset
   912
However, it does not support recreation of a new smalltal executable and/or
657dde1e749d new default destination: /opt/smalltalk/<RELEASE>
Claus Gittinger <cg@exept.de>
parents: 1010
diff changeset
   913
shared binary classLibraries.
678
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   914
This requires roughly 70-90Mb of hard disk space.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   915
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   916
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   917
 ').
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   918
    l adjust:#left; backgroundColor:dark; foregroundColor:Color white.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   919
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   920
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   921
    d leftIndent:0.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   922
    d addVerticalSpace.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   923
    d addHorizontalLine.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   924
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   925
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   926
    d addHelpButtonFor:'STXInstaller/installHelp.html';
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   927
      addAbortButton; 
1010
d744cc925443 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 793
diff changeset
   928
      addOkButton:(Button label:(resources string:'full') action:[installWhat := #full]);
d744cc925443 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 793
diff changeset
   929
      addOkButtonLabelled:(resources string:'partial').
678
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   930
    d extent:500@400.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   931
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   932
    d allViewBackground:dark.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   933
1010
d744cc925443 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 793
diff changeset
   934
    installWhat := #partial.
678
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   935
    d openAtCenter.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   936
    d accepted ifTrue:[
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   937
        d destroy.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   938
        ^ true
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   939
    ].
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   940
    d destroy.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   941
    ^ false
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   942
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   943
    "
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   944
     STXInstaller open
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   945
    "
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   946
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   947
    "Created: / 25.2.1998 / 16:50:16 / cg"
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   948
    "Modified: / 25.2.1998 / 19:42:31 / cg"
0
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   949
!
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   950
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   951
checkForExistingInstallationAndConfirm
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   952
    "look if there is another installation and confirm
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   953
     reinstalling; return true if ok, false if not"
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   954
678
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   955
    |whichDir canOverWrite whatToDo box|
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   956
1010
d744cc925443 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 793
diff changeset
   957
    installWhat == #full ifTrue:[
678
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   958
        whichDir := fullDir.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   959
        canOverWrite := false.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   960
    ] ifFalse:[
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   961
        whichDir := stxLibDir.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   962
        canOverWrite := true.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   963
    ].
1
7ebb34d8f3df checkin from browser
Claus Gittinger <cg@exept.de>
parents: 0
diff changeset
   964
678
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   965
    whichDir asFilename exists ifTrue:[
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   966
            whatToDo := Dialog 
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   967
                            choose:(resources 
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   968
                                        string:'detected existing ST/X installation in %1' 
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   969
                                          with:whichDir asText allBold)
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   970
                            label:(resources string:'Attention')
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   971
                            labels:(resources array:(canOverWrite 
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   972
                                                    ifFalse:[#('remove first' 'cancel')] 
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   973
                                                    ifTrue:[#('remove first' 'overwrite' 'cancel')] )) 
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   974
                            values:(canOverWrite ifFalse:[#(remove nil)] ifTrue:[#(remove over nil)])
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   975
                            default:nil.     
73
2087134eea96 better messages;
Claus Gittinger <cg@exept.de>
parents: 31
diff changeset
   976
678
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   977
            whatToDo isNil ifTrue:[^false].
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   978
            whatToDo == #remove ifTrue:[
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   979
                ((whichDir findString:'stx') == 0
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   980
                and:[(whichDir findString:'smalltalk') == 0]) ifTrue:[
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   981
                    "/ confirm again
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   982
                    (self confirm:(resources 
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   983
                                    string:'are you certain that the directory to remove
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   984
(' , whichDir , ') is really a smalltalk directory ?
23
42997b231783 double confirm removal of directory, if its name
Claus Gittinger <cg@exept.de>
parents: 22
diff changeset
   985
73
2087134eea96 better messages;
Claus Gittinger <cg@exept.de>
parents: 31
diff changeset
   986
Remove it now ?')) ifFalse:[ 
678
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   987
                        ^ false
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   988
                    ]
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   989
                ].
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   990
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   991
                [
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   992
                    box := DialogBox new label:'please wait'.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   993
                    box addTextLabel:'removing ' , whichDir , ' ...'.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   994
                    box showAtPointer.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   995
                ] forkAt:(Processor activePriority+1).
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   996
                box waitUntilVisible.
23
42997b231783 double confirm removal of directory, if its name
Claus Gittinger <cg@exept.de>
parents: 22
diff changeset
   997
678
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   998
                (OperatingSystem recursiveRemoveDirectory:whichDir)
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   999
                ifFalse:[
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1000
                    self warn:(resources string:'mhmh - could not remove old installation.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1001
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1002
Please remove it manually (using root privileges if required) 
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1003
and try again.').
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1004
                    box destroy.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1005
                    ^ false
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1006
                ].
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1007
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1008
                box destroy
1
7ebb34d8f3df checkin from browser
Claus Gittinger <cg@exept.de>
parents: 0
diff changeset
  1009
            ].
0
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1010
    ].
678
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1011
0
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1012
    ^ true
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1013
678
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1014
    "
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1015
     STXInstaller open
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1016
    "
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1017
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1018
    "Modified: / 25.2.1998 / 19:35:12 / cg"
0
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1019
!
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1020
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1021
doInstall
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1022
    "install ST/X; return true if ok, false if not"
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1023
678
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1024
    |progressView ok v textView p l 
1117
657dde1e749d new default destination: /opt/smalltalk/<RELEASE>
Claus Gittinger <cg@exept.de>
parents: 1010
diff changeset
  1025
     dirToMonitor doDfMonitoring dfMonitorProcess kB|
678
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1026
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1027
    doDfMonitoring := false.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1028
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1029
    v := View new preferredExtent:(250 @ 350).
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1030
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1031
    textView := HVScrollableView for:TextCollector in:v.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1032
    textView origin:0.0@0.0 corner:1.0@1.0.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1033
    textView bottomInset:30.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1034
    commandTraceView := textView scrolledView.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1035
1010
d744cc925443 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 793
diff changeset
  1036
    installWhat == #full ifTrue:[
678
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1037
        dirToMonitor := fullDir.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1038
    ] ifFalse:[
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1039
        dirToMonitor := stxLibDir
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1040
    ].
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1041
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1042
    (OperatingSystem canExecuteCommand:'df ' , dirToMonitor) ifTrue:[
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1043
        p := HorizontalPanelView in:v.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1044
        p origin:0.0@1.0 corner:1.0@1.0.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1045
        p topInset:-30.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1046
        p horizontalLayout:#fit.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1047
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1048
        l := Label label:'' in:p.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1049
        l labelChannel:(dfHolder := '' asValue).
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1050
        l adjust:#left.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1051
        dfMonitorProcess := [
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1052
            |ok p text keys values i l|
4
8b68fdf7c870 better looking; show command output
Claus Gittinger <cg@exept.de>
parents: 3
diff changeset
  1053
678
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1054
            ok := true.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1055
            [ok] whileTrue:[
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1056
                doDfMonitoring ifTrue:[
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1057
                    ok := false.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1058
                    p := PipeStream readingFrom:('df -k ' , dirToMonitor).
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1059
                    p notNil ifTrue:[
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1060
                       [
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1061
                           text := p contentsOfEntireFile.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1062
                       ] valueNowOrOnUnwindDo:[
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1063
                           p close.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1064
                       ].
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1065
"/ Transcript showCR:text asString.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1066
                       text notNil ifTrue:[
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1067
                           text := text asCollectionOfLines.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1068
                           text size >= 2 ifTrue:[
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1069
                               keys := (text at:1) asCollectionOfWords.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1070
                               values := (text at:2) asCollectionOfWords.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1071
                               i := (keys indexOf:'Capacity').
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1072
                               i == 0 ifTrue:[
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1073
                                   i := (keys indexOf:'capacity').
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1074
                               ].
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1075
                               i ~~ 0 ifTrue:[
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1076
                                   l := 'Used disk space: ' , (values at:i) withoutSeparators.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1077
                                   i := (keys indexOf:'Available').
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1078
                                   i == 0 ifTrue:[
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1079
                                       i := (keys indexOf:'available').
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1080
                                       i == 0 ifTrue:[
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1081
                                           i := (keys indexOf:'avail').
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1082
                                           i == 0 ifTrue:[
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1083
                                               i := (keys indexOf:'Avail').
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1084
                                           ].
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1085
                                       ].
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1086
                                   ].
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1087
                                   i ~~ 0 ifTrue:[
1117
657dde1e749d new default destination: /opt/smalltalk/<RELEASE>
Claus Gittinger <cg@exept.de>
parents: 1010
diff changeset
  1088
                                        kB := (values at:i) withoutSeparators.
657dde1e749d new default destination: /opt/smalltalk/<RELEASE>
Claus Gittinger <cg@exept.de>
parents: 1010
diff changeset
  1089
                                        l := l , ' (' , kB , 'k available)'.
678
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1090
                                   ].
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1091
                                   dfHolder value:l.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1092
                                   ok := true.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1093
                                   Delay waitForSeconds:9.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1094
                               ]
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1095
                           ]
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1096
                        ].
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1097
                    ].
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1098
                ].
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1099
                Delay waitForSeconds:1.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1100
            ]
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1101
        ] forkAt:(Processor activePriority+3)
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1102
    ].
0
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1103
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1104
    progressView := ProgressIndicator
1118
ebecbe5d4b6b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1117
diff changeset
  1105
                        inBoxWithLabel:'ST/X Installation' icon:(Icon stxIcon)
0
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1106
                        text:#('ST/X Installation' '' '' '' '' '' '' '') asStringCollection
4
8b68fdf7c870 better looking; show command output
Claus Gittinger <cg@exept.de>
parents: 3
diff changeset
  1107
                        abortable:true
678
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1108
                        view:v
4
8b68fdf7c870 better looking; show command output
Claus Gittinger <cg@exept.de>
parents: 3
diff changeset
  1109
                        closeWhenDone:false.
73
2087134eea96 better messages;
Claus Gittinger <cg@exept.de>
parents: 31
diff changeset
  1110
    progressView topView extent:(640 min:Display width) @ (500 min:Display height).
0
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1111
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1112
    ok := false.
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1113
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1114
    progressView showProgressOf:
4
8b68fdf7c870 better looking; show command output
Claus Gittinger <cg@exept.de>
parents: 3
diff changeset
  1115
            [:progressValue :currentAction| |msg|
8b68fdf7c870 better looking; show command output
Claus Gittinger <cg@exept.de>
parents: 3
diff changeset
  1116
8b68fdf7c870 better looking; show command output
Claus Gittinger <cg@exept.de>
parents: 3
diff changeset
  1117
              Processor activeProcess withPriority:7 do:[
682
9fcd010d8fd3 terminate monitor process on unwind
Claus Gittinger <cg@exept.de>
parents: 678
diff changeset
  1118
                  [
9fcd010d8fd3 terminate monitor process on unwind
Claus Gittinger <cg@exept.de>
parents: 678
diff changeset
  1119
                      actionPercentageHolder := progressValue.
9fcd010d8fd3 terminate monitor process on unwind
Claus Gittinger <cg@exept.de>
parents: 678
diff changeset
  1120
                      actionTextHolder := currentAction.
9fcd010d8fd3 terminate monitor process on unwind
Claus Gittinger <cg@exept.de>
parents: 678
diff changeset
  1121
1010
d744cc925443 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 793
diff changeset
  1122
                      installWhat == #full ifFalse:[
682
9fcd010d8fd3 terminate monitor process on unwind
Claus Gittinger <cg@exept.de>
parents: 678
diff changeset
  1123
                            self outputInitialMessage.
9fcd010d8fd3 terminate monitor process on unwind
Claus Gittinger <cg@exept.de>
parents: 678
diff changeset
  1124
                      ].
0
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1125
682
9fcd010d8fd3 terminate monitor process on unwind
Claus Gittinger <cg@exept.de>
parents: 678
diff changeset
  1126
                      (self createDirectories) ifTrue:[
9fcd010d8fd3 terminate monitor process on unwind
Claus Gittinger <cg@exept.de>
parents: 678
diff changeset
  1127
                          doDfMonitoring := true.
9fcd010d8fd3 terminate monitor process on unwind
Claus Gittinger <cg@exept.de>
parents: 678
diff changeset
  1128
                          ok := self copyFiles
9fcd010d8fd3 terminate monitor process on unwind
Claus Gittinger <cg@exept.de>
parents: 678
diff changeset
  1129
                      ].
790
79bc027907ee checkin from browser
Claus Gittinger <cg@exept.de>
parents: 682
diff changeset
  1130
                      self changeWritability.
682
9fcd010d8fd3 terminate monitor process on unwind
Claus Gittinger <cg@exept.de>
parents: 678
diff changeset
  1131
                      self createSymbolicLinks.
9fcd010d8fd3 terminate monitor process on unwind
Claus Gittinger <cg@exept.de>
parents: 678
diff changeset
  1132
9fcd010d8fd3 terminate monitor process on unwind
Claus Gittinger <cg@exept.de>
parents: 678
diff changeset
  1133
                      progressValue value:100.
73
2087134eea96 better messages;
Claus Gittinger <cg@exept.de>
parents: 31
diff changeset
  1134
1117
657dde1e749d new default destination: /opt/smalltalk/<RELEASE>
Claus Gittinger <cg@exept.de>
parents: 1010
diff changeset
  1135
                      progressView topView raise.
657dde1e749d new default destination: /opt/smalltalk/<RELEASE>
Claus Gittinger <cg@exept.de>
parents: 1010
diff changeset
  1136
                      commandTraceView showCR:'Installation finished.' asText allBold.
657dde1e749d new default destination: /opt/smalltalk/<RELEASE>
Claus Gittinger <cg@exept.de>
parents: 1010
diff changeset
  1137
                      commandTraceView endEntry. 
657dde1e749d new default destination: /opt/smalltalk/<RELEASE>
Claus Gittinger <cg@exept.de>
parents: 1010
diff changeset
  1138
                      textView flash.
657dde1e749d new default destination: /opt/smalltalk/<RELEASE>
Claus Gittinger <cg@exept.de>
parents: 1010
diff changeset
  1139
682
9fcd010d8fd3 terminate monitor process on unwind
Claus Gittinger <cg@exept.de>
parents: 678
diff changeset
  1140
                      progressView topView abortButton label:(resources string:'continue').
9fcd010d8fd3 terminate monitor process on unwind
Claus Gittinger <cg@exept.de>
parents: 678
diff changeset
  1141
                      progressView topView abortButton action:[progressView topView hide].
9fcd010d8fd3 terminate monitor process on unwind
Claus Gittinger <cg@exept.de>
parents: 678
diff changeset
  1142
                      msg := (resources 
9fcd010d8fd3 terminate monitor process on unwind
Claus Gittinger <cg@exept.de>
parents: 678
diff changeset
  1143
                                 array:#('ST/X Installation finished.' '' 'press continue ...' '' '' ''))
9fcd010d8fd3 terminate monitor process on unwind
Claus Gittinger <cg@exept.de>
parents: 678
diff changeset
  1144
                                     asStringCollection.
9fcd010d8fd3 terminate monitor process on unwind
Claus Gittinger <cg@exept.de>
parents: 678
diff changeset
  1145
                      actionTextHolder value:nil.
9fcd010d8fd3 terminate monitor process on unwind
Claus Gittinger <cg@exept.de>
parents: 678
diff changeset
  1146
                      actionTextHolder value:msg.
9fcd010d8fd3 terminate monitor process on unwind
Claus Gittinger <cg@exept.de>
parents: 678
diff changeset
  1147
                 ] valueOnUnwindDo:[
9fcd010d8fd3 terminate monitor process on unwind
Claus Gittinger <cg@exept.de>
parents: 678
diff changeset
  1148
                    dfMonitorProcess notNil ifTrue:[
9fcd010d8fd3 terminate monitor process on unwind
Claus Gittinger <cg@exept.de>
parents: 678
diff changeset
  1149
                        dfMonitorProcess terminate.
9fcd010d8fd3 terminate monitor process on unwind
Claus Gittinger <cg@exept.de>
parents: 678
diff changeset
  1150
                        dfMonitorProcess := nil.
9fcd010d8fd3 terminate monitor process on unwind
Claus Gittinger <cg@exept.de>
parents: 678
diff changeset
  1151
                    ].
9fcd010d8fd3 terminate monitor process on unwind
Claus Gittinger <cg@exept.de>
parents: 678
diff changeset
  1152
                    copyProcess notNil ifTrue:[
9fcd010d8fd3 terminate monitor process on unwind
Claus Gittinger <cg@exept.de>
parents: 678
diff changeset
  1153
                        copyProcess terminate.
9fcd010d8fd3 terminate monitor process on unwind
Claus Gittinger <cg@exept.de>
parents: 678
diff changeset
  1154
                        copyProcess := nil.
9fcd010d8fd3 terminate monitor process on unwind
Claus Gittinger <cg@exept.de>
parents: 678
diff changeset
  1155
                    ].
9fcd010d8fd3 terminate monitor process on unwind
Claus Gittinger <cg@exept.de>
parents: 678
diff changeset
  1156
                 ]
4
8b68fdf7c870 better looking; show command output
Claus Gittinger <cg@exept.de>
parents: 3
diff changeset
  1157
              ] 
0
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1158
            ].
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1159
678
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1160
    dfMonitorProcess notNil ifTrue:[
682
9fcd010d8fd3 terminate monitor process on unwind
Claus Gittinger <cg@exept.de>
parents: 678
diff changeset
  1161
        dfMonitorProcess terminate.
9fcd010d8fd3 terminate monitor process on unwind
Claus Gittinger <cg@exept.de>
parents: 678
diff changeset
  1162
        dfMonitorProcess := nil.
678
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1163
    ].
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1164
    copyProcess notNil ifTrue:[
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1165
        copyProcess terminate.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1166
        copyProcess := nil.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1167
    ].
0
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1168
    ^ ok
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1169
678
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1170
    "
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1171
     STXInstaller open
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1172
    "
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1173
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1174
    "Created: / 17.7.1996 / 15:11:27 / cg"
790
79bc027907ee checkin from browser
Claus Gittinger <cg@exept.de>
parents: 682
diff changeset
  1175
    "Modified: / 20.4.1998 / 15:36:40 / cg"
0
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1176
!
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1177
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1178
open
1
7ebb34d8f3df checkin from browser
Claus Gittinger <cg@exept.de>
parents: 0
diff changeset
  1179
    self askAndInstall.
0
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1180
5
16cff74f42b0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4
diff changeset
  1181
    "
16cff74f42b0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4
diff changeset
  1182
     STXInstaller open
16cff74f42b0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4
diff changeset
  1183
    "
1
7ebb34d8f3df checkin from browser
Claus Gittinger <cg@exept.de>
parents: 0
diff changeset
  1184
!
7ebb34d8f3df checkin from browser
Claus Gittinger <cg@exept.de>
parents: 0
diff changeset
  1185
7ebb34d8f3df checkin from browser
Claus Gittinger <cg@exept.de>
parents: 0
diff changeset
  1186
postInstall
7ebb34d8f3df checkin from browser
Claus Gittinger <cg@exept.de>
parents: 0
diff changeset
  1187
    "some messages at the end ..."
7ebb34d8f3df checkin from browser
Claus Gittinger <cg@exept.de>
parents: 0
diff changeset
  1188
4
8b68fdf7c870 better looking; show command output
Claus Gittinger <cg@exept.de>
parents: 3
diff changeset
  1189
    |shInfo cshInfo msg havePath|
1
7ebb34d8f3df checkin from browser
Claus Gittinger <cg@exept.de>
parents: 0
diff changeset
  1190
678
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1191
    resources isNil ifTrue:[
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1192
        resources := ResourcePack for:self class.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1193
    ].
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1194
11
9bc23682b68c national strings
Claus Gittinger <cg@exept.de>
parents: 10
diff changeset
  1195
    msg := (resources string:'ST/X Installation complete.\\') withCRs.
1
7ebb34d8f3df checkin from browser
Claus Gittinger <cg@exept.de>
parents: 0
diff changeset
  1196
    shInfo := ''.
7ebb34d8f3df checkin from browser
Claus Gittinger <cg@exept.de>
parents: 0
diff changeset
  1197
    cshInfo := ''.
7ebb34d8f3df checkin from browser
Claus Gittinger <cg@exept.de>
parents: 0
diff changeset
  1198
1010
d744cc925443 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 793
diff changeset
  1199
    installWhat == #full ifTrue:[
678
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1200
        msg := msg , 'You will now find a development directory hierarchy
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1201
in ''' , fullDir asText allBold , '''.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1202
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1203
To try it, ''cd'' to ''' , fullDir , '/projects/smalltalk''
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1204
and start smalltalk with the command: ''./smalltalk''.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1205
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1206
To perform a partial installation of your customized smalltalk later,
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1207
use the INSTALL script found in ''' , fullDir , ''''.
1
7ebb34d8f3df checkin from browser
Claus Gittinger <cg@exept.de>
parents: 0
diff changeset
  1208
678
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1209
    ] ifFalse:[
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1210
        havePath := true.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1211
        (((OperatingSystem getEnvironment:'PATH')
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1212
            asCollectionOfSubstringsSeparatedBy:$:)
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1213
                includes:stxBinDir) ifFalse:[
1