1 "{ Package: 'stx:libtool2' }" |
1 "{ Package: 'stx:libtool2' }" |
2 |
2 |
3 "{ NameSpace: Tools }" |
3 "{ NameSpace: Tools }" |
4 |
4 |
5 AssistantApplication subclass:#ProjectBuilderAssistantApplication |
5 AssistantApplication subclass:#ProjectBuilderAssistantApplication |
6 instanceVariableNames:'packageToBuildHolder projectType selectedProjectIndexHolder |
6 instanceVariableNames:'packageToBuildHolder projectType projectTypeHolder |
7 selectedProjectDefinition listOfMatchingProjects |
7 selectedProjectIndexHolder selectedProjectDefinition |
8 selectedProjectsComment newProjectsName hideSTXProjects |
8 listOfMatchingProjects selectedProjectsComment |
|
9 hasProjectSelectedHolder newProjectsName hideSTXProjects |
9 startMakeButtonEnabled stopMakeButtonVisible makeOutputHolder |
10 startMakeButtonEnabled stopMakeButtonVisible makeOutputHolder |
10 newApplicationsName listOfApplicationsInProject |
11 newApplicationsName listOfApplicationsInProject |
11 selectedApplicationIndexHolder selectedApplication |
12 selectedApplicationIndexHolder selectedApplication |
12 listOfStartupClassesInProject selectedStartupClassIndexHolder |
13 hasApplicationSelectedHolder listOfStartupClassesInProject |
13 selectedStartupClass selectedApplicationsComment |
14 selectedStartupClassIndexHolder selectedStartupClass |
|
15 hasStartupClassSelectedHolder selectedApplicationsComment |
14 buildDirectoryHolder makeProcess listOfClassesInProject |
16 buildDirectoryHolder makeProcess listOfClassesInProject |
15 makeOutputWindow projectBuilder' |
17 makeOutputWindow projectBuilder newStartupClassName' |
16 classVariableNames:'' |
18 classVariableNames:'' |
17 poolDictionaries:'' |
19 poolDictionaries:'' |
18 category:'System-Support-Projects' |
20 category:'System-Support-Projects' |
19 ! |
21 ! |
20 |
22 |
73 ) |
75 ) |
74 (RadioButtonSpec |
76 (RadioButtonSpec |
75 label: 'GUI Application' |
77 label: 'GUI Application' |
76 name: 'RadioButton1' |
78 name: 'RadioButton1' |
77 translateLabel: true |
79 translateLabel: true |
78 model: projectType |
80 model: projectTypeHolder |
79 isTriggerOnDown: true |
81 isTriggerOnDown: true |
80 onCallBackSelector: projectTypeChanged |
82 onCallBackSelector: projectTypeChanged |
81 select: guiApplicationType |
83 select: guiApplicationType |
82 extent: (Point 136 22) |
84 extent: (Point 136 22) |
83 ) |
85 ) |
84 (RadioButtonSpec |
86 (RadioButtonSpec |
85 label: 'Non-GUI Application' |
87 label: 'Non-GUI Application' |
86 name: 'RadioButton2' |
88 name: 'RadioButton2' |
87 translateLabel: true |
89 translateLabel: true |
88 model: projectType |
90 model: projectTypeHolder |
89 isTriggerOnDown: true |
91 isTriggerOnDown: true |
90 onCallBackSelector: projectTypeChanged |
92 onCallBackSelector: projectTypeChanged |
91 select: nonGuiApplicationType |
93 select: nonGuiApplicationType |
92 extent: (Point 136 22) |
94 extent: (Point 136 22) |
93 ) |
95 ) |
94 (RadioButtonSpec |
96 (RadioButtonSpec |
95 label: 'Class Library' |
97 label: 'Class Library' |
96 name: 'RadioButton3' |
98 name: 'RadioButton3' |
97 translateLabel: true |
99 translateLabel: true |
98 model: projectType |
100 model: projectTypeHolder |
99 isTriggerOnDown: true |
101 isTriggerOnDown: true |
100 onCallBackSelector: projectTypeChanged |
102 onCallBackSelector: projectTypeChanged |
101 select: libraryType |
103 select: libraryType |
102 extent: (Point 136 22) |
104 extent: (Point 136 22) |
103 ) |
105 ) |
855 newAppName isEmptyOrNil ifTrue:[ |
868 newAppName isEmptyOrNil ifTrue:[ |
856 Dialog warn:'Please enter the name of the Application-Class first.'. |
869 Dialog warn:'Please enter the name of the Application-Class first.'. |
857 ^ self |
870 ^ self |
858 ]. |
871 ]. |
859 |
872 |
860 Class packageQuerySignal answer:(selectedProjectDefinition package) |
873 self withWaitCursorDo:[ |
861 do:[ |
874 Class packageQuerySignal answer:(selectedProjectDefinition package) |
862 newAppClass := ApplicationModel |
875 do:[ |
863 subclass:newAppName asSymbol |
876 newAppClass := ApplicationModel |
864 instanceVariableNames:'' |
877 subclass:newAppName asSymbol |
865 classVariableNames:'' |
878 instanceVariableNames:'' |
866 poolDictionaries:'' |
879 classVariableNames:'' |
867 category:'Applications'. |
880 poolDictionaries:'' |
868 CodeGeneratorTool createApplicationCodeFor:newAppClass. |
881 category:'Applications'. |
869 ]. |
882 CodeGeneratorTool createApplicationCodeFor:newAppClass. |
870 self updateListOfApplicationsInProject |
883 ]. |
|
884 self updateListOfApplicationsInProject |
|
885 ]. |
871 ! |
886 ! |
872 |
887 |
873 createNewProject |
888 createNewProject |
874 <resource: #uiCallback> |
889 <resource: #uiCallback> |
875 |
890 |
895 self selectedProjectIndexHolder value:( self listOfMatchingProjects value indexOf:projectDefinitionClass). |
914 self selectedProjectIndexHolder value:( self listOfMatchingProjects value indexOf:projectDefinitionClass). |
896 |
915 |
897 projectClasses := projectDefinitionClass allClassNames |
916 projectClasses := projectDefinitionClass allClassNames |
898 collect:[:nm |Smalltalk classNamed:nm]. |
917 collect:[:nm |Smalltalk classNamed:nm]. |
899 |
918 |
900 projectDefinitionClass isGUIApplication ifTrue:[ |
919 "/ projectDefinitionClass isGUIApplication ifTrue:[ |
901 "/ see if it has an AppModel class |
920 "/ "/ see if it has an AppModel class |
902 (projectClasses contains:[:cls | cls isVisualStartable]) ifFalse:[ |
921 "/ (projectClasses contains:[:cls | cls isVisualStartable]) ifFalse:[ |
903 (Dialog confirm:'Create an Application Class ?') ifTrue:[ |
922 "/ (Dialog confirm:'Create an Application Class ?') ifTrue:[ |
904 self halt. |
923 "/ self halt. |
905 ]. |
924 "/ ]. |
906 ]. |
925 "/ ]. |
907 ]. |
926 "/ ]. |
908 |
927 |
909 "/ projectDefinitionClass isLibrary ifFalse:[ |
928 "/ projectDefinitionClass isLibrary ifFalse:[ |
910 "/ "/ see if it has a Startup class |
929 "/ "/ see if it has a Startup class |
911 "/ (projectClasses contains:[:cls | cls isStartable]) ifFalse:[ |
930 "/ (projectClasses contains:[:cls | cls isStartable]) ifFalse:[ |
912 "/ ]. |
931 "/ ]. |
913 "/ ]. |
932 "/ ]. |
914 ! |
933 ! |
915 |
934 |
|
935 createNewStartupClass |
|
936 <resource: #uiCallback> |
|
937 |
|
938 |newClassName newStartupClass| |
|
939 |
|
940 newClassName := self newStartupClassName value. |
|
941 newClassName isEmptyOrNil ifTrue:[ |
|
942 Dialog warn:'Please enter the name of the Startup-Class first.'. |
|
943 ^ self |
|
944 ]. |
|
945 |
|
946 self withWaitCursorDo:[ |
|
947 Class packageQuerySignal answer:(selectedProjectDefinition package) |
|
948 do:[ |
|
949 newStartupClass := StandaloneStartup |
|
950 subclass:newClassName asSymbol |
|
951 instanceVariableNames:'' |
|
952 classVariableNames:'' |
|
953 poolDictionaries:'' |
|
954 category:'Applications'. |
|
955 CodeGeneratorTool createStartupCodeFor:newStartupClass forStartOf:selectedApplication. |
|
956 ]. |
|
957 self updateListOfStartupClassesInProject |
|
958 ]. |
|
959 ! |
|
960 |
916 doAddClassToProject |
961 doAddClassToProject |
917 <resource: #uiCallback> |
962 <resource: #uiCallback> |
918 |
963 |
919 Transcript showCR:self class name, ': action for doAddClassToProject ...'. |
964 Transcript showCR:self class name, ': action for doAddClassToProject ...'. |
920 self halt. |
965 self halt. |
923 doBrowseApplication |
968 doBrowseApplication |
924 <resource: #uiCallback> |
969 <resource: #uiCallback> |
925 |
970 |
926 |appClass| |
971 |appClass| |
927 |
972 |
928 appClass := self listOfApplicationsInProject value at:(self selectedApplicationIndexHolder value). |
973 self hasApplicationSelected ifTrue:[ |
929 UserPreferences systemBrowserClass openInClass:appClass. |
974 appClass := self listOfApplicationsInProject value at:(self selectedApplicationIndexHolder value). |
|
975 UserPreferences systemBrowserClass |
|
976 openInClass:appClass. |
|
977 ]. |
930 ! |
978 ! |
931 |
979 |
932 doBrowseProject |
980 doBrowseProject |
933 <resource: #uiCallback> |
981 <resource: #uiCallback> |
934 |
982 |
935 UserPreferences systemBrowserClass openOnPackage:selectedProjectDefinition package. |
983 UserPreferences systemBrowserClass openOnPackage:selectedProjectDefinition package. |
936 ! |
984 ! |
937 |
985 |
|
986 doBrowseProjectDefinitionClass |
|
987 <resource: #uiCallback> |
|
988 |
|
989 |defClass| |
|
990 |
|
991 self hasProjectSelected ifTrue:[ |
|
992 defClass := self selectedProjectDefinition. |
|
993 UserPreferences systemBrowserClass |
|
994 openInClass:defClass class selector:#classNamesAndAttributes. |
|
995 ]. |
|
996 ! |
|
997 |
|
998 doBrowseStartupClass |
|
999 <resource: #uiCallback> |
|
1000 |
|
1001 |startupClass| |
|
1002 |
|
1003 self hasStartupClassSelected ifTrue:[ |
|
1004 startupClass := self listOfStartupClassesInProject value at:(self selectedStartupClassIndexHolder value). |
|
1005 UserPreferences systemBrowserClass |
|
1006 openInClass:startupClass. |
|
1007 ]. |
|
1008 ! |
|
1009 |
938 doGenerateProjectContentsDefinition |
1010 doGenerateProjectContentsDefinition |
939 self generatePackageContentsMethods |
1011 self generatePackageContentsMethods |
|
1012 ! |
|
1013 |
|
1014 doLaunchApplication |
|
1015 <resource: #uiCallback> |
|
1016 |
|
1017 |appClass| |
|
1018 |
|
1019 self hasApplicationSelected ifTrue:[ |
|
1020 appClass := self listOfApplicationsInProject value at:(self selectedApplicationIndexHolder value). |
|
1021 appClass open. |
|
1022 ]. |
940 ! |
1023 ! |
941 |
1024 |
942 doOpenExplorer |
1025 doOpenExplorer |
943 OperatingSystem |
1026 OperatingSystem |
944 openApplicationForDocument:(projectBuilder packageBuildDirectory) operation:#explore. |
1027 openApplicationForDocument:(projectBuilder packageBuildDirectory) operation:#explore. |
1107 browser onDirectory:targetDirectory. |
1179 browser onDirectory:targetDirectory. |
1108 browser filter:'*setup*'. |
1180 browser filter:'*setup*'. |
1109 ^ browser. |
1181 ^ browser. |
1110 ! |
1182 ! |
1111 |
1183 |
1112 hasBuildDirectorySpecified |
1184 hasApplicationSelectedHolder |
1113 ^ self buildDirectoryHolder value notEmptyOrNil |
1185 <resource: #uiAspect> |
1114 ! |
1186 |
1115 |
1187 hasApplicationSelectedHolder isNil ifTrue:[ |
1116 hasProjectBuilder |
1188 hasApplicationSelectedHolder := nil asValue. |
1117 ^ projectBuilder notNil |
1189 ]. |
1118 ! |
1190 ^ hasApplicationSelectedHolder. |
1119 |
1191 ! |
1120 hasProjectSelected |
1192 |
1121 ^ self selectedProjectIndexHolder value notNil |
1193 hasProjectSelectedHolder |
|
1194 <resource: #uiAspect> |
|
1195 |
|
1196 hasProjectSelectedHolder isNil ifTrue:[ |
|
1197 hasProjectSelectedHolder := nil asValue. |
|
1198 ]. |
|
1199 ^ hasProjectSelectedHolder. |
|
1200 ! |
|
1201 |
|
1202 hasStartupClassSelectedHolder |
|
1203 <resource: #uiAspect> |
|
1204 |
|
1205 hasStartupClassSelectedHolder isNil ifTrue:[ |
|
1206 hasStartupClassSelectedHolder := nil asValue. |
|
1207 ]. |
|
1208 ^ hasStartupClassSelectedHolder. |
1122 ! |
1209 ! |
1123 |
1210 |
1124 hideSTXProjects |
1211 hideSTXProjects |
1125 <resource: #uiAspect> |
1212 <resource: #uiAspect> |
1126 |
1213 |
1202 newProjectsName := nil asValue. |
1289 newProjectsName := nil asValue. |
1203 ]. |
1290 ]. |
1204 ^ newProjectsName. |
1291 ^ newProjectsName. |
1205 ! |
1292 ! |
1206 |
1293 |
|
1294 newStartupClassName |
|
1295 <resource: #uiAspect> |
|
1296 |
|
1297 newStartupClassName isNil ifTrue:[ |
|
1298 newStartupClassName := ValueHolder new. |
|
1299 ]. |
|
1300 ^ newStartupClassName. |
|
1301 ! |
|
1302 |
1207 projectType |
1303 projectType |
1208 <resource: #uiAspect> |
1304 self projectTypeHolder value == #libraryType ifTrue:[ |
1209 |
1305 ^ ProjectDefinition libraryType |
1210 projectType isNil ifTrue:[ |
1306 ]. |
1211 projectType := RadioButtonGroup new. |
1307 self projectTypeHolder value == #guiApplicationType ifTrue:[ |
1212 projectType value:#guiApplicationType. |
1308 ^ ProjectDefinition guiApplicationType |
1213 ]. |
1309 ]. |
1214 ^ projectType. |
1310 self projectTypeHolder value == #nonGuiApplicationType ifTrue:[ |
|
1311 ^ ProjectDefinition nonGuiApplicationType |
|
1312 ]. |
|
1313 self error. |
|
1314 ! |
|
1315 |
|
1316 projectType:aProjectTypeSymbol |
|
1317 |pType| |
|
1318 |
|
1319 self assert:(ProjectDefinition projectTypes includes:aProjectTypeSymbol). |
|
1320 aProjectTypeSymbol == ProjectDefinition libraryType ifTrue:[ |
|
1321 pType := #libraryType |
|
1322 ] ifFalse:[ |
|
1323 aProjectTypeSymbol == ProjectDefinition guiApplicationType ifTrue:[ |
|
1324 pType := #guiApplicationType |
|
1325 ] ifFalse:[ |
|
1326 aProjectTypeSymbol == ProjectDefinition nonGuiApplicationType ifTrue:[ |
|
1327 pType := #nonGuiApplicationType |
|
1328 ] ifFalse:[ |
|
1329 self error. |
|
1330 ]. |
|
1331 ] |
|
1332 ]. |
|
1333 self projectTypeHolder value:aProjectTypeSymbol |
|
1334 ! |
|
1335 |
|
1336 projectTypeHolder |
|
1337 <resource: #uiAspect> |
|
1338 |
|
1339 projectTypeHolder isNil ifTrue:[ |
|
1340 projectTypeHolder := RadioButtonGroup new. |
|
1341 projectTypeHolder value:#guiApplicationType. |
|
1342 ]. |
|
1343 ^ projectTypeHolder. |
1215 ! |
1344 ! |
1216 |
1345 |
1217 projectTypeIsNotLibrary |
1346 projectTypeIsNotLibrary |
1218 ^ self projectType value ~~ #libraryType |
1347 ^ self projectTypeHolder value ~~ #libraryType |
1219 ! |
1348 ! |
1220 |
1349 |
1221 selectedApplicationIndexHolder |
1350 selectedApplicationIndexHolder |
1222 <resource: #uiAspect> |
1351 <resource: #uiAspect> |
1223 |
1352 |
1338 comment := comment collect:[:line | line copyFrom:minIndent]. |
1473 comment := comment collect:[:line | line copyFrom:minIndent]. |
1339 ]. |
1474 ]. |
1340 comment := comment asString. |
1475 comment := comment asString. |
1341 ]. |
1476 ]. |
1342 ^ comment |
1477 ^ comment |
|
1478 ! |
|
1479 |
|
1480 generatePackageContentsMethods |
|
1481 <resource: #uiCallback> |
|
1482 |
|
1483 Class packageQuerySignal answer:(selectedProjectDefinition package) |
|
1484 do:[ |
|
1485 selectedProjectDefinition |
|
1486 forEachContentsMethodsCodeToCompileDo:[:code :category | |
|
1487 CodeGeneratorTool |
|
1488 compile:code |
|
1489 forClass:selectedProjectDefinition theMetaclass |
|
1490 inCategory:category. |
|
1491 ] |
|
1492 ignoreOldDefinition:true |
|
1493 ]. |
|
1494 self updateListOfClassesInProject |
|
1495 ! |
|
1496 |
|
1497 hasApplicationSelected |
|
1498 ^ self selectedApplicationIndexHolder value notNil |
|
1499 ! |
|
1500 |
|
1501 hasBuildDirectorySpecified |
|
1502 ^ self buildDirectoryHolder value notEmptyOrNil |
|
1503 ! |
|
1504 |
|
1505 hasProjectBuilder |
|
1506 ^ projectBuilder notNil |
|
1507 ! |
|
1508 |
|
1509 hasProjectSelected |
|
1510 ^ self selectedProjectIndexHolder value notNil |
|
1511 ! |
|
1512 |
|
1513 hasStartupClassSelected |
|
1514 ^ self selectedStartupClassIndexHolder value notNil |
1343 ! ! |
1515 ! ! |
1344 |
1516 |
1345 !ProjectBuilderAssistantApplication methodsFor:'queries'! |
1517 !ProjectBuilderAssistantApplication methodsFor:'queries'! |
1346 |
1518 |
1347 canEnterApplicationSelection |
1519 canEnterApplicationSelection |
1350 |
1522 |
1351 canEnterBuild |
1523 canEnterBuild |
1352 ^ self hasBuildDirectorySpecified |
1524 ^ self hasBuildDirectorySpecified |
1353 ! |
1525 ! |
1354 |
1526 |
|
1527 canEnterContentsSelection |
|
1528 ^ self hasProjectSelected |
|
1529 and:[ self hasApplicationSelected |
|
1530 and:[ self hasStartupClassSelected ]] |
|
1531 ! |
|
1532 |
1355 canEnterDeploy |
1533 canEnterDeploy |
1356 ^ self hasProjectBuilder |
1534 ^ self hasProjectBuilder |
1357 ! |
1535 ! |
1358 |
1536 |
1359 canEnterStartupClassSelection |
1537 canEnterStartupClassSelection |
1360 ^ self hasProjectSelected |
1538 ^ self hasProjectSelected and:[ self hasApplicationSelected ] |
1361 ! ! |
1539 ! ! |
1362 |
1540 |
1363 !ProjectBuilderAssistantApplication methodsFor:'specs'! |
1541 !ProjectBuilderAssistantApplication methodsFor:'specs'! |
1364 |
1542 |
1365 assistantSpec |
1543 assistantSpec |
1366 ^ #(Array |
1544 ^ #(Array |
1367 ( AssistantPageSpec |
1545 ( AssistantPageSpec |
1368 pageTitle: 'Project Type Selection' |
1546 pageTitle: 'Project Type Selection' |
1369 windowSpecSelector: page1_projectTypeSelectionSpec |
1547 windowSpecSelector: page1_projectTypeSelectionSpec |
1370 enterCallbackSelector: updateListOfMatchingProjects |
1548 enterCallbackSelector: updateListOfMatchingProjects |
|
1549 infoText: 'Choose the type of project you are about to build.' |
1371 ) |
1550 ) |
1372 |
1551 |
1373 (AssistantPageSpec |
1552 (AssistantPageSpec |
1374 pageTitle: 'Project Selection' |
1553 pageTitle: 'Project Selection' |
1375 windowSpecSelector: page2_projectSelectionSpec |
1554 windowSpecSelector: page2_projectSelectionSpec |
1376 enterCallbackSelector: updateListOfMatchingProjects |
1555 enterCallbackSelector: updateListOfMatchingProjects |
|
1556 infoText: 'Choose an existing project or create a new one. |
|
1557 These are subclasses of <I>ProjectDefinition</I> and define the |
|
1558 type and contents of a project.' |
1377 ) |
1559 ) |
1378 |
1560 |
1379 (AssistantPageSpec |
1561 (AssistantPageSpec |
1380 pageTitle: 'Application Selection' |
1562 pageTitle: 'Application Selection' |
1381 windowSpecSelector: page3_applicationSelectionSpec |
1563 windowSpecSelector: page3_applicationSelectionSpec |
1382 isEnabledQuerySelector: #projectTypeIsNotLibrary |
1564 isEnabledQuerySelector: #projectTypeIsNotLibrary |
1383 canEnterQuerySelector: #canEnterApplicationSelection |
1565 canEnterQuerySelector: #canEnterApplicationSelection |
1384 enterCallbackSelector: updateListOfApplicationsInProject |
1566 enterCallbackSelector: updateListOfApplicationsInProject |
|
1567 infoText: 'Choose an existing application or create a new one. |
|
1568 These are subclasses of <I>ApplicationModel</I> and define |
|
1569 the GUI and control flow inside the application.' |
1385 ) |
1570 ) |
1386 |
1571 |
1387 (AssistantPageSpec |
1572 (AssistantPageSpec |
1388 pageTitle: 'Startup Class Selection' |
1573 pageTitle: 'Startup Class Selection' |
1389 windowSpecSelector: page4_startupClassSelectionSpec |
1574 windowSpecSelector: page4_startupClassSelectionSpec |
1390 isEnabledQuerySelector: #projectTypeIsNotLibrary |
1575 isEnabledQuerySelector: #projectTypeIsNotLibrary |
1391 canEnterQuerySelector: #canEnterStartupClassSelection |
1576 canEnterQuerySelector: #canEnterStartupClassSelection |
1392 enterCallbackSelector: updateListOfStartupClassesInProject |
1577 enterCallbackSelector: updateListOfStartupClassesInProject |
|
1578 infoText: 'Choose an existing startup-class or create a new one. |
|
1579 These are subclasses of <I>StandaloneStartup</I> and |
|
1580 start the application. Command line arguments can be |
|
1581 interpreted there.' |
1393 ) |
1582 ) |
1394 |
1583 |
1395 (AssistantPageSpec |
1584 (AssistantPageSpec |
1396 pageTitle: 'Specify Contents' |
1585 pageTitle: 'Specify Contents' |
1397 windowSpecSelector: page5_specifyIncludedClasses |
1586 windowSpecSelector: page5_specifyIncludedClasses |
1398 enterCallbackSelector: updateListOfClassesInProject |
1587 enterCallbackSelector: updateListOfClassesInProject |
|
1588 canEnterQuerySelector: #canEnterContentsSelection |
|
1589 infoText: 'Define which (other) classes are to be included. |
|
1590 Press "<I>Scan</I>" to include all classes of the package; |
|
1591 browse to edit the contents manually.' |
1399 ) |
1592 ) |
1400 |
1593 |
1401 (AssistantPageSpec |
1594 (AssistantPageSpec |
1402 pageTitle: 'Specify Build Directory' |
1595 pageTitle: 'Specify Build Directory' |
1403 windowSpecSelector: page6_specifyBuildDirectorySpec |
1596 windowSpecSelector: page6_specifyBuildDirectorySpec |
|
1597 infoText: 'Define where the build-process is to be performed. |
|
1598 All generated files are created below that directory. |
|
1599 After deployment, the build directory is no longer needed |
|
1600 (but you can keep it for a faster compile the next time).' |
1404 ) |
1601 ) |
1405 |
1602 |
1406 (AssistantPageSpec |
1603 (AssistantPageSpec |
1407 pageTitle: 'Build' |
1604 pageTitle: 'Build' |
1408 windowSpecSelector: page7_buildSpec |
1605 windowSpecSelector: page7_buildSpec |
1409 canEnterQuerySelector: #canEnterBuild |
1606 canEnterQuerySelector: #canEnterBuild |
1410 enterCallbackSelector: #restoreMakeOutputsContents |
1607 enterCallbackSelector: #restoreMakeOutputsContents |
1411 leaveCallbackSelector: #rememberMakeOutputsContents |
1608 leaveCallbackSelector: #rememberMakeOutputsContents |
|
1609 infoText: 'Start the build-process. This will run make/bcc to compile |
|
1610 all required classes and nsis to generate a self-installable |
|
1611 executable. You must have the borland-cc and NullSoft NSIS |
|
1612 packages installed for this to work.' |
1412 ) |
1613 ) |
1413 |
1614 |
1414 (AssistantPageSpec |
1615 (AssistantPageSpec |
1415 pageTitle: 'Deploy' |
1616 pageTitle: 'Deploy' |
1416 windowSpecSelector: page8_deploySpec |
1617 windowSpecSelector: page8_deploySpec |
1417 canEnterQuerySelector: #canEnterDeploy |
1618 canEnterQuerySelector: #canEnterDeploy |
|
1619 infoText: 'Find the installer to be deployed (or test-run the binary). |
|
1620 You can open a WindowsExplorer there to copy the files for |
|
1621 deployment. After that, the build directory is no longer needed |
|
1622 (but you can keep it for a faster compile the next time).' |
1418 ) |
1623 ) |
1419 ) decodeAsLiteralArray. |
1624 ) decodeAsLiteralArray. |
1420 ! ! |
1625 ! ! |
1421 |
1626 |
1422 !ProjectBuilderAssistantApplication methodsFor:'update'! |
1627 !ProjectBuilderAssistantApplication methodsFor:'update'! |
1508 ! |
1713 ! |
1509 |
1714 |
1510 updateListOfMatchingProjects |
1715 updateListOfMatchingProjects |
1511 |matching projectType idx| |
1716 |matching projectType idx| |
1512 |
1717 |
1513 projectType := self projectType value. |
1718 projectType := self projectType. |
1514 matching := ProjectDefinition allSubclasses |
1719 matching := ProjectDefinition allSubclasses |
1515 select:[:defClass | |
1720 select:[:defClass | |
1516 |match| |
1721 |match| |
1517 |
1722 |
1518 match := false. |
1723 match := false. |
1519 defClass isAbstract ifFalse:[ |
1724 defClass isAbstract ifFalse:[ |
1520 (self hideSTXProjects value not |
1725 (self hideSTXProjects value not |
1521 or:[ defClass package asPackageId module ~= 'stx' ]) |
1726 or:[ defClass package asPackageId module ~= 'stx' ]) |
1522 ifTrue:[ |
1727 ifTrue:[ |
1523 projectType == #libraryType ifTrue:[ |
1728 projectType == ProjectDefinition libraryType ifTrue:[ |
1524 match := defClass isLibraryDefinition |
1729 match := defClass isLibraryDefinition |
1525 ] ifFalse:[ |
1730 ] ifFalse:[ |
1526 projectType == #guiApplicationType ifTrue:[ |
1731 projectType == ProjectDefinition guiApplicationType ifTrue:[ |
1527 match := defClass isGUIApplication |
1732 match := defClass isGUIApplication |
1528 ] ifFalse:[ |
1733 ] ifFalse:[ |
1529 projectType == #nonGuiApplicationType ifTrue:[ |
1734 projectType == ProjectDefinition nonGuiApplicationType ifTrue:[ |
1530 match := defClass isConsoleApplication |
1735 match := defClass isConsoleApplication |
1531 ] ifFalse:[ |
1736 ] ifFalse:[ |
1532 self error. |
1737 self error. |
1533 ]. |
1738 ]. |
1534 ]. |
1739 ]. |
1543 idx == 0 ifTrue:[ |
1748 idx == 0 ifTrue:[ |
1544 self selectedProjectIndexHolder value:nil. |
1749 self selectedProjectIndexHolder value:nil. |
1545 ] ifFalse:[ |
1750 ] ifFalse:[ |
1546 self selectedProjectIndexHolder value:idx. |
1751 self selectedProjectIndexHolder value:idx. |
1547 ]. |
1752 ]. |
|
1753 ! |
|
1754 |
|
1755 updateListOfStartupClassesInProject |
|
1756 |startupClasses package startUpClassName startUpClass startupClassIndex| |
|
1757 |
|
1758 startupClassIndex := nil. |
|
1759 self selectedStartupClassIndexHolder value:nil. |
|
1760 |
|
1761 selectedProjectDefinition isNil ifTrue:[ |
|
1762 startupClasses := #() |
|
1763 ] ifFalse:[ |
|
1764 package := selectedProjectDefinition package. |
|
1765 |
|
1766 startupClasses := Smalltalk allClasses |
|
1767 select:[:cls | |
|
1768 (cls package = package |
|
1769 and:[ cls isSubclassOf:StandaloneStartup ]) |
|
1770 ]. |
|
1771 startupClasses := startupClasses asOrderedCollection. |
|
1772 startupClasses sort:[:a :b | a name < b name]. |
|
1773 |
|
1774 startUpClassName := [ selectedProjectDefinition startupClassName ] ifError:[ nil ]. |
|
1775 startUpClassName notNil ifTrue:[ |
|
1776 startUpClass := Smalltalk classNamed:startUpClassName. |
|
1777 startUpClass notNil ifTrue:[ |
|
1778 startupClassIndex := startupClasses indexOf:startUpClass. |
|
1779 startupClassIndex == 0 ifTrue:[ startupClassIndex := nil ]. |
|
1780 ]. |
|
1781 ]. |
|
1782 ]. |
|
1783 self listOfStartupClassesInProject value:startupClasses. |
|
1784 |
|
1785 self selectedStartupClassIndexHolder value:startupClassIndex. |
1548 ! ! |
1786 ! ! |
1549 |
1787 |
1550 !ProjectBuilderAssistantApplication class methodsFor:'documentation'! |
1788 !ProjectBuilderAssistantApplication class methodsFor:'documentation'! |
1551 |
1789 |
1552 version_CVS |
1790 version_CVS |