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