STXInstaller.st
author Claus Gittinger <cg@exept.de>
Wed, 25 Feb 1998 19:43:54 +0100
changeset 678 4dd439ebf162
parent 277 935f9a055594
child 682 9fcd010d8fd3
permissions -rw-r--r--
added full installation
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
9bc23682b68c national strings
Claus Gittinger <cg@exept.de>
parents: 10
diff changeset
   265
copyFiles
678
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   266
    |msg fileSpec filesToCopy numFiles nDone cmd|
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   267
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   268
     msg := (resources array:#('ST/X Installation' '' 'copying:' '' 'to:' '')) asStringCollection.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   269
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   270
    fullInstallation ifTrue:[
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   271
        msg at:4 put:('    all from CD' asText allBold).
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   272
        msg at:6 put:'    ' , (fullDir asText allBold).
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   273
        actionTextHolder value:nil.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   274
        actionTextHolder value:msg.
11
9bc23682b68c national strings
Claus Gittinger <cg@exept.de>
parents: 10
diff changeset
   275
678
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   276
        cmd := 'cp -r ../../* ' , fullDir.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   277
        "/
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   278
        "/ not all systems have cp -rv
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   279
        "/
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   280
        OperatingSystem getOSType = 'linux' ifTrue:[
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   281
            cmd := 'cp -rv ../../* ' , fullDir.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   282
        ].
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   283
        commandTraceView showCR:cmd , ' ...'.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   284
        commandTraceView endEntry.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   285
        cmd := cmd , ' 2>&1' .
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   286
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   287
        self executeCommandAndShowOutput:cmd.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   288
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   289
        ^ true
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   290
    ].
11
9bc23682b68c national strings
Claus Gittinger <cg@exept.de>
parents: 10
diff changeset
   291
9bc23682b68c national strings
Claus Gittinger <cg@exept.de>
parents: 10
diff changeset
   292
    fileSpec := self specOfFilesToCopy.
9bc23682b68c national strings
Claus Gittinger <cg@exept.de>
parents: 10
diff changeset
   293
0
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   294
    filesToCopy := OrderedCollection new.
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   295
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   296
    fileSpec do:[:entry |
8
88df33224360 oops - did not copy file*
Claus Gittinger <cg@exept.de>
parents: 7
diff changeset
   297
        |fileNames dest subDir required destDir|
0
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   298
8
88df33224360 oops - did not copy file*
Claus Gittinger <cg@exept.de>
parents: 7
diff changeset
   299
        fileNames := entry at:1.
0
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   300
        dest := entry at:2.
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   301
        subDir := entry at:3.
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   302
        required := entry at:4.
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   303
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   304
        dest == #bin ifTrue:[
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   305
            destDir := stxBinDir
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   306
        ] ifFalse:[
24
2b61cca30b01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 23
diff changeset
   307
            dest == #libBin ifTrue:[
2b61cca30b01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 23
diff changeset
   308
                destDir := stxLibBinDir
2b61cca30b01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 23
diff changeset
   309
            ] ifFalse:[
2b61cca30b01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 23
diff changeset
   310
                destDir := stxLibDir
2b61cca30b01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 23
diff changeset
   311
            ]
0
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   312
        ].
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   313
        
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   314
        destDir := destDir asFilename.
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   315
        subDir notNil ifTrue:[
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   316
            destDir := destDir construct:subDir
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   317
        ].
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   318
8
88df33224360 oops - did not copy file*
Claus Gittinger <cg@exept.de>
parents: 7
diff changeset
   319
        filesToCopy add:(fileNames -> destDir pathName)
0
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   320
    ].
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   321
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   322
    numFiles := filesToCopy size.
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   323
    nDone := 0.
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   324
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   325
    filesToCopy do:[:entry |
678
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   326
        |fileName destDir cmd|
0
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   327
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   328
        fileName := entry key.
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   329
        destDir := entry value.
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   330
8
88df33224360 oops - did not copy file*
Claus Gittinger <cg@exept.de>
parents: 7
diff changeset
   331
        ((fileName includes:$*)
88df33224360 oops - did not copy file*
Claus Gittinger <cg@exept.de>
parents: 7
diff changeset
   332
        or:[('../../' , fileName) asFilename exists])ifTrue:[
4
8b68fdf7c870 better looking; show command output
Claus Gittinger <cg@exept.de>
parents: 3
diff changeset
   333
            actionPercentageHolder value:(nDone / numFiles * 100) rounded.
0
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   334
4
8b68fdf7c870 better looking; show command output
Claus Gittinger <cg@exept.de>
parents: 3
diff changeset
   335
            msg at:4 put:'    ' , (fileName asText allBold).
8b68fdf7c870 better looking; show command output
Claus Gittinger <cg@exept.de>
parents: 3
diff changeset
   336
            msg at:6 put:'    ' , (destDir asText allBold).
8b68fdf7c870 better looking; show command output
Claus Gittinger <cg@exept.de>
parents: 3
diff changeset
   337
            actionTextHolder value:nil.
8b68fdf7c870 better looking; show command output
Claus Gittinger <cg@exept.de>
parents: 3
diff changeset
   338
            actionTextHolder value:msg.
8b68fdf7c870 better looking; show command output
Claus Gittinger <cg@exept.de>
parents: 3
diff changeset
   339
73
2087134eea96 better messages;
Claus Gittinger <cg@exept.de>
parents: 31
diff changeset
   340
            ((fileName includes:$*) not
2087134eea96 better messages;
Claus Gittinger <cg@exept.de>
parents: 31
diff changeset
   341
            and:[('../../' , fileName) asFilename exists not]) ifTrue:[
2087134eea96 better messages;
Claus Gittinger <cg@exept.de>
parents: 31
diff changeset
   342
                (self listOfOptionalPackages includes:fileName) ifFalse:[
117
45af2b7a5eca checkin from browser
Claus Gittinger <cg@exept.de>
parents: 73
diff changeset
   343
                    commandTraceView showCR:('cannot copy ' , fileName , ' - not included in distribution').
45af2b7a5eca checkin from browser
Claus Gittinger <cg@exept.de>
parents: 73
diff changeset
   344
                    commandTraceView endEntry.
73
2087134eea96 better messages;
Claus Gittinger <cg@exept.de>
parents: 31
diff changeset
   345
                ]
2087134eea96 better messages;
Claus Gittinger <cg@exept.de>
parents: 31
diff changeset
   346
            ] ifFalse:[
2087134eea96 better messages;
Claus Gittinger <cg@exept.de>
parents: 31
diff changeset
   347
                cmd := 'cp -r ../../' , fileName , ' ' , destDir.
2087134eea96 better messages;
Claus Gittinger <cg@exept.de>
parents: 31
diff changeset
   348
                commandTraceView showCR:cmd , ' ...'.
117
45af2b7a5eca checkin from browser
Claus Gittinger <cg@exept.de>
parents: 73
diff changeset
   349
                commandTraceView endEntry.
73
2087134eea96 better messages;
Claus Gittinger <cg@exept.de>
parents: 31
diff changeset
   350
                cmd := cmd , ' 2>&1' .
1
7ebb34d8f3df checkin from browser
Claus Gittinger <cg@exept.de>
parents: 0
diff changeset
   351
678
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   352
                self executeCommandAndShowOutput:cmd
73
2087134eea96 better messages;
Claus Gittinger <cg@exept.de>
parents: 31
diff changeset
   353
            ]
1
7ebb34d8f3df checkin from browser
Claus Gittinger <cg@exept.de>
parents: 0
diff changeset
   354
        ].
0
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   355
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   356
        nDone := nDone + 1
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   357
    ].
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   358
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   359
    ^ true
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   360
678
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   361
    "
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   362
     STXInstaller open
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   363
    "
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   364
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   365
    "Created: / 17.7.1996 / 15:16:20 / cg"
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   366
    "Modified: / 25.2.1998 / 18:30:53 / cg"
0
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   367
!
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   368
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   369
createDirectories
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   370
    |msg dirsToMake numDirs nDone|
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   371
11
9bc23682b68c national strings
Claus Gittinger <cg@exept.de>
parents: 10
diff changeset
   372
    msg := (resources array:#('ST/X Installation' '' 'creating directory:' '' '' '')) asStringCollection.
0
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   373
11
9bc23682b68c national strings
Claus Gittinger <cg@exept.de>
parents: 10
diff changeset
   374
    dirsToMake := self directoriesToMake.
0
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   375
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   376
    numDirs := dirsToMake size.
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   377
    nDone := 0.
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   378
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   379
    dirsToMake do:[:dirName |
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   380
        |d errMsg stop box|
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   381
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   382
        actionPercentageHolder value:(nDone / numDirs * 100) rounded.
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   383
4
8b68fdf7c870 better looking; show command output
Claus Gittinger <cg@exept.de>
parents: 3
diff changeset
   384
        msg at:4 put:'    ' , (dirName asText allBold).
0
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   385
        actionTextHolder value:nil.
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   386
        actionTextHolder value:msg.
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   387
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   388
        d := dirName asFilename.
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
        commandTraceView showCR:(resources string:'creating %1 ...' with:d pathName).
117
45af2b7a5eca checkin from browser
Claus Gittinger <cg@exept.de>
parents: 73
diff changeset
   391
        commandTraceView endEntry.
4
8b68fdf7c870 better looking; show command output
Claus Gittinger <cg@exept.de>
parents: 3
diff changeset
   392
0
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   393
        d exists ifFalse:[
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   394
            OperatingSystem recursiveCreateDirectory:d pathName
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   395
        ].
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   396
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   397
        d exists ifFalse:[
11
9bc23682b68c national strings
Claus Gittinger <cg@exept.de>
parents: 10
diff changeset
   398
            errMsg := resources string:'failed to create directory: %1' with: dirName.
0
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   399
            stop := true
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   400
        ] ifTrue:[
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   401
            d isDirectory ifFalse:[
11
9bc23682b68c national strings
Claus Gittinger <cg@exept.de>
parents: 10
diff changeset
   402
                errMsg := resources string:'not a directory: %1' with:dirName.
0
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   403
                stop := true
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   404
            ] ifTrue:[
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   405
                (d isReadable
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   406
                and:[d isWritable]) ifFalse:[
11
9bc23682b68c national strings
Claus Gittinger <cg@exept.de>
parents: 10
diff changeset
   407
                    errMsg := resources string:'no read/write access to directory: %1' with:dirName.
0
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   408
                    stop := false
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   409
                ] ifTrue:[
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   410
                    errMsg := nil
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   411
                ]
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   412
            ]
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
        errMsg notNil ifTrue:[
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   416
            box := WarningBox new.
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   417
            box title:errMsg.
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   418
            box showAtPointerNotCovering:(WindowGroup activeGroup topViews first).
1
7ebb34d8f3df checkin from browser
Claus Gittinger <cg@exept.de>
parents: 0
diff changeset
   419
            stop ifTrue:[^ false].
0
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   420
        ].
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   421
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   422
        Delay waitForSeconds:0.25.
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   423
        nDone := nDone + 1.
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   424
    ].
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   425
    ^ true
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   426
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   427
    "Created: 17.7.1996 / 15:24:19 / cg"
117
45af2b7a5eca checkin from browser
Claus Gittinger <cg@exept.de>
parents: 73
diff changeset
   428
    "Modified: 22.5.1997 / 15:06:41 / cg"
19
504c3ad987d1 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 18
diff changeset
   429
!
504c3ad987d1 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 18
diff changeset
   430
504c3ad987d1 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 18
diff changeset
   431
createSymbolicLinks
504c3ad987d1 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 18
diff changeset
   432
    |msg dirsToMake numDirs nDone|
504c3ad987d1 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 18
diff changeset
   433
504c3ad987d1 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 18
diff changeset
   434
    msg := (resources array:#('ST/X Installation' '' 'creating symbolic links' '' '' '')) asStringCollection.
504c3ad987d1 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 18
diff changeset
   435
28
b3a8378dd626 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 27
diff changeset
   436
    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
   437
    commandTraceView endEntry.
678
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   438
    fullInstallation ifTrue:[
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   439
        OperatingSystem executeCommand:('(cd ' , fullDir , '/doc/online ; make links)').
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   440
    ] ifFalse:[
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   441
        OperatingSystem executeCommand:('(cd ' , stxLibDir , '/doc/online ; make links)').
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   442
    ].
19
504c3ad987d1 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 18
diff changeset
   443
    ^ true
504c3ad987d1 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 18
diff changeset
   444
678
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   445
    "Created: / 17.7.1996 / 15:24:19 / cg"
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   446
    "Modified: / 25.2.1998 / 19:20:59 / cg"
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   447
!
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   448
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   449
executeCommandAndShowOutput:cmd
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   450
    |doneSemaphore line p|
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   451
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   452
    doneSemaphore := Semaphore new.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   453
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   454
    copyProcess := [   
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   455
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   456
        p := PipeStream readingFrom:cmd.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   457
        p isNil ifTrue:[
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   458
            self warn:('command error. Could not execute:\\' , cmd) withCRs.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   459
        ] ifFalse:[
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   460
            [
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   461
                [p atEnd] whileFalse:[
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   462
                    (p readWaitWithTimeout:0.1) ifFalse:[
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   463
                        line := p nextLine.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   464
                        (line notNil and:[line notEmpty]) ifTrue:[
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   465
                            commandTraceView showCR:(('  ' , line) asText emphasizeAllWith:(#color->Color red)).
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   466
                            commandTraceView endEntry.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   467
                        ]
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   468
                    ]
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
                p close.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   471
            ] valueOnUnwindDo:[
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   472
                p shutDown
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
        ].
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   475
        doneSemaphore signal.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   476
        copyProcess := nil.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   477
    ] forkAt:4.
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
    doneSemaphore wait.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   480
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   481
    "Created: / 25.2.1998 / 17:46:06 / cg"
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   482
    "Modified: / 25.2.1998 / 18:36:50 / cg"
73
2087134eea96 better messages;
Claus Gittinger <cg@exept.de>
parents: 31
diff changeset
   483
!
2087134eea96 better messages;
Claus Gittinger <cg@exept.de>
parents: 31
diff changeset
   484
2087134eea96 better messages;
Claus Gittinger <cg@exept.de>
parents: 31
diff changeset
   485
outputInitialMessage
2087134eea96 better messages;
Claus Gittinger <cg@exept.de>
parents: 31
diff changeset
   486
    #(
2087134eea96 better messages;
Claus Gittinger <cg@exept.de>
parents: 31
diff changeset
   487
    'Notice:'
2087134eea96 better messages;
Claus Gittinger <cg@exept.de>
parents: 31
diff changeset
   488
    ''
2087134eea96 better messages;
Claus Gittinger <cg@exept.de>
parents: 31
diff changeset
   489
    'During the installation, you may get error messages'
2087134eea96 better messages;
Claus Gittinger <cg@exept.de>
parents: 31
diff changeset
   490
    'complaining that some files where not found'
2087134eea96 better messages;
Claus Gittinger <cg@exept.de>
parents: 31
diff changeset
   491
    'and could therefore not be copied.'
2087134eea96 better messages;
Claus Gittinger <cg@exept.de>
parents: 31
diff changeset
   492
    ) do:[:line |
2087134eea96 better messages;
Claus Gittinger <cg@exept.de>
parents: 31
diff changeset
   493
        commandTraceView showCR:((resources string:line) asText emphasizeAllWith:(#color->Color blue)).
2087134eea96 better messages;
Claus Gittinger <cg@exept.de>
parents: 31
diff changeset
   494
        commandTraceView endEntry. 
2087134eea96 better messages;
Claus Gittinger <cg@exept.de>
parents: 31
diff changeset
   495
    ].
2087134eea96 better messages;
Claus Gittinger <cg@exept.de>
parents: 31
diff changeset
   496
2087134eea96 better messages;
Claus Gittinger <cg@exept.de>
parents: 31
diff changeset
   497
    Delay waitForSeconds:2.
2087134eea96 better messages;
Claus Gittinger <cg@exept.de>
parents: 31
diff changeset
   498
2087134eea96 better messages;
Claus Gittinger <cg@exept.de>
parents: 31
diff changeset
   499
    #(
2087134eea96 better messages;
Claus Gittinger <cg@exept.de>
parents: 31
diff changeset
   500
    ''
2087134eea96 better messages;
Claus Gittinger <cg@exept.de>
parents: 31
diff changeset
   501
    'This is normal behavior; since the CD may contain'
2087134eea96 better messages;
Claus Gittinger <cg@exept.de>
parents: 31
diff changeset
   502
    'broken symbolic links to non-existing packages'
2087134eea96 better messages;
Claus Gittinger <cg@exept.de>
parents: 31
diff changeset
   503
    'which are either not contained on your ordered'
276
c8b7fd1fcec5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 237
diff changeset
   504
    'package (i.e. non-commercial) or are not required'
c8b7fd1fcec5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 237
diff changeset
   505
    'for your architecture (and therefore not contained'
c8b7fd1fcec5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 237
diff changeset
   506
    'on the CD).'
c8b7fd1fcec5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 237
diff changeset
   507
    ''
73
2087134eea96 better messages;
Claus Gittinger <cg@exept.de>
parents: 31
diff changeset
   508
    ) do:[:line |
2087134eea96 better messages;
Claus Gittinger <cg@exept.de>
parents: 31
diff changeset
   509
        commandTraceView showCR:((resources string:line) asText emphasizeAllWith:(#color->Color blue)).
2087134eea96 better messages;
Claus Gittinger <cg@exept.de>
parents: 31
diff changeset
   510
        commandTraceView endEntry.
2087134eea96 better messages;
Claus Gittinger <cg@exept.de>
parents: 31
diff changeset
   511
    ].
2087134eea96 better messages;
Claus Gittinger <cg@exept.de>
parents: 31
diff changeset
   512
2087134eea96 better messages;
Claus Gittinger <cg@exept.de>
parents: 31
diff changeset
   513
    Delay waitForSeconds:2.
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
    #(
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
    'Please excuse this inconvenience.'
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
    ) do:[:line |
2087134eea96 better messages;
Claus Gittinger <cg@exept.de>
parents: 31
diff changeset
   520
        commandTraceView showCR:((resources string:line) asText emphasizeAllWith:(#color->Color blue)).
2087134eea96 better messages;
Claus Gittinger <cg@exept.de>
parents: 31
diff changeset
   521
        commandTraceView endEntry.
2087134eea96 better messages;
Claus Gittinger <cg@exept.de>
parents: 31
diff changeset
   522
    ].
2087134eea96 better messages;
Claus Gittinger <cg@exept.de>
parents: 31
diff changeset
   523
2087134eea96 better messages;
Claus Gittinger <cg@exept.de>
parents: 31
diff changeset
   524
    Delay waitForSeconds:2.
2087134eea96 better messages;
Claus Gittinger <cg@exept.de>
parents: 31
diff changeset
   525
2087134eea96 better messages;
Claus Gittinger <cg@exept.de>
parents: 31
diff changeset
   526
    "Created: 2.3.1997 / 12:49:52 / cg"
276
c8b7fd1fcec5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 237
diff changeset
   527
    "Modified: 8.8.1997 / 17:47:06 / cg"
0
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   528
! !
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   529
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   530
!STXInstaller methodsFor:'startup'!
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   531
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   532
askAndInstall
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   533
    "/ check, if we are in the projects/smalltalk directory
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   534
678
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   535
    |answer|
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   536
11
9bc23682b68c national strings
Claus Gittinger <cg@exept.de>
parents: 10
diff changeset
   537
    resources := ResourcePack for:self class.
9bc23682b68c national strings
Claus Gittinger <cg@exept.de>
parents: 10
diff changeset
   538
0
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   539
    (Filename currentDirectory pathName endsWith:'projects/smalltalk') ifFalse:[
11
9bc23682b68c national strings
Claus Gittinger <cg@exept.de>
parents: 10
diff changeset
   540
        self warn:(resources string:'must be in the ''projects/smalltalk'' directory').
0
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   541
        ^ self
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   542
    ].
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   543
678
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   544
    answer := self askForFullInstallation.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   545
    answer ifFalse:[^ self].
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   546
0
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   547
    [self askForDestination] whileTrue:[
73
2087134eea96 better messages;
Claus Gittinger <cg@exept.de>
parents: 31
diff changeset
   548
        self checkForExistingInstallationAndConfirm ifTrue:[
2087134eea96 better messages;
Claus Gittinger <cg@exept.de>
parents: 31
diff changeset
   549
            self preInstall.
2087134eea96 better messages;
Claus Gittinger <cg@exept.de>
parents: 31
diff changeset
   550
            self doInstall ifTrue:[
2087134eea96 better messages;
Claus Gittinger <cg@exept.de>
parents: 31
diff changeset
   551
                self postInstall.
2087134eea96 better messages;
Claus Gittinger <cg@exept.de>
parents: 31
diff changeset
   552
                ^ self
2087134eea96 better messages;
Claus Gittinger <cg@exept.de>
parents: 31
diff changeset
   553
            ].
2087134eea96 better messages;
Claus Gittinger <cg@exept.de>
parents: 31
diff changeset
   554
            (self confirm:(resources string:'installation failed or aborted - retry ?'))
2087134eea96 better messages;
Claus Gittinger <cg@exept.de>
parents: 31
diff changeset
   555
            ifFalse:[
2087134eea96 better messages;
Claus Gittinger <cg@exept.de>
parents: 31
diff changeset
   556
                ^ self
2087134eea96 better messages;
Claus Gittinger <cg@exept.de>
parents: 31
diff changeset
   557
            ]
0
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   558
        ]
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   559
    ].
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   560
678
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   561
    "Modified: / 25.2.1998 / 16:54:51 / cg"
0
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   562
!
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   563
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   564
askForDestination
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   565
    "open a dialog to enter destination directories"
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   566
678
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   567
    fullInstallation ifTrue:[
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   568
        ^ self askForDestinationForFullInstallation
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   569
    ] ifFalse:[
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   570
        ^ self askForDestinationForPartialInstallation
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   571
    ]
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   572
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   573
    "
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   574
     STXInstaller open
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   575
    "
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   576
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   577
    "Modified: / 25.2.1998 / 17:12:45 / cg"
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   578
!
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   579
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   580
askForDestinationForFullInstallation
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   581
    "open a dialog to enter destination directories"
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   582
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   583
    |d cm l green dark img
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   584
     fullDirHolder|
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   585
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   586
    LastFullDir isNil ifTrue:[
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   587
        LastFullDir := (Filename homeDirectory 
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   588
                            construct:'stx')
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   589
                            constructString:'develop'
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
    fullDirHolder := LastFullDir asValue.
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
    Screen current hasColors ifTrue:[
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   595
        green := (Color red:0 green:80 blue:20) "darkened".
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   596
        dark := Color grey:10.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   597
    ] ifFalse:[
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   598
        green := Color white.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   599
        dark := Color black.
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
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   602
    d := DialogBox new.
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
    d label:(resources string:'ST/X Full Installation').
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   605
    img := Image fromFile:'SmalltalkX.xbm'.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   606
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   607
    l := d addTextLabel:img.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   608
    l adjust:#left; foregroundColor:green backgroundColor:dark.
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
    l := d addTextLabel:(resources string:'Smalltalk/X CD installation (full).').
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   611
    l adjust:#left; backgroundColor:dark; foregroundColor:Color white.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   612
    d addVerticalSpace.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   613
    d addVerticalSpace.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   614
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   615
    d addHorizontalLine.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   616
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   617
    l := d addTextLabel:(resources string:'ST/X development directory:').
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   618
    l adjust:#left; backgroundColor:dark; foregroundColor:Color white.
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
    cm := ComboBoxView on:fullDirHolder.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   621
    cm list:self defaultFullDirs.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   622
    d 
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   623
        addLabelledField:cm 
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   624
        label:(resources string:'stx develop')
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   625
        adjust:#left 
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   626
        tabable:true 
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   627
        from:0.0 to:1.0 separateAtX:0.25
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   628
        nameAs:'fullBox'.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   629
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   630
    (d componentAt:'fullBox.label') backgroundColor:dark; foregroundColor:Color white.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   631
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   632
    d addVerticalSpace.
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
    d addHelpButtonFor:'STXInstaller/installHelp.html';
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   636
      addAbortButton; 
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   637
      addOkButtonLabelled:(resources string:'install').
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   638
    d extent:500@400.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   639
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   640
    d allViewBackground:dark.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   641
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   642
    d openAtCenter.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   643
    d accepted ifTrue:[
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   644
        fullDir := LastFullDir := fullDirHolder value.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   645
        d destroy.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   646
        ^ true
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 destroy.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   649
    ^ false
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   650
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   651
    "
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   652
     STXInstaller open
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   653
    "
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   654
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   655
    "Created: / 25.2.1998 / 17:11:37 / cg"
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   656
    "Modified: / 25.2.1998 / 17:29:07 / cg"
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
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   659
askForDestinationForPartialInstallation
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   660
    "open a dialog to enter destination directories"
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   661
2
936a4407697b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1
diff changeset
   662
    |d cm l green dark img
24
2b61cca30b01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 23
diff changeset
   663
     stxLibDirHolder stxLibBinDirHolder stxBinDirHolder
5
16cff74f42b0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4
diff changeset
   664
     installDocHolder installSourceHolder installSTCHolder installGoodiesHolder
73
2087134eea96 better messages;
Claus Gittinger <cg@exept.de>
parents: 31
diff changeset
   665
     binMegabytes libMegabytes docMegabytes stcMegabytes srcMegabytes
0
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   666
    |
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   667
678
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   668
    binMegabytes := 12.
73
2087134eea96 better messages;
Claus Gittinger <cg@exept.de>
parents: 31
diff changeset
   669
    libMegabytes := 30.
678
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   670
    docMegabytes := 15.
73
2087134eea96 better messages;
Claus Gittinger <cg@exept.de>
parents: 31
diff changeset
   671
    stcMegabytes := 1.
678
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   672
    srcMegabytes := 20.
11
9bc23682b68c national strings
Claus Gittinger <cg@exept.de>
parents: 10
diff changeset
   673
0
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   674
    LastLibDir isNil ifTrue:[
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   675
        LastLibDir := '/usr/local/lib/smalltalk'
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   676
    ].
24
2b61cca30b01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 23
diff changeset
   677
    LastLibBinDir isNil ifTrue:[
2b61cca30b01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 23
diff changeset
   678
        LastLibBinDir := '/usr/local/lib'
2b61cca30b01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 23
diff changeset
   679
    ].
0
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   680
    LastBinDir isNil ifTrue:[
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   681
        LastBinDir := '/usr/local/bin'
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   682
    ].
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   683
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   684
    stxLibDirHolder := LastLibDir asValue.
24
2b61cca30b01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 23
diff changeset
   685
    stxLibBinDirHolder := LastLibBinDir asValue.
0
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   686
    stxBinDirHolder := LastBinDir asValue.
24
2b61cca30b01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 23
diff changeset
   687
5
16cff74f42b0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4
diff changeset
   688
    installDocHolder := true asValue.
16cff74f42b0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4
diff changeset
   689
    installSourceHolder := true asValue.
16cff74f42b0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4
diff changeset
   690
    installSTCHolder := true asValue.
16cff74f42b0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4
diff changeset
   691
    installGoodiesHolder := true asValue.
0
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   692
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   693
    Screen current hasColors ifTrue:[
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   694
        green := (Color red:0 green:80 blue:20) "darkened".
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   695
        dark := Color grey:10.
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   696
    ] ifFalse:[
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   697
        green := Color white.
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   698
        dark := Color black.
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   699
    ].
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   700
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   701
    d := DialogBox new.
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   702
678
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   703
    d label:(resources string:'ST/X Partial Installation').
2
936a4407697b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1
diff changeset
   704
    img := Image fromFile:'SmalltalkX.xbm'.
936a4407697b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1
diff changeset
   705
936a4407697b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1
diff changeset
   706
    l := d addTextLabel:img.
936a4407697b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1
diff changeset
   707
    l adjust:#left; foregroundColor:green backgroundColor:dark.
936a4407697b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1
diff changeset
   708
678
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   709
    l := d addTextLabel:(resources string:'Smalltalk/X CD installation (partial).').
0
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   710
    l adjust:#left; backgroundColor:dark; foregroundColor:Color white.
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   711
    d addVerticalSpace.
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   712
    d addVerticalSpace.
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   713
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   714
    d addHorizontalLine.
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   715
11
9bc23682b68c national strings
Claus Gittinger <cg@exept.de>
parents: 10
diff changeset
   716
    l := d addTextLabel:(resources string:'Destination directories:').
0
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   717
    l adjust:#left; backgroundColor:dark; foregroundColor:Color white.
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   718
678
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   719
    l := d addTextLabel:(resources string:'(the defaults below are recommended)').
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   720
    l adjust:#right; backgroundColor:dark; foregroundColor:Color white.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   721
0
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   722
    cm := ComboBoxView on:stxBinDirHolder.
1
7ebb34d8f3df checkin from browser
Claus Gittinger <cg@exept.de>
parents: 0
diff changeset
   723
    cm list:self defaultBinDirs.
0
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   724
    d 
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   725
        addLabelledField:cm 
11
9bc23682b68c national strings
Claus Gittinger <cg@exept.de>
parents: 10
diff changeset
   726
        label:(resources string:'binaries')
0
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   727
        adjust:#left 
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   728
        tabable:true 
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   729
        from:0.0 to:1.0 separateAtX:0.25
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   730
        nameAs:'binaryBox'.
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 componentAt:'binaryBox.label') backgroundColor:dark; foregroundColor:Color white.
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   733
24
2b61cca30b01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 23
diff changeset
   734
    cm := ComboBoxView on:stxLibBinDirHolder.
2b61cca30b01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 23
diff changeset
   735
    cm list:self defaultLibBinDirs.
2b61cca30b01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 23
diff changeset
   736
    d 
2b61cca30b01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 23
diff changeset
   737
        addLabelledField:cm 
2b61cca30b01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 23
diff changeset
   738
        label:(resources string:'libraries') 
2b61cca30b01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 23
diff changeset
   739
        adjust:#left 
2b61cca30b01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 23
diff changeset
   740
        tabable:true 
2b61cca30b01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 23
diff changeset
   741
        from:0.0 to:1.0 separateAtX:0.25
2b61cca30b01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 23
diff changeset
   742
        nameAs:'libraryBinBox'.
2b61cca30b01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 23
diff changeset
   743
2b61cca30b01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 23
diff changeset
   744
    (d componentAt:'libraryBinBox.label') backgroundColor:dark; foregroundColor:Color white.
2b61cca30b01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 23
diff changeset
   745
0
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   746
    cm := ComboBoxView on:stxLibDirHolder.
1
7ebb34d8f3df checkin from browser
Claus Gittinger <cg@exept.de>
parents: 0
diff changeset
   747
    cm list:self defaultLibDirs.
0
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   748
    d 
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   749
        addLabelledField:cm 
117
45af2b7a5eca checkin from browser
Claus Gittinger <cg@exept.de>
parents: 73
diff changeset
   750
        label:(resources string:'other files') 
0
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   751
        adjust:#left 
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   752
        tabable:true 
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   753
        from:0.0 to:1.0 separateAtX:0.25
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   754
        nameAs:'libraryBox'.
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   755
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   756
    (d componentAt:'libraryBox.label') backgroundColor:dark; foregroundColor:Color white.
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   757
5
16cff74f42b0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4
diff changeset
   758
    d addVerticalSpace.
16cff74f42b0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4
diff changeset
   759
    d addHorizontalLine.
16cff74f42b0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4
diff changeset
   760
    d addVerticalSpace.
16cff74f42b0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4
diff changeset
   761
11
9bc23682b68c national strings
Claus Gittinger <cg@exept.de>
parents: 10
diff changeset
   762
    (d addTextLabel:(resources string:'required:'))
5
16cff74f42b0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4
diff changeset
   763
        adjust:#left; foregroundColor:Color white backgroundColor:dark.
16cff74f42b0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4
diff changeset
   764
16cff74f42b0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4
diff changeset
   765
    d leftIndent:35.
11
9bc23682b68c national strings
Claus Gittinger <cg@exept.de>
parents: 10
diff changeset
   766
    (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
   767
        adjust:#left; foregroundColor:Color white backgroundColor:dark.
11
9bc23682b68c national strings
Claus Gittinger <cg@exept.de>
parents: 10
diff changeset
   768
    (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
   769
        adjust:#left; foregroundColor:Color white backgroundColor:dark.
16cff74f42b0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4
diff changeset
   770
    d leftIndent:0.
16cff74f42b0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4
diff changeset
   771
16cff74f42b0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4
diff changeset
   772
    d addVerticalSpace.
16cff74f42b0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4
diff changeset
   773
    d addHorizontalLine.
16cff74f42b0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4
diff changeset
   774
    d addVerticalSpace.
16cff74f42b0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4
diff changeset
   775
11
9bc23682b68c national strings
Claus Gittinger <cg@exept.de>
parents: 10
diff changeset
   776
    (d addTextLabel:(resources string:'optional:'))
5
16cff74f42b0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4
diff changeset
   777
        adjust:#left; foregroundColor:Color white backgroundColor:dark.
16cff74f42b0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4
diff changeset
   778
73
2087134eea96 better messages;
Claus Gittinger <cg@exept.de>
parents: 31
diff changeset
   779
    (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
   780
        labelView foregroundColor:Color white backgroundColor:dark.
73
2087134eea96 better messages;
Claus Gittinger <cg@exept.de>
parents: 31
diff changeset
   781
    (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
   782
        labelView foregroundColor:Color white backgroundColor:dark.
c9574685e157 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 9
diff changeset
   783
c9574685e157 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 9
diff changeset
   784
    d addVerticalSpace.
c9574685e157 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 9
diff changeset
   785
    d addHorizontalLine.
c9574685e157 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 9
diff changeset
   786
    d addVerticalSpace.
c9574685e157 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 9
diff changeset
   787
11
9bc23682b68c national strings
Claus Gittinger <cg@exept.de>
parents: 10
diff changeset
   788
    (d addTextLabel:(resources string:'optional (but highly recommended):'))
10
c9574685e157 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 9
diff changeset
   789
        adjust:#left; foregroundColor:Color white backgroundColor:dark.
c9574685e157 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 9
diff changeset
   790
73
2087134eea96 better messages;
Claus Gittinger <cg@exept.de>
parents: 31
diff changeset
   791
    (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
   792
        labelView foregroundColor:Color white backgroundColor:dark.
73
2087134eea96 better messages;
Claus Gittinger <cg@exept.de>
parents: 31
diff changeset
   793
    (d addCheckBox:((resources string:'goodies (+0.5 Mb)')) on:installGoodiesHolder)
5
16cff74f42b0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4
diff changeset
   794
        labelView foregroundColor:Color white backgroundColor:dark.
16cff74f42b0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4
diff changeset
   795
16cff74f42b0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4
diff changeset
   796
    d addVerticalSpace.
16cff74f42b0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4
diff changeset
   797
    d addHorizontalLine.
16cff74f42b0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4
diff changeset
   798
24
2b61cca30b01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 23
diff changeset
   799
    d addHelpButtonFor:'STXInstaller/installHelp.html';
2b61cca30b01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 23
diff changeset
   800
      addAbortButton; 
2b61cca30b01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 23
diff changeset
   801
      addOkButtonLabelled:(resources string:'install').
73
2087134eea96 better messages;
Claus Gittinger <cg@exept.de>
parents: 31
diff changeset
   802
    d extent:500@400.
0
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   803
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   804
    d allViewBackground:dark.
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   805
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   806
    d openAtCenter.
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   807
    d accepted ifTrue:[
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   808
        stxLibDir := LastLibDir := stxLibDirHolder value.
24
2b61cca30b01 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 23
diff changeset
   809
        stxLibBinDir := LastLibBinDir := stxLibBinDirHolder value.
0
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   810
        stxBinDir := LastBinDir := stxBinDirHolder value.
5
16cff74f42b0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4
diff changeset
   811
        installDocFiles := installDocHolder value.
16cff74f42b0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4
diff changeset
   812
        installSourceFiles := installSourceHolder value.
16cff74f42b0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4
diff changeset
   813
        installSTCFiles := installSTCHolder value.
16cff74f42b0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4
diff changeset
   814
        installGoodyFiles := installGoodiesHolder value.
1
7ebb34d8f3df checkin from browser
Claus Gittinger <cg@exept.de>
parents: 0
diff changeset
   815
        d destroy.
0
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   816
        ^ true
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   817
    ].
1
7ebb34d8f3df checkin from browser
Claus Gittinger <cg@exept.de>
parents: 0
diff changeset
   818
    d destroy.
0
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   819
    ^ false
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   820
678
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   821
    "
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   822
     STXInstaller open
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   823
    "
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   824
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   825
    "Created: / 25.2.1998 / 17:11:26 / cg"
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   826
    "Modified: / 25.2.1998 / 19:43:30 / cg"
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   827
!
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   828
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   829
askForFullInstallation
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   830
    "open a dialog to enter destination directories"
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   831
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   832
    |d cm l green dark img|
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   833
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   834
    Screen current hasColors ifTrue:[
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   835
        green := (Color red:0 green:80 blue:20) "darkened".
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   836
        dark := Color grey:10.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   837
    ] ifFalse:[
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   838
        green := Color white.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   839
        dark := Color black.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   840
    ].
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
    d := DialogBox new.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   843
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   844
    d label:(resources string:'ST/X CD Installation').
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   845
    img := Image fromFile:'SmalltalkX.xbm'.
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
    l := d addTextLabel:img.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   848
    l adjust:#left; foregroundColor:green backgroundColor:dark.
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
    l := d addTextLabel:(resources string:'Smalltalk/X CD installation.').
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   851
    l adjust:#left; backgroundColor:dark; foregroundColor:Color white.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   852
    d addVerticalSpace.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   853
    d addVerticalSpace.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   854
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   855
    d addHorizontalLine.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   856
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   857
    l := d addTextLabel:(resources string:
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   858
'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
   859
    l adjust:#left; backgroundColor:dark; foregroundColor:Color white.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   860
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   861
    d addVerticalSpace.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   862
    d addHorizontalLine.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   863
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   864
    d leftIndent:20.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   865
    l := d addTextLabel:(resources string:
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   866
'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
   867
customized smalltalk executable. It allows you to include additional 
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   868
precompiled classes or classLibraries. 
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   869
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
   870
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   871
It consists of a directory hierachy, including makefiles for a customizeable 
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   872
rebuild of the whole smalltalk system.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   873
(Actually, it simply copies the whole CD contents onto your disk).
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   874
This requires roughly 120-200Mb of hard disk space.').
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   875
    l adjust:#left; backgroundColor:dark; foregroundColor:Color white.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   876
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   877
    d addVerticalSpace.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   878
    d addHorizontalLine.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   879
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   880
    l := d addTextLabel:(resources string:
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   881
'The partial installation requires less disk space and only copies the
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   882
smalltalk executable, shared libraries and support files onto your hard disk.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   883
This requires roughly 70-90Mb of hard disk space.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   884
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   885
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   886
 ').
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   887
    l adjust:#left; backgroundColor:dark; foregroundColor:Color white.
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
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   890
    d leftIndent:0.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   891
    d addVerticalSpace.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   892
    d addHorizontalLine.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   893
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 addHelpButtonFor:'STXInstaller/installHelp.html';
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   896
      addAbortButton; 
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   897
      addOkButton:(Button label:(resources string:'install full') action:[fullInstallation:=true]);
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   898
      addOkButtonLabelled:(resources string:'install partial').
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   899
    d extent:500@400.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   900
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   901
    d allViewBackground:dark.
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
    fullInstallation := false.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   904
    d openAtCenter.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   905
    d accepted ifTrue:[
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   906
        d destroy.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   907
        ^ true
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   908
    ].
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   909
    d destroy.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   910
    ^ false
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
     STXInstaller open
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   914
    "
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   915
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   916
    "Created: / 25.2.1998 / 16:50:16 / cg"
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   917
    "Modified: / 25.2.1998 / 19:42:31 / cg"
0
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   918
!
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   919
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   920
checkForExistingInstallationAndConfirm
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   921
    "look if there is another installation and confirm
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   922
     reinstalling; return true if ok, false if not"
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   923
678
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   924
    |whichDir canOverWrite whatToDo box|
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   925
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   926
    fullInstallation ifTrue:[
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   927
        whichDir := fullDir.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   928
        canOverWrite := false.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   929
    ] ifFalse:[
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   930
        whichDir := stxLibDir.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   931
        canOverWrite := true.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   932
    ].
1
7ebb34d8f3df checkin from browser
Claus Gittinger <cg@exept.de>
parents: 0
diff changeset
   933
678
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   934
    whichDir asFilename exists ifTrue:[
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   935
            whatToDo := Dialog 
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   936
                            choose:(resources 
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   937
                                        string:'detected existing ST/X installation in %1' 
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   938
                                          with:whichDir asText allBold)
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   939
                            label:(resources string:'Attention')
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   940
                            labels:(resources array:(canOverWrite 
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   941
                                                    ifFalse:[#('remove first' 'cancel')] 
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   942
                                                    ifTrue:[#('remove first' 'overwrite' 'cancel')] )) 
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   943
                            values:(canOverWrite ifFalse:[#(remove nil)] ifTrue:[#(remove over nil)])
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   944
                            default:nil.     
73
2087134eea96 better messages;
Claus Gittinger <cg@exept.de>
parents: 31
diff changeset
   945
678
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   946
            whatToDo isNil ifTrue:[^false].
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   947
            whatToDo == #remove ifTrue:[
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   948
                ((whichDir findString:'stx') == 0
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   949
                and:[(whichDir findString:'smalltalk') == 0]) ifTrue:[
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   950
                    "/ confirm again
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   951
                    (self confirm:(resources 
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   952
                                    string:'are you certain that the directory to remove
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   953
(' , 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
   954
73
2087134eea96 better messages;
Claus Gittinger <cg@exept.de>
parents: 31
diff changeset
   955
Remove it now ?')) ifFalse:[ 
678
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   956
                        ^ false
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   957
                    ]
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   958
                ].
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   959
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   960
                [
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   961
                    box := DialogBox new label:'please wait'.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   962
                    box addTextLabel:'removing ' , whichDir , ' ...'.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   963
                    box showAtPointer.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   964
                ] forkAt:(Processor activePriority+1).
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   965
                box waitUntilVisible.
23
42997b231783 double confirm removal of directory, if its name
Claus Gittinger <cg@exept.de>
parents: 22
diff changeset
   966
678
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   967
                (OperatingSystem recursiveRemoveDirectory:whichDir)
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   968
                ifFalse:[
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   969
                    self warn:(resources string:'mhmh - could not remove old installation.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   970
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   971
Please remove it manually (using root privileges if required) 
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   972
and try again.').
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   973
                    box destroy.
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
                box destroy
1
7ebb34d8f3df checkin from browser
Claus Gittinger <cg@exept.de>
parents: 0
diff changeset
   978
            ].
0
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   979
    ].
678
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   980
0
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   981
    ^ true
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   982
678
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   983
    "
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   984
     STXInstaller open
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   985
    "
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   986
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   987
    "Modified: / 25.2.1998 / 19:35:12 / cg"
0
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   988
!
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   989
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   990
doInstall
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   991
    "install ST/X; return true if ok, false if not"
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   992
678
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   993
    |progressView ok v textView p l 
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   994
     dirToMonitor doDfMonitoring dfMonitorProcess|
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   995
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   996
    doDfMonitoring := false.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   997
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   998
    v := View new preferredExtent:(250 @ 350).
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   999
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1000
    textView := HVScrollableView for:TextCollector in:v.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1001
    textView origin:0.0@0.0 corner:1.0@1.0.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1002
    textView bottomInset:30.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1003
    commandTraceView := textView scrolledView.
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
    fullInstallation ifTrue:[
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1006
        dirToMonitor := fullDir.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1007
    ] ifFalse:[
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1008
        dirToMonitor := stxLibDir
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1009
    ].
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1010
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1011
    (OperatingSystem canExecuteCommand:'df ' , dirToMonitor) ifTrue:[
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1012
        p := HorizontalPanelView in:v.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1013
        p origin:0.0@1.0 corner:1.0@1.0.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1014
        p topInset:-30.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1015
        p horizontalLayout:#fit.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1016
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1017
        l := Label label:'' in:p.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1018
        l labelChannel:(dfHolder := '' asValue).
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1019
        l adjust:#left.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1020
        dfMonitorProcess := [
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1021
            |ok p text keys values i l|
4
8b68fdf7c870 better looking; show command output
Claus Gittinger <cg@exept.de>
parents: 3
diff changeset
  1022
678
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1023
            ok := true.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1024
            [ok] whileTrue:[
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1025
                doDfMonitoring ifTrue:[
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1026
                    ok := false.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1027
                    p := PipeStream readingFrom:('df -k ' , dirToMonitor).
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1028
                    p notNil ifTrue:[
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1029
                       [
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1030
                           text := p contentsOfEntireFile.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1031
                       ] valueNowOrOnUnwindDo:[
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1032
                           p close.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1033
                       ].
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1034
"/ Transcript showCR:text asString.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1035
                       text notNil ifTrue:[
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1036
                           text := text asCollectionOfLines.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1037
                           text size >= 2 ifTrue:[
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1038
                               keys := (text at:1) asCollectionOfWords.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1039
                               values := (text at:2) asCollectionOfWords.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1040
                               i := (keys indexOf:'Capacity').
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1041
                               i == 0 ifTrue:[
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1042
                                   i := (keys indexOf:'capacity').
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1043
                               ].
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1044
                               i ~~ 0 ifTrue:[
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1045
                                   l := 'Used disk space: ' , (values at:i) withoutSeparators.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1046
                                   i := (keys indexOf:'Available').
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1047
                                   i == 0 ifTrue:[
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1048
                                       i := (keys indexOf:'available').
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1049
                                       i == 0 ifTrue:[
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1050
                                           i := (keys indexOf:'avail').
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1051
                                           i == 0 ifTrue:[
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1052
                                               i := (keys indexOf:'Avail').
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1053
                                           ].
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1054
                                       ].
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1055
                                   ].
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1056
                                   i ~~ 0 ifTrue:[
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1057
                                        l := l , ' (' , (values at:i) withoutSeparators , 'k available)'.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1058
                                   ].
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1059
                                   dfHolder value:l.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1060
                                   ok := true.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1061
                                   Delay waitForSeconds:9.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1062
                               ]
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1063
                           ]
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1064
                        ].
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1065
                    ].
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1066
                ].
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1067
                Delay waitForSeconds:1.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1068
            ]
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1069
        ] forkAt:(Processor activePriority+3)
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1070
    ].
0
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1071
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1072
    progressView := ProgressIndicator
26
6975669b213b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 25
diff changeset
  1073
                        inBoxWithLabel:'ST/X Installation' icon:(Depth8Image fromImage:Launcher aboutIcon)
0
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1074
                        text:#('ST/X Installation' '' '' '' '' '' '' '') asStringCollection
4
8b68fdf7c870 better looking; show command output
Claus Gittinger <cg@exept.de>
parents: 3
diff changeset
  1075
                        abortable:true
678
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1076
                        view:v
4
8b68fdf7c870 better looking; show command output
Claus Gittinger <cg@exept.de>
parents: 3
diff changeset
  1077
                        closeWhenDone:false.
73
2087134eea96 better messages;
Claus Gittinger <cg@exept.de>
parents: 31
diff changeset
  1078
    progressView topView extent:(640 min:Display width) @ (500 min:Display height).
0
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1079
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1080
    ok := false.
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1081
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1082
    progressView showProgressOf:
4
8b68fdf7c870 better looking; show command output
Claus Gittinger <cg@exept.de>
parents: 3
diff changeset
  1083
            [:progressValue :currentAction| |msg|
8b68fdf7c870 better looking; show command output
Claus Gittinger <cg@exept.de>
parents: 3
diff changeset
  1084
8b68fdf7c870 better looking; show command output
Claus Gittinger <cg@exept.de>
parents: 3
diff changeset
  1085
              Processor activeProcess withPriority:7 do:[
8b68fdf7c870 better looking; show command output
Claus Gittinger <cg@exept.de>
parents: 3
diff changeset
  1086
                  actionPercentageHolder := progressValue.
8b68fdf7c870 better looking; show command output
Claus Gittinger <cg@exept.de>
parents: 3
diff changeset
  1087
                  actionTextHolder := currentAction.
0
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1088
678
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1089
                  fullInstallation ifFalse:[
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1090
                        self outputInitialMessage.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1091
                  ].
73
2087134eea96 better messages;
Claus Gittinger <cg@exept.de>
parents: 31
diff changeset
  1092
4
8b68fdf7c870 better looking; show command output
Claus Gittinger <cg@exept.de>
parents: 3
diff changeset
  1093
                  (self createDirectories) ifTrue:[
678
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1094
                      doDfMonitoring := true.
4
8b68fdf7c870 better looking; show command output
Claus Gittinger <cg@exept.de>
parents: 3
diff changeset
  1095
                      ok := self copyFiles
8b68fdf7c870 better looking; show command output
Claus Gittinger <cg@exept.de>
parents: 3
diff changeset
  1096
                  ].
19
504c3ad987d1 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 18
diff changeset
  1097
                  self createSymbolicLinks.
504c3ad987d1 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 18
diff changeset
  1098
6
e08461c725fd show 100% when finished
Claus Gittinger <cg@exept.de>
parents: 5
diff changeset
  1099
                  progressValue value:100.
e08461c725fd show 100% when finished
Claus Gittinger <cg@exept.de>
parents: 5
diff changeset
  1100
11
9bc23682b68c national strings
Claus Gittinger <cg@exept.de>
parents: 10
diff changeset
  1101
                  progressView topView abortButton label:(resources string:'continue').
4
8b68fdf7c870 better looking; show command output
Claus Gittinger <cg@exept.de>
parents: 3
diff changeset
  1102
                  progressView topView abortButton action:[progressView topView hide].
11
9bc23682b68c national strings
Claus Gittinger <cg@exept.de>
parents: 10
diff changeset
  1103
                  msg := (resources 
9bc23682b68c national strings
Claus Gittinger <cg@exept.de>
parents: 10
diff changeset
  1104
                             array:#('ST/X Installation finished.' '' 'press continue ...' '' '' ''))
9bc23682b68c national strings
Claus Gittinger <cg@exept.de>
parents: 10
diff changeset
  1105
                                 asStringCollection.
4
8b68fdf7c870 better looking; show command output
Claus Gittinger <cg@exept.de>
parents: 3
diff changeset
  1106
                  actionTextHolder value:nil.
8b68fdf7c870 better looking; show command output
Claus Gittinger <cg@exept.de>
parents: 3
diff changeset
  1107
                  actionTextHolder value:msg.
8b68fdf7c870 better looking; show command output
Claus Gittinger <cg@exept.de>
parents: 3
diff changeset
  1108
              ] 
0
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1109
            ].
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1110
678
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1111
    dfMonitorProcess notNil ifTrue:[
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1112
        dfMonitorProcess terminate
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1113
    ].
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1114
    copyProcess notNil ifTrue:[
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1115
        copyProcess terminate.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1116
        copyProcess := nil.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1117
    ].
0
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1118
    ^ ok
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1119
678
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1120
    "
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1121
     STXInstaller open
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1122
    "
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1123
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1124
    "Created: / 17.7.1996 / 15:11:27 / cg"
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1125
    "Modified: / 25.2.1998 / 19:36:08 / cg"
0
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1126
!
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1127
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1128
open
1
7ebb34d8f3df checkin from browser
Claus Gittinger <cg@exept.de>
parents: 0
diff changeset
  1129
    self askAndInstall.
0
ce9f4417b660 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1130
5
16cff74f42b0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4
diff changeset
  1131
    "
16cff74f42b0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4
diff changeset
  1132
     STXInstaller open
16cff74f42b0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4
diff changeset
  1133
    "
1
7ebb34d8f3df checkin from browser
Claus Gittinger <cg@exept.de>
parents: 0
diff changeset
  1134
!
7ebb34d8f3df checkin from browser
Claus Gittinger <cg@exept.de>
parents: 0
diff changeset
  1135
7ebb34d8f3df checkin from browser
Claus Gittinger <cg@exept.de>
parents: 0
diff changeset
  1136
postInstall
7ebb34d8f3df checkin from browser
Claus Gittinger <cg@exept.de>
parents: 0
diff changeset
  1137
    "some messages at the end ..."
7ebb34d8f3df checkin from browser
Claus Gittinger <cg@exept.de>
parents: 0
diff changeset
  1138
4
8b68fdf7c870 better looking; show command output
Claus Gittinger <cg@exept.de>
parents: 3
diff changeset
  1139
    |shInfo cshInfo msg havePath|
1
7ebb34d8f3df checkin from browser
Claus Gittinger <cg@exept.de>
parents: 0
diff changeset
  1140
678
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1141
    resources isNil ifTrue:[
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1142
        resources := ResourcePack for:self class.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1143
    ].
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1144
11
9bc23682b68c national strings
Claus Gittinger <cg@exept.de>
parents: 10
diff changeset
  1145
    msg := (resources string:'ST/X Installation complete.\\') withCRs.
1
7ebb34d8f3df checkin from browser
Claus Gittinger <cg@exept.de>
parents: 0
diff changeset
  1146
    shInfo := ''.
7ebb34d8f3df checkin from browser
Claus Gittinger <cg@exept.de>
parents: 0
diff changeset
  1147
    cshInfo := ''.
7ebb34d8f3df checkin from browser
Claus Gittinger <cg@exept.de>
parents: 0
diff changeset
  1148
678
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1149
    fullInstallation ifTrue:[
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1150
        msg := msg , 'You will now find a development directory hierarchy
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1151
in ''' , fullDir asText allBold , '''.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1152
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1153
To try it, ''cd'' to ''' , fullDir , '/projects/smalltalk''
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1154
and start smalltalk with the command: ''./smalltalk''.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1155
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1156
To perform a partial installation of your customized smalltalk later,
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1157
use the INSTALL script found in ''' , fullDir , ''''.
1
7ebb34d8f3df checkin from browser
Claus Gittinger <cg@exept.de>
parents: 0
diff changeset
  1158
678
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1159
    ] ifFalse:[
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1160
        havePath := true.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1161
        (((OperatingSystem getEnvironment:'PATH')
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1162
            asCollectionOfSubstringsSeparatedBy:$:)
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1163
                includes:stxBinDir) ifFalse:[
1
7ebb34d8f3df checkin from browser
Claus Gittinger <cg@exept.de>
parents: 0
diff changeset
  1164
678
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1165
            havePath := false.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1166
            shInfo  := 'PATH=$PATH:' , stxBinDir , ' ; export PATH\'.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1167
            cshInfo := 'set path=($path ' , stxBinDir , ')\'.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1168
            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
  1169
                                      with:stxBinDir asText allBold) withCRs.
1
7ebb34d8f3df checkin from browser
Claus Gittinger <cg@exept.de>
parents: 0
diff changeset
  1170
        ].
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
        (stxLibDir ~= '/usr/local/lib/smalltalk'
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1173
        and:[stxLibDir ~= '/usr/lib/smalltalk']) ifTrue:[
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1174
            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
  1175
                                      with:'STX_LIBDIR' asText allBold 
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1176
                                      with:stxLibDir asText allBold) withCRs.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1177
            havePath ifFalse:[
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1178
                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
  1179
            ] ifTrue:[
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1180
                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
  1181
            ].
1
7ebb34d8f3df checkin from browser
Claus Gittinger <cg@exept.de>
parents: 0
diff changeset
  1182
678
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1183
            shInfo := shInfo , 'STX_LIBDIR=' , stxLibDir , ' ; export STX_LIBDIR\'.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1184
            cshInfo := cshInfo , 'setenv STX_LIBDIR ' , stxLibDir , '\'.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1185
        ].
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
        shInfo notEmpty ifTrue:[
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1188
            '*********************************************************' errorPrintCR.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1189
            (resources string:'Message from the ST/X Installer:\\') withCRs errorPrintCR.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1190
            (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
  1191
            '' errorPrintCR.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1192
            shInfo withCRs errorPrintCR.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1193
            '' errorPrintCR.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1194
            (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
  1195
            '' errorPrintCR.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1196
            cshInfo withCRs errorPrintCR.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1197
            '' errorPrintCR.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1198
            '*********************************************************' errorPrintCR.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1199
        ].
1
7ebb34d8f3df checkin from browser
Claus Gittinger <cg@exept.de>
parents: 0
diff changeset
  1200
    ].
73
2087134eea96 better messages;
Claus Gittinger <cg@exept.de>
parents: 31
diff changeset
  1201
2087134eea96 better messages;
Claus Gittinger <cg@exept.de>
parents: 31
diff changeset
  1202
    msg := msg , '\\Have fun using ST/X !!'.
2087134eea96 better messages;
Claus Gittinger <cg@exept.de>
parents: 31
diff changeset
  1203
2087134eea96 better messages;
Claus Gittinger <cg@exept.de>
parents: 31
diff changeset
  1204
    self information:msg withCRs.
1
7ebb34d8f3df checkin from browser
Claus Gittinger <cg@exept.de>
parents: 0
diff changeset
  1205
678
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1206
    "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
  1207
!
42ee3e7ced09 remove local symbolic links (if any) in doc/online
Claus Gittinger <cg@exept.de>
parents: 24
diff changeset
  1208
42ee3e7ced09 remove local symbolic links (if any) in doc/online
Claus Gittinger <cg@exept.de>
parents: 24
diff changeset
  1209
preInstall
678
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1210
    "clobber the doc directory, to avoid copying cyclic symbolic links.
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1211
     Notice, the CD does not contain symlinks, but checking for them
4dd439ebf162 added full installation
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
  1212
     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
  1213
42ee3e7ced09 remove local symbolic links (if any) in doc/online
Claus Gittinger <cg@exept.de>
parents: 24
diff changeset
  1214
    |f|
42ee3e7ced09 remove local symbolic links (if any) in doc/online
Claus Gittinger <cg@exept.de>
parents: