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