ApplicationBuilder.st
author tz
Sat, 18 Apr 1998 16:17:45 +0200
changeset 1558 c4ed1badfc13
parent 1551 8607e094b4df
child 1559 088d6bc754c9
permissions -rw-r--r--
revised
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1518
dd37d7763def initial checkin
tz
parents:
diff changeset
     1
ToolApplicationModel subclass:#ApplicationBuilder
1525
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
     2
	instanceVariableNames:'task shellView aspects'
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
     3
	classVariableNames:''
1518
dd37d7763def initial checkin
tz
parents:
diff changeset
     4
	poolDictionaries:''
dd37d7763def initial checkin
tz
parents:
diff changeset
     5
	category:'Interface-Smalltalk'
dd37d7763def initial checkin
tz
parents:
diff changeset
     6
!
dd37d7763def initial checkin
tz
parents:
diff changeset
     7
1525
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
     8
ApplicationBuilder class instanceVariableNames:'aspects'
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
     9
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
    10
"
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
    11
 The following class instance variables are inherited by this class:
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
    12
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
    13
	ToolApplicationModel - history clipboard settings showHelp
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
    14
	ApplicationModel - ClassResources
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
    15
	Model - 
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
    16
	Object - 
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
    17
"
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
    18
!
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
    19
1518
dd37d7763def initial checkin
tz
parents:
diff changeset
    20
!ApplicationBuilder class methodsFor:'documentation'!
dd37d7763def initial checkin
tz
parents:
diff changeset
    21
dd37d7763def initial checkin
tz
parents:
diff changeset
    22
documentation
dd37d7763def initial checkin
tz
parents:
diff changeset
    23
"
dd37d7763def initial checkin
tz
parents:
diff changeset
    24
    The Application Builder of ST/X allows you to build ST/X-applications by following steps:
dd37d7763def initial checkin
tz
parents:
diff changeset
    25
dd37d7763def initial checkin
tz
parents:
diff changeset
    26
        0. Clobber the target directory of the application
1525
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
    27
        1. Generate the h-file with symbols
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
    28
        2. Generate the c-file with modules
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
    29
        3. Compile the modules init file
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
    30
        4. Compile the startup C-file
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
    31
        5. Define the symbolic links to the libraries
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
    32
        6. Link the libraries to the application
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
    33
        7. Define the symbolic links to the resources
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
    34
1518
dd37d7763def initial checkin
tz
parents:
diff changeset
    35
    [instance variables:]
dd37d7763def initial checkin
tz
parents:
diff changeset
    36
        task           <Process>               task of the running build
1558
c4ed1badfc13 revised
tz
parents: 1551
diff changeset
    37
        shellView      <ShellView>             shell view for outputting the build results
1518
dd37d7763def initial checkin
tz
parents:
diff changeset
    38
1525
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
    39
    [instance class variables:]
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
    40
        aspects        <IdentityDictionary>    aspects of the settings
1518
dd37d7763def initial checkin
tz
parents:
diff changeset
    41
dd37d7763def initial checkin
tz
parents:
diff changeset
    42
    [start with:]
dd37d7763def initial checkin
tz
parents:
diff changeset
    43
        ApplicationBuilder open
dd37d7763def initial checkin
tz
parents:
diff changeset
    44
dd37d7763def initial checkin
tz
parents:
diff changeset
    45
    [see also:]
dd37d7763def initial checkin
tz
parents:
diff changeset
    46
        LibraryBuilder
dd37d7763def initial checkin
tz
parents:
diff changeset
    47
dd37d7763def initial checkin
tz
parents:
diff changeset
    48
    [author:]
dd37d7763def initial checkin
tz
parents:
diff changeset
    49
        Thomas Zwick, eXept Software AG
dd37d7763def initial checkin
tz
parents:
diff changeset
    50
"
dd37d7763def initial checkin
tz
parents:
diff changeset
    51
! !
dd37d7763def initial checkin
tz
parents:
diff changeset
    52
1525
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
    53
!ApplicationBuilder class methodsFor:'accessing'!
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
    54
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
    55
aspects
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
    56
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
    57
    aspects isNil ifTrue: [aspects := IdentityDictionary new].
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
    58
    ^aspects
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
    59
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
    60
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
    61
!
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
    62
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
    63
aspects: anIdentityDictionary
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
    64
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
    65
    aspects := anIdentityDictionary
1558
c4ed1badfc13 revised
tz
parents: 1551
diff changeset
    66
!
c4ed1badfc13 revised
tz
parents: 1551
diff changeset
    67
c4ed1badfc13 revised
tz
parents: 1551
diff changeset
    68
label
c4ed1badfc13 revised
tz
parents: 1551
diff changeset
    69
c4ed1badfc13 revised
tz
parents: 1551
diff changeset
    70
   ^'Application Builder (experimental)'
1525
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
    71
! !
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
    72
1518
dd37d7763def initial checkin
tz
parents:
diff changeset
    73
!ApplicationBuilder class methodsFor:'help specs'!
dd37d7763def initial checkin
tz
parents:
diff changeset
    74
dd37d7763def initial checkin
tz
parents:
diff changeset
    75
helpSpec
dd37d7763def initial checkin
tz
parents:
diff changeset
    76
    "This resource specification was automatically generated
dd37d7763def initial checkin
tz
parents:
diff changeset
    77
     by the UIHelpTool of ST/X."
dd37d7763def initial checkin
tz
parents:
diff changeset
    78
dd37d7763def initial checkin
tz
parents:
diff changeset
    79
    "Do not manually edit this!! If it is corrupted,
dd37d7763def initial checkin
tz
parents:
diff changeset
    80
     the UIHelpTool may not be able to read the specification."
dd37d7763def initial checkin
tz
parents:
diff changeset
    81
dd37d7763def initial checkin
tz
parents:
diff changeset
    82
    "
dd37d7763def initial checkin
tz
parents:
diff changeset
    83
     UIHelpTool openOnClass:ApplicationBuilder    
dd37d7763def initial checkin
tz
parents:
diff changeset
    84
    "
dd37d7763def initial checkin
tz
parents:
diff changeset
    85
dd37d7763def initial checkin
tz
parents:
diff changeset
    86
    <resource: #help>
dd37d7763def initial checkin
tz
parents:
diff changeset
    87
dd37d7763def initial checkin
tz
parents:
diff changeset
    88
    ^super helpSpec addPairsFrom:#(
dd37d7763def initial checkin
tz
parents:
diff changeset
    89
dd37d7763def initial checkin
tz
parents:
diff changeset
    90
#applicationLinkDefines
dd37d7763def initial checkin
tz
parents:
diff changeset
    91
'Opens a dialog to define the link defines for the application.'
dd37d7763def initial checkin
tz
parents:
diff changeset
    92
dd37d7763def initial checkin
tz
parents:
diff changeset
    93
#applicationName
dd37d7763def initial checkin
tz
parents:
diff changeset
    94
'Name of the application.'
dd37d7763def initial checkin
tz
parents:
diff changeset
    95
dd37d7763def initial checkin
tz
parents:
diff changeset
    96
#build
1525
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
    97
'Starts the process of building the target.'
1518
dd37d7763def initial checkin
tz
parents:
diff changeset
    98
dd37d7763def initial checkin
tz
parents:
diff changeset
    99
#buildDate
dd37d7763def initial checkin
tz
parents:
diff changeset
   100
'Build date of the application.'
dd37d7763def initial checkin
tz
parents:
diff changeset
   101
dd37d7763def initial checkin
tz
parents:
diff changeset
   102
#configuration
dd37d7763def initial checkin
tz
parents:
diff changeset
   103
'Configuration information of the application.'
dd37d7763def initial checkin
tz
parents:
diff changeset
   104
dd37d7763def initial checkin
tz
parents:
diff changeset
   105
#libraryDirectory
dd37d7763def initial checkin
tz
parents:
diff changeset
   106
'Directory of the ST/X libraries.'
dd37d7763def initial checkin
tz
parents:
diff changeset
   107
1525
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
   108
#link
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
   109
'Starts the process of linking the application.'
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
   110
1558
c4ed1badfc13 revised
tz
parents: 1551
diff changeset
   111
#selectPath
c4ed1badfc13 revised
tz
parents: 1551
diff changeset
   112
'Opens a dialog for choosing the name of the file/path.'
c4ed1badfc13 revised
tz
parents: 1551
diff changeset
   113
c4ed1badfc13 revised
tz
parents: 1551
diff changeset
   114
#sourceDirectory
c4ed1badfc13 revised
tz
parents: 1551
diff changeset
   115
'Source directory of ST/X.'
c4ed1badfc13 revised
tz
parents: 1551
diff changeset
   116
1518
dd37d7763def initial checkin
tz
parents:
diff changeset
   117
#start
dd37d7763def initial checkin
tz
parents:
diff changeset
   118
'Start the build application.'
dd37d7763def initial checkin
tz
parents:
diff changeset
   119
dd37d7763def initial checkin
tz
parents:
diff changeset
   120
#startupCFile
dd37d7763def initial checkin
tz
parents:
diff changeset
   121
'Startup C-file of ST/X for the application.'
dd37d7763def initial checkin
tz
parents:
diff changeset
   122
dd37d7763def initial checkin
tz
parents:
diff changeset
   123
#startupFile
dd37d7763def initial checkin
tz
parents:
diff changeset
   124
'Startup C-file of ST/X for the application.'
dd37d7763def initial checkin
tz
parents:
diff changeset
   125
dd37d7763def initial checkin
tz
parents:
diff changeset
   126
#startupMessage
dd37d7763def initial checkin
tz
parents:
diff changeset
   127
'Startup message consisting of the class name and the selector name.'
dd37d7763def initial checkin
tz
parents:
diff changeset
   128
dd37d7763def initial checkin
tz
parents:
diff changeset
   129
#startupModule
dd37d7763def initial checkin
tz
parents:
diff changeset
   130
'Startup module of ST/X for the application.'
dd37d7763def initial checkin
tz
parents:
diff changeset
   131
dd37d7763def initial checkin
tz
parents:
diff changeset
   132
#stop
1525
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
   133
'Stops the process of the building.'
1518
dd37d7763def initial checkin
tz
parents:
diff changeset
   134
dd37d7763def initial checkin
tz
parents:
diff changeset
   135
#stxLibraries
dd37d7763def initial checkin
tz
parents:
diff changeset
   136
'List of the ST/X library names.'
dd37d7763def initial checkin
tz
parents:
diff changeset
   137
dd37d7763def initial checkin
tz
parents:
diff changeset
   138
#symlinkBitmaps
dd37d7763def initial checkin
tz
parents:
diff changeset
   139
'Create symbolic links to the bitmaps of ST/X.'
dd37d7763def initial checkin
tz
parents:
diff changeset
   140
dd37d7763def initial checkin
tz
parents:
diff changeset
   141
#symlinkRCFiles
dd37d7763def initial checkin
tz
parents:
diff changeset
   142
'Create symbolic links to the RC-files of ST/X.'
dd37d7763def initial checkin
tz
parents:
diff changeset
   143
dd37d7763def initial checkin
tz
parents:
diff changeset
   144
#symlinkResources
dd37d7763def initial checkin
tz
parents:
diff changeset
   145
'Create symbolic links to the resources of ST/X.'
dd37d7763def initial checkin
tz
parents:
diff changeset
   146
dd37d7763def initial checkin
tz
parents:
diff changeset
   147
#symlinkSources
dd37d7763def initial checkin
tz
parents:
diff changeset
   148
'Create symbolic links to the sources of ST/X.'
dd37d7763def initial checkin
tz
parents:
diff changeset
   149
dd37d7763def initial checkin
tz
parents:
diff changeset
   150
#systemLibaries
1525
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
   151
'Libraries of the operating system needed by the target.'
1518
dd37d7763def initial checkin
tz
parents:
diff changeset
   152
dd37d7763def initial checkin
tz
parents:
diff changeset
   153
#targetDirectory
1525
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
   154
'Directory where the target will build.'
1518
dd37d7763def initial checkin
tz
parents:
diff changeset
   155
dd37d7763def initial checkin
tz
parents:
diff changeset
   156
#topDirectory
dd37d7763def initial checkin
tz
parents:
diff changeset
   157
'Top directory of ST/X.'
dd37d7763def initial checkin
tz
parents:
diff changeset
   158
dd37d7763def initial checkin
tz
parents:
diff changeset
   159
#userLibraries
dd37d7763def initial checkin
tz
parents:
diff changeset
   160
'Libraries of the user wanted to add to the application.'
dd37d7763def initial checkin
tz
parents:
diff changeset
   161
dd37d7763def initial checkin
tz
parents:
diff changeset
   162
)
dd37d7763def initial checkin
tz
parents:
diff changeset
   163
! !
dd37d7763def initial checkin
tz
parents:
diff changeset
   164
dd37d7763def initial checkin
tz
parents:
diff changeset
   165
!ApplicationBuilder class methodsFor:'interface specs'!
dd37d7763def initial checkin
tz
parents:
diff changeset
   166
dd37d7763def initial checkin
tz
parents:
diff changeset
   167
windowSpec
dd37d7763def initial checkin
tz
parents:
diff changeset
   168
    "This resource specification was automatically generated
dd37d7763def initial checkin
tz
parents:
diff changeset
   169
     by the UIPainter of ST/X."
dd37d7763def initial checkin
tz
parents:
diff changeset
   170
dd37d7763def initial checkin
tz
parents:
diff changeset
   171
    "Do not manually edit this!! If it is corrupted,
dd37d7763def initial checkin
tz
parents:
diff changeset
   172
     the UIPainter may not be able to read the specification."
dd37d7763def initial checkin
tz
parents:
diff changeset
   173
dd37d7763def initial checkin
tz
parents:
diff changeset
   174
    "
dd37d7763def initial checkin
tz
parents:
diff changeset
   175
     UIPainter new openOnClass:ApplicationBuilder andSelector:#windowSpec
dd37d7763def initial checkin
tz
parents:
diff changeset
   176
     ApplicationBuilder new openInterface:#windowSpec
dd37d7763def initial checkin
tz
parents:
diff changeset
   177
     ApplicationBuilder open
dd37d7763def initial checkin
tz
parents:
diff changeset
   178
    "
dd37d7763def initial checkin
tz
parents:
diff changeset
   179
dd37d7763def initial checkin
tz
parents:
diff changeset
   180
    <resource: #canvas>
dd37d7763def initial checkin
tz
parents:
diff changeset
   181
dd37d7763def initial checkin
tz
parents:
diff changeset
   182
    ^
dd37d7763def initial checkin
tz
parents:
diff changeset
   183
     
dd37d7763def initial checkin
tz
parents:
diff changeset
   184
       #(#FullSpec
dd37d7763def initial checkin
tz
parents:
diff changeset
   185
          #window: 
dd37d7763def initial checkin
tz
parents:
diff changeset
   186
           #(#WindowSpec
dd37d7763def initial checkin
tz
parents:
diff changeset
   187
              #name: 'Application Builder'
1558
c4ed1badfc13 revised
tz
parents: 1551
diff changeset
   188
              #layout: #(#LayoutFrame 79 0 285 0 578 0 744 0)
1518
dd37d7763def initial checkin
tz
parents:
diff changeset
   189
              #label: 'Application Builder'
dd37d7763def initial checkin
tz
parents:
diff changeset
   190
              #min: #(#Point 420 220)
dd37d7763def initial checkin
tz
parents:
diff changeset
   191
              #max: #(#Point 1152 900)
1558
c4ed1badfc13 revised
tz
parents: 1551
diff changeset
   192
              #bounds: #(#Rectangle 79 285 579 745)
1518
dd37d7763def initial checkin
tz
parents:
diff changeset
   193
              #menu: #menu
dd37d7763def initial checkin
tz
parents:
diff changeset
   194
              #usePreferredExtent: false
dd37d7763def initial checkin
tz
parents:
diff changeset
   195
          )
dd37d7763def initial checkin
tz
parents:
diff changeset
   196
          #component: 
dd37d7763def initial checkin
tz
parents:
diff changeset
   197
           #(#SpecCollection
dd37d7763def initial checkin
tz
parents:
diff changeset
   198
              #collection: 
dd37d7763def initial checkin
tz
parents:
diff changeset
   199
               #(
dd37d7763def initial checkin
tz
parents:
diff changeset
   200
                 #(#ViewSpec
dd37d7763def initial checkin
tz
parents:
diff changeset
   201
                    #name: 'Box1'
1525
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
   202
                    #layout: #(#LayoutFrame 0 0.0 3 0 0 1.0 292 0)
1518
dd37d7763def initial checkin
tz
parents:
diff changeset
   203
                    #component: 
dd37d7763def initial checkin
tz
parents:
diff changeset
   204
                     #(#SpecCollection
dd37d7763def initial checkin
tz
parents:
diff changeset
   205
                        #collection: 
dd37d7763def initial checkin
tz
parents:
diff changeset
   206
                         #(
dd37d7763def initial checkin
tz
parents:
diff changeset
   207
                           #(#ViewSpec
dd37d7763def initial checkin
tz
parents:
diff changeset
   208
                              #name: 'Box2'
dd37d7763def initial checkin
tz
parents:
diff changeset
   209
                              #layout: #(#LayoutFrame 0 0.0 0 0.0 -148 1.0 2 1.0)
dd37d7763def initial checkin
tz
parents:
diff changeset
   210
                              #component: 
dd37d7763def initial checkin
tz
parents:
diff changeset
   211
                               #(#SpecCollection
dd37d7763def initial checkin
tz
parents:
diff changeset
   212
                                  #collection: 
dd37d7763def initial checkin
tz
parents:
diff changeset
   213
                                   #(
dd37d7763def initial checkin
tz
parents:
diff changeset
   214
                                     #(#LabelSpec
dd37d7763def initial checkin
tz
parents:
diff changeset
   215
                                        #name: 'applicationNameLabel'
dd37d7763def initial checkin
tz
parents:
diff changeset
   216
                                        #layout: #(#AlignmentOrigin 147 0 15 0 1 0.5)
dd37d7763def initial checkin
tz
parents:
diff changeset
   217
                                        #label: 'Application Name:'
dd37d7763def initial checkin
tz
parents:
diff changeset
   218
                                        #adjust: #right
dd37d7763def initial checkin
tz
parents:
diff changeset
   219
                                    )
dd37d7763def initial checkin
tz
parents:
diff changeset
   220
                                     #(#InputFieldSpec
dd37d7763def initial checkin
tz
parents:
diff changeset
   221
                                        #name: 'applicationNameField'
dd37d7763def initial checkin
tz
parents:
diff changeset
   222
                                        #layout: #(#LayoutFrame 150 0 4 0 0 1 26 0)
dd37d7763def initial checkin
tz
parents:
diff changeset
   223
                                        #activeHelpKey: #applicationName
dd37d7763def initial checkin
tz
parents:
diff changeset
   224
                                        #model: #applicationName
dd37d7763def initial checkin
tz
parents:
diff changeset
   225
                                    )
dd37d7763def initial checkin
tz
parents:
diff changeset
   226
                                     #(#LabelSpec
dd37d7763def initial checkin
tz
parents:
diff changeset
   227
                                        #name: 'startupMessageLabel'
dd37d7763def initial checkin
tz
parents:
diff changeset
   228
                                        #layout: #(#AlignmentOrigin 147 0 39 0 1 0.5)
dd37d7763def initial checkin
tz
parents:
diff changeset
   229
                                        #label: 'Startup Message:'
dd37d7763def initial checkin
tz
parents:
diff changeset
   230
                                        #adjust: #right
dd37d7763def initial checkin
tz
parents:
diff changeset
   231
                                    )
dd37d7763def initial checkin
tz
parents:
diff changeset
   232
                                     #(#InputFieldSpec
dd37d7763def initial checkin
tz
parents:
diff changeset
   233
                                        #name: 'startupMessageField'
dd37d7763def initial checkin
tz
parents:
diff changeset
   234
                                        #layout: #(#LayoutFrame 150 0 28 0 0 1.0 50 0)
dd37d7763def initial checkin
tz
parents:
diff changeset
   235
                                        #activeHelpKey: #startupMessage
dd37d7763def initial checkin
tz
parents:
diff changeset
   236
                                        #model: #startupMessage
dd37d7763def initial checkin
tz
parents:
diff changeset
   237
                                    )
dd37d7763def initial checkin
tz
parents:
diff changeset
   238
                                     #(#LabelSpec
dd37d7763def initial checkin
tz
parents:
diff changeset
   239
                                        #name: 'buildDateLabel'
dd37d7763def initial checkin
tz
parents:
diff changeset
   240
                                        #layout: #(#AlignmentOrigin 147 0 63 0 1 0.5)
dd37d7763def initial checkin
tz
parents:
diff changeset
   241
                                        #label: 'Build Date:'
dd37d7763def initial checkin
tz
parents:
diff changeset
   242
                                        #adjust: #right
dd37d7763def initial checkin
tz
parents:
diff changeset
   243
                                    )
dd37d7763def initial checkin
tz
parents:
diff changeset
   244
                                     #(#InputFieldSpec
dd37d7763def initial checkin
tz
parents:
diff changeset
   245
                                        #name: 'buildDateField'
dd37d7763def initial checkin
tz
parents:
diff changeset
   246
                                        #layout: #(#LayoutFrame 150 0 52 0 0 1.0 74 0)
dd37d7763def initial checkin
tz
parents:
diff changeset
   247
                                        #activeHelpKey: #buildDate
dd37d7763def initial checkin
tz
parents:
diff changeset
   248
                                        #model: #buildDate
dd37d7763def initial checkin
tz
parents:
diff changeset
   249
                                    )
dd37d7763def initial checkin
tz
parents:
diff changeset
   250
                                     #(#LabelSpec
dd37d7763def initial checkin
tz
parents:
diff changeset
   251
                                        #name: 'configurationLabel'
dd37d7763def initial checkin
tz
parents:
diff changeset
   252
                                        #layout: #(#AlignmentOrigin 147 0 87 0 1 0.5)
dd37d7763def initial checkin
tz
parents:
diff changeset
   253
                                        #label: 'Configuration:'
dd37d7763def initial checkin
tz
parents:
diff changeset
   254
                                        #adjust: #right
dd37d7763def initial checkin
tz
parents:
diff changeset
   255
                                    )
dd37d7763def initial checkin
tz
parents:
diff changeset
   256
                                     #(#InputFieldSpec
dd37d7763def initial checkin
tz
parents:
diff changeset
   257
                                        #name: 'configurationField'
dd37d7763def initial checkin
tz
parents:
diff changeset
   258
                                        #layout: #(#LayoutFrame 150 0 76 0 0 1.0 98 0)
dd37d7763def initial checkin
tz
parents:
diff changeset
   259
                                        #activeHelpKey: #configuration
dd37d7763def initial checkin
tz
parents:
diff changeset
   260
                                        #model: #configuration
dd37d7763def initial checkin
tz
parents:
diff changeset
   261
                                    )
dd37d7763def initial checkin
tz
parents:
diff changeset
   262
                                     #(#DividerSpec
1525
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
   263
                                        #name: 'Separator2'
1518
dd37d7763def initial checkin
tz
parents:
diff changeset
   264
                                        #layout: #(#LayoutFrame 0 0 102 0 0 1 105 0)
dd37d7763def initial checkin
tz
parents:
diff changeset
   265
                                    )
dd37d7763def initial checkin
tz
parents:
diff changeset
   266
                                     #(#ActionButtonSpec
dd37d7763def initial checkin
tz
parents:
diff changeset
   267
                                        #name: 'targetDirectoryButton'
dd37d7763def initial checkin
tz
parents:
diff changeset
   268
                                        #layout: #(#LayoutFrame 4 0 109 0 147 0 133 0)
1558
c4ed1badfc13 revised
tz
parents: 1551
diff changeset
   269
                                        #activeHelpKey: #selectPath
1518
dd37d7763def initial checkin
tz
parents:
diff changeset
   270
                                        #label: 'Target Directory:'
dd37d7763def initial checkin
tz
parents:
diff changeset
   271
                                        #model: #doSelectDirectory:
dd37d7763def initial checkin
tz
parents:
diff changeset
   272
                                        #actionValue: 'Target'
dd37d7763def initial checkin
tz
parents:
diff changeset
   273
                                    )
dd37d7763def initial checkin
tz
parents:
diff changeset
   274
                                     #(#InputFieldSpec
dd37d7763def initial checkin
tz
parents:
diff changeset
   275
                                        #name: 'targetDirectoryField'
dd37d7763def initial checkin
tz
parents:
diff changeset
   276
                                        #layout: #(#LayoutFrame 150 0 109 0 0 1.0 131 0)
dd37d7763def initial checkin
tz
parents:
diff changeset
   277
                                        #activeHelpKey: #targetDirectory
dd37d7763def initial checkin
tz
parents:
diff changeset
   278
                                        #model: #targetDirectory
dd37d7763def initial checkin
tz
parents:
diff changeset
   279
                                    )
dd37d7763def initial checkin
tz
parents:
diff changeset
   280
                                     #(#ActionButtonSpec
dd37d7763def initial checkin
tz
parents:
diff changeset
   281
                                        #name: 'topDirectoryButton'
dd37d7763def initial checkin
tz
parents:
diff changeset
   282
                                        #layout: #(#LayoutFrame 4 0 133 0 147 0 157 0)
1558
c4ed1badfc13 revised
tz
parents: 1551
diff changeset
   283
                                        #activeHelpKey: #selectPath
1518
dd37d7763def initial checkin
tz
parents:
diff changeset
   284
                                        #label: 'Top Directory:'
dd37d7763def initial checkin
tz
parents:
diff changeset
   285
                                        #model: #doSelectDirectory:
dd37d7763def initial checkin
tz
parents:
diff changeset
   286
                                        #actionValue: 'Top'
dd37d7763def initial checkin
tz
parents:
diff changeset
   287
                                    )
dd37d7763def initial checkin
tz
parents:
diff changeset
   288
                                     #(#InputFieldSpec
dd37d7763def initial checkin
tz
parents:
diff changeset
   289
                                        #name: 'topDirectoryField'
dd37d7763def initial checkin
tz
parents:
diff changeset
   290
                                        #layout: #(#LayoutFrame 150 0 133 0 0 1.0 155 0)
dd37d7763def initial checkin
tz
parents:
diff changeset
   291
                                        #activeHelpKey: #topDirectory
dd37d7763def initial checkin
tz
parents:
diff changeset
   292
                                        #model: #topDirectory
dd37d7763def initial checkin
tz
parents:
diff changeset
   293
                                    )
dd37d7763def initial checkin
tz
parents:
diff changeset
   294
                                     #(#ActionButtonSpec
dd37d7763def initial checkin
tz
parents:
diff changeset
   295
                                        #name: 'libraryDirectoryButton'
dd37d7763def initial checkin
tz
parents:
diff changeset
   296
                                        #layout: #(#LayoutFrame 4 0 157 0 147 0 181 0)
1558
c4ed1badfc13 revised
tz
parents: 1551
diff changeset
   297
                                        #activeHelpKey: #selectPath
1518
dd37d7763def initial checkin
tz
parents:
diff changeset
   298
                                        #label: 'Library Directory:'
dd37d7763def initial checkin
tz
parents:
diff changeset
   299
                                        #model: #doSelectDirectory:
dd37d7763def initial checkin
tz
parents:
diff changeset
   300
                                        #actionValue: 'Library'
dd37d7763def initial checkin
tz
parents:
diff changeset
   301
                                    )
dd37d7763def initial checkin
tz
parents:
diff changeset
   302
                                     #(#InputFieldSpec
dd37d7763def initial checkin
tz
parents:
diff changeset
   303
                                        #name: 'libraryDirectoryField'
dd37d7763def initial checkin
tz
parents:
diff changeset
   304
                                        #layout: #(#LayoutFrame 150 0 157 0 0 1.0 179 0)
dd37d7763def initial checkin
tz
parents:
diff changeset
   305
                                        #activeHelpKey: #libraryDirectory
dd37d7763def initial checkin
tz
parents:
diff changeset
   306
                                        #model: #libraryDirectory
dd37d7763def initial checkin
tz
parents:
diff changeset
   307
                                    )
dd37d7763def initial checkin
tz
parents:
diff changeset
   308
                                     #(#ActionButtonSpec
dd37d7763def initial checkin
tz
parents:
diff changeset
   309
                                        #name: 'startupCFileButton'
dd37d7763def initial checkin
tz
parents:
diff changeset
   310
                                        #layout: #(#LayoutFrame 4 0 181 0 147 0 205 0)
1558
c4ed1badfc13 revised
tz
parents: 1551
diff changeset
   311
                                        #activeHelpKey: #selectPath
1518
dd37d7763def initial checkin
tz
parents:
diff changeset
   312
                                        #label: 'Startup C-File:'
dd37d7763def initial checkin
tz
parents:
diff changeset
   313
                                        #model: #doSelectCFile:
dd37d7763def initial checkin
tz
parents:
diff changeset
   314
                                        #actionValue: 'StartupCFile'
dd37d7763def initial checkin
tz
parents:
diff changeset
   315
                                    )
dd37d7763def initial checkin
tz
parents:
diff changeset
   316
                                     #(#InputFieldSpec
dd37d7763def initial checkin
tz
parents:
diff changeset
   317
                                        #name: 'startupCFileField'
dd37d7763def initial checkin
tz
parents:
diff changeset
   318
                                        #layout: #(#LayoutFrame 150 0 181 0 0 1.0 203 0)
dd37d7763def initial checkin
tz
parents:
diff changeset
   319
                                        #activeHelpKey: #startupModule
dd37d7763def initial checkin
tz
parents:
diff changeset
   320
                                        #model: #startupCFile
dd37d7763def initial checkin
tz
parents:
diff changeset
   321
                                    )
dd37d7763def initial checkin
tz
parents:
diff changeset
   322
                                     #(#DividerSpec
1525
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
   323
                                        #name: 'Separator3'
1518
dd37d7763def initial checkin
tz
parents:
diff changeset
   324
                                        #layout: #(#LayoutFrame 0 0.0 208 0 0 1.0 211 0)
dd37d7763def initial checkin
tz
parents:
diff changeset
   325
                                    )
dd37d7763def initial checkin
tz
parents:
diff changeset
   326
                                     #(#LabelSpec
dd37d7763def initial checkin
tz
parents:
diff changeset
   327
                                        #name: 'stxLibraryButton'
1525
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
   328
                                        #layout: #(#AlignmentOrigin 147 0 227 0 1 0.5)
1518
dd37d7763def initial checkin
tz
parents:
diff changeset
   329
                                        #label: 'ST/X Libraries:'
dd37d7763def initial checkin
tz
parents:
diff changeset
   330
                                    )
dd37d7763def initial checkin
tz
parents:
diff changeset
   331
                                     #(#ComboBoxSpec
dd37d7763def initial checkin
tz
parents:
diff changeset
   332
                                        #name: 'stxLibrariesComboBox'
dd37d7763def initial checkin
tz
parents:
diff changeset
   333
                                        #layout: #(#LayoutFrame 150 0 216 0 0 1 238 0)
dd37d7763def initial checkin
tz
parents:
diff changeset
   334
                                        #activeHelpKey: #stxLibraries
dd37d7763def initial checkin
tz
parents:
diff changeset
   335
                                        #model: #stxLibrary
dd37d7763def initial checkin
tz
parents:
diff changeset
   336
                                        #immediateAccept: false
dd37d7763def initial checkin
tz
parents:
diff changeset
   337
                                        #acceptOnTab: false
dd37d7763def initial checkin
tz
parents:
diff changeset
   338
                                        #comboList: #stxLibraries
dd37d7763def initial checkin
tz
parents:
diff changeset
   339
                                    )
dd37d7763def initial checkin
tz
parents:
diff changeset
   340
                                     #(#ActionButtonSpec
dd37d7763def initial checkin
tz
parents:
diff changeset
   341
                                        #name: 'systemLibrariesButton'
dd37d7763def initial checkin
tz
parents:
diff changeset
   342
                                        #layout: #(#LayoutFrame 4 0 239 0 147 0 263 0)
1558
c4ed1badfc13 revised
tz
parents: 1551
diff changeset
   343
                                        #activeHelpKey: #selectPath
1518
dd37d7763def initial checkin
tz
parents:
diff changeset
   344
                                        #label: 'System Libraries:'
dd37d7763def initial checkin
tz
parents:
diff changeset
   345
                                        #model: #doSelectLibrary:
dd37d7763def initial checkin
tz
parents:
diff changeset
   346
                                        #actionValue: 'SystemLibrary'
dd37d7763def initial checkin
tz
parents:
diff changeset
   347
                                    )
dd37d7763def initial checkin
tz
parents:
diff changeset
   348
                                     #(#ComboBoxSpec
dd37d7763def initial checkin
tz
parents:
diff changeset
   349
                                        #name: 'systemLibrariesComboBox'
dd37d7763def initial checkin
tz
parents:
diff changeset
   350
                                        #layout: #(#LayoutFrame 150 0 240 0 0 1 262 0)
dd37d7763def initial checkin
tz
parents:
diff changeset
   351
                                        #activeHelpKey: #systemLibaries
dd37d7763def initial checkin
tz
parents:
diff changeset
   352
                                        #model: #systemLibrary
dd37d7763def initial checkin
tz
parents:
diff changeset
   353
                                        #immediateAccept: false
dd37d7763def initial checkin
tz
parents:
diff changeset
   354
                                        #acceptOnTab: false
dd37d7763def initial checkin
tz
parents:
diff changeset
   355
                                        #comboList: #systemLibraries
dd37d7763def initial checkin
tz
parents:
diff changeset
   356
                                    )
dd37d7763def initial checkin
tz
parents:
diff changeset
   357
                                     #(#ActionButtonSpec
dd37d7763def initial checkin
tz
parents:
diff changeset
   358
                                        #name: 'userLibrariesButton'
dd37d7763def initial checkin
tz
parents:
diff changeset
   359
                                        #layout: #(#LayoutFrame 4 0 263 0 147 0 287 0)
1558
c4ed1badfc13 revised
tz
parents: 1551
diff changeset
   360
                                        #activeHelpKey: #selectPath
1518
dd37d7763def initial checkin
tz
parents:
diff changeset
   361
                                        #label: 'User Libraries:'
dd37d7763def initial checkin
tz
parents:
diff changeset
   362
                                        #model: #doSelectLibrary:
dd37d7763def initial checkin
tz
parents:
diff changeset
   363
                                        #actionValue: 'UserLibrary'
dd37d7763def initial checkin
tz
parents:
diff changeset
   364
                                    )
dd37d7763def initial checkin
tz
parents:
diff changeset
   365
                                     #(#ComboBoxSpec
dd37d7763def initial checkin
tz
parents:
diff changeset
   366
                                        #name: 'userLibrariesComboBox'
dd37d7763def initial checkin
tz
parents:
diff changeset
   367
                                        #layout: #(#LayoutFrame 150 0 264 0 0 1 286 0)
dd37d7763def initial checkin
tz
parents:
diff changeset
   368
                                        #activeHelpKey: #userLibraries
dd37d7763def initial checkin
tz
parents:
diff changeset
   369
                                        #model: #userLibrary
dd37d7763def initial checkin
tz
parents:
diff changeset
   370
                                        #immediateAccept: false
dd37d7763def initial checkin
tz
parents:
diff changeset
   371
                                        #acceptOnTab: false
dd37d7763def initial checkin
tz
parents:
diff changeset
   372
                                        #comboList: #userLibraries
dd37d7763def initial checkin
tz
parents:
diff changeset
   373
                                    )
dd37d7763def initial checkin
tz
parents:
diff changeset
   374
                                  )
dd37d7763def initial checkin
tz
parents:
diff changeset
   375
                              )
dd37d7763def initial checkin
tz
parents:
diff changeset
   376
                          )
1525
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
   377
                           #(#DividerSpec
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
   378
                              #name: 'Separator4'
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
   379
                              #layout: #(#LayoutFrame -144 1 0 0.0 -138 1 0 1.0)
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
   380
                              #orientation: #vertical
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
   381
                          )
1518
dd37d7763def initial checkin
tz
parents:
diff changeset
   382
                           #(#ViewSpec
dd37d7763def initial checkin
tz
parents:
diff changeset
   383
                              #name: 'Box3'
dd37d7763def initial checkin
tz
parents:
diff changeset
   384
                              #layout: #(#LayoutFrame -134 1 0 0.0 0 1.0 0 1.0)
dd37d7763def initial checkin
tz
parents:
diff changeset
   385
                              #component: 
dd37d7763def initial checkin
tz
parents:
diff changeset
   386
                               #(#SpecCollection
dd37d7763def initial checkin
tz
parents:
diff changeset
   387
                                  #collection: 
dd37d7763def initial checkin
tz
parents:
diff changeset
   388
                                   #(
dd37d7763def initial checkin
tz
parents:
diff changeset
   389
                                     #(#FramedBoxSpec
dd37d7763def initial checkin
tz
parents:
diff changeset
   390
                                        #name: 'FramedBox'
1525
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
   391
                                        #layout: #(#LayoutFrame -4 0.0 4 0.0 0 1.0 -150 1.0)
1518
dd37d7763def initial checkin
tz
parents:
diff changeset
   392
                                        #component: 
dd37d7763def initial checkin
tz
parents:
diff changeset
   393
                                         #(#SpecCollection
dd37d7763def initial checkin
tz
parents:
diff changeset
   394
                                            #collection: 
dd37d7763def initial checkin
tz
parents:
diff changeset
   395
                                             #(
dd37d7763def initial checkin
tz
parents:
diff changeset
   396
                                               #(#CheckBoxSpec
dd37d7763def initial checkin
tz
parents:
diff changeset
   397
                                                  #name: 'linkRCFilesCheckBox'
dd37d7763def initial checkin
tz
parents:
diff changeset
   398
                                                  #layout: #(#LayoutFrame 12 0 24 0 12 1 46 0)
dd37d7763def initial checkin
tz
parents:
diff changeset
   399
                                                  #activeHelpKey: #symlinkRCFiles
dd37d7763def initial checkin
tz
parents:
diff changeset
   400
                                                  #model: #linkRCFiles
dd37d7763def initial checkin
tz
parents:
diff changeset
   401
                                                  #label: 'RC-Files'
dd37d7763def initial checkin
tz
parents:
diff changeset
   402
                                              )
dd37d7763def initial checkin
tz
parents:
diff changeset
   403
                                               #(#CheckBoxSpec
dd37d7763def initial checkin
tz
parents:
diff changeset
   404
                                                  #name: 'linkResourcesCheckBox'
dd37d7763def initial checkin
tz
parents:
diff changeset
   405
                                                  #layout: #(#LayoutFrame 12 0 48 0 12 1 70 0)
dd37d7763def initial checkin
tz
parents:
diff changeset
   406
                                                  #activeHelpKey: #symlinkResources
dd37d7763def initial checkin
tz
parents:
diff changeset
   407
                                                  #model: #linkResources
dd37d7763def initial checkin
tz
parents:
diff changeset
   408
                                                  #label: 'Resources'
dd37d7763def initial checkin
tz
parents:
diff changeset
   409
                                              )
dd37d7763def initial checkin
tz
parents:
diff changeset
   410
                                               #(#CheckBoxSpec
dd37d7763def initial checkin
tz
parents:
diff changeset
   411
                                                  #name: 'linkSourcesCheckBox'
dd37d7763def initial checkin
tz
parents:
diff changeset
   412
                                                  #layout: #(#LayoutFrame 12 0 72 0 12 1 94 0)
dd37d7763def initial checkin
tz
parents:
diff changeset
   413
                                                  #activeHelpKey: #symlinkSources
dd37d7763def initial checkin
tz
parents:
diff changeset
   414
                                                  #model: #linkSources
dd37d7763def initial checkin
tz
parents:
diff changeset
   415
                                                  #label: 'Sources'
dd37d7763def initial checkin
tz
parents:
diff changeset
   416
                                              )
dd37d7763def initial checkin
tz
parents:
diff changeset
   417
                                               #(#CheckBoxSpec
dd37d7763def initial checkin
tz
parents:
diff changeset
   418
                                                  #name: 'linkBitmapsCheckBox'
dd37d7763def initial checkin
tz
parents:
diff changeset
   419
                                                  #layout: #(#LayoutFrame 12 0 96 0 12 1 118 0)
dd37d7763def initial checkin
tz
parents:
diff changeset
   420
                                                  #activeHelpKey: #symlinkBitmaps
dd37d7763def initial checkin
tz
parents:
diff changeset
   421
                                                  #model: #linkBitmaps
dd37d7763def initial checkin
tz
parents:
diff changeset
   422
                                                  #label: 'Bitmaps'
dd37d7763def initial checkin
tz
parents:
diff changeset
   423
                                              )
dd37d7763def initial checkin
tz
parents:
diff changeset
   424
                                            )
dd37d7763def initial checkin
tz
parents:
diff changeset
   425
                                        )
dd37d7763def initial checkin
tz
parents:
diff changeset
   426
                                        #label: 'Symbolic Links'
dd37d7763def initial checkin
tz
parents:
diff changeset
   427
                                        #labelPosition: #topLeft
dd37d7763def initial checkin
tz
parents:
diff changeset
   428
                                    )
dd37d7763def initial checkin
tz
parents:
diff changeset
   429
                                     #(#VerticalPanelViewSpec
dd37d7763def initial checkin
tz
parents:
diff changeset
   430
                                        #name: 'VerticalPanel'
1525
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
   431
                                        #layout: #(#LayoutFrame 0 0.0 -144 1 -6 1.0 -2 1.0)
1518
dd37d7763def initial checkin
tz
parents:
diff changeset
   432
                                        #component: 
dd37d7763def initial checkin
tz
parents:
diff changeset
   433
                                         #(#SpecCollection
dd37d7763def initial checkin
tz
parents:
diff changeset
   434
                                            #collection: 
dd37d7763def initial checkin
tz
parents:
diff changeset
   435
                                             #(
dd37d7763def initial checkin
tz
parents:
diff changeset
   436
                                               #(#ActionButtonSpec
dd37d7763def initial checkin
tz
parents:
diff changeset
   437
                                                  #name: 'buildButton'
dd37d7763def initial checkin
tz
parents:
diff changeset
   438
                                                  #activeHelpKey: #build
dd37d7763def initial checkin
tz
parents:
diff changeset
   439
                                                  #label: 'Build'
dd37d7763def initial checkin
tz
parents:
diff changeset
   440
                                                  #model: #doBuild
1525
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
   441
                                                  #extent: #(#Point 128 33)
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
   442
                                              )
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
   443
                                               #(#ActionButtonSpec
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
   444
                                                  #name: 'linkButton'
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
   445
                                                  #activeHelpKey: #link
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
   446
                                                  #label: 'Link'
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
   447
                                                  #model: #doLink
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
   448
                                                  #extent: #(#Point 128 34)
1518
dd37d7763def initial checkin
tz
parents:
diff changeset
   449
                                              )
dd37d7763def initial checkin
tz
parents:
diff changeset
   450
                                               #(#ActionButtonSpec
dd37d7763def initial checkin
tz
parents:
diff changeset
   451
                                                  #name: 'stopButton'
dd37d7763def initial checkin
tz
parents:
diff changeset
   452
                                                  #activeHelpKey: #stop
dd37d7763def initial checkin
tz
parents:
diff changeset
   453
                                                  #label: 'Stop'
dd37d7763def initial checkin
tz
parents:
diff changeset
   454
                                                  #model: #doStop
1525
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
   455
                                                  #extent: #(#Point 128 33)
1518
dd37d7763def initial checkin
tz
parents:
diff changeset
   456
                                              )
dd37d7763def initial checkin
tz
parents:
diff changeset
   457
                                               #(#ActionButtonSpec
dd37d7763def initial checkin
tz
parents:
diff changeset
   458
                                                  #name: 'Button1'
dd37d7763def initial checkin
tz
parents:
diff changeset
   459
                                                  #activeHelpKey: #start
dd37d7763def initial checkin
tz
parents:
diff changeset
   460
                                                  #label: 'Start'
dd37d7763def initial checkin
tz
parents:
diff changeset
   461
                                                  #model: #doStart
1525
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
   462
                                                  #extent: #(#Point 128 33)
1518
dd37d7763def initial checkin
tz
parents:
diff changeset
   463
                                              )
dd37d7763def initial checkin
tz
parents:
diff changeset
   464
                                            )
dd37d7763def initial checkin
tz
parents:
diff changeset
   465
                                        )
dd37d7763def initial checkin
tz
parents:
diff changeset
   466
                                        #horizontalLayout: #fit
dd37d7763def initial checkin
tz
parents:
diff changeset
   467
                                        #verticalLayout: #fit
dd37d7763def initial checkin
tz
parents:
diff changeset
   468
                                        #horizontalSpace: 3
dd37d7763def initial checkin
tz
parents:
diff changeset
   469
                                        #verticalSpace: 3
dd37d7763def initial checkin
tz
parents:
diff changeset
   470
                                    )
dd37d7763def initial checkin
tz
parents:
diff changeset
   471
                                  )
dd37d7763def initial checkin
tz
parents:
diff changeset
   472
                              )
dd37d7763def initial checkin
tz
parents:
diff changeset
   473
                          )
dd37d7763def initial checkin
tz
parents:
diff changeset
   474
                        )
dd37d7763def initial checkin
tz
parents:
diff changeset
   475
                    )
1525
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
   476
                    #borderWidth: 1
1518
dd37d7763def initial checkin
tz
parents:
diff changeset
   477
                )
dd37d7763def initial checkin
tz
parents:
diff changeset
   478
                 #(#SubCanvasSpec
1525
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
   479
                    #name: 'shellViewSubCanvas'
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
   480
                    #layout: #(#LayoutFrame 0 0.0 294 0 0 1.0 -26 1)
1518
dd37d7763def initial checkin
tz
parents:
diff changeset
   481
                    #hasHorizontalScrollBar: false
dd37d7763def initial checkin
tz
parents:
diff changeset
   482
                    #hasVerticalScrollBar: false
dd37d7763def initial checkin
tz
parents:
diff changeset
   483
                    #clientHolder: #shellView
dd37d7763def initial checkin
tz
parents:
diff changeset
   484
                )
dd37d7763def initial checkin
tz
parents:
diff changeset
   485
                 #(#UISubSpecification
dd37d7763def initial checkin
tz
parents:
diff changeset
   486
                    #name: 'windowSpecForInfoBar'
dd37d7763def initial checkin
tz
parents:
diff changeset
   487
                    #layout: #(#LayoutFrame 0 0.0 -24 1 0 1.0 0 1.0)
dd37d7763def initial checkin
tz
parents:
diff changeset
   488
                    #majorKey: #ToolApplicationModel
dd37d7763def initial checkin
tz
parents:
diff changeset
   489
                    #minorKey: #windowSpecForInfoBar
dd37d7763def initial checkin
tz
parents:
diff changeset
   490
                )
dd37d7763def initial checkin
tz
parents:
diff changeset
   491
              )
dd37d7763def initial checkin
tz
parents:
diff changeset
   492
          )
dd37d7763def initial checkin
tz
parents:
diff changeset
   493
      )
dd37d7763def initial checkin
tz
parents:
diff changeset
   494
! !
dd37d7763def initial checkin
tz
parents:
diff changeset
   495
dd37d7763def initial checkin
tz
parents:
diff changeset
   496
!ApplicationBuilder class methodsFor:'menu specs'!
dd37d7763def initial checkin
tz
parents:
diff changeset
   497
dd37d7763def initial checkin
tz
parents:
diff changeset
   498
menu
dd37d7763def initial checkin
tz
parents:
diff changeset
   499
    "This resource specification was automatically generated
dd37d7763def initial checkin
tz
parents:
diff changeset
   500
     by the MenuEditor of ST/X."
dd37d7763def initial checkin
tz
parents:
diff changeset
   501
dd37d7763def initial checkin
tz
parents:
diff changeset
   502
    "Do not manually edit this!! If it is corrupted,
dd37d7763def initial checkin
tz
parents:
diff changeset
   503
     the MenuEditor may not be able to read the specification."
dd37d7763def initial checkin
tz
parents:
diff changeset
   504
dd37d7763def initial checkin
tz
parents:
diff changeset
   505
    "
dd37d7763def initial checkin
tz
parents:
diff changeset
   506
     MenuEditor new openOnClass:ApplicationBuilder andSelector:#menu
dd37d7763def initial checkin
tz
parents:
diff changeset
   507
     (Menu new fromLiteralArrayEncoding:(ApplicationBuilder menu)) startUp
dd37d7763def initial checkin
tz
parents:
diff changeset
   508
    "
dd37d7763def initial checkin
tz
parents:
diff changeset
   509
dd37d7763def initial checkin
tz
parents:
diff changeset
   510
    <resource: #menu>
dd37d7763def initial checkin
tz
parents:
diff changeset
   511
dd37d7763def initial checkin
tz
parents:
diff changeset
   512
    ^
dd37d7763def initial checkin
tz
parents:
diff changeset
   513
     
dd37d7763def initial checkin
tz
parents:
diff changeset
   514
       #(#Menu
dd37d7763def initial checkin
tz
parents:
diff changeset
   515
          
dd37d7763def initial checkin
tz
parents:
diff changeset
   516
           #(
dd37d7763def initial checkin
tz
parents:
diff changeset
   517
             #(#MenuItem
1558
c4ed1badfc13 revised
tz
parents: 1551
diff changeset
   518
                #label: 'About'
c4ed1badfc13 revised
tz
parents: 1551
diff changeset
   519
                #labelImage: #(#ResourceRetriever nil #menuIcon)
c4ed1badfc13 revised
tz
parents: 1551
diff changeset
   520
                #submenuChannel: #menuAbout
c4ed1badfc13 revised
tz
parents: 1551
diff changeset
   521
            )
c4ed1badfc13 revised
tz
parents: 1551
diff changeset
   522
             #(#MenuItem
1518
dd37d7763def initial checkin
tz
parents:
diff changeset
   523
                #label: 'File'
dd37d7763def initial checkin
tz
parents:
diff changeset
   524
                #submenu: 
dd37d7763def initial checkin
tz
parents:
diff changeset
   525
                 #(#Menu
dd37d7763def initial checkin
tz
parents:
diff changeset
   526
                    
dd37d7763def initial checkin
tz
parents:
diff changeset
   527
                     #(
dd37d7763def initial checkin
tz
parents:
diff changeset
   528
                       #(#MenuItem
1558
c4ed1badfc13 revised
tz
parents: 1551
diff changeset
   529
                          #label: 'Exit'
c4ed1badfc13 revised
tz
parents: 1551
diff changeset
   530
                          #value: #closeRequest
c4ed1badfc13 revised
tz
parents: 1551
diff changeset
   531
                          #activeHelpKey: #fileExit
c4ed1badfc13 revised
tz
parents: 1551
diff changeset
   532
                      )
c4ed1badfc13 revised
tz
parents: 1551
diff changeset
   533
                    ) nil
c4ed1badfc13 revised
tz
parents: 1551
diff changeset
   534
                    nil
c4ed1badfc13 revised
tz
parents: 1551
diff changeset
   535
                )
c4ed1badfc13 revised
tz
parents: 1551
diff changeset
   536
            )
c4ed1badfc13 revised
tz
parents: 1551
diff changeset
   537
             #(#MenuItem
c4ed1badfc13 revised
tz
parents: 1551
diff changeset
   538
                #label: 'Application'
c4ed1badfc13 revised
tz
parents: 1551
diff changeset
   539
                #submenu: 
c4ed1badfc13 revised
tz
parents: 1551
diff changeset
   540
                 #(#Menu
c4ed1badfc13 revised
tz
parents: 1551
diff changeset
   541
                    
c4ed1badfc13 revised
tz
parents: 1551
diff changeset
   542
                     #(
c4ed1badfc13 revised
tz
parents: 1551
diff changeset
   543
                       #(#MenuItem
1518
dd37d7763def initial checkin
tz
parents:
diff changeset
   544
                          #label: 'Build'
dd37d7763def initial checkin
tz
parents:
diff changeset
   545
                          #value: #doBuild
dd37d7763def initial checkin
tz
parents:
diff changeset
   546
                          #activeHelpKey: #build
dd37d7763def initial checkin
tz
parents:
diff changeset
   547
                      )
dd37d7763def initial checkin
tz
parents:
diff changeset
   548
                       #(#MenuItem
1525
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
   549
                          #label: 'Link'
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
   550
                          #value: #doLink
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
   551
                          #activeHelpKey: #link
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
   552
                      )
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
   553
                       #(#MenuItem
1558
c4ed1badfc13 revised
tz
parents: 1551
diff changeset
   554
                          #label: '-'
c4ed1badfc13 revised
tz
parents: 1551
diff changeset
   555
                      )
c4ed1badfc13 revised
tz
parents: 1551
diff changeset
   556
                       #(#MenuItem
1518
dd37d7763def initial checkin
tz
parents:
diff changeset
   557
                          #label: 'Stop'
dd37d7763def initial checkin
tz
parents:
diff changeset
   558
                          #value: #doStop
dd37d7763def initial checkin
tz
parents:
diff changeset
   559
                          #activeHelpKey: #stop
dd37d7763def initial checkin
tz
parents:
diff changeset
   560
                      )
dd37d7763def initial checkin
tz
parents:
diff changeset
   561
                       #(#MenuItem
dd37d7763def initial checkin
tz
parents:
diff changeset
   562
                          #label: 'Start'
dd37d7763def initial checkin
tz
parents:
diff changeset
   563
                          #value: #doStart
dd37d7763def initial checkin
tz
parents:
diff changeset
   564
                          #activeHelpKey: #start
dd37d7763def initial checkin
tz
parents:
diff changeset
   565
                      )
dd37d7763def initial checkin
tz
parents:
diff changeset
   566
                    ) nil
dd37d7763def initial checkin
tz
parents:
diff changeset
   567
                    nil
dd37d7763def initial checkin
tz
parents:
diff changeset
   568
                )
dd37d7763def initial checkin
tz
parents:
diff changeset
   569
            )
dd37d7763def initial checkin
tz
parents:
diff changeset
   570
             #(#MenuItem
dd37d7763def initial checkin
tz
parents:
diff changeset
   571
                #label: 'Settings'
dd37d7763def initial checkin
tz
parents:
diff changeset
   572
                #submenu: 
dd37d7763def initial checkin
tz
parents:
diff changeset
   573
                 #(#Menu
dd37d7763def initial checkin
tz
parents:
diff changeset
   574
                    
dd37d7763def initial checkin
tz
parents:
diff changeset
   575
                     #(
dd37d7763def initial checkin
tz
parents:
diff changeset
   576
                       #(#MenuItem
dd37d7763def initial checkin
tz
parents:
diff changeset
   577
                          #label: 'Target Directory...'
dd37d7763def initial checkin
tz
parents:
diff changeset
   578
                          #value: #doSelectDirectory:
dd37d7763def initial checkin
tz
parents:
diff changeset
   579
                          #activeHelpKey: #targetDirectory
dd37d7763def initial checkin
tz
parents:
diff changeset
   580
                          #argument: 'Target'
dd37d7763def initial checkin
tz
parents:
diff changeset
   581
                      )
dd37d7763def initial checkin
tz
parents:
diff changeset
   582
                       #(#MenuItem
dd37d7763def initial checkin
tz
parents:
diff changeset
   583
                          #label: 'Top Directory...'
dd37d7763def initial checkin
tz
parents:
diff changeset
   584
                          #value: #doSelectDirectory:
dd37d7763def initial checkin
tz
parents:
diff changeset
   585
                          #activeHelpKey: #topDirectory
dd37d7763def initial checkin
tz
parents:
diff changeset
   586
                          #argument: 'Top'
dd37d7763def initial checkin
tz
parents:
diff changeset
   587
                      )
dd37d7763def initial checkin
tz
parents:
diff changeset
   588
                       #(#MenuItem
dd37d7763def initial checkin
tz
parents:
diff changeset
   589
                          #label: 'Library Directory...'
dd37d7763def initial checkin
tz
parents:
diff changeset
   590
                          #value: #doSelectDirectory:
dd37d7763def initial checkin
tz
parents:
diff changeset
   591
                          #activeHelpKey: #libraryDirectory
dd37d7763def initial checkin
tz
parents:
diff changeset
   592
                          #argument: 'Library'
dd37d7763def initial checkin
tz
parents:
diff changeset
   593
                      )
dd37d7763def initial checkin
tz
parents:
diff changeset
   594
                       #(#MenuItem
dd37d7763def initial checkin
tz
parents:
diff changeset
   595
                          #label: 'Startup C-File...'
dd37d7763def initial checkin
tz
parents:
diff changeset
   596
                          #value: #doSelectCFile:
dd37d7763def initial checkin
tz
parents:
diff changeset
   597
                          #activeHelpKey: #startupCFile
dd37d7763def initial checkin
tz
parents:
diff changeset
   598
                          #argument: 'StartupCFile'
dd37d7763def initial checkin
tz
parents:
diff changeset
   599
                      )
dd37d7763def initial checkin
tz
parents:
diff changeset
   600
                       #(#MenuItem
dd37d7763def initial checkin
tz
parents:
diff changeset
   601
                          #label: '-'
dd37d7763def initial checkin
tz
parents:
diff changeset
   602
                      )
dd37d7763def initial checkin
tz
parents:
diff changeset
   603
                       #(#MenuItem
dd37d7763def initial checkin
tz
parents:
diff changeset
   604
                          #label: 'System Libraries...'
dd37d7763def initial checkin
tz
parents:
diff changeset
   605
                          #value: #doSelectLibrary:
dd37d7763def initial checkin
tz
parents:
diff changeset
   606
                          #activeHelpKey: #systemLibaries
dd37d7763def initial checkin
tz
parents:
diff changeset
   607
                          #argument: 'SystemLibrary'
dd37d7763def initial checkin
tz
parents:
diff changeset
   608
                      )
dd37d7763def initial checkin
tz
parents:
diff changeset
   609
                       #(#MenuItem
dd37d7763def initial checkin
tz
parents:
diff changeset
   610
                          #label: 'User Libraries...'
dd37d7763def initial checkin
tz
parents:
diff changeset
   611
                          #value: #doSelectLibrary:
dd37d7763def initial checkin
tz
parents:
diff changeset
   612
                          #activeHelpKey: #userLibraries
dd37d7763def initial checkin
tz
parents:
diff changeset
   613
                          #argument: 'UserLibrary'
dd37d7763def initial checkin
tz
parents:
diff changeset
   614
                      )
dd37d7763def initial checkin
tz
parents:
diff changeset
   615
                       #(#MenuItem
dd37d7763def initial checkin
tz
parents:
diff changeset
   616
                          #label: '-'
dd37d7763def initial checkin
tz
parents:
diff changeset
   617
                      )
dd37d7763def initial checkin
tz
parents:
diff changeset
   618
                       #(#MenuItem
dd37d7763def initial checkin
tz
parents:
diff changeset
   619
                          #label: 'Application Link Defines...'
dd37d7763def initial checkin
tz
parents:
diff changeset
   620
                          #value: #doDefineApplicationLinkDefines
dd37d7763def initial checkin
tz
parents:
diff changeset
   621
                          #activeHelpKey: #applicationLinkDefines
dd37d7763def initial checkin
tz
parents:
diff changeset
   622
                      )
dd37d7763def initial checkin
tz
parents:
diff changeset
   623
                       #(#MenuItem
dd37d7763def initial checkin
tz
parents:
diff changeset
   624
                          #label: '-'
dd37d7763def initial checkin
tz
parents:
diff changeset
   625
                      )
dd37d7763def initial checkin
tz
parents:
diff changeset
   626
                       #(#MenuItem
dd37d7763def initial checkin
tz
parents:
diff changeset
   627
                          #label: 'Fonts'
dd37d7763def initial checkin
tz
parents:
diff changeset
   628
                          #submenuChannel: #menuFont
dd37d7763def initial checkin
tz
parents:
diff changeset
   629
                      )
dd37d7763def initial checkin
tz
parents:
diff changeset
   630
                    ) nil
dd37d7763def initial checkin
tz
parents:
diff changeset
   631
                    nil
dd37d7763def initial checkin
tz
parents:
diff changeset
   632
                )
dd37d7763def initial checkin
tz
parents:
diff changeset
   633
            )
dd37d7763def initial checkin
tz
parents:
diff changeset
   634
             #(#MenuItem
dd37d7763def initial checkin
tz
parents:
diff changeset
   635
                #label: 'Help'
dd37d7763def initial checkin
tz
parents:
diff changeset
   636
                #startGroup: #right
dd37d7763def initial checkin
tz
parents:
diff changeset
   637
                #submenuChannel: #menuHelp
dd37d7763def initial checkin
tz
parents:
diff changeset
   638
            )
dd37d7763def initial checkin
tz
parents:
diff changeset
   639
          ) nil
dd37d7763def initial checkin
tz
parents:
diff changeset
   640
          nil
dd37d7763def initial checkin
tz
parents:
diff changeset
   641
      )
dd37d7763def initial checkin
tz
parents:
diff changeset
   642
! !
dd37d7763def initial checkin
tz
parents:
diff changeset
   643
dd37d7763def initial checkin
tz
parents:
diff changeset
   644
!ApplicationBuilder methodsFor:'actions'!
dd37d7763def initial checkin
tz
parents:
diff changeset
   645
dd37d7763def initial checkin
tz
parents:
diff changeset
   646
doBuild
dd37d7763def initial checkin
tz
parents:
diff changeset
   647
    "builds the application by doing following tasks:
dd37d7763def initial checkin
tz
parents:
diff changeset
   648
        0. Clobber the target directory of the application
1525
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
   649
        1. Generate the h-file with symbols
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
   650
        2. Generate the c-file with modules
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
   651
        3. Compile the modules init file
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
   652
        4. Compile the startup C-file
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
   653
        5. Define the symbolic links to the libraries
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
   654
        6. Link the libraries to the application
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
   655
        7. Define the symbolic links to the resources
1518
dd37d7763def initial checkin
tz
parents:
diff changeset
   656
    "
dd37d7763def initial checkin
tz
parents:
diff changeset
   657
    |dir compilerPath compilerFlags block0 block1 block2 block3 block4 block5 block6 block7 priority|
dd37d7763def initial checkin
tz
parents:
diff changeset
   658
dd37d7763def initial checkin
tz
parents:
diff changeset
   659
    task notNil ifTrue: [self warn: 'There is already a build running!!'].
dd37d7763def initial checkin
tz
parents:
diff changeset
   660
dd37d7763def initial checkin
tz
parents:
diff changeset
   661
    self inform: 'Starting building of application...' asBoldText.
dd37d7763def initial checkin
tz
parents:
diff changeset
   662
1525
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
   663
    (dir := self getTargetDirectory) isNil 
1518
dd37d7763def initial checkin
tz
parents:
diff changeset
   664
        ifTrue: [^self warn: 'Could not create application directory!!'].
dd37d7763def initial checkin
tz
parents:
diff changeset
   665
dd37d7763def initial checkin
tz
parents:
diff changeset
   666
    shellView directory: dir.
dd37d7763def initial checkin
tz
parents:
diff changeset
   667
dd37d7763def initial checkin
tz
parents:
diff changeset
   668
    (compilerPath := ByteCodeCompiler ccPath, ' ') isNil 
dd37d7763def initial checkin
tz
parents:
diff changeset
   669
        ifTrue: [^self warn:'Define first a system compiler!!'].
dd37d7763def initial checkin
tz
parents:
diff changeset
   670
    compilerFlags := self getCompilerFlags.
dd37d7763def initial checkin
tz
parents:
diff changeset
   671
1525
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
   672
    block0 := self getBlockForClobberingTargetDirectory: dir.
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
   673
    block1 := self getBlockForGeneratingHFileWithSymbolsIn: dir.
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
   674
    block2 := self getBlockForGeneratingCFileWithModulesIn: dir.
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
   675
    block3 := self getBlockForCompilingModulListFileWith: compilerPath, compilerFlags inDirectory: dir.
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
   676
    block4 := self getBlockForCompilingStartupCFileWith: compilerPath, compilerFlags inDirectory: dir.
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
   677
    block5 := self getBlockForCreatingSymbolicLinksToTheLibrariesIn: dir.
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
   678
    block6 := self getBlockForLinkingLibrariesToTheApplicationIn: dir.
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
   679
    block7 := self getBlockForCreatingSymbolicLinksToTheResourcesIn: dir.
1518
dd37d7763def initial checkin
tz
parents:
diff changeset
   680
dd37d7763def initial checkin
tz
parents:
diff changeset
   681
    priority := Processor userBackgroundPriority.
dd37d7763def initial checkin
tz
parents:
diff changeset
   682
    task := block0 forkAt: priority.
dd37d7763def initial checkin
tz
parents:
diff changeset
   683
    task addExitAction: 
dd37d7763def initial checkin
tz
parents:
diff changeset
   684
    [
dd37d7763def initial checkin
tz
parents:
diff changeset
   685
        task isNil ifTrue: 
dd37d7763def initial checkin
tz
parents:
diff changeset
   686
        [
dd37d7763def initial checkin
tz
parents:
diff changeset
   687
            task := block1 forkAt: priority.
dd37d7763def initial checkin
tz
parents:
diff changeset
   688
            task addExitAction: 
dd37d7763def initial checkin
tz
parents:
diff changeset
   689
            [
dd37d7763def initial checkin
tz
parents:
diff changeset
   690
                task isNil ifTrue: 
dd37d7763def initial checkin
tz
parents:
diff changeset
   691
                [
dd37d7763def initial checkin
tz
parents:
diff changeset
   692
                    task := block2 forkAt: priority.
dd37d7763def initial checkin
tz
parents:
diff changeset
   693
                    task addExitAction: 
dd37d7763def initial checkin
tz
parents:
diff changeset
   694
                    [
dd37d7763def initial checkin
tz
parents:
diff changeset
   695
                        task isNil ifTrue:
dd37d7763def initial checkin
tz
parents:
diff changeset
   696
                        [
dd37d7763def initial checkin
tz
parents:
diff changeset
   697
                            task := block3 forkAt: priority.
dd37d7763def initial checkin
tz
parents:
diff changeset
   698
                            task addExitAction: 
dd37d7763def initial checkin
tz
parents:
diff changeset
   699
                            [
dd37d7763def initial checkin
tz
parents:
diff changeset
   700
                                task isNil ifTrue: 
dd37d7763def initial checkin
tz
parents:
diff changeset
   701
                                [
dd37d7763def initial checkin
tz
parents:
diff changeset
   702
                                    task := block4 forkAt: priority.
dd37d7763def initial checkin
tz
parents:
diff changeset
   703
                                    task addExitAction: 
dd37d7763def initial checkin
tz
parents:
diff changeset
   704
                                    [
dd37d7763def initial checkin
tz
parents:
diff changeset
   705
                                        task isNil ifTrue: 
dd37d7763def initial checkin
tz
parents:
diff changeset
   706
                                        [
dd37d7763def initial checkin
tz
parents:
diff changeset
   707
                                            task := block5 forkAt: priority.
dd37d7763def initial checkin
tz
parents:
diff changeset
   708
                                            task addExitAction: 
dd37d7763def initial checkin
tz
parents:
diff changeset
   709
                                            [
dd37d7763def initial checkin
tz
parents:
diff changeset
   710
                                                task isNil ifTrue: 
dd37d7763def initial checkin
tz
parents:
diff changeset
   711
                                                [
dd37d7763def initial checkin
tz
parents:
diff changeset
   712
                                                    task := block6 forkAt: priority.
dd37d7763def initial checkin
tz
parents:
diff changeset
   713
                                                    task addExitAction: 
dd37d7763def initial checkin
tz
parents:
diff changeset
   714
                                                    [
dd37d7763def initial checkin
tz
parents:
diff changeset
   715
                                                        task isNil ifTrue: 
dd37d7763def initial checkin
tz
parents:
diff changeset
   716
                                                        [
dd37d7763def initial checkin
tz
parents:
diff changeset
   717
                                                            task := block7 forkAt: priority.
dd37d7763def initial checkin
tz
parents:
diff changeset
   718
                                                            task addExitAction: 
dd37d7763def initial checkin
tz
parents:
diff changeset
   719
                                                            [
1525
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
   720
                                                                task isNil 
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
   721
                                                                    ifTrue: [self inform: 'Application build.' asBoldText]
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
   722
                                                                    ifFalse: [self informTargetBuildingFailured].
1518
dd37d7763def initial checkin
tz
parents:
diff changeset
   723
                                                                Display beep.
dd37d7763def initial checkin
tz
parents:
diff changeset
   724
                                                            ]   
1525
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
   725
                                                        ] ifFalse: [self informTargetBuildingFailured]
1518
dd37d7763def initial checkin
tz
parents:
diff changeset
   726
                                                    ]
1525
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
   727
                                                ] ifFalse: [self informTargetBuildingFailured]
1518
dd37d7763def initial checkin
tz
parents:
diff changeset
   728
                                            ]
1525
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
   729
                                        ] ifFalse: [self informTargetBuildingFailured]
1518
dd37d7763def initial checkin
tz
parents:
diff changeset
   730
                                    ]
1525
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
   731
                                ] ifFalse: [self informTargetBuildingFailured]
1518
dd37d7763def initial checkin
tz
parents:
diff changeset
   732
                            ]
1525
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
   733
                        ] ifFalse: [self informTargetBuildingFailured]
1518
dd37d7763def initial checkin
tz
parents:
diff changeset
   734
                    ]           
1525
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
   735
                ] ifFalse: [self informTargetBuildingFailured]
1518
dd37d7763def initial checkin
tz
parents:
diff changeset
   736
            ]
1525
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
   737
        ] ifFalse: [self informTargetBuildingFailured]
1518
dd37d7763def initial checkin
tz
parents:
diff changeset
   738
    ]
dd37d7763def initial checkin
tz
parents:
diff changeset
   739
!
dd37d7763def initial checkin
tz
parents:
diff changeset
   740
dd37d7763def initial checkin
tz
parents:
diff changeset
   741
doDefineApplicationLinkDefines
dd37d7763def initial checkin
tz
parents:
diff changeset
   742
    "opens a dialog for defining the application defines"
dd37d7763def initial checkin
tz
parents:
diff changeset
   743
dd37d7763def initial checkin
tz
parents:
diff changeset
   744
    |box|
dd37d7763def initial checkin
tz
parents:
diff changeset
   745
    box := EnterBox new.
dd37d7763def initial checkin
tz
parents:
diff changeset
   746
    box label: 'Application Link Defines'.
1525
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
   747
    box initialText: (aspects at: #applicationLinkDefines) value.
1518
dd37d7763def initial checkin
tz
parents:
diff changeset
   748
    box showAtPointer.
dd37d7763def initial checkin
tz
parents:
diff changeset
   749
    box accepted
dd37d7763def initial checkin
tz
parents:
diff changeset
   750
    ifTrue:
dd37d7763def initial checkin
tz
parents:
diff changeset
   751
    [
1525
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
   752
        (aspects at: #applicationLinkDefines) value: box contents
1518
dd37d7763def initial checkin
tz
parents:
diff changeset
   753
    ].
dd37d7763def initial checkin
tz
parents:
diff changeset
   754
    box destroy
dd37d7763def initial checkin
tz
parents:
diff changeset
   755
!
dd37d7763def initial checkin
tz
parents:
diff changeset
   756
1525
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
   757
doLink
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
   758
    "links the application"
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
   759
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
   760
    |dir block priority|
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
   761
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
   762
    task notNil ifTrue: [self warn: 'There is already a build running!!'].
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
   763
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
   764
    self inform: 'Starting building of application...' asBoldText.
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
   765
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
   766
    (dir := self getTargetDirectory) isNil 
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
   767
        ifTrue: [^self warn: 'Could not create application directory!!'].
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
   768
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
   769
    shellView directory: dir.
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
   770
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
   771
    block := self getBlockForLinkingLibrariesToTheApplicationIn: dir.
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
   772
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
   773
    priority := Processor userBackgroundPriority.
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
   774
    task := block forkAt: priority.
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
   775
    task addExitAction: 
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
   776
    [
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
   777
        task isNil 
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
   778
            ifTrue: [self inform: 'Application build.' asBoldText]
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
   779
            ifFalse:[self informTargetBuildingFailured].
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
   780
        Display beep.
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
   781
    ]
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
   782
!
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
   783
1518
dd37d7763def initial checkin
tz
parents:
diff changeset
   784
doSelectCFile: whichFile
dd37d7763def initial checkin
tz
parents:
diff changeset
   785
    "opens a FileSelectionBrowser in order to select C-file"
dd37d7763def initial checkin
tz
parents:
diff changeset
   786
dd37d7763def initial checkin
tz
parents:
diff changeset
   787
    |currentFile selectedFile|
dd37d7763def initial checkin
tz
parents:
diff changeset
   788
1525
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
   789
    currentFile := aspects at: whichFile asLowercaseFirst asSymbol.
1518
dd37d7763def initial checkin
tz
parents:
diff changeset
   790
dd37d7763def initial checkin
tz
parents:
diff changeset
   791
    ((selectedFile := FileSelectionBrowser
dd37d7763def initial checkin
tz
parents:
diff changeset
   792
        request: 'Select Your ', whichFile, ' File' 
dd37d7763def initial checkin
tz
parents:
diff changeset
   793
        fileName: currentFile value
dd37d7763def initial checkin
tz
parents:
diff changeset
   794
        withFileFilters: #('*.c')) notNil and:
dd37d7763def initial checkin
tz
parents:
diff changeset
   795
    [selectedFile asFilename exists and: [selectedFile asFilename isDirectory not]]) 
dd37d7763def initial checkin
tz
parents:
diff changeset
   796
        ifTrue: [currentFile value: selectedFile]
dd37d7763def initial checkin
tz
parents:
diff changeset
   797
dd37d7763def initial checkin
tz
parents:
diff changeset
   798
dd37d7763def initial checkin
tz
parents:
diff changeset
   799
!
dd37d7763def initial checkin
tz
parents:
diff changeset
   800
dd37d7763def initial checkin
tz
parents:
diff changeset
   801
doSelectDirectory: whichDir
dd37d7763def initial checkin
tz
parents:
diff changeset
   802
    "opens a FileSelectionBrowser in order to select directory"
dd37d7763def initial checkin
tz
parents:
diff changeset
   803
dd37d7763def initial checkin
tz
parents:
diff changeset
   804
    |currentDir selectedDir|
dd37d7763def initial checkin
tz
parents:
diff changeset
   805
1525
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
   806
    currentDir := aspects at: (whichDir asLowercaseFirst, 'Directory') asSymbol.
1518
dd37d7763def initial checkin
tz
parents:
diff changeset
   807
dd37d7763def initial checkin
tz
parents:
diff changeset
   808
    ((selectedDir := FileSelectionBrowser
dd37d7763def initial checkin
tz
parents:
diff changeset
   809
        request: 'Select Your ', whichDir, ' Directory' 
dd37d7763def initial checkin
tz
parents:
diff changeset
   810
        fileName: nil 
dd37d7763def initial checkin
tz
parents:
diff changeset
   811
        inDirectory: currentDir value
dd37d7763def initial checkin
tz
parents:
diff changeset
   812
        withFileFilters: #('*.*o')) notNil and:
dd37d7763def initial checkin
tz
parents:
diff changeset
   813
    [selectedDir asFilename exists and: [selectedDir asFilename isDirectory]]) 
dd37d7763def initial checkin
tz
parents:
diff changeset
   814
        ifTrue: [currentDir value: selectedDir. shellView executeCommand: 'cd ', selectedDir]
dd37d7763def initial checkin
tz
parents:
diff changeset
   815
dd37d7763def initial checkin
tz
parents:
diff changeset
   816
dd37d7763def initial checkin
tz
parents:
diff changeset
   817
!
dd37d7763def initial checkin
tz
parents:
diff changeset
   818
dd37d7763def initial checkin
tz
parents:
diff changeset
   819
doSelectLibrary: whichFile
dd37d7763def initial checkin
tz
parents:
diff changeset
   820
    "opens a FileSelectionBrowser in order to select library"
dd37d7763def initial checkin
tz
parents:
diff changeset
   821
dd37d7763def initial checkin
tz
parents:
diff changeset
   822
    |currentFile selectedFile|
dd37d7763def initial checkin
tz
parents:
diff changeset
   823
1525
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
   824
    currentFile := aspects at: whichFile asLowercaseFirst asSymbol.
1518
dd37d7763def initial checkin
tz
parents:
diff changeset
   825
dd37d7763def initial checkin
tz
parents:
diff changeset
   826
    ((selectedFile := FileSelectionBrowser
dd37d7763def initial checkin
tz
parents:
diff changeset
   827
        request: 'Select Your ', whichFile, ' File' 
dd37d7763def initial checkin
tz
parents:
diff changeset
   828
        fileName: currentFile value
dd37d7763def initial checkin
tz
parents:
diff changeset
   829
        withFileFilters: #('*.*o' '*.a')) notNil and:
dd37d7763def initial checkin
tz
parents:
diff changeset
   830
    [selectedFile asFilename exists and: [selectedFile asFilename isDirectory not]]) 
dd37d7763def initial checkin
tz
parents:
diff changeset
   831
        ifTrue: [currentFile value: selectedFile]
dd37d7763def initial checkin
tz
parents:
diff changeset
   832
dd37d7763def initial checkin
tz
parents:
diff changeset
   833
dd37d7763def initial checkin
tz
parents:
diff changeset
   834
!
dd37d7763def initial checkin
tz
parents:
diff changeset
   835
dd37d7763def initial checkin
tz
parents:
diff changeset
   836
doStart
dd37d7763def initial checkin
tz
parents:
diff changeset
   837
    "starts the build application"
dd37d7763def initial checkin
tz
parents:
diff changeset
   838
dd37d7763def initial checkin
tz
parents:
diff changeset
   839
    |dir|
dd37d7763def initial checkin
tz
parents:
diff changeset
   840
    self doStop.
1525
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
   841
    (dir := self getTargetDirectory) isNil 
1518
dd37d7763def initial checkin
tz
parents:
diff changeset
   842
        ifTrue: [^self warn: 'Application directory does not exists!!'].
dd37d7763def initial checkin
tz
parents:
diff changeset
   843
dd37d7763def initial checkin
tz
parents:
diff changeset
   844
    shellView directory: dir.
1525
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
   845
    shellView executeCommand: (aspects at: #applicationName) value.
1518
dd37d7763def initial checkin
tz
parents:
diff changeset
   846
dd37d7763def initial checkin
tz
parents:
diff changeset
   847
!
dd37d7763def initial checkin
tz
parents:
diff changeset
   848
dd37d7763def initial checkin
tz
parents:
diff changeset
   849
doStop
dd37d7763def initial checkin
tz
parents:
diff changeset
   850
    "terminates the task of the current build"
dd37d7763def initial checkin
tz
parents:
diff changeset
   851
dd37d7763def initial checkin
tz
parents:
diff changeset
   852
    task notNil ifTrue: [task removeAllExitActions. task terminate].
dd37d7763def initial checkin
tz
parents:
diff changeset
   853
    task := nil.
dd37d7763def initial checkin
tz
parents:
diff changeset
   854
    shellView executeCommand: 'clear'.
dd37d7763def initial checkin
tz
parents:
diff changeset
   855
    self inform: ''
dd37d7763def initial checkin
tz
parents:
diff changeset
   856
1525
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
   857
!
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
   858
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
   859
executeCommand: aCommand inDirectory: dir
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
   860
    "executes aCommand in directory dir; put aCommand and the result into the shell view"
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
   861
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
   862
    |outStream|
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
   863
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
   864
    shellView directory: dir.
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
   865
    shellView append: shellView getDirectoryTextString, ' ', aCommand.
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
   866
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
   867
    outStream:= PipeStream readingFrom: aCommand errorDisposition:#inline inDirectory: dir.
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
   868
    [      
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
   869
        outStream canReadWithoutBlocking
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
   870
        ifTrue:
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
   871
        [
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
   872
            outStream readWait.
1558
c4ed1badfc13 revised
tz
parents: 1551
diff changeset
   873
            shellView append: (Text string: (outStream upTo: Character cr) color: Color red).
1525
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
   874
        ].
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
   875
    ] doWhile:[outStream atEnd not].
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
   876
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
   877
    outStream close
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
   878
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
   879
!
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
   880
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
   881
inform: aString
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
   882
    "outputs aString via shell view as information"
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
   883
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
   884
    shellView commandInputField contents: aString
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
   885
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
   886
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
   887
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
   888
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
   889
!
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
   890
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
   891
informTargetBuildingFailured
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
   892
    "informs that something went wrong"
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
   893
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
   894
    self inform: 'Application building failured.' asBoldText.
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
   895
    task := nil
1518
dd37d7763def initial checkin
tz
parents:
diff changeset
   896
! !
dd37d7763def initial checkin
tz
parents:
diff changeset
   897
dd37d7763def initial checkin
tz
parents:
diff changeset
   898
!ApplicationBuilder methodsFor:'aspects'!
dd37d7763def initial checkin
tz
parents:
diff changeset
   899
dd37d7763def initial checkin
tz
parents:
diff changeset
   900
aspectFor:aKey
dd37d7763def initial checkin
tz
parents:
diff changeset
   901
    "returns an aspect at aKey"
dd37d7763def initial checkin
tz
parents:
diff changeset
   902
1525
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
   903
    ^aspects at: aKey ifAbsent: [super aspectFor:aKey]
1518
dd37d7763def initial checkin
tz
parents:
diff changeset
   904
!
dd37d7763def initial checkin
tz
parents:
diff changeset
   905
dd37d7763def initial checkin
tz
parents:
diff changeset
   906
aspectsAt: aKey putFirst: anObject
dd37d7763def initial checkin
tz
parents:
diff changeset
   907
    "puts firstly anObject as ValueHolder at aKey and returns it"
dd37d7763def initial checkin
tz
parents:
diff changeset
   908
1525
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
   909
    ^aspects at: aKey ifAbsent: [aspects at: aKey put: anObject asValue]
1518
dd37d7763def initial checkin
tz
parents:
diff changeset
   910
dd37d7763def initial checkin
tz
parents:
diff changeset
   911
dd37d7763def initial checkin
tz
parents:
diff changeset
   912
dd37d7763def initial checkin
tz
parents:
diff changeset
   913
dd37d7763def initial checkin
tz
parents:
diff changeset
   914
dd37d7763def initial checkin
tz
parents:
diff changeset
   915
dd37d7763def initial checkin
tz
parents:
diff changeset
   916
dd37d7763def initial checkin
tz
parents:
diff changeset
   917
dd37d7763def initial checkin
tz
parents:
diff changeset
   918
dd37d7763def initial checkin
tz
parents:
diff changeset
   919
dd37d7763def initial checkin
tz
parents:
diff changeset
   920
dd37d7763def initial checkin
tz
parents:
diff changeset
   921
dd37d7763def initial checkin
tz
parents:
diff changeset
   922
dd37d7763def initial checkin
tz
parents:
diff changeset
   923
dd37d7763def initial checkin
tz
parents:
diff changeset
   924
dd37d7763def initial checkin
tz
parents:
diff changeset
   925
dd37d7763def initial checkin
tz
parents:
diff changeset
   926
dd37d7763def initial checkin
tz
parents:
diff changeset
   927
dd37d7763def initial checkin
tz
parents:
diff changeset
   928
dd37d7763def initial checkin
tz
parents:
diff changeset
   929
dd37d7763def initial checkin
tz
parents:
diff changeset
   930
dd37d7763def initial checkin
tz
parents:
diff changeset
   931
dd37d7763def initial checkin
tz
parents:
diff changeset
   932
dd37d7763def initial checkin
tz
parents:
diff changeset
   933
dd37d7763def initial checkin
tz
parents:
diff changeset
   934
dd37d7763def initial checkin
tz
parents:
diff changeset
   935
dd37d7763def initial checkin
tz
parents:
diff changeset
   936
dd37d7763def initial checkin
tz
parents:
diff changeset
   937
dd37d7763def initial checkin
tz
parents:
diff changeset
   938
!
dd37d7763def initial checkin
tz
parents:
diff changeset
   939
dd37d7763def initial checkin
tz
parents:
diff changeset
   940
shellView
dd37d7763def initial checkin
tz
parents:
diff changeset
   941
    "returns a shell view"
dd37d7763def initial checkin
tz
parents:
diff changeset
   942
1525
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
   943
    shellView isNil ifTrue: [shellView := ShellView new. shellView directory: (aspects at: #topDirectory) value]. 
1518
dd37d7763def initial checkin
tz
parents:
diff changeset
   944
    ^shellView 
dd37d7763def initial checkin
tz
parents:
diff changeset
   945
dd37d7763def initial checkin
tz
parents:
diff changeset
   946
dd37d7763def initial checkin
tz
parents:
diff changeset
   947
dd37d7763def initial checkin
tz
parents:
diff changeset
   948
! !
dd37d7763def initial checkin
tz
parents:
diff changeset
   949
1525
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
   950
!ApplicationBuilder methodsFor:'building blocks'!
1518
dd37d7763def initial checkin
tz
parents:
diff changeset
   951
1525
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
   952
getBlockForClobberingTargetDirectory: dir
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
   953
    "returns the block for clobbering the target directory of the application"
1518
dd37d7763def initial checkin
tz
parents:
diff changeset
   954
1525
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
   955
    ^
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
   956
    [
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
   957
        self inform: 'Clobbering the target directory...'.
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
   958
        self executeCommand: 'rm -r *' inDirectory: dir.
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
   959
        task := nil
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
   960
    ]
1518
dd37d7763def initial checkin
tz
parents:
diff changeset
   961
dd37d7763def initial checkin
tz
parents:
diff changeset
   962
!
dd37d7763def initial checkin
tz
parents:
diff changeset
   963
1525
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
   964
getBlockForCompilingModulListFileWith: compilerPathAndFlags inDirectory: dir
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
   965
    "returns the block for compiling the C-file with the list of the module names"
1518
dd37d7763def initial checkin
tz
parents:
diff changeset
   966
1525
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
   967
    ^
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
   968
    [
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
   969
        |command|
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
   970
        self inform: 'Starting compilation of the modules init file...'.
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
   971
        command := compilerPathAndFlags , ' -c -fPIC -O6 -fomit-frame-pointer -m486 -DDEBUG -Di386 modulList.c'.
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
   972
        self executeCommand: command inDirectory: dir.
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
   973
        (dir asFilename construct: 'modulList.o') exists
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
   974
            ifTrue:  [task := nil]
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
   975
            ifFalse: [self warn:'Could not compile the modules file!!']
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
   976
    ]
1518
dd37d7763def initial checkin
tz
parents:
diff changeset
   977
!
dd37d7763def initial checkin
tz
parents:
diff changeset
   978
1525
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
   979
getBlockForCompilingStartupCFileWith: compilerPathAndFlags inDirectory: dir
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
   980
    "returns the block for compiling the startup file with passing startup class, startup selector, configuration string, and build date"
1518
dd37d7763def initial checkin
tz
parents:
diff changeset
   981
1525
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
   982
    ^
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
   983
    [
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
   984
        |startUpClass cls startUpSelector startupFile command|
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
   985
        ((aspects at: #startupCFile) value asFilename) exists  
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
   986
        ifFalse: 
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
   987
        [
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
   988
            self warn: 'Defined startup C-file not found!!'
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
   989
        ]
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
   990
        ifTrue:
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
   991
        [
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
   992
            self inform: 'Starting compilation of the startup C-file...'.
1518
dd37d7763def initial checkin
tz
parents:
diff changeset
   993
1525
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
   994
            startUpClass    := ((aspects at: #startupMessage) value upTo: $ ) asSymbol.
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
   995
            (cls := Smalltalk at: startUpClass) isNil ifTrue: [^self warn: 'Defined class not found in system!!'].
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
   996
            startUpSelector := ((aspects at: #startupMessage) value copy reverse upTo: $ ) reverse asSymbol.
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
   997
            (cls respondsTo: startUpSelector) ifFalse: [^self warn: 'Defined class does not respond to the defined selector!!'].
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
   998
            startupFile     := (aspects at: #startupCFile) value asFilename.
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
   999
            startupFile copyTo: (startupFile := dir asFilename construct: (aspects at: #startupCFile) value asFilename baseName).
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
  1000
            command := compilerPathAndFlags , ' -o main.o -c -O -O6 -fomit-frame-pointer -m486 -DDEBUG -Di386 ',
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
  1001
                '-DSTARTUP_CLASS="\"',        startUpClass, '\"" ',
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
  1002
                '-DSTARTUP_SELECTOR="\"',     startUpSelector, '\"" ',
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
  1003
                '-DCONFIGURATION_STRING="\"', (aspects at: #configuration)   value, '\"" ',
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
  1004
                '-DBUILD_DATE="\"',           (aspects at: #buildDate)       value, '\"" ',
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
  1005
                startupFile name.
1518
dd37d7763def initial checkin
tz
parents:
diff changeset
  1006
1525
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
  1007
            self executeCommand: command inDirectory: dir.
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
  1008
        ].
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
  1009
        (dir asFilename construct: 'main.o') exists
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
  1010
            ifTrue:  [task := nil]
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
  1011
            ifFalse: [self warn:'Could not compile the startup C-file!!']
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
  1012
    ]
1518
dd37d7763def initial checkin
tz
parents:
diff changeset
  1013
!
dd37d7763def initial checkin
tz
parents:
diff changeset
  1014
1525
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
  1015
getBlockForCreatingSymbolicLinksToTheLibrariesIn: dir
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
  1016
    "returns the block for creating the symbolic links to the libraries"
1518
dd37d7763def initial checkin
tz
parents:
diff changeset
  1017
1525
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
  1018
    ^
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
  1019
    [
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
  1020
        self inform: 'Starting defining of the symbolic links to the libraries...'.
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
  1021
        self getLibraryFileNames value do:
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
  1022
        [:libPath|       
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
  1023
            self executeCommand: 'ln -s ', libPath , ' ', libPath asFilename head inDirectory: dir
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
  1024
        ].
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
  1025
        task := nil. 
1518
dd37d7763def initial checkin
tz
parents:
diff changeset
  1026
    ]
dd37d7763def initial checkin
tz
parents:
diff changeset
  1027
dd37d7763def initial checkin
tz
parents:
diff changeset
  1028
!
dd37d7763def initial checkin
tz
parents:
diff changeset
  1029
1525
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
  1030
getBlockForCreatingSymbolicLinksToTheResourcesIn: dir
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
  1031
    "returns the block for creating the symbolic links to the resources"
1518
dd37d7763def initial checkin
tz
parents:
diff changeset
  1032
1525
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
  1033
    ^
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
  1034
    [
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
  1035
        self inform: 'Starting linking of the resources...'.
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
  1036
        (aspects at: #linkRCFiles) value
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
  1037
        ifTrue:
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
  1038
        [                
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
  1039
            self executeCommand: 
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
  1040
                'ln -s ', 
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
  1041
                ((aspects at: #libraryDirectory) value asFilename construct: '*.rc') name, ' ', 
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
  1042
                (aspects at: #targetDirectory) value inDirectory: dir.
1558
c4ed1badfc13 revised
tz
parents: 1551
diff changeset
  1043
            self executeCommand: 
c4ed1badfc13 revised
tz
parents: 1551
diff changeset
  1044
                'ln -s ', 
c4ed1badfc13 revised
tz
parents: 1551
diff changeset
  1045
                ((aspects at: #libraryDirectory) value asFilename construct: 'patches') name, ' ', 
c4ed1badfc13 revised
tz
parents: 1551
diff changeset
  1046
                (aspects at: #targetDirectory) value inDirectory: dir.
1525
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
  1047
        ].
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
  1048
        (aspects at: #linkResources) value
1518
dd37d7763def initial checkin
tz
parents:
diff changeset
  1049
        ifTrue:
1525
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
  1050
        [ 
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
  1051
            self executeCommand: 
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
  1052
                'cp -r -d ', 
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
  1053
                ((aspects at: #libraryDirectory) value asFilename construct: 'resources') name, ' ', 
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
  1054
                (aspects at: #targetDirectory) value inDirectory: dir.
1518
dd37d7763def initial checkin
tz
parents:
diff changeset
  1055
        ].
1525
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
  1056
        (aspects at: #linkSources) value
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
  1057
        ifTrue:
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
  1058
        [ 
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
  1059
            self executeCommand: 
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
  1060
                'cp -r -d ', 
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
  1061
                ((aspects at: #libraryDirectory) value asFilename construct: 'source') name, ' ', 
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
  1062
                (aspects at: #targetDirectory) value inDirectory: dir.
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
  1063
        ].
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
  1064
        (aspects at: #linkBitmaps) value
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
  1065
        ifTrue:
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
  1066
        [ 
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
  1067
            self executeCommand: 
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
  1068
                'cp -r -d ', 
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
  1069
                ((aspects at: #libraryDirectory) value asFilename construct: 'bitmaps') name, ' ', 
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
  1070
                (aspects at: #targetDirectory) value inDirectory: dir.
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
  1071
        ].
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
  1072
        task := nil.
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
  1073
    ]
1518
dd37d7763def initial checkin
tz
parents:
diff changeset
  1074
dd37d7763def initial checkin
tz
parents:
diff changeset
  1075
!
dd37d7763def initial checkin
tz
parents:
diff changeset
  1076
1525
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
  1077
getBlockForGeneratingCFileWithModulesIn: dir
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
  1078
    "returns the block for generating a C-file with the modules in directory dir"
1518
dd37d7763def initial checkin
tz
parents:
diff changeset
  1079
1525
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
  1080
    ^
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
  1081
    [
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
  1082
        |selectionOfLibraries|
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
  1083
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
  1084
        self inform: 'Starting generation of the C-file with modules...'.
1518
dd37d7763def initial checkin
tz
parents:
diff changeset
  1085
1525
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
  1086
        selectionOfLibraries := self getModuleNames.
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
  1087
        self executeCommand: 'echo "#include <stcIntern.h>" > modulList.c' inDirectory: dir.
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
  1088
        self executeCommand: 'echo "typedef void (*vf)();" >> modulList.c' inDirectory: dir.
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
  1089
        selectionOfLibraries do:
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
  1090
        [:lib|
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
  1091
            self executeCommand: 'echo "extern void _', lib, '_Init();" >> modulList.c' inDirectory: dir.
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
  1092
        ].
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
  1093
        self executeCommand: 'echo "static vf modules[] = {" >> modulList.c' inDirectory: dir.
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
  1094
        selectionOfLibraries do:
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
  1095
        [:lib|
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
  1096
            self executeCommand: 'echo "_', lib, '_Init," >> modulList.c' inDirectory: dir.
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
  1097
        ].
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
  1098
        self executeCommand: 'echo "(vf)0};" >> modulList.c' inDirectory: dir.
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
  1099
        self executeCommand: 'echo "vf *__modules__ = modules;" >> modulList.c' inDirectory: dir.
1518
dd37d7763def initial checkin
tz
parents:
diff changeset
  1100
1525
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
  1101
        (dir asFilename construct: 'modulList.c') exists
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
  1102
            ifTrue:  [task := nil]
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
  1103
            ifFalse: [self warn:'Could not generate the C-file with libraries!!']
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
  1104
    ]
1518
dd37d7763def initial checkin
tz
parents:
diff changeset
  1105
dd37d7763def initial checkin
tz
parents:
diff changeset
  1106
!
dd37d7763def initial checkin
tz
parents:
diff changeset
  1107
1525
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
  1108
getBlockForGeneratingHFileWithSymbolsIn: dir
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
  1109
    "returns the block for generating a H-file with the symbols in directory dir"
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
  1110
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
  1111
    ^
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
  1112
    [
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
  1113
        |symbolsFile realInc|
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
  1114
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
  1115
        self inform: 'Starting generation of the h-file with symbols...'.
1518
dd37d7763def initial checkin
tz
parents:
diff changeset
  1116
1525
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
  1117
        ByteCodeCompiler stcCompilationIncludes asArrayOfSubstrings do:
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
  1118
        [:inc|
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
  1119
            realInc := inc readStream.
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
  1120
            realInc upTo: $/. 
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
  1121
            realInc := '/', realInc upToEnd.      
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
  1122
            (symbolsFile := realInc asFilename construct: 'symbols.stc') exists
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
  1123
            ifTrue:
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
  1124
            [   
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
  1125
                self executeCommand: 'echo "char *__symbols[] = {" > symbols.h' inDirectory: dir.
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
  1126
                self executeCommand: 'sed ''s/^/"/'' < ', symbolsFile name,' | sed ''s/$/",/'' | sed ''s/\\/\\\\/g'' >> symbols.h' inDirectory: dir.
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
  1127
                self executeCommand: 'echo "0 };" >> symbols.h' inDirectory: dir.
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
  1128
            ]
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
  1129
        ].
1518
dd37d7763def initial checkin
tz
parents:
diff changeset
  1130
1525
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
  1131
        (dir asFilename construct: 'symbols.h') exists
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
  1132
            ifTrue:  [task := nil]
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
  1133
            ifFalse: [self warn:'Could not generate the h-file with symbols!!']
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
  1134
    ]
1518
dd37d7763def initial checkin
tz
parents:
diff changeset
  1135
dd37d7763def initial checkin
tz
parents:
diff changeset
  1136
!
dd37d7763def initial checkin
tz
parents:
diff changeset
  1137
1525
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
  1138
getBlockForLinkingLibrariesToTheApplicationIn: dir
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
  1139
    "returns the block for linking the libraries to the application"
1518
dd37d7763def initial checkin
tz
parents:
diff changeset
  1140
1525
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
  1141
    ^
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
  1142
    [
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
  1143
        |appName command|
1518
dd37d7763def initial checkin
tz
parents:
diff changeset
  1144
1525
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
  1145
        self inform: 'Starting linking of the libraries to the application...'.
1518
dd37d7763def initial checkin
tz
parents:
diff changeset
  1146
1525
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
  1147
        appName := (aspects at: #applicationName) value.
1518
dd37d7763def initial checkin
tz
parents:
diff changeset
  1148
1525
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
  1149
        command := ByteCodeCompiler ccPath,
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
  1150
            ' ', (aspects at: #applicationLinkDefines) value, ' ',
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
  1151
            ' -o ' , appName,
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
  1152
            ' modulList.o main.o ', 
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
  1153
            ((aspects at: #libraryDirectory) value asFilename construct: 'librun', ObjectFileLoader sharedLibraryExtension) name, ' ',
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
  1154
            ((self getLibraryFileNames, (aspects at: #systemLibraries) value) asStringCollection asStringWith: $ ).
1518
dd37d7763def initial checkin
tz
parents:
diff changeset
  1155
1525
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
  1156
        self executeCommand: command inDirectory: dir.
1518
dd37d7763def initial checkin
tz
parents:
diff changeset
  1157
1525
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
  1158
        (dir asFilename construct: (aspects at: #applicationName) value) exists
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
  1159
            ifTrue:  [task := nil]
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
  1160
            ifFalse: [self warn:'Could not build the application!!']
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
  1161
    ]
1518
dd37d7763def initial checkin
tz
parents:
diff changeset
  1162
dd37d7763def initial checkin
tz
parents:
diff changeset
  1163
! !
dd37d7763def initial checkin
tz
parents:
diff changeset
  1164
dd37d7763def initial checkin
tz
parents:
diff changeset
  1165
!ApplicationBuilder methodsFor:'change & update'!
dd37d7763def initial checkin
tz
parents:
diff changeset
  1166
dd37d7763def initial checkin
tz
parents:
diff changeset
  1167
update:something with:aParameter from:changedObject
dd37d7763def initial checkin
tz
parents:
diff changeset
  1168
    "updates the combo boxes with the library names and the module names"
dd37d7763def initial checkin
tz
parents:
diff changeset
  1169
dd37d7763def initial checkin
tz
parents:
diff changeset
  1170
    |library libraries|
dd37d7763def initial checkin
tz
parents:
diff changeset
  1171
1525
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
  1172
    changedObject == (aspects at: #stxLibrary ifAbsent: nil) 
1518
dd37d7763def initial checkin
tz
parents:
diff changeset
  1173
    ifTrue: 
dd37d7763def initial checkin
tz
parents:
diff changeset
  1174
    [                
1525
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
  1175
        libraries := (aspects at: #stxLibraries) value.
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
  1176
        (aspects at: #stxLibrary) value size = 0 ifTrue: [libraries remove: (aspects at: #oldSTXLibrary) value ifAbsent: nil].
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
  1177
        (aspects at: #oldSTXLibrary) value: (library := (aspects at: #stxLibrary) value).
1518
dd37d7763def initial checkin
tz
parents:
diff changeset
  1178
    ].
1525
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
  1179
    changedObject == (aspects at: #systemLibrary) 
1518
dd37d7763def initial checkin
tz
parents:
diff changeset
  1180
    ifTrue: 
dd37d7763def initial checkin
tz
parents:
diff changeset
  1181
    [                
1525
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
  1182
        libraries := (aspects at: #systemLibraries) value.
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
  1183
        (aspects at: #systemLibrary) value size = 0 ifTrue: [libraries remove: (aspects at: #oldSystemLibrary) value ifAbsent: nil].
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
  1184
        (aspects at: #oldSystemLibrary) value: (library := (aspects at: #systemLibrary) value).
1518
dd37d7763def initial checkin
tz
parents:
diff changeset
  1185
    ].
1525
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
  1186
    changedObject == (aspects at: #userLibrary ifAbsent: nil) 
1518
dd37d7763def initial checkin
tz
parents:
diff changeset
  1187
    ifTrue: 
dd37d7763def initial checkin
tz
parents:
diff changeset
  1188
    [                
1525
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
  1189
        libraries := (aspects at: #userLibraries) value.
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
  1190
        (aspects at: #userLibrary) value size = 0 ifTrue: [libraries remove: (aspects at: #oldUserLibrary) value ifAbsent: nil].
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
  1191
        (aspects at: #oldUserLibrary) value: (library := (aspects at: #userLibrary) value).
1518
dd37d7763def initial checkin
tz
parents:
diff changeset
  1192
    ].
1558
c4ed1badfc13 revised
tz
parents: 1551
diff changeset
  1193
    (libraries includes: library) not & library notEmpty
1525
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
  1194
    ifTrue:
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
  1195
    [   
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
  1196
        libraries addFirst: library
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
  1197
    ]
1518
dd37d7763def initial checkin
tz
parents:
diff changeset
  1198
dd37d7763def initial checkin
tz
parents:
diff changeset
  1199
dd37d7763def initial checkin
tz
parents:
diff changeset
  1200
dd37d7763def initial checkin
tz
parents:
diff changeset
  1201
dd37d7763def initial checkin
tz
parents:
diff changeset
  1202
dd37d7763def initial checkin
tz
parents:
diff changeset
  1203
! !
dd37d7763def initial checkin
tz
parents:
diff changeset
  1204
dd37d7763def initial checkin
tz
parents:
diff changeset
  1205
!ApplicationBuilder methodsFor:'initialization'!
dd37d7763def initial checkin
tz
parents:
diff changeset
  1206
dd37d7763def initial checkin
tz
parents:
diff changeset
  1207
initialize
dd37d7763def initial checkin
tz
parents:
diff changeset
  1208
    "initialize all aspects"
dd37d7763def initial checkin
tz
parents:
diff changeset
  1209
dd37d7763def initial checkin
tz
parents:
diff changeset
  1210
    |homeDir|
dd37d7763def initial checkin
tz
parents:
diff changeset
  1211
dd37d7763def initial checkin
tz
parents:
diff changeset
  1212
    super initialize.
dd37d7763def initial checkin
tz
parents:
diff changeset
  1213
1525
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
  1214
    aspects := self class aspects.
1518
dd37d7763def initial checkin
tz
parents:
diff changeset
  1215
dd37d7763def initial checkin
tz
parents:
diff changeset
  1216
    homeDir := Filename homeDirectory asFilename.
dd37d7763def initial checkin
tz
parents:
diff changeset
  1217
1525
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
  1218
    self aspectsAt: #topDirectory      putFirst: (homeDir construct: 'stx') name.
1558
c4ed1badfc13 revised
tz
parents: 1551
diff changeset
  1219
    aspects     at: #systemLibraries   put: ObjectFileLoader searchedLibraries asValue.
1525
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
  1220
    (aspects at: #systemLibrary        put: ((aspects at: #systemLibraries) value at: 1 ifAbsent: '') asValue) addDependent: self.
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
  1221
    self aspectsAt: #oldSystemLibrary putFirst: (aspects at: #systemLibrary) value.
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
  1222
    self aspectsAt: #configuration     putFirst: Smalltalk configuration.
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
  1223
1558
c4ed1badfc13 revised
tz
parents: 1551
diff changeset
  1224
    self class ~~ ApplicationBuilder ifTrue: [^self].
1525
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
  1225
1518
dd37d7763def initial checkin
tz
parents:
diff changeset
  1226
    self aspectsAt: #applicationName   putFirst: 'application'.
dd37d7763def initial checkin
tz
parents:
diff changeset
  1227
    self aspectsAt: #startupMessage    putFirst: 'Smalltalk start'.
dd37d7763def initial checkin
tz
parents:
diff changeset
  1228
    self aspectsAt: #startupCFile      putFirst: (homeDir construct: 'stx/librun/main.c') name.
1525
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
  1229
1518
dd37d7763def initial checkin
tz
parents:
diff changeset
  1230
    self aspectsAt: #targetDirectory   putFirst: (homeDir construct: 'stx/projects/application') name.
dd37d7763def initial checkin
tz
parents:
diff changeset
  1231
    self aspectsAt: #libraryDirectory  putFirst: (homeDir construct: 'stx/projects/smalltalk') name.
dd37d7763def initial checkin
tz
parents:
diff changeset
  1232
dd37d7763def initial checkin
tz
parents:
diff changeset
  1233
    self aspectsAt: #stxLibraries      putFirst: 
dd37d7763def initial checkin
tz
parents:
diff changeset
  1234
        (ObjectMemory binaryModuleInfo collect: [:binMoInfo| (binMoInfo name copy reverse upTo: $ ) reverse]) asSortedCollection.
1525
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
  1235
1518
dd37d7763def initial checkin
tz
parents:
diff changeset
  1236
    self aspectsAt: #userLibraries     putFirst: OrderedCollection new.
dd37d7763def initial checkin
tz
parents:
diff changeset
  1237
1525
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
  1238
    aspects at:     #buildDate         put:      Date today printString, ' ', Time now printString.
1518
dd37d7763def initial checkin
tz
parents:
diff changeset
  1239
dd37d7763def initial checkin
tz
parents:
diff changeset
  1240
    self aspectsAt: #linkRCFiles       putFirst: true.
dd37d7763def initial checkin
tz
parents:
diff changeset
  1241
    self aspectsAt: #linkResources     putFirst: true.
dd37d7763def initial checkin
tz
parents:
diff changeset
  1242
    self aspectsAt: #linkSources       putFirst: true.
dd37d7763def initial checkin
tz
parents:
diff changeset
  1243
    self aspectsAt: #linkBitmaps       putFirst: true.
dd37d7763def initial checkin
tz
parents:
diff changeset
  1244
1525
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
  1245
    (aspects at: #stxLibrary           put: ((aspects at: #stxLibraries)    value at: 1 ifAbsent: '') asValue) addDependent: self.
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
  1246
    (aspects at: #userLibrary          put: ((aspects at: #userLibraries)   value at: 1 ifAbsent: '') asValue) addDependent: self.
1518
dd37d7763def initial checkin
tz
parents:
diff changeset
  1247
1525
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
  1248
    self aspectsAt: #oldSTXLibrary    putFirst: (aspects at: #stxLibrary) value.
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
  1249
    self aspectsAt: #oldUserLibrary   putFirst: (aspects at: #userLibrary) value.
1518
dd37d7763def initial checkin
tz
parents:
diff changeset
  1250
dd37d7763def initial checkin
tz
parents:
diff changeset
  1251
    self aspectsAt: #applicationLinkDefines putFirst: '-L/usr/X11/lib -Llib -Lbinary -L. -L/usr/local/lib -L/usr/lib -L/lib -lm -ldl -lXext -lX11'.
dd37d7763def initial checkin
tz
parents:
diff changeset
  1252
! !
dd37d7763def initial checkin
tz
parents:
diff changeset
  1253
dd37d7763def initial checkin
tz
parents:
diff changeset
  1254
!ApplicationBuilder methodsFor:'queries'!
dd37d7763def initial checkin
tz
parents:
diff changeset
  1255
dd37d7763def initial checkin
tz
parents:
diff changeset
  1256
getCompilerFlags
dd37d7763def initial checkin
tz
parents:
diff changeset
  1257
    "returns the defines of the OS and the compiler flags of the ByteCodeCompiler"
dd37d7763def initial checkin
tz
parents:
diff changeset
  1258
dd37d7763def initial checkin
tz
parents:
diff changeset
  1259
    |compilerFlags|
dd37d7763def initial checkin
tz
parents:
diff changeset
  1260
dd37d7763def initial checkin
tz
parents:
diff changeset
  1261
    compilerFlags := OperatingSystem getOSDefine ? ''.
dd37d7763def initial checkin
tz
parents:
diff changeset
  1262
dd37d7763def initial checkin
tz
parents:
diff changeset
  1263
    ByteCodeCompiler stcCompilationDefines notNil 
dd37d7763def initial checkin
tz
parents:
diff changeset
  1264
        ifTrue:[compilerFlags := compilerFlags , ' ' , ByteCodeCompiler stcCompilationDefines].
dd37d7763def initial checkin
tz
parents:
diff changeset
  1265
    ByteCodeCompiler stcCompilationIncludes notNil 
dd37d7763def initial checkin
tz
parents:
diff changeset
  1266
        ifTrue:[compilerFlags := compilerFlags , ' ' , ByteCodeCompiler stcCompilationIncludes].
dd37d7763def initial checkin
tz
parents:
diff changeset
  1267
    ByteCodeCompiler ccCompilationOptions notNil 
dd37d7763def initial checkin
tz
parents:
diff changeset
  1268
        ifTrue:[compilerFlags := compilerFlags , ' ' , ByteCodeCompiler ccCompilationOptions].
dd37d7763def initial checkin
tz
parents:
diff changeset
  1269
dd37d7763def initial checkin
tz
parents:
diff changeset
  1270
    ^compilerFlags
dd37d7763def initial checkin
tz
parents:
diff changeset
  1271
dd37d7763def initial checkin
tz
parents:
diff changeset
  1272
!
dd37d7763def initial checkin
tz
parents:
diff changeset
  1273
dd37d7763def initial checkin
tz
parents:
diff changeset
  1274
getLibraryFileNames
dd37d7763def initial checkin
tz
parents:
diff changeset
  1275
    "returns the complete file names of the system and the user libraries"
dd37d7763def initial checkin
tz
parents:
diff changeset
  1276
dd37d7763def initial checkin
tz
parents:
diff changeset
  1277
    |libraryFileNames|
dd37d7763def initial checkin
tz
parents:
diff changeset
  1278
dd37d7763def initial checkin
tz
parents:
diff changeset
  1279
    libraryFileNames := OrderedCollection new.
dd37d7763def initial checkin
tz
parents:
diff changeset
  1280
1525
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
  1281
    (aspects at: #stxLibraries) value do:
1518
dd37d7763def initial checkin
tz
parents:
diff changeset
  1282
    [:lib|
dd37d7763def initial checkin
tz
parents:
diff changeset
  1283
        |abbrevLib libPath|
dd37d7763def initial checkin
tz
parents:
diff changeset
  1284
        abbrevLib  := lib.
dd37d7763def initial checkin
tz
parents:
diff changeset
  1285
        lib = 'GLXWorkstation'   ifTrue: [abbrevLib := 'GLXWorkstat'].
dd37d7763def initial checkin
tz
parents:
diff changeset
  1286
        lib = 'XWorkstation'     ifTrue: [abbrevLib := 'XWorkstat'  ].
dd37d7763def initial checkin
tz
parents:
diff changeset
  1287
        lib = 'ObjectFileLoader' ifTrue: [abbrevLib := 'ObjFLoader' ].
1525
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
  1288
        (libPath := (aspects at: #libraryDirectory) value asFilename construct: abbrevLib, ObjectFileLoader sharedLibraryExtension) exists
1518
dd37d7763def initial checkin
tz
parents:
diff changeset
  1289
            ifTrue: [libraryFileNames add: libPath name]
dd37d7763def initial checkin
tz
parents:
diff changeset
  1290
    ].
dd37d7763def initial checkin
tz
parents:
diff changeset
  1291
1525
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
  1292
    ^libraryFileNames, (aspects at: #userLibraries) value
1518
dd37d7763def initial checkin
tz
parents:
diff changeset
  1293
dd37d7763def initial checkin
tz
parents:
diff changeset
  1294
!
dd37d7763def initial checkin
tz
parents:
diff changeset
  1295
dd37d7763def initial checkin
tz
parents:
diff changeset
  1296
getModuleNames
dd37d7763def initial checkin
tz
parents:
diff changeset
  1297
    "returns the module names of the system and the user libraries"
dd37d7763def initial checkin
tz
parents:
diff changeset
  1298
dd37d7763def initial checkin
tz
parents:
diff changeset
  1299
    |moduleNames|
dd37d7763def initial checkin
tz
parents:
diff changeset
  1300
dd37d7763def initial checkin
tz
parents:
diff changeset
  1301
    moduleNames := OrderedCollection new.
1525
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
  1302
    (aspects at: #userLibraries) value do:
1518
dd37d7763def initial checkin
tz
parents:
diff changeset
  1303
    [:lib|
dd37d7763def initial checkin
tz
parents:
diff changeset
  1304
        lib asFilename exists ifTrue: [moduleNames add: (lib asFilename baseName upTo: $.)]
dd37d7763def initial checkin
tz
parents:
diff changeset
  1305
    ].
dd37d7763def initial checkin
tz
parents:
diff changeset
  1306
1525
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
  1307
    ^(aspects at: #stxLibraries) value, moduleNames
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
  1308
!
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
  1309
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
  1310
getTargetDirectory
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
  1311
    "returns the directory of the application; if not present, create it"
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
  1312
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
  1313
    |targetDirectory|
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
  1314
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
  1315
    (targetDirectory := (aspects at: #targetDirectory) value asFilename) exists ifFalse:[targetDirectory makeDirectory].   
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
  1316
    (targetDirectory isReadable and:[targetDirectory isWritable]) ifFalse: [^nil].
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
  1317
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
  1318
    ^targetDirectory name
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
  1319
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
  1320
1518
dd37d7763def initial checkin
tz
parents:
diff changeset
  1321
! !
dd37d7763def initial checkin
tz
parents:
diff changeset
  1322
dd37d7763def initial checkin
tz
parents:
diff changeset
  1323
!ApplicationBuilder methodsFor:'startup / release'!
dd37d7763def initial checkin
tz
parents:
diff changeset
  1324
dd37d7763def initial checkin
tz
parents:
diff changeset
  1325
closeRequest
dd37d7763def initial checkin
tz
parents:
diff changeset
  1326
    "close request; before closing stop the running build, then release the dependents of all aspects"
dd37d7763def initial checkin
tz
parents:
diff changeset
  1327
dd37d7763def initial checkin
tz
parents:
diff changeset
  1328
    self doStop.
1525
ba7044e40ba0 revised
tz
parents: 1518
diff changeset
  1329
    aspects do: [:aspect| aspect release].
1518
dd37d7763def initial checkin
tz
parents:
diff changeset
  1330
dd37d7763def initial checkin
tz
parents:
diff changeset
  1331
    super closeRequest
dd37d7763def initial checkin
tz
parents:
diff changeset
  1332
1558
c4ed1badfc13 revised
tz
parents: 1551
diff changeset
  1333
!
c4ed1badfc13 revised
tz
parents: 1551
diff changeset
  1334
c4ed1badfc13 revised
tz
parents: 1551
diff changeset
  1335
postBuildWith:aBuilder
c4ed1badfc13 revised
tz
parents: 1551
diff changeset
  1336
    "sets target directory for the shell view"
c4ed1badfc13 revised
tz
parents: 1551
diff changeset
  1337
c4ed1badfc13 revised
tz
parents: 1551
diff changeset
  1338
    shellView directory: self getTargetDirectory.
c4ed1badfc13 revised
tz
parents: 1551
diff changeset
  1339
c4ed1badfc13 revised
tz
parents: 1551
diff changeset
  1340
    ^super postBuildWith:aBuilder
1518
dd37d7763def initial checkin
tz
parents:
diff changeset
  1341
! !
dd37d7763def initial checkin
tz
parents:
diff changeset
  1342
dd37d7763def initial checkin
tz
parents:
diff changeset
  1343
!ApplicationBuilder class methodsFor:'documentation'!
dd37d7763def initial checkin
tz
parents:
diff changeset
  1344
dd37d7763def initial checkin
tz
parents:
diff changeset
  1345
version
1558
c4ed1badfc13 revised
tz
parents: 1551
diff changeset
  1346
    ^ '$Header: /cvs/stx/stx/libtool/ApplicationBuilder.st,v 1.4 1998-04-18 14:17:07 tz Exp $'
1518
dd37d7763def initial checkin
tz
parents:
diff changeset
  1347
! !