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