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