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