LibraryBuilder.st
author Jan Vrany <jan.vrany@labware.com>
Wed, 05 Oct 2022 11:57:26 +0100
branchjv
changeset 19637 28f5bfaa093d
parent 16676 04e6ef206a00
permissions -rw-r--r--
`NewSystemBrowser`: avoid updating package info when changed class is not selected This speeds up loading of packages when browser is open as it does not (needlessly) update package info which may involve scm round-trip.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2628
c20c71989aa1 copyrights
Claus Gittinger <cg@exept.de>
parents: 1630
diff changeset
     1
"
c20c71989aa1 copyrights
Claus Gittinger <cg@exept.de>
parents: 1630
diff changeset
     2
 COPYRIGHT (c) 1998 by eXept Software AG
c20c71989aa1 copyrights
Claus Gittinger <cg@exept.de>
parents: 1630
diff changeset
     3
              All Rights Reserved
c20c71989aa1 copyrights
Claus Gittinger <cg@exept.de>
parents: 1630
diff changeset
     4
c20c71989aa1 copyrights
Claus Gittinger <cg@exept.de>
parents: 1630
diff changeset
     5
 This software is furnished under a license and may be used
c20c71989aa1 copyrights
Claus Gittinger <cg@exept.de>
parents: 1630
diff changeset
     6
 only in accordance with the terms of that license and with the
c20c71989aa1 copyrights
Claus Gittinger <cg@exept.de>
parents: 1630
diff changeset
     7
 inclusion of the above copyright notice. This software may not
c20c71989aa1 copyrights
Claus Gittinger <cg@exept.de>
parents: 1630
diff changeset
     8
 be provided or otherwise made available to, or used by, any
c20c71989aa1 copyrights
Claus Gittinger <cg@exept.de>
parents: 1630
diff changeset
     9
 other person. No title to or ownership of the software is
c20c71989aa1 copyrights
Claus Gittinger <cg@exept.de>
parents: 1630
diff changeset
    10
 hereby transferred.
c20c71989aa1 copyrights
Claus Gittinger <cg@exept.de>
parents: 1630
diff changeset
    11
"
16667
149afdb60320 #OTHER by mawalch
mawalch
parents: 7088
diff changeset
    12
"{ Package: 'stx:libtool' }"
2628
c20c71989aa1 copyrights
Claus Gittinger <cg@exept.de>
parents: 1630
diff changeset
    13
16667
149afdb60320 #OTHER by mawalch
mawalch
parents: 7088
diff changeset
    14
"{ NameSpace: Smalltalk }"
7088
448b68fa16e8 category change
Claus Gittinger <cg@exept.de>
parents: 2628
diff changeset
    15
1526
eb8814228056 initial checkin
tz
parents:
diff changeset
    16
ApplicationBuilder subclass:#LibraryBuilder
1560
308be6511a7c use stand alone aspects
tz
parents: 1558
diff changeset
    17
	instanceVariableNames:''
1526
eb8814228056 initial checkin
tz
parents:
diff changeset
    18
	classVariableNames:''
eb8814228056 initial checkin
tz
parents:
diff changeset
    19
	poolDictionaries:''
7088
448b68fa16e8 category change
Claus Gittinger <cg@exept.de>
parents: 2628
diff changeset
    20
	category:'Interface-Tools'
1526
eb8814228056 initial checkin
tz
parents:
diff changeset
    21
!
eb8814228056 initial checkin
tz
parents:
diff changeset
    22
eb8814228056 initial checkin
tz
parents:
diff changeset
    23
!LibraryBuilder class methodsFor:'documentation'!
eb8814228056 initial checkin
tz
parents:
diff changeset
    24
2628
c20c71989aa1 copyrights
Claus Gittinger <cg@exept.de>
parents: 1630
diff changeset
    25
copyright
c20c71989aa1 copyrights
Claus Gittinger <cg@exept.de>
parents: 1630
diff changeset
    26
"
c20c71989aa1 copyrights
Claus Gittinger <cg@exept.de>
parents: 1630
diff changeset
    27
 COPYRIGHT (c) 1998 by eXept Software AG
c20c71989aa1 copyrights
Claus Gittinger <cg@exept.de>
parents: 1630
diff changeset
    28
              All Rights Reserved
c20c71989aa1 copyrights
Claus Gittinger <cg@exept.de>
parents: 1630
diff changeset
    29
c20c71989aa1 copyrights
Claus Gittinger <cg@exept.de>
parents: 1630
diff changeset
    30
 This software is furnished under a license and may be used
c20c71989aa1 copyrights
Claus Gittinger <cg@exept.de>
parents: 1630
diff changeset
    31
 only in accordance with the terms of that license and with the
c20c71989aa1 copyrights
Claus Gittinger <cg@exept.de>
parents: 1630
diff changeset
    32
 inclusion of the above copyright notice. This software may not
c20c71989aa1 copyrights
Claus Gittinger <cg@exept.de>
parents: 1630
diff changeset
    33
 be provided or otherwise made available to, or used by, any
c20c71989aa1 copyrights
Claus Gittinger <cg@exept.de>
parents: 1630
diff changeset
    34
 other person. No title to or ownership of the software is
c20c71989aa1 copyrights
Claus Gittinger <cg@exept.de>
parents: 1630
diff changeset
    35
 hereby transferred.
c20c71989aa1 copyrights
Claus Gittinger <cg@exept.de>
parents: 1630
diff changeset
    36
"
c20c71989aa1 copyrights
Claus Gittinger <cg@exept.de>
parents: 1630
diff changeset
    37
c20c71989aa1 copyrights
Claus Gittinger <cg@exept.de>
parents: 1630
diff changeset
    38
c20c71989aa1 copyrights
Claus Gittinger <cg@exept.de>
parents: 1630
diff changeset
    39
c20c71989aa1 copyrights
Claus Gittinger <cg@exept.de>
parents: 1630
diff changeset
    40
!
c20c71989aa1 copyrights
Claus Gittinger <cg@exept.de>
parents: 1630
diff changeset
    41
1526
eb8814228056 initial checkin
tz
parents:
diff changeset
    42
documentation
eb8814228056 initial checkin
tz
parents:
diff changeset
    43
"
2628
c20c71989aa1 copyrights
Claus Gittinger <cg@exept.de>
parents: 1630
diff changeset
    44
    WARNING: unfinished - do not use.
c20c71989aa1 copyrights
Claus Gittinger <cg@exept.de>
parents: 1630
diff changeset
    45
1526
eb8814228056 initial checkin
tz
parents:
diff changeset
    46
    The Library Builder of ST/X allows you to build ST/X-libraries by following steps:
eb8814228056 initial checkin
tz
parents:
diff changeset
    47
1558
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
    48
        0. Clobber the target directory of the application
1526
eb8814228056 initial checkin
tz
parents:
diff changeset
    49
        1. File out the source code of all library classes
1558
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
    50
        2. Link the source code of all library classes into the source directory
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
    51
        3. Generate the file Make.Proto
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
    52
        4. Generate the file Makefile
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
    53
        5. Make the library
1526
eb8814228056 initial checkin
tz
parents:
diff changeset
    54
eb8814228056 initial checkin
tz
parents:
diff changeset
    55
    [start with:]
eb8814228056 initial checkin
tz
parents:
diff changeset
    56
        LibraryBuilder open
eb8814228056 initial checkin
tz
parents:
diff changeset
    57
eb8814228056 initial checkin
tz
parents:
diff changeset
    58
    [see also:]
eb8814228056 initial checkin
tz
parents:
diff changeset
    59
        ApplicationBuilder
eb8814228056 initial checkin
tz
parents:
diff changeset
    60
eb8814228056 initial checkin
tz
parents:
diff changeset
    61
    [author:]
eb8814228056 initial checkin
tz
parents:
diff changeset
    62
        Thomas Zwick, eXept Software AG
eb8814228056 initial checkin
tz
parents:
diff changeset
    63
"
eb8814228056 initial checkin
tz
parents:
diff changeset
    64
! !
eb8814228056 initial checkin
tz
parents:
diff changeset
    65
1558
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
    66
!LibraryBuilder class methodsFor:'accessing'!
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
    67
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
    68
label
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
    69
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
    70
   ^'Library Builder (experimental)'
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
    71
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
    72
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
    73
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
    74
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
    75
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
    76
! !
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
    77
1526
eb8814228056 initial checkin
tz
parents:
diff changeset
    78
!LibraryBuilder class methodsFor:'help specs'!
eb8814228056 initial checkin
tz
parents:
diff changeset
    79
eb8814228056 initial checkin
tz
parents:
diff changeset
    80
helpSpec
eb8814228056 initial checkin
tz
parents:
diff changeset
    81
    "This resource specification was automatically generated
eb8814228056 initial checkin
tz
parents:
diff changeset
    82
     by the UIHelpTool of ST/X."
eb8814228056 initial checkin
tz
parents:
diff changeset
    83
eb8814228056 initial checkin
tz
parents:
diff changeset
    84
    "Do not manually edit this!! If it is corrupted,
eb8814228056 initial checkin
tz
parents:
diff changeset
    85
     the UIHelpTool may not be able to read the specification."
eb8814228056 initial checkin
tz
parents:
diff changeset
    86
eb8814228056 initial checkin
tz
parents:
diff changeset
    87
    "
eb8814228056 initial checkin
tz
parents:
diff changeset
    88
     UIHelpTool openOnClass:LibraryBuilder    
eb8814228056 initial checkin
tz
parents:
diff changeset
    89
    "
eb8814228056 initial checkin
tz
parents:
diff changeset
    90
eb8814228056 initial checkin
tz
parents:
diff changeset
    91
    <resource: #help>
eb8814228056 initial checkin
tz
parents:
diff changeset
    92
eb8814228056 initial checkin
tz
parents:
diff changeset
    93
    ^super helpSpec addPairsFrom:#(
eb8814228056 initial checkin
tz
parents:
diff changeset
    94
1560
308be6511a7c use stand alone aspects
tz
parents: 1558
diff changeset
    95
#addLibraryClasses
308be6511a7c use stand alone aspects
tz
parents: 1558
diff changeset
    96
'Adds the selected classes to the list of library classes.'
1558
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
    97
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
    98
#fileOutClasses
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
    99
'Files out the source code of the selected library classes.'
1526
eb8814228056 initial checkin
tz
parents:
diff changeset
   100
eb8814228056 initial checkin
tz
parents:
diff changeset
   101
#findClass
eb8814228056 initial checkin
tz
parents:
diff changeset
   102
'Find the class with the first known letters.'
eb8814228056 initial checkin
tz
parents:
diff changeset
   103
eb8814228056 initial checkin
tz
parents:
diff changeset
   104
#inlineNew
eb8814228056 initial checkin
tz
parents:
diff changeset
   105
'Additionally inline new.'
eb8814228056 initial checkin
tz
parents:
diff changeset
   106
eb8814228056 initial checkin
tz
parents:
diff changeset
   107
#libraryClasses
eb8814228056 initial checkin
tz
parents:
diff changeset
   108
'Classes of the library.'
eb8814228056 initial checkin
tz
parents:
diff changeset
   109
eb8814228056 initial checkin
tz
parents:
diff changeset
   110
#libraryName
eb8814228056 initial checkin
tz
parents:
diff changeset
   111
'Name of the library.'
eb8814228056 initial checkin
tz
parents:
diff changeset
   112
1558
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   113
#linkSources
1560
308be6511a7c use stand alone aspects
tz
parents: 1558
diff changeset
   114
'Creates links in the source directory to the source files of the library classes.'
1558
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   115
1526
eb8814228056 initial checkin
tz
parents:
diff changeset
   116
#optinline
eb8814228056 initial checkin
tz
parents:
diff changeset
   117
'Generate optimized inline code.'
eb8814228056 initial checkin
tz
parents:
diff changeset
   118
eb8814228056 initial checkin
tz
parents:
diff changeset
   119
#optspace
eb8814228056 initial checkin
tz
parents:
diff changeset
   120
'Optimize for space.'
eb8814228056 initial checkin
tz
parents:
diff changeset
   121
eb8814228056 initial checkin
tz
parents:
diff changeset
   122
#optspace2
eb8814228056 initial checkin
tz
parents:
diff changeset
   123
'Optimize more for space.'
eb8814228056 initial checkin
tz
parents:
diff changeset
   124
eb8814228056 initial checkin
tz
parents:
diff changeset
   125
#optspace3
eb8814228056 initial checkin
tz
parents:
diff changeset
   126
'Optimize even more for space.'
eb8814228056 initial checkin
tz
parents:
diff changeset
   127
1560
308be6511a7c use stand alone aspects
tz
parents: 1558
diff changeset
   128
#removeLibraryClasses
308be6511a7c use stand alone aspects
tz
parents: 1558
diff changeset
   129
'Removes the selected library classes.'
308be6511a7c use stand alone aspects
tz
parents: 1558
diff changeset
   130
1526
eb8814228056 initial checkin
tz
parents:
diff changeset
   131
#stxClasses
eb8814228056 initial checkin
tz
parents:
diff changeset
   132
'Classes of the ST/X.'
eb8814228056 initial checkin
tz
parents:
diff changeset
   133
eb8814228056 initial checkin
tz
parents:
diff changeset
   134
)
eb8814228056 initial checkin
tz
parents:
diff changeset
   135
! !
eb8814228056 initial checkin
tz
parents:
diff changeset
   136
eb8814228056 initial checkin
tz
parents:
diff changeset
   137
!LibraryBuilder class methodsFor:'interface specs'!
eb8814228056 initial checkin
tz
parents:
diff changeset
   138
eb8814228056 initial checkin
tz
parents:
diff changeset
   139
windowSpec
eb8814228056 initial checkin
tz
parents:
diff changeset
   140
    "This resource specification was automatically generated
eb8814228056 initial checkin
tz
parents:
diff changeset
   141
     by the UIPainter of ST/X."
eb8814228056 initial checkin
tz
parents:
diff changeset
   142
eb8814228056 initial checkin
tz
parents:
diff changeset
   143
    "Do not manually edit this!! If it is corrupted,
eb8814228056 initial checkin
tz
parents:
diff changeset
   144
     the UIPainter may not be able to read the specification."
eb8814228056 initial checkin
tz
parents:
diff changeset
   145
eb8814228056 initial checkin
tz
parents:
diff changeset
   146
    "
eb8814228056 initial checkin
tz
parents:
diff changeset
   147
     UIPainter new openOnClass:LibraryBuilder andSelector:#windowSpec
eb8814228056 initial checkin
tz
parents:
diff changeset
   148
     LibraryBuilder new openInterface:#windowSpec
eb8814228056 initial checkin
tz
parents:
diff changeset
   149
     LibraryBuilder open
eb8814228056 initial checkin
tz
parents:
diff changeset
   150
    "
eb8814228056 initial checkin
tz
parents:
diff changeset
   151
eb8814228056 initial checkin
tz
parents:
diff changeset
   152
    <resource: #canvas>
eb8814228056 initial checkin
tz
parents:
diff changeset
   153
eb8814228056 initial checkin
tz
parents:
diff changeset
   154
    ^
eb8814228056 initial checkin
tz
parents:
diff changeset
   155
     
eb8814228056 initial checkin
tz
parents:
diff changeset
   156
       #(#FullSpec
eb8814228056 initial checkin
tz
parents:
diff changeset
   157
          #window: 
eb8814228056 initial checkin
tz
parents:
diff changeset
   158
           #(#WindowSpec
1558
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   159
              #name: 'Library Builder (experimental)'
1560
308be6511a7c use stand alone aspects
tz
parents: 1558
diff changeset
   160
              #layout: #(#LayoutFrame 15 0 222 0 514 0 681 0)
1558
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   161
              #label: 'Library Builder (experimental)'
1526
eb8814228056 initial checkin
tz
parents:
diff changeset
   162
              #min: #(#Point 420 220)
eb8814228056 initial checkin
tz
parents:
diff changeset
   163
              #max: #(#Point 1152 900)
1560
308be6511a7c use stand alone aspects
tz
parents: 1558
diff changeset
   164
              #bounds: #(#Rectangle 15 222 515 682)
1526
eb8814228056 initial checkin
tz
parents:
diff changeset
   165
              #menu: #menu
eb8814228056 initial checkin
tz
parents:
diff changeset
   166
              #usePreferredExtent: false
eb8814228056 initial checkin
tz
parents:
diff changeset
   167
          )
eb8814228056 initial checkin
tz
parents:
diff changeset
   168
          #component: 
eb8814228056 initial checkin
tz
parents:
diff changeset
   169
           #(#SpecCollection
eb8814228056 initial checkin
tz
parents:
diff changeset
   170
              #collection: 
eb8814228056 initial checkin
tz
parents:
diff changeset
   171
               #(
eb8814228056 initial checkin
tz
parents:
diff changeset
   172
                 #(#ViewSpec
eb8814228056 initial checkin
tz
parents:
diff changeset
   173
                    #name: 'Box1'
1558
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   174
                    #layout: #(#LayoutFrame 0 0.0 3 0 0 1.0 316 0)
1526
eb8814228056 initial checkin
tz
parents:
diff changeset
   175
                    #component: 
eb8814228056 initial checkin
tz
parents:
diff changeset
   176
                     #(#SpecCollection
eb8814228056 initial checkin
tz
parents:
diff changeset
   177
                        #collection: 
eb8814228056 initial checkin
tz
parents:
diff changeset
   178
                         #(
eb8814228056 initial checkin
tz
parents:
diff changeset
   179
                           #(#ViewSpec
eb8814228056 initial checkin
tz
parents:
diff changeset
   180
                              #name: 'Box2'
1558
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   181
                              #layout: #(#LayoutFrame 0 0.0 0 0.0 -148 1.0 0 1.0)
1526
eb8814228056 initial checkin
tz
parents:
diff changeset
   182
                              #component: 
eb8814228056 initial checkin
tz
parents:
diff changeset
   183
                               #(#SpecCollection
eb8814228056 initial checkin
tz
parents:
diff changeset
   184
                                  #collection: 
eb8814228056 initial checkin
tz
parents:
diff changeset
   185
                                   #(
eb8814228056 initial checkin
tz
parents:
diff changeset
   186
                                     #(#LabelSpec
eb8814228056 initial checkin
tz
parents:
diff changeset
   187
                                        #name: 'libraryNameLabel'
eb8814228056 initial checkin
tz
parents:
diff changeset
   188
                                        #layout: #(#AlignmentOrigin 147 0 15 0 1 0.5)
eb8814228056 initial checkin
tz
parents:
diff changeset
   189
                                        #label: 'Library Name:'
eb8814228056 initial checkin
tz
parents:
diff changeset
   190
                                        #adjust: #right
eb8814228056 initial checkin
tz
parents:
diff changeset
   191
                                    )
eb8814228056 initial checkin
tz
parents:
diff changeset
   192
                                     #(#InputFieldSpec
eb8814228056 initial checkin
tz
parents:
diff changeset
   193
                                        #name: 'libraryNameField'
eb8814228056 initial checkin
tz
parents:
diff changeset
   194
                                        #layout: #(#LayoutFrame 150 0 4 0 0 1 26 0)
eb8814228056 initial checkin
tz
parents:
diff changeset
   195
                                        #activeHelpKey: #libraryName
eb8814228056 initial checkin
tz
parents:
diff changeset
   196
                                        #model: #libraryName
eb8814228056 initial checkin
tz
parents:
diff changeset
   197
                                    )
eb8814228056 initial checkin
tz
parents:
diff changeset
   198
                                     #(#DividerSpec
eb8814228056 initial checkin
tz
parents:
diff changeset
   199
                                        #name: 'Separator2'
eb8814228056 initial checkin
tz
parents:
diff changeset
   200
                                        #layout: #(#LayoutFrame 0 0 28 0 0 1 31 0)
eb8814228056 initial checkin
tz
parents:
diff changeset
   201
                                    )
eb8814228056 initial checkin
tz
parents:
diff changeset
   202
                                     #(#LabelSpec
eb8814228056 initial checkin
tz
parents:
diff changeset
   203
                                        #name: 'libraryClassesLabel'
eb8814228056 initial checkin
tz
parents:
diff changeset
   204
                                        #layout: #(#AlignmentOrigin 147 0 42 0 1 0.5)
eb8814228056 initial checkin
tz
parents:
diff changeset
   205
                                        #label: 'Library Classes:'
eb8814228056 initial checkin
tz
parents:
diff changeset
   206
                                        #adjust: #right
eb8814228056 initial checkin
tz
parents:
diff changeset
   207
                                    )
eb8814228056 initial checkin
tz
parents:
diff changeset
   208
                                     #(#SequenceViewSpec
1558
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   209
                                        #name: 'libraryClassesList'
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   210
                                        #layout: #(#LayoutFrame 0 0.6 56 0 0 1.0 195 0)
1526
eb8814228056 initial checkin
tz
parents:
diff changeset
   211
                                        #activeHelpKey: #libraryClasses
eb8814228056 initial checkin
tz
parents:
diff changeset
   212
                                        #model: #selectionOfLibraryClasses
eb8814228056 initial checkin
tz
parents:
diff changeset
   213
                                        #hasHorizontalScrollBar: true
eb8814228056 initial checkin
tz
parents:
diff changeset
   214
                                        #hasVerticalScrollBar: true
eb8814228056 initial checkin
tz
parents:
diff changeset
   215
                                        #miniScrollerVertical: true
1558
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   216
                                        #backgroundColor: #(#Color 100.0 74.9996 49.9992)
1526
eb8814228056 initial checkin
tz
parents:
diff changeset
   217
                                        #isMultiSelect: true
eb8814228056 initial checkin
tz
parents:
diff changeset
   218
                                        #useIndex: false
eb8814228056 initial checkin
tz
parents:
diff changeset
   219
                                        #sequenceList: #libraryClasses
eb8814228056 initial checkin
tz
parents:
diff changeset
   220
                                    )
eb8814228056 initial checkin
tz
parents:
diff changeset
   221
                                     #(#DividerSpec
eb8814228056 initial checkin
tz
parents:
diff changeset
   222
                                        #name: 'Separator3'
eb8814228056 initial checkin
tz
parents:
diff changeset
   223
                                        #layout: #(#LayoutFrame 0 0 196 0 0 1 199 0)
eb8814228056 initial checkin
tz
parents:
diff changeset
   224
                                    )
eb8814228056 initial checkin
tz
parents:
diff changeset
   225
                                     #(#ActionButtonSpec
eb8814228056 initial checkin
tz
parents:
diff changeset
   226
                                        #name: 'targetDirectoryButton'
eb8814228056 initial checkin
tz
parents:
diff changeset
   227
                                        #layout: #(#LayoutFrame 4 0 204 0 147 0 228 0)
1558
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   228
                                        #activeHelpKey: #selectPath
1526
eb8814228056 initial checkin
tz
parents:
diff changeset
   229
                                        #label: 'Target Directory:'
eb8814228056 initial checkin
tz
parents:
diff changeset
   230
                                        #model: #doSelectDirectory:
eb8814228056 initial checkin
tz
parents:
diff changeset
   231
                                        #actionValue: 'Target'
eb8814228056 initial checkin
tz
parents:
diff changeset
   232
                                    )
eb8814228056 initial checkin
tz
parents:
diff changeset
   233
                                     #(#InputFieldSpec
eb8814228056 initial checkin
tz
parents:
diff changeset
   234
                                        #name: 'targetDirectoryField'
eb8814228056 initial checkin
tz
parents:
diff changeset
   235
                                        #layout: #(#LayoutFrame 150 0 205 0 0 1.0 227 0)
eb8814228056 initial checkin
tz
parents:
diff changeset
   236
                                        #activeHelpKey: #targetDirectory
eb8814228056 initial checkin
tz
parents:
diff changeset
   237
                                        #model: #targetDirectory
eb8814228056 initial checkin
tz
parents:
diff changeset
   238
                                    )
eb8814228056 initial checkin
tz
parents:
diff changeset
   239
                                     #(#ActionButtonSpec
eb8814228056 initial checkin
tz
parents:
diff changeset
   240
                                        #name: 'topDirectoryButton'
eb8814228056 initial checkin
tz
parents:
diff changeset
   241
                                        #layout: #(#LayoutFrame 4 0 228 0 147 0 252 0)
1558
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   242
                                        #activeHelpKey: #selectPath
1526
eb8814228056 initial checkin
tz
parents:
diff changeset
   243
                                        #label: 'Top Directory:'
eb8814228056 initial checkin
tz
parents:
diff changeset
   244
                                        #model: #doSelectDirectory:
eb8814228056 initial checkin
tz
parents:
diff changeset
   245
                                        #actionValue: 'Top'
eb8814228056 initial checkin
tz
parents:
diff changeset
   246
                                    )
eb8814228056 initial checkin
tz
parents:
diff changeset
   247
                                     #(#InputFieldSpec
eb8814228056 initial checkin
tz
parents:
diff changeset
   248
                                        #name: 'topDirectoryField'
eb8814228056 initial checkin
tz
parents:
diff changeset
   249
                                        #layout: #(#LayoutFrame 150 0 229 0 0 1.0 251 0)
eb8814228056 initial checkin
tz
parents:
diff changeset
   250
                                        #activeHelpKey: #topDirectory
eb8814228056 initial checkin
tz
parents:
diff changeset
   251
                                        #model: #topDirectory
eb8814228056 initial checkin
tz
parents:
diff changeset
   252
                                    )
eb8814228056 initial checkin
tz
parents:
diff changeset
   253
                                     #(#DividerSpec
eb8814228056 initial checkin
tz
parents:
diff changeset
   254
                                        #name: 'Separator4'
1558
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   255
                                        #layout: #(#LayoutFrame 0 0.0 278 0 0 1.0 281 0)
1526
eb8814228056 initial checkin
tz
parents:
diff changeset
   256
                                    )
eb8814228056 initial checkin
tz
parents:
diff changeset
   257
                                     #(#ActionButtonSpec
eb8814228056 initial checkin
tz
parents:
diff changeset
   258
                                        #name: 'systemLibrariesButton'
1558
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   259
                                        #layout: #(#LayoutFrame 4 0 285 0 147 0 309 0)
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   260
                                        #activeHelpKey: #selectPath
1526
eb8814228056 initial checkin
tz
parents:
diff changeset
   261
                                        #label: 'System Libraries:'
eb8814228056 initial checkin
tz
parents:
diff changeset
   262
                                        #model: #doSelectLibrary:
eb8814228056 initial checkin
tz
parents:
diff changeset
   263
                                        #actionValue: 'SystemLibrary'
eb8814228056 initial checkin
tz
parents:
diff changeset
   264
                                    )
eb8814228056 initial checkin
tz
parents:
diff changeset
   265
                                     #(#ComboBoxSpec
eb8814228056 initial checkin
tz
parents:
diff changeset
   266
                                        #name: 'systemLibrariesComboBox'
1558
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   267
                                        #layout: #(#LayoutFrame 150 0 286 0 0 1 308 0)
1526
eb8814228056 initial checkin
tz
parents:
diff changeset
   268
                                        #activeHelpKey: #systemLibaries
eb8814228056 initial checkin
tz
parents:
diff changeset
   269
                                        #model: #systemLibrary
eb8814228056 initial checkin
tz
parents:
diff changeset
   270
                                        #immediateAccept: false
eb8814228056 initial checkin
tz
parents:
diff changeset
   271
                                        #acceptOnTab: false
eb8814228056 initial checkin
tz
parents:
diff changeset
   272
                                        #comboList: #systemLibraries
eb8814228056 initial checkin
tz
parents:
diff changeset
   273
                                    )
1558
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   274
                                     #(#SequenceViewSpec
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   275
                                        #name: 'listOfCategoriesList'
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   276
                                        #layout: #(#LayoutFrame 0 0.0 56 0 0 0.3 195 0)
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   277
                                        #activeHelpKey: #libraryClasses
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   278
                                        #model: #selectionOfCategory
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   279
                                        #hasHorizontalScrollBar: true
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   280
                                        #hasVerticalScrollBar: true
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   281
                                        #miniScrollerVertical: true
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   282
                                        #backgroundColor: #(#Color 86.9993 86.9993 86.9993)
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   283
                                        #useIndex: false
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   284
                                        #sequenceList: #listOfCategories
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   285
                                    )
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   286
                                     #(#SequenceViewSpec
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   287
                                        #name: 'listOfClassesList'
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   288
                                        #layout: #(#LayoutFrame 0 0.3 56 0 0 0.6 195 0)
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   289
                                        #activeHelpKey: #libraryClasses
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   290
                                        #model: #selectionOfClasses
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   291
                                        #hasHorizontalScrollBar: true
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   292
                                        #hasVerticalScrollBar: true
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   293
                                        #miniScrollerVertical: true
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   294
                                        #backgroundColor: #(#Color 86.9993 86.9993 86.9993)
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   295
                                        #isMultiSelect: true
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   296
                                        #useIndex: false
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   297
                                        #sequenceList: #listOfClasses
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   298
                                    )
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   299
                                     #(#ActionButtonSpec
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   300
                                        #name: 'sourceDirectoryButton1'
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   301
                                        #layout: #(#LayoutFrame 4 0 252 0 147 0 276 0)
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   302
                                        #activeHelpKey: #selectPath
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   303
                                        #label: 'Source Directory:'
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   304
                                        #model: #doSelectDirectory:
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   305
                                        #actionValue: 'Source'
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   306
                                    )
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   307
                                     #(#InputFieldSpec
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   308
                                        #name: 'sourceDirectoryField'
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   309
                                        #layout: #(#LayoutFrame 150 0 253 0 0 1.0 275 0)
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   310
                                        #activeHelpKey: #sourceDirectory
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   311
                                        #model: #sourceDirectory
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   312
                                    )
1560
308be6511a7c use stand alone aspects
tz
parents: 1558
diff changeset
   313
                                     #(#ActionButtonSpec
308be6511a7c use stand alone aspects
tz
parents: 1558
diff changeset
   314
                                        #name: 'removeButton'
308be6511a7c use stand alone aspects
tz
parents: 1558
diff changeset
   315
                                        #layout: #(#LayoutFrame -32 0.6 34 0 -1 0.6 56 0)
308be6511a7c use stand alone aspects
tz
parents: 1558
diff changeset
   316
                                        #activeHelpKey: #removeLibraryClasses
308be6511a7c use stand alone aspects
tz
parents: 1558
diff changeset
   317
                                        #hasCharacterOrientedLabel: false
308be6511a7c use stand alone aspects
tz
parents: 1558
diff changeset
   318
                                        #label: 'leftIcon'
308be6511a7c use stand alone aspects
tz
parents: 1558
diff changeset
   319
                                        #model: #removeLibraryClasses
308be6511a7c use stand alone aspects
tz
parents: 1558
diff changeset
   320
                                    )
308be6511a7c use stand alone aspects
tz
parents: 1558
diff changeset
   321
                                     #(#ActionButtonSpec
308be6511a7c use stand alone aspects
tz
parents: 1558
diff changeset
   322
                                        #name: 'addButton'
308be6511a7c use stand alone aspects
tz
parents: 1558
diff changeset
   323
                                        #layout: #(#LayoutFrame 1 0.6 34 0 32 0.6 56 0)
308be6511a7c use stand alone aspects
tz
parents: 1558
diff changeset
   324
                                        #activeHelpKey: #addLibraryClasses
308be6511a7c use stand alone aspects
tz
parents: 1558
diff changeset
   325
                                        #hasCharacterOrientedLabel: false
308be6511a7c use stand alone aspects
tz
parents: 1558
diff changeset
   326
                                        #label: 'rightIcon'
308be6511a7c use stand alone aspects
tz
parents: 1558
diff changeset
   327
                                        #model: #addLibraryClasses
308be6511a7c use stand alone aspects
tz
parents: 1558
diff changeset
   328
                                    )
1526
eb8814228056 initial checkin
tz
parents:
diff changeset
   329
                                  )
eb8814228056 initial checkin
tz
parents:
diff changeset
   330
                              )
eb8814228056 initial checkin
tz
parents:
diff changeset
   331
                          )
eb8814228056 initial checkin
tz
parents:
diff changeset
   332
                           #(#DividerSpec
eb8814228056 initial checkin
tz
parents:
diff changeset
   333
                              #name: 'Separator5'
eb8814228056 initial checkin
tz
parents:
diff changeset
   334
                              #layout: #(#LayoutFrame -144 1 0 0.0 -138 1 0 1.0)
eb8814228056 initial checkin
tz
parents:
diff changeset
   335
                              #orientation: #vertical
eb8814228056 initial checkin
tz
parents:
diff changeset
   336
                          )
eb8814228056 initial checkin
tz
parents:
diff changeset
   337
                           #(#ViewSpec
eb8814228056 initial checkin
tz
parents:
diff changeset
   338
                              #name: 'Box3'
eb8814228056 initial checkin
tz
parents:
diff changeset
   339
                              #layout: #(#LayoutFrame -134 1 0 0.0 0 1.0 0 1.0)
eb8814228056 initial checkin
tz
parents:
diff changeset
   340
                              #component: 
eb8814228056 initial checkin
tz
parents:
diff changeset
   341
                               #(#SpecCollection
eb8814228056 initial checkin
tz
parents:
diff changeset
   342
                                  #collection: 
eb8814228056 initial checkin
tz
parents:
diff changeset
   343
                                   #(
eb8814228056 initial checkin
tz
parents:
diff changeset
   344
                                     #(#FramedBoxSpec
eb8814228056 initial checkin
tz
parents:
diff changeset
   345
                                        #name: 'FramedBox'
1558
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   346
                                        #layout: #(#LayoutFrame -4 0.0 4 0.0 0 1.0 -128 1.0)
1526
eb8814228056 initial checkin
tz
parents:
diff changeset
   347
                                        #component: 
eb8814228056 initial checkin
tz
parents:
diff changeset
   348
                                         #(#SpecCollection
eb8814228056 initial checkin
tz
parents:
diff changeset
   349
                                            #collection: 
eb8814228056 initial checkin
tz
parents:
diff changeset
   350
                                             #(
eb8814228056 initial checkin
tz
parents:
diff changeset
   351
                                               #(#CheckBoxSpec
eb8814228056 initial checkin
tz
parents:
diff changeset
   352
                                                  #name: 'spaceCheckBox'
1558
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   353
                                                  #layout: #(#LayoutFrame 12 0 24 0 21 1 46 0)
1526
eb8814228056 initial checkin
tz
parents:
diff changeset
   354
                                                  #activeHelpKey: #optspace
eb8814228056 initial checkin
tz
parents:
diff changeset
   355
                                                  #model: #optspace
eb8814228056 initial checkin
tz
parents:
diff changeset
   356
                                                  #label: 'Space'
eb8814228056 initial checkin
tz
parents:
diff changeset
   357
                                              )
eb8814228056 initial checkin
tz
parents:
diff changeset
   358
                                               #(#CheckBoxSpec
eb8814228056 initial checkin
tz
parents:
diff changeset
   359
                                                  #name: 'space2CheckBox'
1558
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   360
                                                  #layout: #(#LayoutFrame 12 0 48 0 21 1 70 0)
1526
eb8814228056 initial checkin
tz
parents:
diff changeset
   361
                                                  #activeHelpKey: #optspace2
eb8814228056 initial checkin
tz
parents:
diff changeset
   362
                                                  #model: #optspace2
eb8814228056 initial checkin
tz
parents:
diff changeset
   363
                                                  #label: 'Space2'
eb8814228056 initial checkin
tz
parents:
diff changeset
   364
                                              )
eb8814228056 initial checkin
tz
parents:
diff changeset
   365
                                               #(#CheckBoxSpec
eb8814228056 initial checkin
tz
parents:
diff changeset
   366
                                                  #name: 'space3CheckBox'
1558
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   367
                                                  #layout: #(#LayoutFrame 12 0 72 0 21 1 94 0)
1526
eb8814228056 initial checkin
tz
parents:
diff changeset
   368
                                                  #activeHelpKey: #optspace3
eb8814228056 initial checkin
tz
parents:
diff changeset
   369
                                                  #model: #optspace3
eb8814228056 initial checkin
tz
parents:
diff changeset
   370
                                                  #label: 'Space3'
eb8814228056 initial checkin
tz
parents:
diff changeset
   371
                                              )
eb8814228056 initial checkin
tz
parents:
diff changeset
   372
                                               #(#CheckBoxSpec
eb8814228056 initial checkin
tz
parents:
diff changeset
   373
                                                  #name: 'inlineCheckBox'
1558
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   374
                                                  #layout: #(#LayoutFrame 12 0 96 0 21 1 118 0)
1526
eb8814228056 initial checkin
tz
parents:
diff changeset
   375
                                                  #activeHelpKey: #optinline
eb8814228056 initial checkin
tz
parents:
diff changeset
   376
                                                  #model: #optinline
eb8814228056 initial checkin
tz
parents:
diff changeset
   377
                                                  #label: 'Inline'
eb8814228056 initial checkin
tz
parents:
diff changeset
   378
                                              )
eb8814228056 initial checkin
tz
parents:
diff changeset
   379
                                               #(#CheckBoxSpec
eb8814228056 initial checkin
tz
parents:
diff changeset
   380
                                                  #name: 'inlineNewCheckBox'
1558
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   381
                                                  #layout: #(#LayoutFrame 12 0 120 0 21 1 142 0)
1526
eb8814228056 initial checkin
tz
parents:
diff changeset
   382
                                                  #activeHelpKey: #inlineNew
eb8814228056 initial checkin
tz
parents:
diff changeset
   383
                                                  #model: #inlineNew
eb8814228056 initial checkin
tz
parents:
diff changeset
   384
                                                  #label: 'Inline New'
eb8814228056 initial checkin
tz
parents:
diff changeset
   385
                                              )
1558
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   386
                                               #(#CheckBoxSpec
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   387
                                                  #name: 'linkSourcesCheckBox'
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   388
                                                  #layout: #(#LayoutFrame 12 0 144 0 21 1 166 0)
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   389
                                                  #activeHelpKey: #linkSources
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   390
                                                  #model: #linkSources
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   391
                                                  #label: 'Link Sources'
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   392
                                              )
1526
eb8814228056 initial checkin
tz
parents:
diff changeset
   393
                                            )
eb8814228056 initial checkin
tz
parents:
diff changeset
   394
                                        )
1558
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   395
                                        #label: 'Options'
1526
eb8814228056 initial checkin
tz
parents:
diff changeset
   396
                                        #labelPosition: #topLeft
eb8814228056 initial checkin
tz
parents:
diff changeset
   397
                                    )
eb8814228056 initial checkin
tz
parents:
diff changeset
   398
                                     #(#VerticalPanelViewSpec
eb8814228056 initial checkin
tz
parents:
diff changeset
   399
                                        #name: 'VerticalPanel'
eb8814228056 initial checkin
tz
parents:
diff changeset
   400
                                        #layout: #(#LayoutFrame 0 0.0 -68 1 -6 1.0 -2 1.0)
eb8814228056 initial checkin
tz
parents:
diff changeset
   401
                                        #component: 
eb8814228056 initial checkin
tz
parents:
diff changeset
   402
                                         #(#SpecCollection
eb8814228056 initial checkin
tz
parents:
diff changeset
   403
                                            #collection: 
eb8814228056 initial checkin
tz
parents:
diff changeset
   404
                                             #(
eb8814228056 initial checkin
tz
parents:
diff changeset
   405
                                               #(#ActionButtonSpec
eb8814228056 initial checkin
tz
parents:
diff changeset
   406
                                                  #name: 'buildButton'
eb8814228056 initial checkin
tz
parents:
diff changeset
   407
                                                  #activeHelpKey: #build
eb8814228056 initial checkin
tz
parents:
diff changeset
   408
                                                  #label: 'Build'
eb8814228056 initial checkin
tz
parents:
diff changeset
   409
                                                  #model: #doBuild
eb8814228056 initial checkin
tz
parents:
diff changeset
   410
                                                  #extent: #(#Point 128 32)
eb8814228056 initial checkin
tz
parents:
diff changeset
   411
                                              )
eb8814228056 initial checkin
tz
parents:
diff changeset
   412
                                               #(#ActionButtonSpec
eb8814228056 initial checkin
tz
parents:
diff changeset
   413
                                                  #name: 'stopButton'
eb8814228056 initial checkin
tz
parents:
diff changeset
   414
                                                  #activeHelpKey: #stop
eb8814228056 initial checkin
tz
parents:
diff changeset
   415
                                                  #label: 'Stop'
eb8814228056 initial checkin
tz
parents:
diff changeset
   416
                                                  #model: #doStop
eb8814228056 initial checkin
tz
parents:
diff changeset
   417
                                                  #extent: #(#Point 128 31)
eb8814228056 initial checkin
tz
parents:
diff changeset
   418
                                              )
eb8814228056 initial checkin
tz
parents:
diff changeset
   419
                                            )
eb8814228056 initial checkin
tz
parents:
diff changeset
   420
                                        )
eb8814228056 initial checkin
tz
parents:
diff changeset
   421
                                        #horizontalLayout: #fit
eb8814228056 initial checkin
tz
parents:
diff changeset
   422
                                        #verticalLayout: #fit
eb8814228056 initial checkin
tz
parents:
diff changeset
   423
                                        #horizontalSpace: 3
eb8814228056 initial checkin
tz
parents:
diff changeset
   424
                                        #verticalSpace: 3
eb8814228056 initial checkin
tz
parents:
diff changeset
   425
                                    )
eb8814228056 initial checkin
tz
parents:
diff changeset
   426
                                  )
eb8814228056 initial checkin
tz
parents:
diff changeset
   427
                              )
eb8814228056 initial checkin
tz
parents:
diff changeset
   428
                          )
eb8814228056 initial checkin
tz
parents:
diff changeset
   429
                        )
eb8814228056 initial checkin
tz
parents:
diff changeset
   430
                    )
eb8814228056 initial checkin
tz
parents:
diff changeset
   431
                    #borderWidth: 1
eb8814228056 initial checkin
tz
parents:
diff changeset
   432
                )
eb8814228056 initial checkin
tz
parents:
diff changeset
   433
                 #(#SubCanvasSpec
eb8814228056 initial checkin
tz
parents:
diff changeset
   434
                    #name: 'shellViewSubCanvas'
1558
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   435
                    #layout: #(#LayoutFrame 0 0.0 318 0 0 1.0 -26 1)
1526
eb8814228056 initial checkin
tz
parents:
diff changeset
   436
                    #hasHorizontalScrollBar: false
eb8814228056 initial checkin
tz
parents:
diff changeset
   437
                    #hasVerticalScrollBar: false
eb8814228056 initial checkin
tz
parents:
diff changeset
   438
                    #clientHolder: #shellView
eb8814228056 initial checkin
tz
parents:
diff changeset
   439
                )
eb8814228056 initial checkin
tz
parents:
diff changeset
   440
                 #(#UISubSpecification
eb8814228056 initial checkin
tz
parents:
diff changeset
   441
                    #name: 'windowSpecForInfoBar'
eb8814228056 initial checkin
tz
parents:
diff changeset
   442
                    #layout: #(#LayoutFrame 0 0.0 -24 1 0 1.0 0 1.0)
eb8814228056 initial checkin
tz
parents:
diff changeset
   443
                    #majorKey: #ToolApplicationModel
eb8814228056 initial checkin
tz
parents:
diff changeset
   444
                    #minorKey: #windowSpecForInfoBar
eb8814228056 initial checkin
tz
parents:
diff changeset
   445
                )
eb8814228056 initial checkin
tz
parents:
diff changeset
   446
              )
eb8814228056 initial checkin
tz
parents:
diff changeset
   447
          )
eb8814228056 initial checkin
tz
parents:
diff changeset
   448
      )
eb8814228056 initial checkin
tz
parents:
diff changeset
   449
! !
eb8814228056 initial checkin
tz
parents:
diff changeset
   450
eb8814228056 initial checkin
tz
parents:
diff changeset
   451
!LibraryBuilder class methodsFor:'menu specs'!
eb8814228056 initial checkin
tz
parents:
diff changeset
   452
eb8814228056 initial checkin
tz
parents:
diff changeset
   453
menu
eb8814228056 initial checkin
tz
parents:
diff changeset
   454
    "This resource specification was automatically generated
eb8814228056 initial checkin
tz
parents:
diff changeset
   455
     by the MenuEditor of ST/X."
eb8814228056 initial checkin
tz
parents:
diff changeset
   456
eb8814228056 initial checkin
tz
parents:
diff changeset
   457
    "Do not manually edit this!! If it is corrupted,
eb8814228056 initial checkin
tz
parents:
diff changeset
   458
     the MenuEditor may not be able to read the specification."
eb8814228056 initial checkin
tz
parents:
diff changeset
   459
eb8814228056 initial checkin
tz
parents:
diff changeset
   460
    "
eb8814228056 initial checkin
tz
parents:
diff changeset
   461
     MenuEditor new openOnClass:LibraryBuilder andSelector:#menu
eb8814228056 initial checkin
tz
parents:
diff changeset
   462
     (Menu new fromLiteralArrayEncoding:(LibraryBuilder menu)) startUp
eb8814228056 initial checkin
tz
parents:
diff changeset
   463
    "
eb8814228056 initial checkin
tz
parents:
diff changeset
   464
eb8814228056 initial checkin
tz
parents:
diff changeset
   465
    <resource: #menu>
eb8814228056 initial checkin
tz
parents:
diff changeset
   466
eb8814228056 initial checkin
tz
parents:
diff changeset
   467
    ^
eb8814228056 initial checkin
tz
parents:
diff changeset
   468
     
eb8814228056 initial checkin
tz
parents:
diff changeset
   469
       #(#Menu
eb8814228056 initial checkin
tz
parents:
diff changeset
   470
          
eb8814228056 initial checkin
tz
parents:
diff changeset
   471
           #(
eb8814228056 initial checkin
tz
parents:
diff changeset
   472
             #(#MenuItem
1558
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   473
                #label: 'About'
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   474
                #labelImage: #(#ResourceRetriever nil #menuIcon)
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   475
                #submenuChannel: #menuAbout
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   476
            )
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   477
             #(#MenuItem
1526
eb8814228056 initial checkin
tz
parents:
diff changeset
   478
                #label: 'File'
eb8814228056 initial checkin
tz
parents:
diff changeset
   479
                #submenu: 
eb8814228056 initial checkin
tz
parents:
diff changeset
   480
                 #(#Menu
eb8814228056 initial checkin
tz
parents:
diff changeset
   481
                    
eb8814228056 initial checkin
tz
parents:
diff changeset
   482
                     #(
eb8814228056 initial checkin
tz
parents:
diff changeset
   483
                       #(#MenuItem
1558
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   484
                          #label: 'Load...'
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   485
                          #value: #doLoad
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   486
                      )
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   487
                       #(#MenuItem
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   488
                          #label: '-'
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   489
                      )
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   490
                       #(#MenuItem
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   491
                          #label: 'Save As...'
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   492
                          #value: #doSaveAs
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   493
                      )
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   494
                       #(#MenuItem
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   495
                          #label: '-'
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   496
                      )
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   497
                       #(#MenuItem
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   498
                          #label: 'Exit'
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   499
                          #value: #closeRequest
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   500
                          #activeHelpKey: #fileExit
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   501
                      )
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   502
                    ) nil
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   503
                    nil
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   504
                )
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   505
            )
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   506
             #(#MenuItem
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   507
                #label: 'Library'
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   508
                #submenu: 
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   509
                 #(#Menu
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   510
                    
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   511
                     #(
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   512
                       #(#MenuItem
1526
eb8814228056 initial checkin
tz
parents:
diff changeset
   513
                          #label: 'Build'
eb8814228056 initial checkin
tz
parents:
diff changeset
   514
                          #value: #doBuild
eb8814228056 initial checkin
tz
parents:
diff changeset
   515
                          #activeHelpKey: #build
eb8814228056 initial checkin
tz
parents:
diff changeset
   516
                      )
eb8814228056 initial checkin
tz
parents:
diff changeset
   517
                       #(#MenuItem
eb8814228056 initial checkin
tz
parents:
diff changeset
   518
                          #label: 'Stop'
eb8814228056 initial checkin
tz
parents:
diff changeset
   519
                          #value: #doStop
eb8814228056 initial checkin
tz
parents:
diff changeset
   520
                          #activeHelpKey: #stop
eb8814228056 initial checkin
tz
parents:
diff changeset
   521
                      )
eb8814228056 initial checkin
tz
parents:
diff changeset
   522
                       #(#MenuItem
eb8814228056 initial checkin
tz
parents:
diff changeset
   523
                          #label: '-'
eb8814228056 initial checkin
tz
parents:
diff changeset
   524
                      )
eb8814228056 initial checkin
tz
parents:
diff changeset
   525
                       #(#MenuItem
1558
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   526
                          #label: 'File Out Class'
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   527
                          #value: #doFileOutClass
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   528
                          #activeHelpKey: #fileOutClasses
1526
eb8814228056 initial checkin
tz
parents:
diff changeset
   529
                      )
eb8814228056 initial checkin
tz
parents:
diff changeset
   530
                    ) nil
eb8814228056 initial checkin
tz
parents:
diff changeset
   531
                    nil
eb8814228056 initial checkin
tz
parents:
diff changeset
   532
                )
eb8814228056 initial checkin
tz
parents:
diff changeset
   533
            )
eb8814228056 initial checkin
tz
parents:
diff changeset
   534
             #(#MenuItem
eb8814228056 initial checkin
tz
parents:
diff changeset
   535
                #label: 'Settings'
eb8814228056 initial checkin
tz
parents:
diff changeset
   536
                #submenu: 
eb8814228056 initial checkin
tz
parents:
diff changeset
   537
                 #(#Menu
eb8814228056 initial checkin
tz
parents:
diff changeset
   538
                    
eb8814228056 initial checkin
tz
parents:
diff changeset
   539
                     #(
eb8814228056 initial checkin
tz
parents:
diff changeset
   540
                       #(#MenuItem
eb8814228056 initial checkin
tz
parents:
diff changeset
   541
                          #label: 'Target Directory...'
eb8814228056 initial checkin
tz
parents:
diff changeset
   542
                          #value: #doSelectDirectory:
eb8814228056 initial checkin
tz
parents:
diff changeset
   543
                          #activeHelpKey: #targetDirectory
eb8814228056 initial checkin
tz
parents:
diff changeset
   544
                          #argument: 'Target'
eb8814228056 initial checkin
tz
parents:
diff changeset
   545
                      )
eb8814228056 initial checkin
tz
parents:
diff changeset
   546
                       #(#MenuItem
eb8814228056 initial checkin
tz
parents:
diff changeset
   547
                          #label: 'Top Directory...'
eb8814228056 initial checkin
tz
parents:
diff changeset
   548
                          #value: #doSelectDirectory:
eb8814228056 initial checkin
tz
parents:
diff changeset
   549
                          #activeHelpKey: #topDirectory
eb8814228056 initial checkin
tz
parents:
diff changeset
   550
                          #argument: 'Top'
eb8814228056 initial checkin
tz
parents:
diff changeset
   551
                      )
eb8814228056 initial checkin
tz
parents:
diff changeset
   552
                       #(#MenuItem
eb8814228056 initial checkin
tz
parents:
diff changeset
   553
                          #label: '-'
eb8814228056 initial checkin
tz
parents:
diff changeset
   554
                      )
eb8814228056 initial checkin
tz
parents:
diff changeset
   555
                       #(#MenuItem
eb8814228056 initial checkin
tz
parents:
diff changeset
   556
                          #label: 'System Libraries...'
eb8814228056 initial checkin
tz
parents:
diff changeset
   557
                          #value: #doSelectLibrary:
eb8814228056 initial checkin
tz
parents:
diff changeset
   558
                          #activeHelpKey: #systemLibaries
eb8814228056 initial checkin
tz
parents:
diff changeset
   559
                          #argument: 'SystemLibrary'
eb8814228056 initial checkin
tz
parents:
diff changeset
   560
                      )
eb8814228056 initial checkin
tz
parents:
diff changeset
   561
                       #(#MenuItem
eb8814228056 initial checkin
tz
parents:
diff changeset
   562
                          #label: '-'
eb8814228056 initial checkin
tz
parents:
diff changeset
   563
                      )
eb8814228056 initial checkin
tz
parents:
diff changeset
   564
                       #(#MenuItem
eb8814228056 initial checkin
tz
parents:
diff changeset
   565
                          #label: 'Fonts'
eb8814228056 initial checkin
tz
parents:
diff changeset
   566
                          #submenuChannel: #menuFont
eb8814228056 initial checkin
tz
parents:
diff changeset
   567
                      )
eb8814228056 initial checkin
tz
parents:
diff changeset
   568
                    ) nil
eb8814228056 initial checkin
tz
parents:
diff changeset
   569
                    nil
eb8814228056 initial checkin
tz
parents:
diff changeset
   570
                )
eb8814228056 initial checkin
tz
parents:
diff changeset
   571
            )
eb8814228056 initial checkin
tz
parents:
diff changeset
   572
             #(#MenuItem
eb8814228056 initial checkin
tz
parents:
diff changeset
   573
                #label: 'Help'
eb8814228056 initial checkin
tz
parents:
diff changeset
   574
                #startGroup: #right
eb8814228056 initial checkin
tz
parents:
diff changeset
   575
                #submenuChannel: #menuHelp
eb8814228056 initial checkin
tz
parents:
diff changeset
   576
            )
eb8814228056 initial checkin
tz
parents:
diff changeset
   577
          ) nil
eb8814228056 initial checkin
tz
parents:
diff changeset
   578
          nil
eb8814228056 initial checkin
tz
parents:
diff changeset
   579
      )
eb8814228056 initial checkin
tz
parents:
diff changeset
   580
! !
eb8814228056 initial checkin
tz
parents:
diff changeset
   581
eb8814228056 initial checkin
tz
parents:
diff changeset
   582
!LibraryBuilder methodsFor:'actions'!
eb8814228056 initial checkin
tz
parents:
diff changeset
   583
eb8814228056 initial checkin
tz
parents:
diff changeset
   584
addLibraryClasses
1558
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   585
    "adds selecetd classes to the list of the library classes"
1526
eb8814228056 initial checkin
tz
parents:
diff changeset
   586
eb8814228056 initial checkin
tz
parents:
diff changeset
   587
    |libraryClasses selectionOfLibraryClasses|
eb8814228056 initial checkin
tz
parents:
diff changeset
   588
1560
308be6511a7c use stand alone aspects
tz
parents: 1558
diff changeset
   589
    self selectionOfClasses value size == 0 
308be6511a7c use stand alone aspects
tz
parents: 1558
diff changeset
   590
        ifTrue: [^self warn: 'No class selected!!'].
1558
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   591
1526
eb8814228056 initial checkin
tz
parents:
diff changeset
   592
    libraryClasses := (aspects at: #libraryClasses) value.
eb8814228056 initial checkin
tz
parents:
diff changeset
   593
eb8814228056 initial checkin
tz
parents:
diff changeset
   594
    (aspects at: #libraryClasses) value: 
eb8814228056 initial checkin
tz
parents:
diff changeset
   595
        ((libraryClasses,
1558
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   596
        (selectionOfLibraryClasses := self selectionOfClasses value)) asSet asSortedCollection asArray
1526
eb8814228056 initial checkin
tz
parents:
diff changeset
   597
            topologicalSort:[:n1 :n2 | ((Smalltalk at: n2) isSubclassOf: (Smalltalk at: n1))]) asOrderedCollection.
eb8814228056 initial checkin
tz
parents:
diff changeset
   598
1558
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   599
    self selectionOfLibraryClasses value: selectionOfLibraryClasses.
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   600
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   601
    self selectionOfCategory changed
1526
eb8814228056 initial checkin
tz
parents:
diff changeset
   602
!
eb8814228056 initial checkin
tz
parents:
diff changeset
   603
eb8814228056 initial checkin
tz
parents:
diff changeset
   604
classSelected: anIndexCollection
eb8814228056 initial checkin
tz
parents:
diff changeset
   605
    "updates the field of the class name after a selection in the class tree view"
eb8814228056 initial checkin
tz
parents:
diff changeset
   606
1552
924c8331a628 #classSelected: error
tz
parents: 1526
diff changeset
   607
    self valueOfClassName value: (self selectionOfClasses value first name upTo: $ )
1526
eb8814228056 initial checkin
tz
parents:
diff changeset
   608
eb8814228056 initial checkin
tz
parents:
diff changeset
   609
eb8814228056 initial checkin
tz
parents:
diff changeset
   610
!
eb8814228056 initial checkin
tz
parents:
diff changeset
   611
eb8814228056 initial checkin
tz
parents:
diff changeset
   612
doBuild
eb8814228056 initial checkin
tz
parents:
diff changeset
   613
    "builds the library by doing following tasks:
eb8814228056 initial checkin
tz
parents:
diff changeset
   614
        0. Clobber the target directory of the application
eb8814228056 initial checkin
tz
parents:
diff changeset
   615
        1. File out the source code of all library classes
1558
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   616
        2. Link the source code of all library classes into the source directory
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   617
        3. Generate the file Make.Proto
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   618
        4. Generate the file Makefile
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   619
        5. Make the library
1526
eb8814228056 initial checkin
tz
parents:
diff changeset
   620
    "
1558
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   621
    |dir compilerPath compilerFlags block0 block1 block2 block3 block4 block5 priority|
1526
eb8814228056 initial checkin
tz
parents:
diff changeset
   622
eb8814228056 initial checkin
tz
parents:
diff changeset
   623
    task notNil ifTrue: [self warn: 'There is already a build running!!'].
eb8814228056 initial checkin
tz
parents:
diff changeset
   624
eb8814228056 initial checkin
tz
parents:
diff changeset
   625
    self inform: 'Starting building of library...' asBoldText.
eb8814228056 initial checkin
tz
parents:
diff changeset
   626
eb8814228056 initial checkin
tz
parents:
diff changeset
   627
    (dir := self getTargetDirectory) isNil 
eb8814228056 initial checkin
tz
parents:
diff changeset
   628
        ifTrue: [^self warn: 'Could not create library directory!!'].
eb8814228056 initial checkin
tz
parents:
diff changeset
   629
eb8814228056 initial checkin
tz
parents:
diff changeset
   630
    shellView directory: dir.
eb8814228056 initial checkin
tz
parents:
diff changeset
   631
eb8814228056 initial checkin
tz
parents:
diff changeset
   632
    (compilerPath := ByteCodeCompiler ccPath, ' ') isNil 
eb8814228056 initial checkin
tz
parents:
diff changeset
   633
        ifTrue: [^self warn:'Define first a system compiler!!'].
eb8814228056 initial checkin
tz
parents:
diff changeset
   634
    compilerFlags := self getCompilerFlags.
eb8814228056 initial checkin
tz
parents:
diff changeset
   635
eb8814228056 initial checkin
tz
parents:
diff changeset
   636
    block0 := self getBlockForClobberingTargetDirectory: dir.
eb8814228056 initial checkin
tz
parents:
diff changeset
   637
    block1 := self getBlockForFilingOutAllClassesIn: dir.
1558
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   638
    block2 := self getBlockForLinkingSourceOfAllClassesIn: dir.
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   639
    block3 := self getBlockForGeneratingMakeProtoFileIn: dir.
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   640
    block4 := self getBlockForGeneratingMakefileFileIn: dir.
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   641
    block5 := self getBlockForMakingTheLibraryIn: dir.
1526
eb8814228056 initial checkin
tz
parents:
diff changeset
   642
eb8814228056 initial checkin
tz
parents:
diff changeset
   643
    priority := Processor userBackgroundPriority.
eb8814228056 initial checkin
tz
parents:
diff changeset
   644
    task := block0 forkAt: priority.
eb8814228056 initial checkin
tz
parents:
diff changeset
   645
    task addExitAction: 
eb8814228056 initial checkin
tz
parents:
diff changeset
   646
    [
eb8814228056 initial checkin
tz
parents:
diff changeset
   647
        task isNil ifTrue: 
eb8814228056 initial checkin
tz
parents:
diff changeset
   648
        [
eb8814228056 initial checkin
tz
parents:
diff changeset
   649
            task := block1 forkAt: priority.
eb8814228056 initial checkin
tz
parents:
diff changeset
   650
            task addExitAction: 
eb8814228056 initial checkin
tz
parents:
diff changeset
   651
            [
eb8814228056 initial checkin
tz
parents:
diff changeset
   652
                task isNil ifTrue: 
eb8814228056 initial checkin
tz
parents:
diff changeset
   653
                [
eb8814228056 initial checkin
tz
parents:
diff changeset
   654
                    task := block2 forkAt: priority.
eb8814228056 initial checkin
tz
parents:
diff changeset
   655
                    task addExitAction: 
eb8814228056 initial checkin
tz
parents:
diff changeset
   656
                    [
eb8814228056 initial checkin
tz
parents:
diff changeset
   657
                        task isNil ifTrue:
eb8814228056 initial checkin
tz
parents:
diff changeset
   658
                        [
eb8814228056 initial checkin
tz
parents:
diff changeset
   659
                            task := block3 forkAt: priority.
eb8814228056 initial checkin
tz
parents:
diff changeset
   660
                            task addExitAction: 
eb8814228056 initial checkin
tz
parents:
diff changeset
   661
                            [
eb8814228056 initial checkin
tz
parents:
diff changeset
   662
                                task isNil ifTrue: 
eb8814228056 initial checkin
tz
parents:
diff changeset
   663
                                [
eb8814228056 initial checkin
tz
parents:
diff changeset
   664
                                    task := block4 forkAt: priority.
eb8814228056 initial checkin
tz
parents:
diff changeset
   665
                                    task addExitAction: 
eb8814228056 initial checkin
tz
parents:
diff changeset
   666
                                    [
1558
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   667
                                        task isNil ifTrue: 
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   668
                                        [
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   669
                                            task := block5 forkAt: priority.
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   670
                                            task addExitAction: 
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   671
                                            [
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   672
                                                task isNil 
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   673
                                                    ifTrue: [self inform: 'Library build.' asBoldText]
1630
0303b4b6a5ce grammar
tz
parents: 1564
diff changeset
   674
                                                    ifFalse: [self informTargetBuildingFailed].
1558
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   675
                                                task := nil.
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   676
                                                Display beep.
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   677
                                            ]   
1630
0303b4b6a5ce grammar
tz
parents: 1564
diff changeset
   678
                                        ] ifFalse: [self informTargetBuildingFailed]
1558
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   679
                                    ]
1630
0303b4b6a5ce grammar
tz
parents: 1564
diff changeset
   680
                                ] ifFalse: [self informTargetBuildingFailed]
1526
eb8814228056 initial checkin
tz
parents:
diff changeset
   681
                            ]
1630
0303b4b6a5ce grammar
tz
parents: 1564
diff changeset
   682
                        ] ifFalse: [self informTargetBuildingFailed]
1526
eb8814228056 initial checkin
tz
parents:
diff changeset
   683
                    ]           
1630
0303b4b6a5ce grammar
tz
parents: 1564
diff changeset
   684
                ] ifFalse: [self informTargetBuildingFailed]
1526
eb8814228056 initial checkin
tz
parents:
diff changeset
   685
            ]
1630
0303b4b6a5ce grammar
tz
parents: 1564
diff changeset
   686
        ] ifFalse: [self informTargetBuildingFailed]
1526
eb8814228056 initial checkin
tz
parents:
diff changeset
   687
    ].
eb8814228056 initial checkin
tz
parents:
diff changeset
   688
eb8814228056 initial checkin
tz
parents:
diff changeset
   689
eb8814228056 initial checkin
tz
parents:
diff changeset
   690
eb8814228056 initial checkin
tz
parents:
diff changeset
   691
eb8814228056 initial checkin
tz
parents:
diff changeset
   692
eb8814228056 initial checkin
tz
parents:
diff changeset
   693
eb8814228056 initial checkin
tz
parents:
diff changeset
   694
eb8814228056 initial checkin
tz
parents:
diff changeset
   695
!
eb8814228056 initial checkin
tz
parents:
diff changeset
   696
1558
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   697
doFileOutClass
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   698
    "files out the source code of the selected classes"
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   699
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   700
    |dir|
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   701
    (dir := self getTargetDirectory) isNil 
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   702
        ifTrue: [^self warn: 'Could not create library directory!!'].
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   703
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   704
    self selectionOfLibraryClasses value do:
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   705
    [:clsName |
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   706
        (Smalltalk at: clsName) fileOutIn: dir
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   707
    ]
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   708
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   709
!
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   710
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   711
doLoad
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   712
    "opens a dialog for loading a library specification"
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   713
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   714
    |selectedFile fileStream fileAspects|
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   715
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   716
    (selectedFile := FileSelectionBrowser
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   717
        request: 'Load Library Specification' 
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   718
        fileName: ((aspects at: #targetDirectory) value asFilename construct: (aspects at: #libraryName) value,'.def') name
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   719
        withFileFilters: #('*.def')) notNil 
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   720
    ifTrue:
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   721
    [
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   722
        (fileStream := selectedFile asFilename readStream) notNil
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   723
        ifTrue:
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   724
        [   
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   725
            fileAspects := Compiler evaluate: fileStream contents asString.
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   726
            fileAspects associationsDo: 
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   727
            [:aspect|
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   728
                (aspects at: aspect key) value: aspect value
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   729
            ].
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   730
            shellView directory: (aspects at: #targetDirectory) value.
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   731
            fileStream close    
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   732
        ]
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   733
    ]
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   734
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   735
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   736
!
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   737
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   738
doSaveAs
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   739
    "opens a dialog for saving the the library specification"
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   740
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   741
    |selectedFile fileStream longestStringSize|
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   742
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   743
    (selectedFile := FileSelectionBrowser
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   744
        request: 'Save Library Specification' 
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   745
        fileName: ((aspects at: #targetDirectory) value asFilename construct: (aspects at: #libraryName) value,'.def') name
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   746
        withFileFilters: #('*.def')) notNil 
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   747
    ifTrue:
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   748
    [
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   749
        (fileStream := selectedFile asFilename writeStream) notNil
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   750
        ifTrue:
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   751
        [   
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   752
            longestStringSize := aspects keys first size.
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   753
            aspects keys do: [:key| key size > longestStringSize ifTrue: [longestStringSize := key size]].
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   754
            fileStream nextPutAll: 'IdentityDictionary new'; cr.
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   755
            aspects associationsDo: 
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   756
            [:aspect| 
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   757
                fileStream nextPutAll: 'at: #', aspect key.
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   758
                (longestStringSize - aspect key size) timesRepeat: [fileStream space].
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   759
                fileStream nextPutAll: ' put: '. 
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   760
                aspect value value storeOn: fileStream.
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   761
                fileStream nextPutAll: ';'. 
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   762
                fileStream cr
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   763
            ].
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   764
            fileStream nextPutAll: 'yourself'.
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   765
            fileStream close    
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   766
        ]
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   767
    ]
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   768
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   769
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   770
!
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   771
1630
0303b4b6a5ce grammar
tz
parents: 1564
diff changeset
   772
informTargetBuildingFailed
1526
eb8814228056 initial checkin
tz
parents:
diff changeset
   773
    "informs that something went wrong"
eb8814228056 initial checkin
tz
parents:
diff changeset
   774
1630
0303b4b6a5ce grammar
tz
parents: 1564
diff changeset
   775
    self inform: 'Library building failed.' asBoldText.
1526
eb8814228056 initial checkin
tz
parents:
diff changeset
   776
    task := nil
eb8814228056 initial checkin
tz
parents:
diff changeset
   777
!
eb8814228056 initial checkin
tz
parents:
diff changeset
   778
eb8814228056 initial checkin
tz
parents:
diff changeset
   779
removeLibraryClasses
1558
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   780
    "removes selected library classes from the list of the library classes"
1526
eb8814228056 initial checkin
tz
parents:
diff changeset
   781
eb8814228056 initial checkin
tz
parents:
diff changeset
   782
    |libraryClasses|
eb8814228056 initial checkin
tz
parents:
diff changeset
   783
1558
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   784
    self selectionOfLibraryClasses value size == 0 ifTrue: [^self warn: 'No library class selected!!'].
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   785
1526
eb8814228056 initial checkin
tz
parents:
diff changeset
   786
    libraryClasses := aspects at: #libraryClasses.
eb8814228056 initial checkin
tz
parents:
diff changeset
   787
eb8814228056 initial checkin
tz
parents:
diff changeset
   788
    self selectionOfLibraryClasses value do:
eb8814228056 initial checkin
tz
parents:
diff changeset
   789
    [:clsName|
eb8814228056 initial checkin
tz
parents:
diff changeset
   790
        libraryClasses value remove: clsName ifAbsent: nil
eb8814228056 initial checkin
tz
parents:
diff changeset
   791
    ].
1558
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   792
    self selectionOfCategory changed.
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   793
    libraryClasses changed
1526
eb8814228056 initial checkin
tz
parents:
diff changeset
   794
eb8814228056 initial checkin
tz
parents:
diff changeset
   795
! !
eb8814228056 initial checkin
tz
parents:
diff changeset
   796
eb8814228056 initial checkin
tz
parents:
diff changeset
   797
!LibraryBuilder methodsFor:'aspects'!
eb8814228056 initial checkin
tz
parents:
diff changeset
   798
1558
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   799
listOfCategories
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   800
    "returns the list of categories as value holder"
1526
eb8814228056 initial checkin
tz
parents:
diff changeset
   801
eb8814228056 initial checkin
tz
parents:
diff changeset
   802
    |holder|
1558
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   803
    (holder := builder bindingAt:#listOfCategories) isNil ifTrue:[
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   804
        builder aspectAt:#listOfCategories put: (holder :=  List withAll:
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   805
        ((Object withAllSubclasses reject: [:cls|cls isPrivate]) collect: [:cls| cls category]) asSet asSortedCollection)
1526
eb8814228056 initial checkin
tz
parents:
diff changeset
   806
    ].
eb8814228056 initial checkin
tz
parents:
diff changeset
   807
    ^ holder
eb8814228056 initial checkin
tz
parents:
diff changeset
   808
eb8814228056 initial checkin
tz
parents:
diff changeset
   809
eb8814228056 initial checkin
tz
parents:
diff changeset
   810
eb8814228056 initial checkin
tz
parents:
diff changeset
   811
!
eb8814228056 initial checkin
tz
parents:
diff changeset
   812
1558
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   813
listOfClasses
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   814
    "returns the list of classes belonging to the selected category as value holder"
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   815
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   816
    |holder|
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   817
    (holder := builder bindingAt:#listOfClasses) isNil ifTrue:[
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   818
        builder aspectAt:#listOfClasses put: (holder := List new)
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   819
    ].
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   820
    ^ holder
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   821
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   822
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   823
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   824
!
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   825
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   826
selectionOfCategory
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   827
    "returns the selected category as value holder"
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   828
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   829
    |holder|
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   830
    (holder := builder bindingAt:#selectionOfCategory) isNil ifTrue:[
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   831
        builder aspectAt:#selectionOfCategory put:(holder :=  ValueHolder new).
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   832
        holder onChangeSend: #value to: 
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   833
        [self listOfClasses contents: 
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   834
                ((Object withAllSubclasses select: [:cls| cls category = holder value and: [cls isPrivate not]]) collect: [:cls| cls name]).
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   835
        self selectionOfLibraryClasses value: ((aspects at: #libraryClasses) value  select: [:clsName| self listOfClasses includes: clsName ]).
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   836
        self selectionOfClasses        value: (self listOfClasses select: [:clsName| self selectionOfLibraryClasses value includes: clsName ])].
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   837
    ].
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   838
    ^ holder
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   839
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   840
!
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   841
1526
eb8814228056 initial checkin
tz
parents:
diff changeset
   842
selectionOfClasses
1558
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   843
    "returns the selected classes as value holder"
1526
eb8814228056 initial checkin
tz
parents:
diff changeset
   844
eb8814228056 initial checkin
tz
parents:
diff changeset
   845
    |holder|
eb8814228056 initial checkin
tz
parents:
diff changeset
   846
    (holder := builder bindingAt:#selectionOfClasses) isNil ifTrue:[
eb8814228056 initial checkin
tz
parents:
diff changeset
   847
        builder aspectAt:#selectionOfClasses put:(holder :=  ValueHolder new).
eb8814228056 initial checkin
tz
parents:
diff changeset
   848
    ].
eb8814228056 initial checkin
tz
parents:
diff changeset
   849
    ^ holder
eb8814228056 initial checkin
tz
parents:
diff changeset
   850
eb8814228056 initial checkin
tz
parents:
diff changeset
   851
!
eb8814228056 initial checkin
tz
parents:
diff changeset
   852
eb8814228056 initial checkin
tz
parents:
diff changeset
   853
selectionOfLibraryClasses
1558
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   854
    "returns the selected library classes as value holder"
1526
eb8814228056 initial checkin
tz
parents:
diff changeset
   855
eb8814228056 initial checkin
tz
parents:
diff changeset
   856
    |holder|
eb8814228056 initial checkin
tz
parents:
diff changeset
   857
    (holder := builder bindingAt:#selectionOfLibraryClasses) isNil ifTrue:[
1558
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   858
        builder aspectAt:#selectionOfLibraryClasses put:(holder := Array new asValue).
1526
eb8814228056 initial checkin
tz
parents:
diff changeset
   859
    ].
eb8814228056 initial checkin
tz
parents:
diff changeset
   860
    ^ holder
eb8814228056 initial checkin
tz
parents:
diff changeset
   861
eb8814228056 initial checkin
tz
parents:
diff changeset
   862
! !
eb8814228056 initial checkin
tz
parents:
diff changeset
   863
eb8814228056 initial checkin
tz
parents:
diff changeset
   864
!LibraryBuilder methodsFor:'building blocks'!
eb8814228056 initial checkin
tz
parents:
diff changeset
   865
eb8814228056 initial checkin
tz
parents:
diff changeset
   866
getBlockForFilingOutAllClassesIn: dir
eb8814228056 initial checkin
tz
parents:
diff changeset
   867
    "returns the block for filing out all Smalltalk-source files into the target directory"
eb8814228056 initial checkin
tz
parents:
diff changeset
   868
eb8814228056 initial checkin
tz
parents:
diff changeset
   869
    ^
eb8814228056 initial checkin
tz
parents:
diff changeset
   870
    [
eb8814228056 initial checkin
tz
parents:
diff changeset
   871
        |libraryClasses|
eb8814228056 initial checkin
tz
parents:
diff changeset
   872
        (libraryClasses := self getLibraryClasses) isEmpty
eb8814228056 initial checkin
tz
parents:
diff changeset
   873
        ifTrue: 
eb8814228056 initial checkin
tz
parents:
diff changeset
   874
        [
eb8814228056 initial checkin
tz
parents:
diff changeset
   875
            self warn:'No class libraries defined!!'
eb8814228056 initial checkin
tz
parents:
diff changeset
   876
        ]
eb8814228056 initial checkin
tz
parents:
diff changeset
   877
        ifFalse:     
eb8814228056 initial checkin
tz
parents:
diff changeset
   878
        [
eb8814228056 initial checkin
tz
parents:
diff changeset
   879
            libraryClasses do:
eb8814228056 initial checkin
tz
parents:
diff changeset
   880
            [:cls |
eb8814228056 initial checkin
tz
parents:
diff changeset
   881
                cls isLoaded ifFalse: [cls autoload].     
1558
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   882
                cls fileOutIn: dir.
1526
eb8814228056 initial checkin
tz
parents:
diff changeset
   883
            ].
eb8814228056 initial checkin
tz
parents:
diff changeset
   884
            task := nil
eb8814228056 initial checkin
tz
parents:
diff changeset
   885
        ]
eb8814228056 initial checkin
tz
parents:
diff changeset
   886
    ]
eb8814228056 initial checkin
tz
parents:
diff changeset
   887
eb8814228056 initial checkin
tz
parents:
diff changeset
   888
!
eb8814228056 initial checkin
tz
parents:
diff changeset
   889
eb8814228056 initial checkin
tz
parents:
diff changeset
   890
getBlockForGeneratingMakeProtoFileIn: dir
eb8814228056 initial checkin
tz
parents:
diff changeset
   891
    "returns the block for generating the file Make.proto"
eb8814228056 initial checkin
tz
parents:
diff changeset
   892
eb8814228056 initial checkin
tz
parents:
diff changeset
   893
    ^
eb8814228056 initial checkin
tz
parents:
diff changeset
   894
    [
eb8814228056 initial checkin
tz
parents:
diff changeset
   895
        |makeProtoFile makeProtoFileStream conf libraryClasses|
eb8814228056 initial checkin
tz
parents:
diff changeset
   896
1560
308be6511a7c use stand alone aspects
tz
parents: 1558
diff changeset
   897
        (makeProtoFileStream := (makeProtoFile := dir asFilename construct:'Make.proto') writeStream) isNil
1526
eb8814228056 initial checkin
tz
parents:
diff changeset
   898
        ifTrue:
eb8814228056 initial checkin
tz
parents:
diff changeset
   899
        [
1558
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   900
            self warn: 'Cannot create Make.proto'
1526
eb8814228056 initial checkin
tz
parents:
diff changeset
   901
        ]
eb8814228056 initial checkin
tz
parents:
diff changeset
   902
        ifFalse:
eb8814228056 initial checkin
tz
parents:
diff changeset
   903
        [
eb8814228056 initial checkin
tz
parents:
diff changeset
   904
            libraryClasses := self getLibraryClasses collect: [:cls|Smalltalk fileNameForClass:cls name].
eb8814228056 initial checkin
tz
parents:
diff changeset
   905
eb8814228056 initial checkin
tz
parents:
diff changeset
   906
            makeProtoFileStream
eb8814228056 initial checkin
tz
parents:
diff changeset
   907
                nextPutAll:'#Make.proto automatically generated by the Library Builder of ST/X.'; cr; cr;
eb8814228056 initial checkin
tz
parents:
diff changeset
   908
                nextPutAll:'TOP=', (aspects at: #topDirectory) value; cr;
eb8814228056 initial checkin
tz
parents:
diff changeset
   909
                nextPutAll:'LIBNAME=', (aspects at: #libraryName) value ; cr;
1558
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   910
                nextPutAll:'PACKAGE=tz:$(LIBNAME)' ; cr;
1526
eb8814228056 initial checkin
tz
parents:
diff changeset
   911
                nextPutAll:'STCLOCALOPTIMIZATIONS=', 
eb8814228056 initial checkin
tz
parents:
diff changeset
   912
                    ((aspects at: #optspace ) value ifTrue: [' +optspace' ] ifFalse: ['']),
eb8814228056 initial checkin
tz
parents:
diff changeset
   913
                    ((aspects at: #optspace2) value ifTrue: [' +optspace2'] ifFalse: ['']),
eb8814228056 initial checkin
tz
parents:
diff changeset
   914
                    ((aspects at: #optspace3) value ifTrue: [' +optspace3'] ifFalse: ['']),
eb8814228056 initial checkin
tz
parents:
diff changeset
   915
                    ((aspects at: #optinline) value ifTrue: [' +optinline'] ifFalse: ['']),
eb8814228056 initial checkin
tz
parents:
diff changeset
   916
                    ((aspects at: #inlineNew) value ifTrue: [' +inlineNew'] ifFalse: ['']); cr;
eb8814228056 initial checkin
tz
parents:
diff changeset
   917
1558
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   918
                nextPutAll:'STCLOCALOPT=$(STCLOCALOPTIMIZATIONS) -H. -package=$(PACKAGE) -Z$(LIBNAME) $(COMMONSYMFLAG) $(INITCODESEPFLAG)'; cr;
1526
eb8814228056 initial checkin
tz
parents:
diff changeset
   919
                nextPutAll:'RCSSOURCES=*.st Make.proto' ; cr;
eb8814228056 initial checkin
tz
parents:
diff changeset
   920
                nextPutAll:'all::           classLibRule' ; cr;
1558
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   921
                nextPutAll:'LINK_ADDITIONAL_OBJS=', ((aspects at: #systemLibraries) value asStringCollection asStringWith: $ ); cr.
1526
eb8814228056 initial checkin
tz
parents:
diff changeset
   922
eb8814228056 initial checkin
tz
parents:
diff changeset
   923
            makeProtoFileStream nextPutAll:'OBJS= \'; cr.
eb8814228056 initial checkin
tz
parents:
diff changeset
   924
eb8814228056 initial checkin
tz
parents:
diff changeset
   925
            libraryClasses do:
eb8814228056 initial checkin
tz
parents:
diff changeset
   926
            [:clsFileName|
eb8814228056 initial checkin
tz
parents:
diff changeset
   927
                makeProtoFileStream tab; nextPutAll: clsFileName; nextPutAll:'.$(O)'; tab.
eb8814228056 initial checkin
tz
parents:
diff changeset
   928
                libraryClasses last ~~ clsFileName ifTrue: [makeProtoFileStream nextPutAll: '\'; cr]
eb8814228056 initial checkin
tz
parents:
diff changeset
   929
            ].
eb8814228056 initial checkin
tz
parents:
diff changeset
   930
eb8814228056 initial checkin
tz
parents:
diff changeset
   931
            makeProtoFileStream cr; cr; nextPutAll:'# BEGINMAKEDEPEND --- do not remove this line; make depend needs it'.
eb8814228056 initial checkin
tz
parents:
diff changeset
   932
            libraryClasses do:
eb8814228056 initial checkin
tz
parents:
diff changeset
   933
            [:clsFileName|
eb8814228056 initial checkin
tz
parents:
diff changeset
   934
                makeProtoFileStream cr; nextPutAll: clsFileName; nextPutAll:'.$(O):  '; nextPutAll: clsFileName; nextPutAll:'.st $(STCHDR)'.
eb8814228056 initial checkin
tz
parents:
diff changeset
   935
            ].
eb8814228056 initial checkin
tz
parents:
diff changeset
   936
            makeProtoFileStream cr; nextPutAll:'# ENDMAKEDEPEND --- do not remove this line'.
eb8814228056 initial checkin
tz
parents:
diff changeset
   937
eb8814228056 initial checkin
tz
parents:
diff changeset
   938
            makeProtoFileStream close.  
eb8814228056 initial checkin
tz
parents:
diff changeset
   939
eb8814228056 initial checkin
tz
parents:
diff changeset
   940
            task := nil
eb8814228056 initial checkin
tz
parents:
diff changeset
   941
        ]
eb8814228056 initial checkin
tz
parents:
diff changeset
   942
    ]
eb8814228056 initial checkin
tz
parents:
diff changeset
   943
eb8814228056 initial checkin
tz
parents:
diff changeset
   944
!
eb8814228056 initial checkin
tz
parents:
diff changeset
   945
eb8814228056 initial checkin
tz
parents:
diff changeset
   946
getBlockForGeneratingMakefileFileIn: dir
eb8814228056 initial checkin
tz
parents:
diff changeset
   947
    "returns the block for generating the file Makefile"
eb8814228056 initial checkin
tz
parents:
diff changeset
   948
eb8814228056 initial checkin
tz
parents:
diff changeset
   949
    ^
eb8814228056 initial checkin
tz
parents:
diff changeset
   950
    [
eb8814228056 initial checkin
tz
parents:
diff changeset
   951
        |makeFile makeFileStream makeProtoFile catOn|
eb8814228056 initial checkin
tz
parents:
diff changeset
   952
1560
308be6511a7c use stand alone aspects
tz
parents: 1558
diff changeset
   953
        (makeFileStream := (makeFile := dir asFilename construct:'Makefile') writeStream) isNil
1526
eb8814228056 initial checkin
tz
parents:
diff changeset
   954
        ifTrue:
eb8814228056 initial checkin
tz
parents:
diff changeset
   955
        [
eb8814228056 initial checkin
tz
parents:
diff changeset
   956
            self warn:'Cannot create Makefile'.
eb8814228056 initial checkin
tz
parents:
diff changeset
   957
        ]
eb8814228056 initial checkin
tz
parents:
diff changeset
   958
        ifFalse:
eb8814228056 initial checkin
tz
parents:
diff changeset
   959
        [
eb8814228056 initial checkin
tz
parents:
diff changeset
   960
            catOn :=
eb8814228056 initial checkin
tz
parents:
diff changeset
   961
            [:aFileName|
eb8814228056 initial checkin
tz
parents:
diff changeset
   962
                |systemFileStream|
eb8814228056 initial checkin
tz
parents:
diff changeset
   963
                systemFileStream := Smalltalk systemFileStreamFor: ((aspects at: #topDirectory) value asFilename construct: aFileName) name.
eb8814228056 initial checkin
tz
parents:
diff changeset
   964
                makeFileStream nextPutAll: systemFileStream contents asString.
eb8814228056 initial checkin
tz
parents:
diff changeset
   965
                systemFileStream close
eb8814228056 initial checkin
tz
parents:
diff changeset
   966
            ].
eb8814228056 initial checkin
tz
parents:
diff changeset
   967
eb8814228056 initial checkin
tz
parents:
diff changeset
   968
            catOn value: (aspects at: #standardHeaderPath) value.
eb8814228056 initial checkin
tz
parents:
diff changeset
   969
            catOn value: (aspects at: #commonDefinesPath) value.
eb8814228056 initial checkin
tz
parents:
diff changeset
   970
            catOn value: (aspects at: #vendorCommonDefinesPath) value.
eb8814228056 initial checkin
tz
parents:
diff changeset
   971
            catOn value: (aspects at: #vendorCommonConfigurationDefinesPath) value.
eb8814228056 initial checkin
tz
parents:
diff changeset
   972
            catOn value: (aspects at: #packagePath) value.
eb8814228056 initial checkin
tz
parents:
diff changeset
   973
            catOn value: (aspects at: #standardHeader2Path) value.
eb8814228056 initial checkin
tz
parents:
diff changeset
   974
eb8814228056 initial checkin
tz
parents:
diff changeset
   975
            (makeProtoFile := self getTargetDirectory asFilename construct:'Make.proto') exists
eb8814228056 initial checkin
tz
parents:
diff changeset
   976
            ifTrue:
eb8814228056 initial checkin
tz
parents:
diff changeset
   977
            [
eb8814228056 initial checkin
tz
parents:
diff changeset
   978
                makeFileStream nextPutAll:makeProtoFile readStream contents asString.
eb8814228056 initial checkin
tz
parents:
diff changeset
   979
            ].
eb8814228056 initial checkin
tz
parents:
diff changeset
   980
eb8814228056 initial checkin
tz
parents:
diff changeset
   981
            makeFileStream cr; cr; nextPutAll: 'CONF=', (aspects at: #configuration) value.
eb8814228056 initial checkin
tz
parents:
diff changeset
   982
            catOn value: (aspects at: #standardRulesPath) value.
eb8814228056 initial checkin
tz
parents:
diff changeset
   983
eb8814228056 initial checkin
tz
parents:
diff changeset
   984
            makeFileStream close.
eb8814228056 initial checkin
tz
parents:
diff changeset
   985
eb8814228056 initial checkin
tz
parents:
diff changeset
   986
            task := nil
eb8814228056 initial checkin
tz
parents:
diff changeset
   987
        ]
eb8814228056 initial checkin
tz
parents:
diff changeset
   988
    ]
eb8814228056 initial checkin
tz
parents:
diff changeset
   989
eb8814228056 initial checkin
tz
parents:
diff changeset
   990
eb8814228056 initial checkin
tz
parents:
diff changeset
   991
!
eb8814228056 initial checkin
tz
parents:
diff changeset
   992
1558
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   993
getBlockForLinkingSourceOfAllClassesIn: dir
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   994
    "returns the block for linking source of all Smalltalk-source files into the target directory"
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   995
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   996
    ^
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   997
    [
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   998
        self getLibraryClasses do:
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
   999
        [:cls |
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
  1000
            (aspects at: #linkSources) value 
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
  1001
            ifTrue: 
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
  1002
            [                       
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
  1003
                self executeCommand: 
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
  1004
                'ln -s ', 
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
  1005
                ((aspects at: #targetDirectory) value asFilename construct: cls name, '.st') name, ' ', 
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
  1006
                 (aspects at: #sourceDirectory) value inDirectory: dir.
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
  1007
            ]
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
  1008
        ].
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
  1009
        task := nil
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
  1010
    ]
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
  1011
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
  1012
!
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
  1013
1526
eb8814228056 initial checkin
tz
parents:
diff changeset
  1014
getBlockForMakingTheLibraryIn: dir
eb8814228056 initial checkin
tz
parents:
diff changeset
  1015
    "returns the block for making the library"
eb8814228056 initial checkin
tz
parents:
diff changeset
  1016
eb8814228056 initial checkin
tz
parents:
diff changeset
  1017
    ^
eb8814228056 initial checkin
tz
parents:
diff changeset
  1018
    [
eb8814228056 initial checkin
tz
parents:
diff changeset
  1019
        self inform: 'Making the library...'.
eb8814228056 initial checkin
tz
parents:
diff changeset
  1020
        self executeCommand: 'make' inDirectory: dir.
eb8814228056 initial checkin
tz
parents:
diff changeset
  1021
        task := nil
eb8814228056 initial checkin
tz
parents:
diff changeset
  1022
    ]
eb8814228056 initial checkin
tz
parents:
diff changeset
  1023
eb8814228056 initial checkin
tz
parents:
diff changeset
  1024
eb8814228056 initial checkin
tz
parents:
diff changeset
  1025
! !
eb8814228056 initial checkin
tz
parents:
diff changeset
  1026
eb8814228056 initial checkin
tz
parents:
diff changeset
  1027
!LibraryBuilder methodsFor:'initialization'!
eb8814228056 initial checkin
tz
parents:
diff changeset
  1028
eb8814228056 initial checkin
tz
parents:
diff changeset
  1029
initialize
1558
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
  1030
    "initializes all aspects"
1526
eb8814228056 initial checkin
tz
parents:
diff changeset
  1031
1564
9a5fedae64f2 path fixes
Claus Gittinger <cg@exept.de>
parents: 1560
diff changeset
  1032
    |topDir myAspects|
1526
eb8814228056 initial checkin
tz
parents:
diff changeset
  1033
eb8814228056 initial checkin
tz
parents:
diff changeset
  1034
    super initialize.
eb8814228056 initial checkin
tz
parents:
diff changeset
  1035
1564
9a5fedae64f2 path fixes
Claus Gittinger <cg@exept.de>
parents: 1560
diff changeset
  1036
    topDir := (Filename currentDirectory asFilename construct:'..') construct:'..'.
1526
eb8814228056 initial checkin
tz
parents:
diff changeset
  1037
1560
308be6511a7c use stand alone aspects
tz
parents: 1558
diff changeset
  1038
    myAspects := IdentityDictionary new.
308be6511a7c use stand alone aspects
tz
parents: 1558
diff changeset
  1039
    aspects associationsDo: [:aspect| myAspects at: aspect key put: aspect value copy].
308be6511a7c use stand alone aspects
tz
parents: 1558
diff changeset
  1040
    aspects   := myAspects.
308be6511a7c use stand alone aspects
tz
parents: 1558
diff changeset
  1041
308be6511a7c use stand alone aspects
tz
parents: 1558
diff changeset
  1042
    (aspects at: #systemLibrary) addDependent: self.
1526
eb8814228056 initial checkin
tz
parents:
diff changeset
  1043
    self aspectsAt: #libraryName     putFirst: 'libnew'.
eb8814228056 initial checkin
tz
parents:
diff changeset
  1044
    self aspectsAt: #libraryClasses  putFirst: OrderedCollection new.
eb8814228056 initial checkin
tz
parents:
diff changeset
  1045
    self getLibraryClasses. "do check classes"
eb8814228056 initial checkin
tz
parents:
diff changeset
  1046
    self aspectsAt: #libraryDefines  putFirst: '-L/usr/X11/lib -Llib -Lbinary -L. -L/usr/local/lib -L/usr/lib -L/lib -lm -ldl -lXext -lX11'.
1564
9a5fedae64f2 path fixes
Claus Gittinger <cg@exept.de>
parents: 1560
diff changeset
  1047
    self aspectsAt: #targetDirectory putFirst: (topDir pathName asFilename construct: 'libnew') pathName.
9a5fedae64f2 path fixes
Claus Gittinger <cg@exept.de>
parents: 1560
diff changeset
  1048
    self aspectsAt: #sourceDirectory putFirst: topDir pathName.
1526
eb8814228056 initial checkin
tz
parents:
diff changeset
  1049
eb8814228056 initial checkin
tz
parents:
diff changeset
  1050
    self aspectsAt: #standardHeaderPath                   putFirst: '/rules/stdHeader'.
eb8814228056 initial checkin
tz
parents:
diff changeset
  1051
    self aspectsAt: #commonDefinesPath                    putFirst: '/configurations/COMMON/defines'.
eb8814228056 initial checkin
tz
parents:
diff changeset
  1052
    self aspectsAt: #vendorCommonDefinesPath              putFirst: '/configurations/vendorConf'.
eb8814228056 initial checkin
tz
parents:
diff changeset
  1053
    self aspectsAt: #vendorCommonConfigurationDefinesPath putFirst: '/configurations/myConf'.
eb8814228056 initial checkin
tz
parents:
diff changeset
  1054
    self aspectsAt: #packagePath                          putFirst: '/configurations/myPack'.
eb8814228056 initial checkin
tz
parents:
diff changeset
  1055
    self aspectsAt: #standardHeader2Path                  putFirst: '/rules/stdHeader2'.
eb8814228056 initial checkin
tz
parents:
diff changeset
  1056
    self aspectsAt: #standardRulesPath                    putFirst: '/rules/stdRules'.
eb8814228056 initial checkin
tz
parents:
diff changeset
  1057
1558
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
  1058
    self aspectsAt: #optspace    putFirst: false.
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
  1059
    self aspectsAt: #optspace2   putFirst: false.
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
  1060
    self aspectsAt: #optspace3   putFirst: false.
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
  1061
    self aspectsAt: #optinline   putFirst: false.
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
  1062
    self aspectsAt: #inlineNew   putFirst: false.
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
  1063
1560
308be6511a7c use stand alone aspects
tz
parents: 1558
diff changeset
  1064
    self aspectsAt: #linkSources putFirst: false.
1526
eb8814228056 initial checkin
tz
parents:
diff changeset
  1065
eb8814228056 initial checkin
tz
parents:
diff changeset
  1066
! !
eb8814228056 initial checkin
tz
parents:
diff changeset
  1067
eb8814228056 initial checkin
tz
parents:
diff changeset
  1068
!LibraryBuilder methodsFor:'queries'!
eb8814228056 initial checkin
tz
parents:
diff changeset
  1069
eb8814228056 initial checkin
tz
parents:
diff changeset
  1070
getLibraryClasses
eb8814228056 initial checkin
tz
parents:
diff changeset
  1071
    "returns the 'real' library classes"
eb8814228056 initial checkin
tz
parents:
diff changeset
  1072
eb8814228056 initial checkin
tz
parents:
diff changeset
  1073
    |libraryClasses cls|
eb8814228056 initial checkin
tz
parents:
diff changeset
  1074
    libraryClasses := OrderedCollection new.
eb8814228056 initial checkin
tz
parents:
diff changeset
  1075
    (aspects at: #libraryClasses) value reverseDo:
eb8814228056 initial checkin
tz
parents:
diff changeset
  1076
    [:clsName| 
eb8814228056 initial checkin
tz
parents:
diff changeset
  1077
        (cls := Smalltalk at: clsName) notNil
eb8814228056 initial checkin
tz
parents:
diff changeset
  1078
            ifTrue: [libraryClasses add: cls]
eb8814228056 initial checkin
tz
parents:
diff changeset
  1079
            ifFalse:[(aspects at: #libraryClasses) value remove: clsName]
eb8814228056 initial checkin
tz
parents:
diff changeset
  1080
    ].
eb8814228056 initial checkin
tz
parents:
diff changeset
  1081
    (aspects at: #libraryClasses) changed.
1558
c4ed1badfc13 revised
tz
parents: 1552
diff changeset
  1082
    ^libraryClasses reverse
1526
eb8814228056 initial checkin
tz
parents:
diff changeset
  1083
! !
eb8814228056 initial checkin
tz
parents:
diff changeset
  1084
16667
149afdb60320 #OTHER by mawalch
mawalch
parents: 7088
diff changeset
  1085
!LibraryBuilder methodsFor:'startup & release'!
1560
308be6511a7c use stand alone aspects
tz
parents: 1558
diff changeset
  1086
308be6511a7c use stand alone aspects
tz
parents: 1558
diff changeset
  1087
closeRequest
308be6511a7c use stand alone aspects
tz
parents: 1558
diff changeset
  1088
    "close request; stores the aspects for the next try"
308be6511a7c use stand alone aspects
tz
parents: 1558
diff changeset
  1089
308be6511a7c use stand alone aspects
tz
parents: 1558
diff changeset
  1090
    self class aspects: aspects.
308be6511a7c use stand alone aspects
tz
parents: 1558
diff changeset
  1091
308be6511a7c use stand alone aspects
tz
parents: 1558
diff changeset
  1092
    super closeRequest
308be6511a7c use stand alone aspects
tz
parents: 1558
diff changeset
  1093
308be6511a7c use stand alone aspects
tz
parents: 1558
diff changeset
  1094
308be6511a7c use stand alone aspects
tz
parents: 1558
diff changeset
  1095
308be6511a7c use stand alone aspects
tz
parents: 1558
diff changeset
  1096
! !
308be6511a7c use stand alone aspects
tz
parents: 1558
diff changeset
  1097
1526
eb8814228056 initial checkin
tz
parents:
diff changeset
  1098
!LibraryBuilder class methodsFor:'documentation'!
eb8814228056 initial checkin
tz
parents:
diff changeset
  1099
eb8814228056 initial checkin
tz
parents:
diff changeset
  1100
version
16667
149afdb60320 #OTHER by mawalch
mawalch
parents: 7088
diff changeset
  1101
    ^ '$Header$'
12650
e0f607754b9a Merged 18d06283743d and ff31bac2fd1b (branch default - CVS HEAD)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12125
diff changeset
  1102
!
e0f607754b9a Merged 18d06283743d and ff31bac2fd1b (branch default - CVS HEAD)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12125
diff changeset
  1103
e0f607754b9a Merged 18d06283743d and ff31bac2fd1b (branch default - CVS HEAD)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12125
diff changeset
  1104
version_HG
e0f607754b9a Merged 18d06283743d and ff31bac2fd1b (branch default - CVS HEAD)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12125
diff changeset
  1105
e0f607754b9a Merged 18d06283743d and ff31bac2fd1b (branch default - CVS HEAD)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12125
diff changeset
  1106
    ^ '$Changeset: <not expanded> $'
1526
eb8814228056 initial checkin
tz
parents:
diff changeset
  1107
! !
16667
149afdb60320 #OTHER by mawalch
mawalch
parents: 7088
diff changeset
  1108