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