author | sr |
Fri, 23 Oct 2009 15:38:34 +0200 | |
changeset 2682 | 54418b0e52fb |
parent 2681 | e331628e00f5 |
child 2685 | 9e5b81943c7f |
permissions | -rw-r--r-- |
2636 | 1 |
"{ Package: 'stx:libtool2' }" |
2 |
||
3 |
"{ NameSpace: Tools }" |
|
4 |
||
5 |
AssistantApplication subclass:#ProjectBuilderAssistantApplication |
|
2659 | 6 |
instanceVariableNames:'packageToBuildHolder projectType projectTypeHolder |
7 |
selectedProjectIndexHolder selectedProjectDefinition |
|
8 |
listOfMatchingProjects selectedProjectsComment |
|
9 |
hasProjectSelectedHolder newProjectsName hideSTXProjects |
|
2671 | 10 |
hideOtherApplicationClasses hideOtherStartupClasses |
2636 | 11 |
startMakeButtonEnabled stopMakeButtonVisible makeOutputHolder |
2656 | 12 |
newApplicationsName listOfApplicationsInProject |
13 |
selectedApplicationIndexHolder selectedApplication |
|
2659 | 14 |
hasApplicationSelectedHolder listOfStartupClassesInProject |
15 |
selectedStartupClassIndexHolder selectedStartupClass |
|
16 |
hasStartupClassSelectedHolder selectedApplicationsComment |
|
2656 | 17 |
buildDirectoryHolder makeProcess listOfClassesInProject |
2681 | 18 |
makeOutputWindow projectBuilder newStartupClassName |
19 |
usedCompilerHolder' |
|
2636 | 20 |
classVariableNames:'' |
21 |
poolDictionaries:'' |
|
22 |
category:'System-Support-Projects' |
|
23 |
! |
|
24 |
||
2668 | 25 |
!ProjectBuilderAssistantApplication class methodsFor:'documentation'! |
26 |
||
27 |
documentation |
|
28 |
" |
|
29 |
a user friendly interface to the build process. |
|
30 |
Simply wraps up existing tools like the CodeGeneratorTool, the browsers |
|
31 |
and the ProjetBuilder |
|
32 |
||
33 |
[see also:] |
|
34 |
CodeGeneratorTool |
|
35 |
ProjectBuilder |
|
36 |
ProjectDefinition |
|
37 |
||
38 |
[author:] |
|
39 |
Claus Gittinger |
|
40 |
" |
|
41 |
! ! |
|
2636 | 42 |
|
2670 | 43 |
!ProjectBuilderAssistantApplication class methodsFor:'defaults'! |
44 |
||
45 |
defaultIcon |
|
46 |
^ ToolbarIconLibrary projectBuilderIcon |
|
47 |
! |
|
48 |
||
49 |
windowLabelTemplate |
|
50 |
^ 'ST/X Packager: %1' |
|
51 |
! ! |
|
52 |
||
2636 | 53 |
!ProjectBuilderAssistantApplication class methodsFor:'interface specs'! |
54 |
||
2645 | 55 |
page1_projectTypeSelectionSpec |
2636 | 56 |
"This resource specification was automatically generated |
57 |
by the UIPainter of ST/X." |
|
58 |
||
59 |
"Do not manually edit this!! If it is corrupted, |
|
60 |
the UIPainter may not be able to read the specification." |
|
61 |
||
62 |
" |
|
2648 | 63 |
UIPainter new openOnClass:Tools::ProjectBuilderAssistantApplication andSelector:#page1_projectTypeSelectionSpec |
64 |
Tools::ProjectBuilderAssistantApplication new openInterface:#page1_projectTypeSelectionSpec |
|
2636 | 65 |
" |
66 |
||
67 |
<resource: #canvas> |
|
68 |
||
69 |
^ |
|
70 |
#(FullSpec |
|
2645 | 71 |
name: #'page1_projectTypeSelectionSpec' |
2636 | 72 |
window: |
73 |
(WindowSpec |
|
74 |
label: 'Project Selection' |
|
75 |
name: 'Project Selection' |
|
76 |
min: (Point 0 0) |
|
77 |
bounds: (Rectangle 0 0 626 394) |
|
78 |
) |
|
79 |
component: |
|
80 |
(SpecCollection |
|
81 |
collection: ( |
|
82 |
(FramedBoxSpec |
|
83 |
label: 'Project Type Filter' |
|
84 |
name: 'FramedBox1' |
|
85 |
layout: (LayoutFrame 0 0.0 0 0 4 1.0 105 0) |
|
86 |
labelPosition: topLeft |
|
87 |
translateLabel: true |
|
88 |
component: |
|
89 |
(SpecCollection |
|
90 |
collection: ( |
|
91 |
(VerticalPanelViewSpec |
|
92 |
name: 'VerticalPanel1' |
|
93 |
layout: (LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0) |
|
94 |
horizontalLayout: leftSpace |
|
95 |
verticalLayout: topSpace |
|
96 |
horizontalSpace: 3 |
|
97 |
verticalSpace: 3 |
|
98 |
component: |
|
99 |
(SpecCollection |
|
100 |
collection: ( |
|
101 |
(ViewSpec |
|
102 |
name: 'Box1' |
|
103 |
extent: (Point 10 10) |
|
104 |
) |
|
105 |
(RadioButtonSpec |
|
106 |
label: 'GUI Application' |
|
107 |
name: 'RadioButton1' |
|
108 |
translateLabel: true |
|
2659 | 109 |
model: projectTypeHolder |
2636 | 110 |
isTriggerOnDown: true |
111 |
onCallBackSelector: projectTypeChanged |
|
112 |
select: guiApplicationType |
|
113 |
extent: (Point 136 22) |
|
114 |
) |
|
115 |
(RadioButtonSpec |
|
116 |
label: 'Non-GUI Application' |
|
117 |
name: 'RadioButton2' |
|
118 |
translateLabel: true |
|
2659 | 119 |
model: projectTypeHolder |
2636 | 120 |
isTriggerOnDown: true |
121 |
onCallBackSelector: projectTypeChanged |
|
122 |
select: nonGuiApplicationType |
|
123 |
extent: (Point 136 22) |
|
124 |
) |
|
125 |
(RadioButtonSpec |
|
126 |
label: 'Class Library' |
|
127 |
name: 'RadioButton3' |
|
128 |
translateLabel: true |
|
2659 | 129 |
model: projectTypeHolder |
2636 | 130 |
isTriggerOnDown: true |
131 |
onCallBackSelector: projectTypeChanged |
|
132 |
select: libraryType |
|
133 |
extent: (Point 136 22) |
|
134 |
) |
|
135 |
) |
|
136 |
||
137 |
) |
|
138 |
) |
|
139 |
) |
|
140 |
||
141 |
) |
|
142 |
) |
|
143 |
(FramedBoxSpec |
|
144 |
label: 'Existing Projects' |
|
145 |
name: 'FramedBox2' |
|
2648 | 146 |
layout: (LayoutFrame 0 0.0 105 0 4 1.0 0 1) |
2636 | 147 |
labelPosition: topLeft |
148 |
translateLabel: true |
|
149 |
component: |
|
150 |
(SpecCollection |
|
151 |
collection: ( |
|
152 |
(VariableHorizontalPanelSpec |
|
153 |
name: 'VariableHorizontalPanel1' |
|
154 |
layout: (LayoutFrame 0 0 4 0 0 1 -26 1) |
|
155 |
component: |
|
156 |
(SpecCollection |
|
157 |
collection: ( |
|
158 |
(SequenceViewSpec |
|
159 |
name: 'List1' |
|
160 |
model: selectedProjectIndexHolder |
|
161 |
hasHorizontalScrollBar: true |
|
162 |
hasVerticalScrollBar: true |
|
163 |
useIndex: true |
|
164 |
sequenceList: listOfMatchingProjects |
|
165 |
) |
|
166 |
(TextEditorSpec |
|
167 |
name: 'TextEditor1' |
|
168 |
model: selectedProjectsComment |
|
169 |
hasHorizontalScrollBar: true |
|
170 |
hasVerticalScrollBar: true |
|
171 |
isReadOnly: true |
|
172 |
hasKeyboardFocusInitially: false |
|
173 |
) |
|
174 |
) |
|
175 |
||
176 |
) |
|
177 |
handles: (Any 0.34560327198364 1.0) |
|
178 |
) |
|
179 |
(CheckBoxSpec |
|
180 |
label: 'Hide ST/X Base Packages' |
|
181 |
name: 'CheckBox1' |
|
2659 | 182 |
layout: (LayoutFrame -1 0 -18 1 0 1 4 1) |
2636 | 183 |
model: hideSTXProjects |
184 |
translateLabel: true |
|
185 |
) |
|
186 |
) |
|
187 |
||
188 |
) |
|
189 |
) |
|
190 |
) |
|
191 |
||
192 |
) |
|
193 |
) |
|
194 |
! |
|
195 |
||
2645 | 196 |
page2_projectSelectionSpec |
2636 | 197 |
"This resource specification was automatically generated |
198 |
by the UIPainter of ST/X." |
|
199 |
||
200 |
"Do not manually edit this!! If it is corrupted, |
|
201 |
the UIPainter may not be able to read the specification." |
|
202 |
||
203 |
" |
|
2648 | 204 |
UIPainter new openOnClass:Tools::ProjectBuilderAssistantApplication andSelector:#page2_projectSelectionSpec |
205 |
Tools::ProjectBuilderAssistantApplication new openInterface:#page2_projectSelectionSpec |
|
2636 | 206 |
" |
207 |
||
208 |
<resource: #canvas> |
|
209 |
||
210 |
^ |
|
211 |
#(FullSpec |
|
2645 | 212 |
name: #'page2_projectSelectionSpec' |
2636 | 213 |
window: |
214 |
(WindowSpec |
|
215 |
label: 'Project Selection' |
|
216 |
name: 'Project Selection' |
|
217 |
min: (Point 0 0) |
|
218 |
bounds: (Rectangle 0 0 521 453) |
|
219 |
) |
|
220 |
component: |
|
221 |
(SpecCollection |
|
222 |
collection: ( |
|
223 |
(FramedBoxSpec |
|
224 |
label: 'New Project' |
|
225 |
name: 'FramedBox3' |
|
226 |
layout: (LayoutFrame 0 0.0 5 0 4 1.0 72 0) |
|
227 |
labelPosition: topLeft |
|
228 |
translateLabel: true |
|
229 |
component: |
|
230 |
(SpecCollection |
|
231 |
collection: ( |
|
232 |
(InputFieldSpec |
|
233 |
name: 'EntryField1' |
|
2659 | 234 |
layout: (LayoutFrame 1 0 6 0 -113 1 28 0) |
2636 | 235 |
model: newProjectsName |
236 |
acceptOnReturn: true |
|
237 |
acceptOnTab: true |
|
238 |
acceptOnPointerLeave: true |
|
239 |
emptyFieldReplacementText: 'module:directory' |
|
240 |
) |
|
241 |
(ActionButtonSpec |
|
242 |
label: 'Create' |
|
243 |
name: 'Button1' |
|
2659 | 244 |
layout: (LayoutFrame -100 1 6 0 2 1 28 0) |
2636 | 245 |
translateLabel: true |
246 |
model: createNewProject |
|
247 |
) |
|
248 |
) |
|
249 |
||
250 |
) |
|
251 |
) |
|
252 |
(FramedBoxSpec |
|
253 |
label: 'Existing Projects' |
|
254 |
name: 'FramedBox4' |
|
2648 | 255 |
layout: (LayoutFrame 0 0.0 70 0 4 1.0 -30 1) |
2636 | 256 |
labelPosition: topLeft |
257 |
translateLabel: true |
|
258 |
component: |
|
259 |
(SpecCollection |
|
260 |
collection: ( |
|
261 |
(VariableHorizontalPanelSpec |
|
262 |
name: 'VariableHorizontalPanel2' |
|
263 |
layout: (LayoutFrame 0 0 4 0 0 1 -26 1) |
|
264 |
component: |
|
265 |
(SpecCollection |
|
266 |
collection: ( |
|
267 |
(SequenceViewSpec |
|
268 |
name: 'List2' |
|
269 |
model: selectedProjectIndexHolder |
|
270 |
hasHorizontalScrollBar: true |
|
271 |
hasVerticalScrollBar: true |
|
272 |
useIndex: true |
|
273 |
sequenceList: listOfMatchingProjects |
|
274 |
) |
|
275 |
(TextEditorSpec |
|
276 |
name: 'TextEditor2' |
|
277 |
model: selectedProjectsComment |
|
278 |
hasHorizontalScrollBar: true |
|
279 |
hasVerticalScrollBar: true |
|
280 |
isReadOnly: true |
|
281 |
hasKeyboardFocusInitially: false |
|
282 |
viewClassName: 'TextView' |
|
283 |
) |
|
284 |
) |
|
285 |
||
286 |
) |
|
287 |
handles: (Any 0.34560327198364 1.0) |
|
288 |
) |
|
289 |
(CheckBoxSpec |
|
290 |
label: 'Hide ST/X Base Packages' |
|
291 |
name: 'CheckBox1' |
|
2659 | 292 |
layout: (LayoutFrame -1 0 -17 1 0 1 5 1) |
2636 | 293 |
model: hideSTXProjects |
294 |
translateLabel: true |
|
295 |
) |
|
296 |
) |
|
297 |
||
298 |
) |
|
299 |
) |
|
2648 | 300 |
(HorizontalPanelViewSpec |
301 |
name: 'HorizontalPanel1' |
|
302 |
layout: (LayoutFrame 0 0 -30 1 0 1 0 1) |
|
303 |
horizontalLayout: leftSpace |
|
304 |
verticalLayout: center |
|
305 |
horizontalSpace: 3 |
|
306 |
verticalSpace: 3 |
|
307 |
component: |
|
308 |
(SpecCollection |
|
309 |
collection: ( |
|
310 |
(ActionButtonSpec |
|
311 |
label: 'Browse Selected Project' |
|
312 |
name: 'Button3' |
|
313 |
translateLabel: true |
|
314 |
model: doBrowseProject |
|
2659 | 315 |
enableChannel: hasProjectSelectedHolder |
2648 | 316 |
extent: (Point 180 22) |
317 |
) |
|
318 |
) |
|
319 |
||
320 |
) |
|
2636 | 321 |
) |
322 |
) |
|
323 |
||
324 |
) |
|
325 |
) |
|
326 |
! |
|
327 |
||
2645 | 328 |
page3_applicationSelectionSpec |
2636 | 329 |
"This resource specification was automatically generated |
330 |
by the UIPainter of ST/X." |
|
331 |
||
332 |
"Do not manually edit this!! If it is corrupted, |
|
333 |
the UIPainter may not be able to read the specification." |
|
334 |
||
335 |
" |
|
2648 | 336 |
UIPainter new openOnClass:Tools::ProjectBuilderAssistantApplication andSelector:#page3_applicationSelectionSpec |
337 |
Tools::ProjectBuilderAssistantApplication new openInterface:#page3_applicationSelectionSpec |
|
2636 | 338 |
" |
339 |
||
340 |
<resource: #canvas> |
|
341 |
||
342 |
^ |
|
343 |
#(FullSpec |
|
2645 | 344 |
name: #'page3_applicationSelectionSpec' |
2636 | 345 |
window: |
346 |
(WindowSpec |
|
347 |
label: 'Application Selection' |
|
348 |
name: 'Application Selection' |
|
349 |
min: (Point 0 0) |
|
2671 | 350 |
bounds: (Rectangle 0 0 519 406) |
2636 | 351 |
) |
352 |
component: |
|
353 |
(SpecCollection |
|
354 |
collection: ( |
|
355 |
(FramedBoxSpec |
|
356 |
label: 'New Application' |
|
357 |
name: 'FramedBox3' |
|
358 |
layout: (LayoutFrame 0 0.0 5 0 4 1.0 105 0) |
|
359 |
labelPosition: topLeft |
|
360 |
translateLabel: true |
|
361 |
component: |
|
362 |
(SpecCollection |
|
363 |
collection: ( |
|
364 |
(InputFieldSpec |
|
365 |
name: 'EntryField1' |
|
2659 | 366 |
layout: (LayoutFrame 1 0 6 0 -113 1 28 0) |
2636 | 367 |
model: newApplicationsName |
368 |
acceptOnReturn: true |
|
369 |
acceptOnTab: true |
|
370 |
acceptOnPointerLeave: true |
|
371 |
emptyFieldReplacementText: 'MyApplication' |
|
372 |
) |
|
373 |
(ActionButtonSpec |
|
374 |
label: 'Create' |
|
375 |
name: 'Button1' |
|
2659 | 376 |
layout: (LayoutFrame -100 1 6 0 1 1 28 0) |
2636 | 377 |
translateLabel: true |
378 |
model: createNewApplication |
|
379 |
) |
|
380 |
) |
|
381 |
||
382 |
) |
|
383 |
) |
|
384 |
(FramedBoxSpec |
|
385 |
label: 'Existing Applications' |
|
386 |
name: 'FramedBox4' |
|
2648 | 387 |
layout: (LayoutFrame 0 0.0 105 0 4 1.0 -30 1) |
2636 | 388 |
labelPosition: topLeft |
389 |
translateLabel: true |
|
390 |
component: |
|
391 |
(SpecCollection |
|
392 |
collection: ( |
|
393 |
(VariableHorizontalPanelSpec |
|
394 |
name: 'VariableHorizontalPanel2' |
|
2671 | 395 |
layout: (LayoutFrame 0 0 4 0 0 1 -26 1) |
2636 | 396 |
component: |
397 |
(SpecCollection |
|
398 |
collection: ( |
|
399 |
(SequenceViewSpec |
|
400 |
name: 'List2' |
|
401 |
model: selectedApplicationIndexHolder |
|
402 |
hasHorizontalScrollBar: true |
|
403 |
hasVerticalScrollBar: true |
|
404 |
useIndex: true |
|
405 |
sequenceList: listOfApplicationsInProject |
|
2671 | 406 |
ignoreReselect: false |
2636 | 407 |
) |
408 |
(TextEditorSpec |
|
409 |
name: 'TextEditor2' |
|
410 |
model: selectedApplicationsComment |
|
411 |
hasHorizontalScrollBar: true |
|
412 |
hasVerticalScrollBar: true |
|
413 |
isReadOnly: true |
|
414 |
hasKeyboardFocusInitially: false |
|
415 |
viewClassName: 'TextView' |
|
416 |
) |
|
417 |
) |
|
418 |
||
419 |
) |
|
420 |
handles: (Any 0.34560327198364 1.0) |
|
421 |
) |
|
2671 | 422 |
(CheckBoxSpec |
423 |
label: 'Hide other Application Classes' |
|
424 |
name: 'CheckBox1' |
|
425 |
layout: (LayoutFrame -1 0 -18 1 0 1 4 1) |
|
426 |
model: hideOtherApplicationClasses |
|
427 |
translateLabel: true |
|
428 |
) |
|
2636 | 429 |
) |
430 |
||
431 |
) |
|
432 |
) |
|
2648 | 433 |
(HorizontalPanelViewSpec |
434 |
name: 'HorizontalPanel1' |
|
435 |
layout: (LayoutFrame 0 0 -30 1 0 1 0 1) |
|
436 |
horizontalLayout: leftSpace |
|
437 |
verticalLayout: center |
|
438 |
horizontalSpace: 3 |
|
439 |
verticalSpace: 3 |
|
440 |
component: |
|
441 |
(SpecCollection |
|
442 |
collection: ( |
|
443 |
(ActionButtonSpec |
|
444 |
label: 'Browse Selected Application' |
|
445 |
name: 'Button3' |
|
446 |
translateLabel: true |
|
447 |
model: doBrowseApplication |
|
2659 | 448 |
enableChannel: hasApplicationSelectedHolder |
449 |
extent: (Point 180 22) |
|
450 |
) |
|
451 |
(ActionButtonSpec |
|
452 |
label: 'Launch Selected Application' |
|
453 |
name: 'Button4' |
|
454 |
translateLabel: true |
|
455 |
model: doLaunchApplication |
|
456 |
enableChannel: hasApplicationSelectedHolder |
|
2648 | 457 |
extent: (Point 180 22) |
458 |
) |
|
459 |
) |
|
460 |
||
461 |
) |
|
2636 | 462 |
) |
463 |
) |
|
464 |
||
465 |
) |
|
466 |
) |
|
467 |
! |
|
468 |
||
2656 | 469 |
page4_startupClassSelectionSpec |
2636 | 470 |
"This resource specification was automatically generated |
471 |
by the UIPainter of ST/X." |
|
472 |
||
473 |
"Do not manually edit this!! If it is corrupted, |
|
474 |
the UIPainter may not be able to read the specification." |
|
475 |
||
476 |
" |
|
2656 | 477 |
UIPainter new openOnClass:Tools::ProjectBuilderAssistantApplication andSelector:#page4_startupClassSelectionSpec |
478 |
Tools::ProjectBuilderAssistantApplication new openInterface:#page4_startupClassSelectionSpec |
|
2636 | 479 |
" |
480 |
||
481 |
<resource: #canvas> |
|
482 |
||
483 |
^ |
|
484 |
#(FullSpec |
|
2656 | 485 |
name: #'page4_startupClassSelectionSpec' |
486 |
window: |
|
487 |
(WindowSpec |
|
488 |
label: 'Startup Class Selection' |
|
489 |
name: 'Startup Class Selection' |
|
490 |
min: (Point 0 0) |
|
491 |
bounds: (Rectangle 0 0 521 408) |
|
492 |
) |
|
493 |
component: |
|
494 |
(SpecCollection |
|
495 |
collection: ( |
|
496 |
(FramedBoxSpec |
|
497 |
label: 'New Application' |
|
498 |
name: 'FramedBox3' |
|
499 |
layout: (LayoutFrame 0 0.0 5 0 4 1.0 105 0) |
|
500 |
labelPosition: topLeft |
|
501 |
translateLabel: true |
|
502 |
component: |
|
503 |
(SpecCollection |
|
504 |
collection: ( |
|
505 |
(InputFieldSpec |
|
506 |
name: 'EntryField1' |
|
2659 | 507 |
layout: (LayoutFrame 1 0 6 0 -113 1 28 0) |
2656 | 508 |
model: newStartupClassName |
509 |
acceptOnReturn: true |
|
510 |
acceptOnTab: true |
|
511 |
acceptOnPointerLeave: true |
|
512 |
emptyFieldReplacementText: 'MyStandAloneStartup' |
|
513 |
) |
|
514 |
(ActionButtonSpec |
|
515 |
label: 'Create' |
|
516 |
name: 'Button1' |
|
2659 | 517 |
layout: (LayoutFrame -100 1 6 0 1 1 28 0) |
2656 | 518 |
translateLabel: true |
519 |
model: createNewStartupClass |
|
520 |
) |
|
521 |
) |
|
522 |
||
523 |
) |
|
524 |
) |
|
525 |
(FramedBoxSpec |
|
526 |
label: 'Existing StartupClasses' |
|
527 |
name: 'FramedBox4' |
|
528 |
layout: (LayoutFrame 0 0.0 105 0 4 1.0 -30 1) |
|
529 |
labelPosition: topLeft |
|
530 |
translateLabel: true |
|
531 |
component: |
|
532 |
(SpecCollection |
|
533 |
collection: ( |
|
534 |
(VariableHorizontalPanelSpec |
|
535 |
name: 'VariableHorizontalPanel2' |
|
2671 | 536 |
layout: (LayoutFrame 0 0 4 0 0 1 -26 1) |
2656 | 537 |
component: |
538 |
(SpecCollection |
|
539 |
collection: ( |
|
540 |
(SequenceViewSpec |
|
541 |
name: 'List2' |
|
542 |
model: selectedStartupClassIndexHolder |
|
543 |
hasHorizontalScrollBar: true |
|
544 |
hasVerticalScrollBar: true |
|
545 |
useIndex: true |
|
546 |
sequenceList: listOfStartupClassesInProject |
|
547 |
) |
|
548 |
(TextEditorSpec |
|
549 |
name: 'TextEditor2' |
|
550 |
model: selectedStartupClassesComment |
|
551 |
hasHorizontalScrollBar: true |
|
552 |
hasVerticalScrollBar: true |
|
553 |
isReadOnly: true |
|
554 |
hasKeyboardFocusInitially: false |
|
555 |
viewClassName: 'TextView' |
|
556 |
) |
|
557 |
) |
|
558 |
||
559 |
) |
|
560 |
handles: (Any 0.34560327198364 1.0) |
|
561 |
) |
|
2671 | 562 |
(CheckBoxSpec |
563 |
label: 'Hide other Startup Classes' |
|
564 |
name: 'CheckBox1' |
|
565 |
layout: (LayoutFrame -1 0 -20 1 0 1 2 1) |
|
566 |
model: hideOtherStartupClasses |
|
567 |
translateLabel: true |
|
568 |
) |
|
2656 | 569 |
) |
570 |
||
571 |
) |
|
572 |
) |
|
573 |
(HorizontalPanelViewSpec |
|
574 |
name: 'HorizontalPanel1' |
|
575 |
layout: (LayoutFrame 0 0 -30 1 0 1 0 1) |
|
576 |
horizontalLayout: leftSpace |
|
577 |
verticalLayout: center |
|
578 |
horizontalSpace: 3 |
|
579 |
verticalSpace: 3 |
|
580 |
component: |
|
581 |
(SpecCollection |
|
582 |
collection: ( |
|
583 |
(ActionButtonSpec |
|
584 |
label: 'Browse Selected StartupClass' |
|
585 |
name: 'Button3' |
|
586 |
translateLabel: true |
|
587 |
model: doBrowseStartupClass |
|
2659 | 588 |
enableChannel: hasStartupClassSelectedHolder |
2656 | 589 |
extent: (Point 180 22) |
590 |
) |
|
591 |
) |
|
592 |
||
593 |
) |
|
594 |
) |
|
595 |
) |
|
596 |
||
597 |
) |
|
598 |
) |
|
599 |
! |
|
600 |
||
601 |
page5_specifyIncludedClasses |
|
602 |
"This resource specification was automatically generated |
|
603 |
by the UIPainter of ST/X." |
|
604 |
||
605 |
"Do not manually edit this!! If it is corrupted, |
|
606 |
the UIPainter may not be able to read the specification." |
|
607 |
||
608 |
" |
|
609 |
UIPainter new openOnClass:Tools::ProjectBuilderAssistantApplication andSelector:#page5_specifyIncludedClasses |
|
610 |
Tools::ProjectBuilderAssistantApplication new openInterface:#page5_specifyIncludedClasses |
|
611 |
" |
|
612 |
||
613 |
<resource: #canvas> |
|
614 |
||
615 |
^ |
|
616 |
#(FullSpec |
|
617 |
name: #'page5_specifyIncludedClasses' |
|
2636 | 618 |
window: |
619 |
(WindowSpec |
|
620 |
label: 'Project Selection' |
|
621 |
name: 'Project Selection' |
|
622 |
min: (Point 0 0) |
|
623 |
bounds: (Rectangle 0 0 521 400) |
|
624 |
) |
|
625 |
component: |
|
626 |
(SpecCollection |
|
627 |
collection: ( |
|
628 |
(FramedBoxSpec |
|
629 |
label: 'Project Contents' |
|
630 |
name: 'FramedBox3' |
|
2648 | 631 |
layout: (LayoutFrame 0 0.0 5 0 4 1.0 -30 1) |
2636 | 632 |
labelPosition: topLeft |
633 |
translateLabel: true |
|
634 |
component: |
|
635 |
(SpecCollection |
|
636 |
collection: ( |
|
637 |
(SequenceViewSpec |
|
638 |
name: 'List1' |
|
639 |
layout: (LayoutFrame 0 0 0 0 0 1 0 1) |
|
640 |
initiallyDisabled: true |
|
641 |
hasHorizontalScrollBar: true |
|
642 |
hasVerticalScrollBar: true |
|
643 |
useIndex: false |
|
644 |
sequenceList: listOfClassesInProject |
|
645 |
) |
|
646 |
) |
|
647 |
||
648 |
) |
|
649 |
) |
|
2648 | 650 |
(HorizontalPanelViewSpec |
651 |
name: 'HorizontalPanel1' |
|
652 |
layout: (LayoutFrame 0 0 -30 1 0 1 0 1) |
|
653 |
horizontalLayout: center |
|
654 |
verticalLayout: center |
|
655 |
horizontalSpace: 3 |
|
656 |
verticalSpace: 3 |
|
657 |
component: |
|
658 |
(SpecCollection |
|
659 |
collection: ( |
|
660 |
(ActionButtonSpec |
|
661 |
label: 'Browse Project Definition' |
|
662 |
name: 'Button3' |
|
663 |
translateLabel: true |
|
2659 | 664 |
model: doBrowseProjectDefinitionClass |
2648 | 665 |
extent: (Point 180 22) |
666 |
) |
|
667 |
(ActionButtonSpec |
|
668 |
label: 'Update Contents (Scan)' |
|
669 |
name: 'Button4' |
|
670 |
translateLabel: true |
|
671 |
model: doGenerateProjectContentsDefinition |
|
672 |
extent: (Point 180 22) |
|
673 |
) |
|
674 |
) |
|
675 |
||
676 |
) |
|
2636 | 677 |
) |
678 |
) |
|
679 |
||
680 |
) |
|
681 |
) |
|
682 |
! |
|
683 |
||
2656 | 684 |
page6_specifyBuildDirectorySpec |
2636 | 685 |
"This resource specification was automatically generated |
686 |
by the UIPainter of ST/X." |
|
687 |
||
688 |
"Do not manually edit this!! If it is corrupted, |
|
689 |
the UIPainter may not be able to read the specification." |
|
690 |
||
691 |
" |
|
2681 | 692 |
UIPainter new openOnClass:Tools::ProjectBuilderAssistantApplication andSelector:#page6_specifyBuildDirectorySpec |
693 |
Tools::ProjectBuilderAssistantApplication new openInterface:#page6_specifyBuildDirectorySpec |
|
2636 | 694 |
" |
695 |
||
696 |
<resource: #canvas> |
|
697 |
||
698 |
^ |
|
699 |
#(FullSpec |
|
2656 | 700 |
name: #'page6_specifyBuildDirectorySpec' |
2636 | 701 |
window: |
702 |
(WindowSpec |
|
703 |
label: 'Project Selection' |
|
704 |
name: 'Project Selection' |
|
705 |
min: (Point 0 0) |
|
2681 | 706 |
bounds: (Rectangle 0 0 521 239) |
2636 | 707 |
) |
708 |
component: |
|
709 |
(SpecCollection |
|
710 |
collection: ( |
|
711 |
(FramedBoxSpec |
|
712 |
label: 'Build Directory' |
|
713 |
name: 'FramedBox3' |
|
714 |
layout: (LayoutFrame 0 0.0 5 0 4 1.0 79 0) |
|
715 |
labelPosition: topLeft |
|
716 |
translateLabel: true |
|
717 |
component: |
|
718 |
(SpecCollection |
|
719 |
collection: ( |
|
720 |
(FilenameInputFieldSpec |
|
721 |
name: 'FilenameEntryField1' |
|
722 |
layout: (LayoutFrame 0 0.0 10 0 0 1.0 32 0) |
|
723 |
model: buildDirectoryHolder |
|
724 |
acceptOnPointerLeave: true |
|
725 |
viewClassName: FilenameWidgetWithHistory |
|
726 |
) |
|
727 |
) |
|
728 |
||
729 |
) |
|
730 |
) |
|
2681 | 731 |
(FramedBoxSpec |
732 |
label: 'Compiler / Toolchain' |
|
733 |
name: 'FramedBox4' |
|
734 |
layout: (LayoutFrame 0 0.0 81 0 4 1.0 155 0) |
|
735 |
labelPosition: topLeft |
|
736 |
translateLabel: true |
|
737 |
component: |
|
738 |
(SpecCollection |
|
739 |
collection: ( |
|
740 |
(ComboListSpec |
|
741 |
name: 'ComboList1' |
|
742 |
layout: (LayoutFrame 0 0 10 0 137 0 32 0) |
|
743 |
model: usedCompilerHolder |
|
744 |
comboList: listOfPossibleCompilers |
|
745 |
useIndex: false |
|
746 |
) |
|
747 |
) |
|
748 |
||
749 |
) |
|
750 |
) |
|
2636 | 751 |
) |
752 |
||
753 |
) |
|
754 |
) |
|
755 |
! |
|
756 |
||
2656 | 757 |
page7_buildSpec |
2636 | 758 |
"This resource specification was automatically generated |
759 |
by the UIPainter of ST/X." |
|
760 |
||
761 |
"Do not manually edit this!! If it is corrupted, |
|
762 |
the UIPainter may not be able to read the specification." |
|
763 |
||
764 |
" |
|
2656 | 765 |
UIPainter new openOnClass:Tools::ProjectBuilderAssistantApplication andSelector:#page7_buildSpec |
766 |
Tools::ProjectBuilderAssistantApplication new openInterface:#page7_buildSpec |
|
2636 | 767 |
" |
768 |
||
769 |
<resource: #canvas> |
|
770 |
||
771 |
^ |
|
772 |
#(FullSpec |
|
2656 | 773 |
name: #'page7_buildSpec' |
2636 | 774 |
window: |
775 |
(WindowSpec |
|
776 |
label: 'Project Selection' |
|
777 |
name: 'Project Selection' |
|
778 |
min: (Point 0 0) |
|
779 |
bounds: (Rectangle 0 0 521 472) |
|
780 |
) |
|
781 |
component: |
|
782 |
(SpecCollection |
|
783 |
collection: ( |
|
784 |
(FramedBoxSpec |
|
785 |
label: 'Make Output' |
|
786 |
name: 'FramedBox3' |
|
2648 | 787 |
layout: (LayoutFrame 0 0.0 5 0 4 1.0 -30 1) |
2636 | 788 |
labelPosition: topLeft |
789 |
translateLabel: true |
|
790 |
component: |
|
791 |
(SpecCollection |
|
792 |
collection: ( |
|
793 |
(TextEditorSpec |
|
2646 | 794 |
name: 'MakeOutputWindow' |
2636 | 795 |
layout: (LayoutFrame 0 0 0 0 0 1 0 1) |
796 |
model: makeOutputHolder |
|
797 |
hasHorizontalScrollBar: true |
|
798 |
hasVerticalScrollBar: true |
|
799 |
hasKeyboardFocusInitially: false |
|
800 |
viewClassName: 'TextCollector' |
|
2646 | 801 |
postBuildCallback: postBuildMakeOutputWindow: |
2636 | 802 |
) |
803 |
) |
|
804 |
||
805 |
) |
|
806 |
) |
|
2648 | 807 |
(HorizontalPanelViewSpec |
808 |
name: 'HorizontalPanel1' |
|
809 |
layout: (LayoutFrame 0 0 -30 1 0 1 0 1) |
|
810 |
horizontalLayout: leftSpace |
|
811 |
verticalLayout: center |
|
812 |
horizontalSpace: 3 |
|
813 |
verticalSpace: 3 |
|
814 |
component: |
|
815 |
(SpecCollection |
|
816 |
collection: ( |
|
817 |
(ActionButtonSpec |
|
2674 | 818 |
label: 'Make All' |
2648 | 819 |
name: 'Button3' |
820 |
translateLabel: true |
|
2674 | 821 |
model: doStartMakeAll |
2648 | 822 |
enableChannel: startMakeButtonEnabled |
823 |
extent: (Point 107 22) |
|
824 |
) |
|
825 |
(ActionButtonSpec |
|
2674 | 826 |
label: 'Make EXE only' |
827 |
name: 'Button5' |
|
828 |
translateLabel: true |
|
829 |
model: doStartMakeExe |
|
830 |
enableChannel: startMakeButtonEnabled |
|
831 |
extent: (Point 107 22) |
|
832 |
) |
|
833 |
(ViewSpec |
|
834 |
name: 'Box1' |
|
835 |
extent: (Point 20 10) |
|
836 |
) |
|
837 |
(ActionButtonSpec |
|
2648 | 838 |
label: 'Stop Make' |
839 |
name: 'Button4' |
|
840 |
visibilityChannel: stopMakeButtonVisible |
|
841 |
translateLabel: true |
|
842 |
model: doStopMake |
|
843 |
extent: (Point 107 22) |
|
844 |
) |
|
845 |
) |
|
846 |
||
847 |
) |
|
2636 | 848 |
) |
849 |
) |
|
850 |
||
851 |
) |
|
852 |
) |
|
853 |
! |
|
854 |
||
2676 | 855 |
page8_deploySpec |
856 |
"This resource specification was automatically generated |
|
857 |
by the UIPainter of ST/X." |
|
858 |
||
859 |
"Do not manually edit this!! If it is corrupted, |
|
860 |
the UIPainter may not be able to read the specification." |
|
861 |
||
862 |
" |
|
863 |
UIPainter new openOnClass:Tools::ProjectBuilderAssistantApplication andSelector:#page8_deploySpec |
|
864 |
Tools::ProjectBuilderAssistantApplication new openInterface:#page8_deploySpec |
|
865 |
" |
|
866 |
||
867 |
<resource: #canvas> |
|
868 |
||
869 |
^ |
|
870 |
#(FullSpec |
|
871 |
name: #'page8_deploySpec' |
|
872 |
window: |
|
873 |
(WindowSpec |
|
874 |
label: 'Project Selection' |
|
875 |
name: 'Project Selection' |
|
876 |
min: (Point 0 0) |
|
877 |
bounds: (Rectangle 0 0 521 472) |
|
878 |
) |
|
879 |
component: |
|
880 |
(SpecCollection |
|
881 |
collection: ( |
|
882 |
(FramedBoxSpec |
|
883 |
label: 'Files for Deployment' |
|
884 |
name: 'FramedBox3' |
|
885 |
layout: (LayoutFrame 0 0.0 5 0 4 1.0 0 1) |
|
886 |
labelPosition: topLeft |
|
887 |
translateLabel: true |
|
888 |
component: |
|
889 |
(SpecCollection |
|
890 |
collection: ( |
|
891 |
(SubCanvasSpec |
|
892 |
name: 'SubCanvas1' |
|
893 |
layout: (LayoutFrame 0 0 0 0 0 1 -30 1) |
|
894 |
hasHorizontalScrollBar: false |
|
895 |
hasVerticalScrollBar: false |
|
896 |
clientHolder: fileBrowserInstance |
|
897 |
createNewApplication: true |
|
898 |
createNewBuilder: true |
|
2675 | 899 |
) |
2676 | 900 |
(HorizontalPanelViewSpec |
901 |
name: 'HorizontalPanel1' |
|
902 |
layout: (LayoutFrame 0 0 -30 1 0 1 0 1) |
|
2679 | 903 |
horizontalLayout: centerMax |
2676 | 904 |
verticalLayout: center |
905 |
horizontalSpace: 3 |
|
906 |
verticalSpace: 3 |
|
907 |
component: |
|
908 |
(SpecCollection |
|
909 |
collection: ( |
|
910 |
(ActionButtonSpec |
|
911 |
label: 'Open Windows Explorer' |
|
912 |
name: 'Button1' |
|
913 |
translateLabel: true |
|
2649 | 914 |
resizeForLabel: true |
915 |
model: doOpenExplorer |
|
916 |
extent: (Point 172 22) |
|
917 |
) |
|
2679 | 918 |
(ActionButtonSpec |
919 |
label: 'Open Console' |
|
920 |
name: 'Button2' |
|
921 |
translateLabel: true |
|
922 |
resizeForLabel: true |
|
923 |
model: doOpenConsoleTerminal |
|
924 |
extent: (Point 172 22) |
|
925 |
) |
|
2649 | 926 |
) |
927 |
||
928 |
) |
|
929 |
) |
|
2636 | 930 |
) |
931 |
||
932 |
) |
|
933 |
) |
|
934 |
) |
|
935 |
||
936 |
) |
|
937 |
) |
|
2676 | 938 |
! ! |
939 |
||
940 |
!ProjectBuilderAssistantApplication methodsFor:'actions'! |
|
941 |
||
942 |
buildDirectoryChanged |
|
943 |
self updateButtonEnableState. |
|
2636 | 944 |
! |
945 |
||
2676 | 946 |
createNewApplication |
947 |
<resource: #uiCallback> |
|
948 |
||
949 |
|newAppName newAppClass| |
|
2636 | 950 |
|
2676 | 951 |
newAppName := self newApplicationsName value. |
952 |
newAppName isEmptyOrNil ifTrue:[ |
|
953 |
Dialog warn:'Please enter the name of the Application-Class first.'. |
|
954 |
^ self |
|
955 |
]. |
|
956 |
||
957 |
self withWaitCursorDo:[ |
|
958 |
Class packageQuerySignal answer:(selectedProjectDefinition package) |
|
959 |
do:[ |
|
2659 | 960 |
newAppClass := ApplicationModel |
961 |
subclass:newAppName asSymbol |
|
962 |
instanceVariableNames:'' |
|
963 |
classVariableNames:'' |
|
964 |
poolDictionaries:'' |
|
965 |
category:'Applications'. |
|
966 |
CodeGeneratorTool createApplicationCodeFor:newAppClass. |
|
967 |
]. |
|
968 |
self updateListOfApplicationsInProject |
|
2636 | 969 |
]. |
970 |
! |
|
971 |
||
2676 | 972 |
createNewProject |
973 |
<resource: #uiCallback> |
|
974 |
||
975 |
|newProjectID projectDefinitionType projectDefinitionClass projectClasses| |
|
976 |
||
977 |
newProjectID := self newProjectsName value. |
|
978 |
newProjectID isEmptyOrNil ifTrue:[ |
|
979 |
Dialog warn:'Please enter a packageID first.'. |
|
980 |
^ self |
|
981 |
]. |
|
982 |
newProjectID asPackageId isModuleId ifTrue:[ |
|
983 |
Dialog warn:'Please enter a corrent packageID (module:directory).'. |
|
984 |
^ self |
|
985 |
]. |
|
986 |
||
987 |
projectDefinitionType := ProjectDefinition perform:(self projectTypeHolder value). |
|
988 |
||
989 |
||
990 |
projectDefinitionClass := ProjectDefinition |
|
991 |
definitionClassForPackage:newProjectID |
|
992 |
projectType: projectDefinitionType |
|
993 |
createIfAbsent:true. |
|
994 |
||
995 |
projectDefinitionClass compileDescriptionMethods. |
|
996 |
self updateListOfMatchingProjects. |
|
997 |
||
998 |
self selectedProjectIndexHolder value:( self listOfMatchingProjects value indexOf:projectDefinitionClass). |
|
999 |
||
1000 |
projectClasses := projectDefinitionClass allClassNames |
|
1001 |
collect:[:nm |Smalltalk classNamed:nm]. |
|
1002 |
||
1003 |
"/ projectDefinitionClass isGUIApplication ifTrue:[ |
|
1004 |
"/ "/ see if it has an AppModel class |
|
2659 | 1005 |
"/ (projectClasses contains:[:cls | cls isVisualStartable]) ifFalse:[ |
1006 |
"/ (Dialog confirm:'Create an Application Class ?') ifTrue:[ |
|
1007 |
"/ self halt. |
|
1008 |
"/ ]. |
|
1009 |
"/ ]. |
|
1010 |
"/ ]. |
|
2636 | 1011 |
|
1012 |
"/ projectDefinitionClass isLibrary ifFalse:[ |
|
1013 |
"/ "/ see if it has a Startup class |
|
1014 |
"/ (projectClasses contains:[:cls | cls isStartable]) ifFalse:[ |
|
1015 |
"/ ]. |
|
1016 |
"/ ]. |
|
1017 |
! |
|
1018 |
||
2676 | 1019 |
createNewStartupClass |
1020 |
<resource: #uiCallback> |
|
1021 |
||
1022 |
|newClassName newStartupClass| |
|
1023 |
||
1024 |
newClassName := self newStartupClassName value. |
|
1025 |
newClassName isEmptyOrNil ifTrue:[ |
|
1026 |
Dialog warn:'Please enter the name of the Startup-Class first.'. |
|
1027 |
^ self |
|
1028 |
]. |
|
1029 |
||
1030 |
self withWaitCursorDo:[ |
|
1031 |
Class packageQuerySignal answer:(selectedProjectDefinition package) |
|
1032 |
do:[ |
|
1033 |
newStartupClass := StandaloneStartup |
|
2659 | 1034 |
subclass:newClassName asSymbol |
1035 |
instanceVariableNames:'' |
|
1036 |
classVariableNames:'' |
|
1037 |
poolDictionaries:'' |
|
1038 |
category:'Applications'. |
|
1039 |
CodeGeneratorTool createStartupCodeFor:newStartupClass forStartOf:selectedApplication. |
|
1040 |
]. |
|
1041 |
self updateListOfStartupClassesInProject |
|
1042 |
]. |
|
1043 |
! |
|
1044 |
||
2676 | 1045 |
doAddClassToProject |
1046 |
<resource: #uiCallback> |
|
2636 | 1047 |
|
1048 |
Transcript showCR:self class name, ': action for doAddClassToProject ...'. |
|
1049 |
self halt. |
|
1050 |
! |
|
1051 |
||
2676 | 1052 |
doBrowseApplication |
1053 |
<resource: #uiCallback> |
|
2636 | 1054 |
|
1055 |
|appClass| |
|
1056 |
||
2659 | 1057 |
self hasApplicationSelected ifTrue:[ |
1058 |
appClass := self listOfApplicationsInProject value at:(self selectedApplicationIndexHolder value). |
|
1059 |
UserPreferences systemBrowserClass |
|
2668 | 1060 |
openInClass:appClass class selector:#windowSpec. |
2659 | 1061 |
]. |
2636 | 1062 |
! |
1063 |
||
2676 | 1064 |
doBrowseProject |
1065 |
<resource: #uiCallback> |
|
1066 |
||
1067 |
UserPreferences systemBrowserClass openOnPackage:selectedProjectDefinition package. |
|
2636 | 1068 |
! |
1069 |
||
2676 | 1070 |
doBrowseProjectDefinitionClass |
1071 |
<resource: #uiCallback> |
|
1072 |
||
1073 |
|defClass| |
|
1074 |
||
1075 |
self hasProjectSelected ifTrue:[ |
|
1076 |
defClass := self selectedProjectDefinition. |
|
1077 |
UserPreferences systemBrowserClass |
|
2659 | 1078 |
openInClass:defClass class selector:#classNamesAndAttributes. |
1079 |
]. |
|
1080 |
! |
|
1081 |
||
2676 | 1082 |
doBrowseStartupClass |
1083 |
<resource: #uiCallback> |
|
1084 |
||
1085 |
|startupClass| |
|
1086 |
||
1087 |
self hasStartupClassSelected ifTrue:[ |
|
1088 |
startupClass := self listOfStartupClassesInProject value at:(self selectedStartupClassIndexHolder value). |
|
1089 |
UserPreferences systemBrowserClass |
|
1090 |
openInClass:startupClass class selector:#main:. |
|
2659 | 1091 |
]. |
1092 |
! |
|
1093 |
||
2676 | 1094 |
doGenerateProjectContentsDefinition |
1095 |
self generatePackageContentsMethods |
|
1096 |
! |
|
1097 |
||
1098 |
doLaunchApplication |
|
1099 |
<resource: #uiCallback> |
|
1100 |
||
1101 |
|appClass| |
|
1102 |
||
1103 |
self hasApplicationSelected ifTrue:[ |
|
1104 |
appClass := self listOfApplicationsInProject value at:(self selectedApplicationIndexHolder value). |
|
1105 |
appClass open. |
|
2659 | 1106 |
]. |
1107 |
! |
|
1108 |
||
2679 | 1109 |
doOpenConsoleTerminal |
1110 |
"/ OperatingSystem |
|
1111 |
"/ executeCommand:'cmd.exe' |
|
1112 |
"/ inDirectory:(projectBuilder packageBuildDirectory) |
|
1113 |
OperatingSystem |
|
1114 |
executeCommand:'c:\windows\System32\cmd.exe' |
|
1115 |
inDirectory:(projectBuilder packageBuildDirectory) |
|
1116 |
! |
|
1117 |
||
2676 | 1118 |
doOpenExplorer |
1119 |
OperatingSystem |
|
1120 |
openApplicationForDocument:(projectBuilder packageBuildDirectory) operation:#explore. |
|
1121 |
! |
|
1122 |
||
2674 | 1123 |
doStartMakeAll |
2636 | 1124 |
<resource: #uiCallback> |
1125 |
||
1126 |
self stopMakeButtonVisible value:true. |
|
1127 |
self startMakeButtonEnabled value:false. |
|
1128 |
||
2646 | 1129 |
makeOutputWindow clear. |
1130 |
||
2636 | 1131 |
makeProcess := |
1132 |
[ |
|
1133 |
[ |
|
2674 | 1134 |
self runBuildProcess:'all' |
1135 |
] ensure:[ |
|
1136 |
self stopMakeButtonVisible value:false. |
|
1137 |
self startMakeButtonEnabled value:true. |
|
1138 |
makeProcess := nil. |
|
1139 |
self updateButtonEnableState. |
|
1140 |
]. |
|
1141 |
] newProcess. |
|
1142 |
||
1143 |
makeProcess priority:4. |
|
1144 |
makeProcess priorityRange:(4 to:8). |
|
1145 |
makeProcess resume. |
|
1146 |
! |
|
1147 |
||
2675 | 1148 |
doStartMakeExe |
2674 | 1149 |
<resource: #uiCallback> |
1150 |
||
1151 |
self stopMakeButtonVisible value:true. |
|
1152 |
self startMakeButtonEnabled value:false. |
|
1153 |
||
1154 |
makeOutputWindow clear. |
|
1155 |
||
1156 |
makeProcess := |
|
1157 |
[ |
|
1158 |
[ |
|
1159 |
self runBuildProcess:'exe' |
|
2636 | 1160 |
] ensure:[ |
1161 |
self stopMakeButtonVisible value:false. |
|
1162 |
self startMakeButtonEnabled value:true. |
|
2646 | 1163 |
makeProcess := nil. |
2648 | 1164 |
self updateButtonEnableState. |
2636 | 1165 |
]. |
1166 |
] newProcess. |
|
1167 |
||
1168 |
makeProcess priority:4. |
|
1169 |
makeProcess priorityRange:(4 to:8). |
|
1170 |
makeProcess resume. |
|
1171 |
! |
|
1172 |
||
2676 | 1173 |
doStopMake |
1174 |
<resource: #uiCallback> |
|
1175 |
||
1176 |
|p| |
|
2646 | 1177 |
|
2676 | 1178 |
(p := makeProcess) notNil ifTrue:[ |
1179 |
makeProcess := nil. |
|
1180 |
p terminate. |
|
1181 |
p waitUntilTerminated. |
|
1182 |
||
1183 |
makeOutputWindow endEntry. |
|
1184 |
makeOutputWindow cr. |
|
1185 |
makeOutputWindow nextPutLine:('Make Cancelled' colorizeAllWith:Color white on:Color red). |
|
1186 |
makeOutputWindow endEntry. |
|
1187 |
]. |
|
2646 | 1188 |
! |
1189 |
||
2676 | 1190 |
projectTypeChanged |
1191 |
<resource: #uiCallback> |
|
1192 |
||
1193 |
self updateListOfMatchingProjects |
|
2636 | 1194 |
! |
1195 |
||
2674 | 1196 |
runBuildProcess:what |
2636 | 1197 |
<resource: #uiCallback> |
1198 |
||
2646 | 1199 |
self assert:makeOutputWindow notNil. |
1200 |
self assert:makeOutputWindow model == self makeOutputHolder. |
|
1201 |
||
1202 |
ActivityNotification handle:[:ex | |
|
1203 |
ex messageText notNil ifTrue:[ |
|
1204 |
makeOutputWindow endEntry. |
|
1205 |
makeOutputWindow cr. |
|
2659 | 1206 |
makeOutputWindow nextPutLine:(ex messageText colorizeAllWith:Color white on:Color blue). |
2646 | 1207 |
makeOutputWindow endEntry. |
1208 |
]. |
|
1209 |
ex proceed. |
|
1210 |
] do:[ |
|
1211 |
projectBuilder := ProjectBuilder new. |
|
1212 |
projectBuilder package:(selectedProjectDefinition package). |
|
2681 | 1213 |
projectBuilder usedCompiler:(usedCompilerHolder value). |
2674 | 1214 |
what = 'exe' ifTrue:[ |
1215 |
projectBuilder makeExeOnly:true |
|
1216 |
] ifFalse:[ |
|
1217 |
projectBuilder makeExeOnly:false |
|
1218 |
]. |
|
1219 |
||
1220 |
Error handle:[:ex | |
|
1221 |
makeOutputWindow endEntry. |
|
1222 |
makeOutputWindow cr. |
|
2682 | 1223 |
makeOutputWindow nextPutLine:(ex description colorizeAllWith:Color white on:Color red). |
2674 | 1224 |
makeOutputWindow endEntry. |
2682 | 1225 |
ex proceed. |
2674 | 1226 |
] do:[ |
1227 |
projectBuilder buildWithColorizedOutputTo:makeOutputWindow. |
|
1228 |
]. |
|
2646 | 1229 |
]. |
2636 | 1230 |
! |
1231 |
||
2676 | 1232 |
selectedApplicationChanged |
1233 |
|idx| |
|
2671 | 1234 |
|
2676 | 1235 |
((idx := self selectedApplicationIndexHolder value) isNil |
1236 |
or:[idx == 0]) ifTrue:[ |
|
1237 |
selectedApplication := nil. |
|
1238 |
] ifFalse:[ |
|
1239 |
selectedApplication := self listOfApplicationsInProject value at:idx. |
|
2636 | 1240 |
]. |
2676 | 1241 |
self hasApplicationSelectedHolder value:(selectedApplication notNil). |
2659 | 1242 |
|
2676 | 1243 |
"/ selectedApplication notNil ifTrue:[ |
1244 |
"/ "/ generate startupClass code |
|
1245 |
"/ CodeGeneratorTool |
|
2656 | 1246 |
"/ compile:(selectedProjectDefinition startupClassName_codeFor:(selectedApplication name)) |
1247 |
"/ forClass:selectedProjectDefinition theMetaclass |
|
1248 |
"/ inCategory:'description - startup'. |
|
1249 |
"/ ]. |
|
2636 | 1250 |
self updateApplicationComment. |
1251 |
self updateButtonEnableState. |
|
1252 |
! |
|
1253 |
||
2676 | 1254 |
selectedProjectChanged |
1255 |
self selectedProjectIndexHolder value isNil ifTrue:[ |
|
1256 |
selectedProjectDefinition := nil. |
|
1257 |
] ifFalse:[ |
|
1258 |
selectedProjectDefinition := self listOfMatchingProjects value at:(self selectedProjectIndexHolder value). |
|
1259 |
]. |
|
1260 |
self hasProjectSelectedHolder value:(selectedProjectDefinition notNil). |
|
1261 |
||
1262 |
self updateComment. |
|
1263 |
self updateListOfApplicationsInProject. |
|
2636 | 1264 |
self updateButtonEnableState. |
2656 | 1265 |
! |
1266 |
||
2676 | 1267 |
selectedStartupClassChanged |
1268 |
self selectedStartupClassIndexHolder value isNil ifTrue:[ |
|
1269 |
selectedStartupClass := nil. |
|
1270 |
] ifFalse:[ |
|
1271 |
selectedStartupClass := self listOfStartupClassesInProject value at:(self selectedStartupClassIndexHolder value). |
|
2656 | 1272 |
]. |
2659 | 1273 |
self hasStartupClassSelectedHolder value:(selectedStartupClass notNil). |
1274 |
||
2656 | 1275 |
selectedStartupClass notNil ifTrue:[ |
1276 |
"/ generate startupClass code |
|
1277 |
CodeGeneratorTool |
|
1278 |
compile:(selectedProjectDefinition startupClassName_codeFor:(selectedStartupClass name)) |
|
1279 |
forClass:selectedProjectDefinition theMetaclass |
|
1280 |
inCategory:'description - startup'. |
|
1281 |
]. |
|
1282 |
self updateButtonEnableState. |
|
2676 | 1283 |
! ! |
2636 | 1284 |
|
2676 | 1285 |
!ProjectBuilderAssistantApplication methodsFor:'aspects'! |
2636 | 1286 |
|
2676 | 1287 |
buildDirectoryHolder |
1288 |
<resource: #uiAspect> |
|
2636 | 1289 |
|
1290 |
|buildDirectory| |
|
1291 |
||
1292 |
buildDirectoryHolder isNil ifTrue:[ |
|
1293 |
buildDirectoryHolder := nil asValue. |
|
1294 |
buildDirectoryHolder onChangeSend:#buildDirectoryChanged to:self. |
|
1295 |
]. |
|
1296 |
buildDirectoryHolder value isEmptyOrNil ifTrue:[ |
|
1297 |
buildDirectory := Tools::ProjectBuilder previousBuildDirectory. |
|
1298 |
buildDirectory isNil ifTrue:[ |
|
1299 |
buildDirectory := UserPreferences current buildDirectory. |
|
1300 |
buildDirectory isNil ifTrue:[ |
|
1301 |
buildDirectory := Filename tempDirectory construct:'stx_build'. |
|
1302 |
]. |
|
1303 |
]. |
|
1304 |
buildDirectoryHolder value: buildDirectory. |
|
1305 |
]. |
|
1306 |
^ buildDirectoryHolder. |
|
1307 |
! |
|
1308 |
||
2676 | 1309 |
fileBrowserInstance |
1310 |
|targetDirectory browser| |
|
2646 | 1311 |
|
2676 | 1312 |
targetDirectory := projectBuilder packageBuildDirectory. |
2646 | 1313 |
|
2676 | 1314 |
browser := FileBrowserV2 new. |
2646 | 1315 |
browser onDirectory:targetDirectory. |
2669
3e0023b75ad9
changed: #fileBrowserInstance
Claus Gittinger <cg@exept.de>
parents:
2668
diff
changeset
|
1316 |
browser filter:'*.exe'. |
2646 | 1317 |
^ browser. |
1318 |
! |
|
1319 |
||
2676 | 1320 |
hasApplicationSelectedHolder |
1321 |
<resource: #uiAspect> |
|
1322 |
||
1323 |
hasApplicationSelectedHolder isNil ifTrue:[ |
|
2659 | 1324 |
hasApplicationSelectedHolder := nil asValue. |
1325 |
]. |
|
1326 |
^ hasApplicationSelectedHolder. |
|
2636 | 1327 |
! |
1328 |
||
2676 | 1329 |
hasProjectSelectedHolder |
1330 |
<resource: #uiAspect> |
|
1331 |
||
1332 |
hasProjectSelectedHolder isNil ifTrue:[ |
|
2659 | 1333 |
hasProjectSelectedHolder := nil asValue. |
1334 |
]. |
|
1335 |
^ hasProjectSelectedHolder. |
|
2648 | 1336 |
! |
1337 |
||
2676 | 1338 |
hasStartupClassSelectedHolder |
1339 |
<resource: #uiAspect> |
|
1340 |
||
1341 |
hasStartupClassSelectedHolder isNil ifTrue:[ |
|
2659 | 1342 |
hasStartupClassSelectedHolder := nil asValue. |
1343 |
]. |
|
1344 |
^ hasStartupClassSelectedHolder. |
|
2636 | 1345 |
! |
1346 |
||
2676 | 1347 |
hideOtherApplicationClasses |
1348 |
<resource: #uiAspect> |
|
1349 |
||
1350 |
hideOtherApplicationClasses isNil ifTrue:[ |
|
2671 | 1351 |
hideOtherApplicationClasses := true asValue. |
1352 |
hideOtherApplicationClasses onChangeSend:#updateListOfApplicationsInProject to:self. |
|
1353 |
]. |
|
1354 |
^ hideOtherApplicationClasses. |
|
1355 |
! |
|
1356 |
||
2676 | 1357 |
hideOtherStartupClasses |
1358 |
<resource: #uiAspect> |
|
1359 |
||
1360 |
hideOtherStartupClasses isNil ifTrue:[ |
|
1361 |
hideOtherStartupClasses := true asValue. |
|
1362 |
hideOtherStartupClasses onChangeSend:#updateListOfStartupClassesInProject to:self. |
|
2671 | 1363 |
]. |
2676 | 1364 |
^ hideOtherStartupClasses. |
2671 | 1365 |
! |
1366 |
||
2676 | 1367 |
hideSTXProjects |
1368 |
<resource: #uiAspect> |
|
1369 |
||
1370 |
hideSTXProjects isNil ifTrue:[ |
|
1371 |
hideSTXProjects := true asValue. |
|
1372 |
hideSTXProjects onChangeSend:#updateListOfMatchingProjects to:self. |
|
1373 |
]. |
|
1374 |
^ hideSTXProjects. |
|
1375 |
! |
|
1376 |
||
1377 |
listOfApplicationsInProject |
|
1378 |
<resource: #uiAspect> |
|
1379 |
||
1380 |
listOfApplicationsInProject isNil ifTrue:[ |
|
2636 | 1381 |
listOfApplicationsInProject := ValueHolder new. |
1382 |
]. |
|
1383 |
^ listOfApplicationsInProject. |
|
1384 |
! |
|
1385 |
||
2676 | 1386 |
listOfClassesInProject |
1387 |
<resource: #uiAspect> |
|
1388 |
||
1389 |
listOfClassesInProject isNil ifTrue:[ |
|
2636 | 1390 |
listOfClassesInProject := ValueHolder new. |
1391 |
]. |
|
1392 |
^ listOfClassesInProject. |
|
1393 |
! |
|
1394 |
||
2676 | 1395 |
listOfMatchingProjects |
1396 |
<resource: #uiAspect> |
|
2636 | 1397 |
|
1398 |
listOfMatchingProjects isNil ifTrue:[ |
|
1399 |
listOfMatchingProjects := ValueHolder new. |
|
1400 |
]. |
|
1401 |
^ listOfMatchingProjects. |
|
1402 |
! |
|
1403 |
||
2681 | 1404 |
listOfPossibleCompilers |
1405 |
OperatingSystem isMSWINDOWSlike ifTrue:[ |
|
1406 |
^ #('bcc' 'vc' 'lcc') |
|
1407 |
]. |
|
1408 |
^ #('gcc') |
|
1409 |
! |
|
1410 |
||
2676 | 1411 |
listOfStartupClassesInProject |
1412 |
<resource: #uiAspect> |
|
1413 |
||
1414 |
listOfStartupClassesInProject isNil ifTrue:[ |
|
1415 |
listOfStartupClassesInProject := ValueHolder new. |
|
1416 |
]. |
|
1417 |
^ listOfStartupClassesInProject. |
|
1418 |
! |
|
1419 |
||
1420 |
makeOutputHolder |
|
1421 |
<resource: #uiAspect> |
|
2636 | 1422 |
|
1423 |
makeOutputHolder isNil ifTrue:[ |
|
2646 | 1424 |
makeOutputHolder := ValueHolder new. |
2636 | 1425 |
]. |
1426 |
^ makeOutputHolder. |
|
1427 |
! |
|
1428 |
||
2676 | 1429 |
newApplicationsName |
1430 |
<resource: #uiAspect> |
|
1431 |
||
1432 |
"automatically generated by UIPainter ..." |
|
1433 |
||
1434 |
"*** the code below creates a default model when invoked." |
|
1435 |
"*** (which may not be the one you wanted)" |
|
1436 |
"*** Please change as required and accept it in the browser." |
|
1437 |
"*** (and replace this comment by something more useful ;-)" |
|
1438 |
||
1439 |
newApplicationsName isNil ifTrue:[ |
|
1440 |
newApplicationsName := ValueHolder new. |
|
1441 |
"/ if your app needs to be notified of changes, uncomment one of the lines below: |
|
2636 | 1442 |
"/ newApplicationsName addDependent:self. |
1443 |
"/ newApplicationsName onChangeSend:#newApplicationsNameChanged to:self. |
|
1444 |
]. |
|
1445 |
^ newApplicationsName. |
|
1446 |
! |
|
1447 |
||
2676 | 1448 |
newProjectsName |
1449 |
<resource: #uiAspect> |
|
1450 |
||
1451 |
newProjectsName isNil ifTrue:[ |
|
2636 | 1452 |
newProjectsName := nil asValue. |
1453 |
]. |
|
1454 |
^ newProjectsName. |
|
1455 |
! |
|
1456 |
||
2676 | 1457 |
newStartupClassName |
1458 |
<resource: #uiAspect> |
|
1459 |
||
1460 |
newStartupClassName isNil ifTrue:[ |
|
1461 |
newStartupClassName := ValueHolder new. |
|
1462 |
]. |
|
1463 |
^ newStartupClassName. |
|
2659 | 1464 |
! |
1465 |
||
2676 | 1466 |
projectType |
1467 |
self projectTypeHolder value == #libraryType ifTrue:[ |
|
1468 |
^ ProjectDefinition libraryType |
|
2659 | 1469 |
]. |
1470 |
self projectTypeHolder value == #guiApplicationType ifTrue:[ |
|
1471 |
^ ProjectDefinition guiApplicationType |
|
1472 |
]. |
|
1473 |
self projectTypeHolder value == #nonGuiApplicationType ifTrue:[ |
|
1474 |
^ ProjectDefinition nonGuiApplicationType |
|
2636 | 1475 |
]. |
2659 | 1476 |
self error. |
1477 |
! |
|
1478 |
||
2676 | 1479 |
projectType:aProjectTypeSymbol |
1480 |
|pType| |
|
1481 |
||
1482 |
self assert:(ProjectDefinition projectTypes includes:aProjectTypeSymbol). |
|
1483 |
aProjectTypeSymbol == ProjectDefinition libraryType ifTrue:[ |
|
1484 |
pType := #libraryType |
|
1485 |
] ifFalse:[ |
|
1486 |
aProjectTypeSymbol == ProjectDefinition guiApplicationType ifTrue:[ |
|
1487 |
pType := #guiApplicationType |
|
1488 |
] ifFalse:[ |
|
1489 |
aProjectTypeSymbol == ProjectDefinition nonGuiApplicationType ifTrue:[ |
|
2659 | 1490 |
pType := #nonGuiApplicationType |
1491 |
] ifFalse:[ |
|
1492 |
self error. |
|
1493 |
]. |
|
1494 |
] |
|
1495 |
]. |
|
1496 |
self projectTypeHolder value:aProjectTypeSymbol |
|
1497 |
! |
|
1498 |
||
2676 | 1499 |
projectTypeHolder |
1500 |
<resource: #uiAspect> |
|
2659 | 1501 |
|
2676 | 1502 |
projectTypeHolder isNil ifTrue:[ |
1503 |
projectTypeHolder := RadioButtonGroup new. |
|
1504 |
projectTypeHolder value:#guiApplicationType. |
|
2659 | 1505 |
]. |
1506 |
^ projectTypeHolder. |
|
2636 | 1507 |
! |
1508 |
||
2676 | 1509 |
projectTypeIsNotLibrary |
1510 |
^ self projectTypeHolder value ~~ #libraryType |
|
1511 |
! |
|
1512 |
||
1513 |
selectedApplicationIndexHolder |
|
1514 |
<resource: #uiAspect> |
|
1515 |
||
1516 |
selectedApplicationIndexHolder isNil ifTrue:[ |
|
2636 | 1517 |
selectedApplicationIndexHolder := ValueHolder new. |
1518 |
selectedApplicationIndexHolder onChangeSend:#selectedApplicationChanged to:self. |
|
1519 |
]. |
|
1520 |
^ selectedApplicationIndexHolder. |
|
1521 |
! |
|
1522 |
||
2676 | 1523 |
selectedApplicationsComment |
1524 |
<resource: #uiAspect> |
|
1525 |
||
1526 |
"automatically generated by UIPainter ..." |
|
2636 | 1527 |
|
1528 |
"*** the code below creates a default model when invoked." |
|
1529 |
"*** (which may not be the one you wanted)" |
|
1530 |
"*** Please change as required and accept it in the browser." |
|
1531 |
"*** (and replace this comment by something more useful ;-)" |
|
1532 |
||
1533 |
selectedApplicationsComment isNil ifTrue:[ |
|
1534 |
selectedApplicationsComment := '' asValue. |
|
1535 |
"/ if your app needs to be notified of changes, uncomment one of the lines below: |
|
1536 |
"/ selectedApplicationsComment addDependent:self. |
|
1537 |
"/ selectedApplicationsComment onChangeSend:#selectedApplicationsCommentChanged to:self. |
|
1538 |
]. |
|
1539 |
^ selectedApplicationsComment. |
|
1540 |
! |
|
1541 |
||
2676 | 1542 |
selectedProjectDefinition |
1543 |
<resource: #uiAspect> |
|
2636 | 1544 |
|
2676 | 1545 |
^ selectedProjectDefinition. |
2636 | 1546 |
! |
1547 |
||
2676 | 1548 |
selectedProjectIndexHolder |
1549 |
<resource: #uiAspect> |
|
2636 | 1550 |
|
1551 |
selectedProjectIndexHolder isNil ifTrue:[ |
|
1552 |
selectedProjectIndexHolder := ValueHolder new. |
|
1553 |
selectedProjectIndexHolder onChangeSend:#selectedProjectChanged to:self. |
|
1554 |
]. |
|
1555 |
^ selectedProjectIndexHolder. |
|
2676 | 1556 |
! |
1557 |
||
1558 |
selectedProjectsComment |
|
1559 |
<resource: #uiAspect> |
|
1560 |
||
1561 |
selectedProjectsComment isNil ifTrue:[ |
|
1562 |
selectedProjectsComment := '' asValue. |
|
1563 |
]. |
|
1564 |
^ selectedProjectsComment. |
|
1565 |
! |
|
1566 |
||
1567 |
selectedStartupClassIndexHolder |
|
1568 |
<resource: #uiAspect> |
|
1569 |
||
1570 |
selectedStartupClassIndexHolder isNil ifTrue:[ |
|
1571 |
selectedStartupClassIndexHolder := ValueHolder new. |
|
1572 |
selectedStartupClassIndexHolder onChangeSend:#selectedStartupClassChanged to:self. |
|
1573 |
]. |
|
1574 |
^ selectedStartupClassIndexHolder. |
|
1575 |
! |
|
1576 |
||
1577 |
startMakeButtonEnabled |
|
1578 |
<resource: #uiAspect> |
|
1579 |
||
1580 |
startMakeButtonEnabled isNil ifTrue:[ |
|
1581 |
startMakeButtonEnabled := true asValue. |
|
1582 |
]. |
|
1583 |
^ startMakeButtonEnabled. |
|
1584 |
! |
|
1585 |
||
1586 |
stopMakeButtonVisible |
|
1587 |
<resource: #uiAspect> |
|
1588 |
||
1589 |
stopMakeButtonVisible isNil ifTrue:[ |
|
1590 |
stopMakeButtonVisible := false asValue. |
|
1591 |
]. |
|
1592 |
^ stopMakeButtonVisible. |
|
2681 | 1593 |
! |
1594 |
||
1595 |
usedCompilerHolder |
|
1596 |
<resource: #uiAspect> |
|
1597 |
||
1598 |
usedCompilerHolder isNil ifTrue:[ |
|
1599 |
usedCompilerHolder := ValueHolder new. |
|
1600 |
usedCompilerHolder value:(OperatingSystem isMSWINDOWSlike ifTrue:['bcc'] ifFalse:['gcc']) |
|
1601 |
]. |
|
1602 |
^ usedCompilerHolder. |
|
2676 | 1603 |
! ! |
1604 |
||
1605 |
!ProjectBuilderAssistantApplication methodsFor:'initialization & release'! |
|
1606 |
||
1607 |
postBuildMakeOutputWindow:aView |
|
1608 |
makeOutputWindow := aView |
|
1609 |
! |
|
1610 |
||
1611 |
postBuildWith:aBuilder |
|
1612 |
super postBuildWith:aBuilder. |
|
1613 |
self updateListOfMatchingProjects. |
|
1614 |
||
1615 |
Smalltalk addDependent:self. |
|
1616 |
! |
|
1617 |
||
1618 |
release |
|
1619 |
Smalltalk removeDependent:self. |
|
1620 |
super release |
|
1621 |
! ! |
|
1622 |
||
1623 |
!ProjectBuilderAssistantApplication methodsFor:'menu actions'! |
|
1624 |
||
1625 |
openDocumentation |
|
1626 |
self openHTMLDocument:'tools/misc/TOP.html#PACKAGER'. |
|
2659 | 1627 |
! ! |
1628 |
||
2636 | 1629 |
!ProjectBuilderAssistantApplication methodsFor:'private'! |
1630 |
||
2676 | 1631 |
commentFromClass:aClass |
1632 |
|docMethod comment indents minIndent maxLineLength| |
|
2636 | 1633 |
|
1634 |
docMethod := aClass class compiledMethodAt:#documentation. |
|
1635 |
docMethod notNil ifTrue:[ |
|
1636 |
comment := docMethod comment. |
|
1637 |
comment := comment asStringCollection |
|
1638 |
collect:[:line | line withoutTrailingSeparators]. |
|
1639 |
[comment notEmpty and:[comment first isBlank]] whileTrue:[ comment removeFirst ]. |
|
1640 |
maxLineLength := (comment collect:[:line | line size]) max. |
|
1641 |
indents := comment collect:[:line | |
|
1642 |
line isEmptyOrNil |
|
1643 |
ifTrue:[maxLineLength] |
|
1644 |
ifFalse:[ line findFirst:[:ch | ch isSeparator not]]]. |
|
1645 |
(minIndent := indents min) > 1 ifTrue:[ |
|
1646 |
comment := comment collect:[:line | line copyFrom:minIndent]. |
|
1647 |
]. |
|
1648 |
comment := comment asString. |
|
1649 |
]. |
|
1650 |
^ comment |
|
2659 | 1651 |
! |
1652 |
||
2676 | 1653 |
generatePackageContentsMethods |
1654 |
<resource: #uiCallback> |
|
1655 |
||
1656 |
Class packageQuerySignal answer:(selectedProjectDefinition package) |
|
1657 |
do:[ |
|
1658 |
selectedProjectDefinition |
|
1659 |
forEachContentsMethodsCodeToCompileDo:[:code :category | |
|
1660 |
CodeGeneratorTool |
|
1661 |
compile:code |
|
1662 |
forClass:selectedProjectDefinition theMetaclass |
|
1663 |
inCategory:category. |
|
1664 |
] |
|
1665 |
ignoreOldDefinition:true |
|
2659 | 1666 |
]. |
2676 | 1667 |
self updateListOfClassesInProject |
2659 | 1668 |
! |
1669 |
||
2676 | 1670 |
hasApplicationSelected |
1671 |
^ self selectedApplicationIndexHolder value notNil |
|
1672 |
! |
|
1673 |
||
1674 |
hasBuildDirectorySpecified |
|
1675 |
^ self buildDirectoryHolder value notEmptyOrNil |
|
2659 | 1676 |
! |
1677 |
||
2676 | 1678 |
hasProjectBuilder |
1679 |
^ projectBuilder notNil |
|
1680 |
! |
|
1681 |
||
1682 |
hasProjectSelected |
|
1683 |
^ self selectedProjectIndexHolder value notNil |
|
1684 |
! |
|
1685 |
||
1686 |
hasStartupClassSelected |
|
1687 |
^ self selectedStartupClassIndexHolder value notNil |
|
2636 | 1688 |
! ! |
1689 |
||
2656 | 1690 |
!ProjectBuilderAssistantApplication methodsFor:'queries'! |
1691 |
||
2676 | 1692 |
canEnterApplicationSelection |
1693 |
^ self hasProjectSelected |
|
2656 | 1694 |
! |
1695 |
||
2676 | 1696 |
canEnterBuild |
1697 |
^ self hasBuildDirectorySpecified |
|
2656 | 1698 |
! |
1699 |
||
2659 | 1700 |
canEnterContentsSelection |
1701 |
^ self hasProjectSelected |
|
2674 | 1702 |
and:[ true "self hasApplicationSelected" |
2659 | 1703 |
and:[ self hasStartupClassSelected ]] |
1704 |
! |
|
1705 |
||
2676 | 1706 |
canEnterDeploy |
1707 |
^ self hasProjectBuilder |
|
2656 | 1708 |
! |
1709 |
||
2676 | 1710 |
canEnterStartupClassSelection |
1711 |
^ self hasProjectSelected "and:[ self hasApplicationSelected ]" |
|
2656 | 1712 |
! ! |
1713 |
||
2636 | 1714 |
!ProjectBuilderAssistantApplication methodsFor:'specs'! |
1715 |
||
2676 | 1716 |
assistantSpec |
1717 |
^ #(Array |
|
1718 |
( AssistantPageSpec |
|
1719 |
pageTitle: 'Project Type Selection' |
|
1720 |
windowSpecSelector: page1_projectTypeSelectionSpec |
|
1721 |
enterCallbackSelector: updateListOfMatchingProjects |
|
1722 |
infoText: 'Choose the type of project you are about to build.' |
|
1723 |
) |
|
1724 |
||
1725 |
(AssistantPageSpec |
|
1726 |
pageTitle: 'Project Selection' |
|
1727 |
windowSpecSelector: page2_projectSelectionSpec |
|
1728 |
enterCallbackSelector: updateListOfMatchingProjects |
|
1729 |
infoText: 'Choose an existing project or create a new one. |
|
1730 |
These are subclasses of <I>ProjectDefinition</I> and define the |
|
1731 |
type and contents of a project.' |
|
1732 |
) |
|
2636 | 1733 |
|
2676 | 1734 |
(AssistantPageSpec |
1735 |
pageTitle: 'Application Selection' |
|
1736 |
windowSpecSelector: page3_applicationSelectionSpec |
|
1737 |
isEnabledQuerySelector: #projectTypeIsNotLibrary |
|
1738 |
canEnterQuerySelector: #canEnterApplicationSelection |
|
1739 |
enterCallbackSelector: updateListOfApplicationsInProject |
|
1740 |
infoText: 'Choose an existing application or create a new one. |
|
1741 |
These are subclasses of <I>ApplicationModel</I> and define |
|
1742 |
the GUI and control flow inside the application. |
|
1743 |
Can also be left blank if the startup class does it all (stx build).' |
|
1744 |
) |
|
2636 | 1745 |
|
2676 | 1746 |
(AssistantPageSpec |
1747 |
pageTitle: 'Startup Class Selection' |
|
1748 |
windowSpecSelector: page4_startupClassSelectionSpec |
|
1749 |
isEnabledQuerySelector: #projectTypeIsNotLibrary |
|
1750 |
canEnterQuerySelector: #canEnterStartupClassSelection |
|
1751 |
enterCallbackSelector: updateListOfStartupClassesInProject |
|
1752 |
infoText: 'Choose an existing startup-class or create a new one. |
|
1753 |
These are subclasses of <I>StandaloneStartup</I> and |
|
1754 |
start the application. Command line arguments can be |
|
1755 |
interpreted there.' |
|
1756 |
) |
|
1757 |
||
1758 |
(AssistantPageSpec |
|
1759 |
pageTitle: 'Specify Contents' |
|
1760 |
windowSpecSelector: page5_specifyIncludedClasses |
|
1761 |
enterCallbackSelector: updateListOfClassesInProject |
|
1762 |
canEnterQuerySelector: #canEnterContentsSelection |
|
1763 |
infoText: 'Define which (other) classes are to be included. |
|
1764 |
Press "<I>Scan</I>" to include all classes of the package; |
|
1765 |
browse to edit the contents manually.' |
|
1766 |
) |
|
1767 |
||
1768 |
(AssistantPageSpec |
|
1769 |
pageTitle: 'Specify Build Directory' |
|
1770 |
windowSpecSelector: page6_specifyBuildDirectorySpec |
|
2659 | 1771 |
infoText: 'Define where the build-process is to be performed. |
1772 |
All generated files are created below that directory. |
|
1773 |
After deployment, the build directory is no longer needed |
|
1774 |
(but you can keep it for a faster compile the next time).' |
|
2636 | 1775 |
) |
1776 |
||
1777 |
(AssistantPageSpec |
|
1778 |
pageTitle: 'Build' |
|
2656 | 1779 |
windowSpecSelector: page7_buildSpec |
1780 |
canEnterQuerySelector: #canEnterBuild |
|
2646 | 1781 |
enterCallbackSelector: #restoreMakeOutputsContents |
1782 |
leaveCallbackSelector: #rememberMakeOutputsContents |
|
2659 | 1783 |
infoText: 'Start the build-process. This will run make/bcc to compile |
1784 |
all required classes and nsis to generate a self-installable |
|
1785 |
executable. You must have the borland-cc and NullSoft NSIS |
|
1786 |
packages installed for this to work.' |
|
2636 | 1787 |
) |
1788 |
||
1789 |
(AssistantPageSpec |
|
1790 |
pageTitle: 'Deploy' |
|
2656 | 1791 |
windowSpecSelector: page8_deploySpec |
1792 |
canEnterQuerySelector: #canEnterDeploy |
|
2659 | 1793 |
infoText: 'Find the installer to be deployed (or test-run the binary). |
1794 |
You can open a WindowsExplorer there to copy the files for |
|
1795 |
deployment. After that, the build directory is no longer needed |
|
1796 |
(but you can keep it for a faster compile the next time).' |
|
2636 | 1797 |
) |
1798 |
) decodeAsLiteralArray. |
|
2676 | 1799 |
! ! |
1800 |
||
1801 |
!ProjectBuilderAssistantApplication methodsFor:'update'! |
|
1802 |
||
1803 |
rememberMakeOutputsContents |
|
1804 |
makeOutputHolder value:(makeOutputWindow contents) |
|
1805 |
! |
|
1806 |
||
1807 |
restoreMakeOutputsContents |
|
1808 |
makeOutputWindow contents:makeOutputHolder value |
|
2646 | 1809 |
! |
1810 |
||
2676 | 1811 |
update:something with:anArgument from:changedObject |
1812 |
changedObject == Smalltalk ifTrue:[ |
|
1813 |
(something == #newClass |
|
1814 |
or:[something == #classRemove |
|
1815 |
or:[something == #projectOrganization]]) ifTrue:[ |
|
1816 |
self updateListOfMatchingProjects. |
|
1817 |
^ self. |
|
1818 |
]. |
|
1819 |
^ self. |
|
1820 |
]. |
|
1821 |
super update:something with:anArgument from:changedObject |
|
2636 | 1822 |
! |
1823 |
||
2676 | 1824 |
updateApplicationComment |
1825 |
|comment| |
|
2636 | 1826 |
|
2676 | 1827 |
self selectedApplicationIndexHolder value notNil ifTrue:[ |
1828 |
comment := self commentFromClass:selectedApplication. |
|
1829 |
comment isNil ifTrue:[ |
|
1830 |
comment := 'Application has no comment' allItalic colorizeAllWith:Color lightGrey. |
|
1831 |
]. |
|
1832 |
] ifFalse:[ |
|
1833 |
comment := 'Please select an Application' allItalic colorizeAllWith:Color lightGrey. |
|
1834 |
]. |
|
1835 |
self selectedApplicationsComment value:comment. |
|
2636 | 1836 |
! |
1837 |
||
2676 | 1838 |
updateComment |
1839 |
|comment| |
|
2636 | 1840 |
|
2676 | 1841 |
self selectedProjectIndexHolder value notNil ifTrue:[ |
1842 |
comment := self commentFromClass:selectedProjectDefinition. |
|
1843 |
comment isNil ifTrue:[ |
|
1844 |
comment := 'Project has no comment' allItalic colorizeAllWith:Color lightGrey. |
|
1845 |
]. |
|
1846 |
] ifFalse:[ |
|
1847 |
comment := 'Please select a Project' allItalic colorizeAllWith:Color lightGrey. |
|
1848 |
]. |
|
1849 |
self selectedProjectsComment value:comment. |
|
2636 | 1850 |
! |
1851 |
||
2676 | 1852 |
updateListOfApplicationsInProject |
1853 |
|oldList applicationClasses package appClass appClassIndex| |
|
2636 | 1854 |
|
2649 | 1855 |
appClassIndex := nil. |
1856 |
||
2636 | 1857 |
selectedProjectDefinition isNil ifTrue:[ |
1858 |
applicationClasses := #() |
|
1859 |
] ifFalse:[ |
|
1860 |
package := selectedProjectDefinition package. |
|
1861 |
||
1862 |
applicationClasses := Smalltalk allClasses |
|
1863 |
select:[:cls | |
|
2671 | 1864 |
((cls isSubclassOf:ApplicationModel) |
1865 |
and:[ self hideOtherApplicationClasses value not |
|
1866 |
or:[ cls package = package ]]) |
|
2636 | 1867 |
]. |
1868 |
applicationClasses := applicationClasses asOrderedCollection. |
|
1869 |
applicationClasses sort:[:a :b | a name < b name]. |
|
2649 | 1870 |
|
2668 | 1871 |
"/ startUpClassName := [ selectedProjectDefinition startupClassName ] ifError:[ nil ]. |
1872 |
"/ startUpClassName notNil ifTrue:[ |
|
1873 |
"/ startUpClass := Smalltalk classNamed:startUpClassName. |
|
1874 |
"/ startUpClass notNil ifTrue:[ |
|
1875 |
"/ appClassIndex := applicationClasses indexOf:startUpClass. |
|
1876 |
"/ appClassIndex == 0 ifTrue:[ appClassIndex := nil ]. |
|
1877 |
"/ ]. |
|
1878 |
"/ ]. |
|
2636 | 1879 |
]. |
2649 | 1880 |
|
2668 | 1881 |
oldList := self listOfApplicationsInProject value. |
1882 |
oldList = applicationClasses ifFalse:[ |
|
1883 |
appClass := selectedApplication. |
|
1884 |
appClassIndex := applicationClasses indexOf:appClass. |
|
1885 |
appClassIndex == 0 ifTrue:[ appClassIndex := nil ]. |
|
1886 |
||
1887 |
self listOfApplicationsInProject value:applicationClasses. |
|
1888 |
self selectedApplicationIndexHolder value:appClassIndex. |
|
1889 |
]. |
|
2636 | 1890 |
! |
1891 |
||
2676 | 1892 |
updateListOfClassesInProject |
1893 |
self listOfClassesInProject value:(selectedProjectDefinition classNames). |
|
1894 |
! |
|
2636 | 1895 |
|
2676 | 1896 |
updateListOfMatchingProjects |
1897 |
|matching projectType idx| |
|
1898 |
||
1899 |
projectType := self projectType. |
|
1900 |
matching := ProjectDefinition allSubclasses |
|
1901 |
select:[:defClass | |
|
1902 |
|match| |
|
2636 | 1903 |
|
2676 | 1904 |
match := false. |
1905 |
defClass isAbstract ifFalse:[ |
|
1906 |
(self hideSTXProjects value not |
|
1907 |
or:[ defClass package asPackageId module ~= 'stx' ]) |
|
1908 |
ifTrue:[ |
|
1909 |
projectType == ProjectDefinition libraryType ifTrue:[ |
|
1910 |
match := defClass isLibraryDefinition |
|
1911 |
] ifFalse:[ |
|
1912 |
projectType == ProjectDefinition guiApplicationType ifTrue:[ |
|
1913 |
match := defClass isGUIApplication |
|
1914 |
] ifFalse:[ |
|
1915 |
projectType == ProjectDefinition nonGuiApplicationType ifTrue:[ |
|
1916 |
match := defClass isConsoleApplication |
|
1917 |
] ifFalse:[ |
|
1918 |
self error. |
|
1919 |
]. |
|
1920 |
]. |
|
1921 |
]. |
|
1922 |
]. |
|
1923 |
]. |
|
1924 |
]. |
|
1925 |
matching sort:[:a :b | a name < b name]. |
|
1926 |
self listOfMatchingProjects value:matching. |
|
2636 | 1927 |
|
2676 | 1928 |
idx := matching indexOf:selectedProjectDefinition. |
1929 |
idx == 0 ifTrue:[ |
|
1930 |
self selectedProjectIndexHolder value:nil. |
|
1931 |
] ifFalse:[ |
|
1932 |
self selectedProjectIndexHolder value:idx. |
|
2636 | 1933 |
]. |
2659 | 1934 |
! |
1935 |
||
1936 |
updateListOfStartupClassesInProject |
|
1937 |
|startupClasses package startUpClassName startUpClass startupClassIndex| |
|
1938 |
||
1939 |
startupClassIndex := nil. |
|
1940 |
self selectedStartupClassIndexHolder value:nil. |
|
1941 |
||
1942 |
selectedProjectDefinition isNil ifTrue:[ |
|
1943 |
startupClasses := #() |
|
1944 |
] ifFalse:[ |
|
1945 |
package := selectedProjectDefinition package. |
|
1946 |
||
1947 |
startupClasses := Smalltalk allClasses |
|
1948 |
select:[:cls | |
|
2671 | 1949 |
((cls includesBehavior:StandaloneStartup) |
1950 |
and:[ self hideOtherStartupClasses value not |
|
1951 |
or:[ cls package = package ]]) |
|
2674 | 1952 |
or:[ cls == Smalltalk |
1953 |
and:[ self hideOtherStartupClasses value not ] ] |
|
2659 | 1954 |
]. |
1955 |
startupClasses := startupClasses asOrderedCollection. |
|
1956 |
startupClasses sort:[:a :b | a name < b name]. |
|
1957 |
||
1958 |
startUpClassName := [ selectedProjectDefinition startupClassName ] ifError:[ nil ]. |
|
1959 |
startUpClassName notNil ifTrue:[ |
|
1960 |
startUpClass := Smalltalk classNamed:startUpClassName. |
|
1961 |
startUpClass notNil ifTrue:[ |
|
1962 |
startupClassIndex := startupClasses indexOf:startUpClass. |
|
1963 |
startupClassIndex == 0 ifTrue:[ startupClassIndex := nil ]. |
|
1964 |
]. |
|
1965 |
]. |
|
1966 |
]. |
|
2674 | 1967 |
|
2659 | 1968 |
self listOfStartupClassesInProject value:startupClasses. |
1969 |
self selectedStartupClassIndexHolder value:startupClassIndex. |
|
2636 | 1970 |
! ! |
1971 |
||
1972 |
!ProjectBuilderAssistantApplication class methodsFor:'documentation'! |
|
1973 |
||
1974 |
version_CVS |
|
1975 |
^ '$Header$' |
|
1976 |
! ! |