Tools__ProjectBuilderAssistantApplication.st
changeset 2703 3ea780aba713
parent 2698 64d179f1eae7
child 2705 64aa9ac2e8a1
equal deleted inserted replaced
2702:96f1dbce3d00 2703:3ea780aba713
    38     [author:]
    38     [author:]
    39         Claus Gittinger
    39         Claus Gittinger
    40 "
    40 "
    41 ! !
    41 ! !
    42 
    42 
       
    43 !ProjectBuilderAssistantApplication class methodsFor:'assistant pages spec'!
       
    44 
       
    45 assistantSpec
       
    46     ^ #(Array
       
    47         ( AssistantPageSpec
       
    48             pageTitle: 'Project Type Selection'
       
    49             windowSpecSelector: page1_projectTypeSelectionSpec
       
    50             enterCallbackSelector: updateListOfMatchingProjects
       
    51             infoText: 'Choose the <B>type</B> of project you are about to build.'
       
    52         )
       
    53 
       
    54         (AssistantPageSpec
       
    55             pageTitle: 'ProjectDefinition Selection'
       
    56             windowSpecSelector: page2_projectSelectionSpec
       
    57             enterCallbackSelector: updateListOfMatchingProjects
       
    58             infoText: 'Choose an existing project definition or create a new one.
       
    59                        These are subclasses of <I>ProjectDefinition</I> and define the
       
    60                        type and contents of a project.'
       
    61         )
       
    62 
       
    63         (AssistantPageSpec
       
    64             pageTitle: 'Startup Application Selection'
       
    65             windowSpecSelector: page3_applicationSelectionSpec
       
    66             isEnabledQuerySelector: #projectTypeIsGuiApplication
       
    67             canEnterQuerySelector: #canEnterApplicationSelection
       
    68             enterCallbackSelector: updateListOfApplicationsInProject
       
    69             infoText: 'Choose an existing application or create a new one.
       
    70                        These are subclasses of <I>ApplicationModel</I> and define
       
    71                        the GUI and control flow inside the application.
       
    72                        Can also be left blank if the startup class does it all (stx build).'
       
    73         )
       
    74 
       
    75         (AssistantPageSpec
       
    76             pageTitle: 'Startup Class Selection'
       
    77             windowSpecSelector: page4_startupClassSelectionSpec
       
    78             isEnabledQuerySelector: #projectTypeIsNotLibrary
       
    79             canEnterQuerySelector: #canEnterStartupClassSelection
       
    80             enterCallbackSelector: updateListOfStartupClassesInProject
       
    81             infoText: 'Choose an existing startup-class or create a new one.
       
    82                        These are subclasses of <I>StandaloneStartup</I> and 
       
    83                        start the application. Command line arguments can be
       
    84                        interpreted there.'
       
    85         )
       
    86 
       
    87         (AssistantPageSpec
       
    88             pageTitle: 'Specify Contents'
       
    89             windowSpecSelector: page5_specifyIncludedClasses
       
    90             enterCallbackSelector: enterContentsSpecification
       
    91             canEnterQuerySelector: #canEnterContentsSelection
       
    92             infoText: 'Define which (other) classes are to be included.
       
    93                        Press "<I>Scan</I>" to include all classes of the package;
       
    94                        browse to edit the contents manually.'
       
    95         )
       
    96 
       
    97         (AssistantPageSpec
       
    98             pageTitle: 'Specify Build Directory'
       
    99             windowSpecSelector: page6_specifyBuildDirectorySpec
       
   100             infoText: 'Define where the build-process is to be performed.
       
   101                        All generated files are created below that directory.
       
   102                        After deployment, the build directory is no longer needed
       
   103                        (but you can keep it for a faster compile the next time).'
       
   104         )
       
   105 
       
   106         (AssistantPageSpec
       
   107             pageTitle: 'Build'
       
   108             windowSpecSelector: page7_buildSpec
       
   109             canEnterQuerySelector: #canEnterBuild
       
   110             enterCallbackSelector: #restoreMakeOutputsContents
       
   111             leaveCallbackSelector: #rememberMakeOutputsContents
       
   112             infoText: 'Start the build-process. This will run make/bcc to compile
       
   113                        all required classes and nsis to generate a self-installable
       
   114                        executable. You must have the borland-cc and NullSoft NSIS
       
   115                        packages installed for this to work.'
       
   116         )
       
   117 
       
   118         (AssistantPageSpec
       
   119             pageTitle: 'Deploy'
       
   120             windowSpecSelector: page8_deploySpec
       
   121             canEnterQuerySelector: #canEnterDeploy
       
   122             infoText: 'Find the installer to be deployed (or test-run the binary).
       
   123                        You can open a WindowsExplorer there to copy the files for
       
   124                        deployment. After that, the build directory is no longer needed
       
   125                        (but you can keep it for a faster compile the next time).'
       
   126         )
       
   127     ) decodeAsLiteralArray.
       
   128 ! !
       
   129 
    43 !ProjectBuilderAssistantApplication class methodsFor:'defaults'!
   130 !ProjectBuilderAssistantApplication class methodsFor:'defaults'!
    44 
   131 
    45 defaultIcon
   132 defaultIcon
    46     ^ ToolbarIconLibrary projectBuilderIcon
   133     ^ ToolbarIconLibrary projectBuilderIcon
    47 !
   134 !
    48 
   135 
    49 windowLabelTemplate
   136 windowLabelTemplate
    50     ^ 'ST/X Packager: %1'
   137     ^ 'ST/X Packager: %1'
       
   138 ! !
       
   139 
       
   140 !ProjectBuilderAssistantApplication class methodsFor:'help'!
       
   141 
       
   142 flyByHelpSpec
       
   143     <resource: #help>
       
   144 
       
   145     ^ super flyByHelpSpec addPairsFrom:#(
       
   146 
       
   147 #newProjectsName
       
   148 'PackageID (module:directory)'
       
   149 
       
   150 #createNewProject
       
   151 'Click to create a new (empty) ProjectDefinition for the given PackageID'
       
   152 
       
   153 #'listOfNewProjectsName'
       
   154 'foo  bar baz'
       
   155 
       
   156 )
    51 ! !
   157 ! !
    52 
   158 
    53 !ProjectBuilderAssistantApplication class methodsFor:'interface specs'!
   159 !ProjectBuilderAssistantApplication class methodsFor:'interface specs'!
    54 
   160 
    55 page1_projectTypeSelectionSpec
   161 page1_projectTypeSelectionSpec
   139                  )
   245                  )
   140                
   246                
   141               )
   247               )
   142             )
   248             )
   143            (FramedBoxSpec
   249            (FramedBoxSpec
   144               label: 'Existing Projects'
   250               label: 'Existing Projects (PackageID''s)'
   145               name: 'FramedBox2'
   251               name: 'FramedBox2'
   146               layout: (LayoutFrame 0 0.0 123 0 4 1.0 0 1)
   252               layout: (LayoutFrame 0 0.0 123 0 4 1.0 0 1)
   147               labelPosition: topLeft
   253               labelPosition: topLeft
   148               translateLabel: true
   254               translateLabel: true
   149               component: 
   255               component: 
   219         )
   325         )
   220         component: 
   326         component: 
   221        (SpecCollection
   327        (SpecCollection
   222           collection: (
   328           collection: (
   223            (FramedBoxSpec
   329            (FramedBoxSpec
   224               label: 'New Project'
   330               label: 'New PackageID'
   225               name: 'FramedBox3'
   331               name: 'FramedBox3'
   226               layout: (LayoutFrame 0 0.0 5 0 4 1.0 72 0)
   332               layout: (LayoutFrame 0 0.0 5 0 4 1.0 72 0)
   227               labelPosition: topLeft
   333               labelPosition: topLeft
   228               translateLabel: true
   334               translateLabel: true
   229               component: 
   335               component: 
   233                     label: 'Create'
   339                     label: 'Create'
   234                     name: 'Button1'
   340                     name: 'Button1'
   235                     layout: (LayoutFrame -100 1 6 0 2 1 28 0)
   341                     layout: (LayoutFrame -100 1 6 0 2 1 28 0)
   236                     translateLabel: true
   342                     translateLabel: true
   237                     model: createNewProject
   343                     model: createNewProject
       
   344               activeHelpKey: createNewProject
   238                   )
   345                   )
   239                  (ExtendedComboBoxSpec
   346                  (ExtendedComboBoxSpec
   240                     name: 'NewProjectsNameListExtendedComboBox'
   347                     name: 'NewProjectsNameListExtendedComboBox'
   241                     layout: (LayoutFrame 1 0 6 0 -113 1 28 0)
   348                     layout: (LayoutFrame 1 0 6 0 -113 1 28 0)
   242                     model: newProjectsName
   349                     model: newProjectsName
   243                     readOnly: false
   350                     readOnly: false
   244                     miniScrollerHorizontal: true
   351                     miniScrollerHorizontal: true
   245                     postBuildCallback: postBuildNewProjectsNameListExtendedComboBox:
   352                     postBuildCallback: postBuildNewProjectsNameListExtendedComboBox:
       
   353               activeHelpKey: newProjectsName
   246                   )
   354                   )
   247                  )
   355                  )
   248                
   356                
   249               )
   357               )
   250             )
   358             )
   251            (FramedBoxSpec
   359            (FramedBoxSpec
   252               label: 'Existing Projects'
   360               label: 'Existing PackageID''s with Project Definition'
   253               name: 'FramedBox4'
   361               name: 'FramedBox4'
   254               layout: (LayoutFrame 0 0.0 70 0 4 1.0 -30 1)
   362               layout: (LayoutFrame 0 0.0 70 0 4 1.0 -30 1)
   255               labelPosition: topLeft
   363               labelPosition: topLeft
   256               translateLabel: true
   364               translateLabel: true
   257               component: 
   365               component: 
   975               hasVerticalScrollBar: true
  1083               hasVerticalScrollBar: true
   976               miniScrollerHorizontal: true
  1084               miniScrollerHorizontal: true
   977               miniScrollerVertical: false
  1085               miniScrollerVertical: false
   978               useIndex: false
  1086               useIndex: false
   979               sequenceList: listOfNewProjectsName
  1087               sequenceList: listOfNewProjectsName
       
  1088               activeHelpKey: listOfNewProjectsName
   980             )
  1089             )
   981            )
  1090            )
   982          
  1091          
   983         )
  1092         )
   984       )
  1093       )
  1817 ! !
  1926 ! !
  1818 
  1927 
  1819 !ProjectBuilderAssistantApplication methodsFor:'specs'!
  1928 !ProjectBuilderAssistantApplication methodsFor:'specs'!
  1820 
  1929 
  1821 assistantSpec
  1930 assistantSpec
  1822     ^ #(Array
  1931     ^ self class assistantSpec
  1823         ( AssistantPageSpec
       
  1824             pageTitle: 'Project Type Selection'
       
  1825             windowSpecSelector: page1_projectTypeSelectionSpec
       
  1826             enterCallbackSelector: updateListOfMatchingProjects
       
  1827             infoText: 'Choose the type of project you are about to build.'
       
  1828         )
       
  1829 
       
  1830         (AssistantPageSpec
       
  1831             pageTitle: 'Project Selection'
       
  1832             windowSpecSelector: page2_projectSelectionSpec
       
  1833             enterCallbackSelector: updateListOfMatchingProjects
       
  1834             infoText: 'Choose an existing project or create a new one.
       
  1835                        These are subclasses of <I>ProjectDefinition</I> and define the
       
  1836                        type and contents of a project.'
       
  1837         )
       
  1838 
       
  1839         (AssistantPageSpec
       
  1840             pageTitle: 'Startup Application Selection'
       
  1841             windowSpecSelector: page3_applicationSelectionSpec
       
  1842             isEnabledQuerySelector: #projectTypeIsGuiApplication
       
  1843             canEnterQuerySelector: #canEnterApplicationSelection
       
  1844             enterCallbackSelector: updateListOfApplicationsInProject
       
  1845             infoText: 'Choose an existing application or create a new one.
       
  1846                        These are subclasses of <I>ApplicationModel</I> and define
       
  1847                        the GUI and control flow inside the application.
       
  1848                        Can also be left blank if the startup class does it all (stx build).'
       
  1849         )
       
  1850 
       
  1851         (AssistantPageSpec
       
  1852             pageTitle: 'Startup Class Selection'
       
  1853             windowSpecSelector: page4_startupClassSelectionSpec
       
  1854             isEnabledQuerySelector: #projectTypeIsNotLibrary
       
  1855             canEnterQuerySelector: #canEnterStartupClassSelection
       
  1856             enterCallbackSelector: updateListOfStartupClassesInProject
       
  1857             infoText: 'Choose an existing startup-class or create a new one.
       
  1858                        These are subclasses of <I>StandaloneStartup</I> and 
       
  1859                        start the application. Command line arguments can be
       
  1860                        interpreted there.'
       
  1861         )
       
  1862 
       
  1863         (AssistantPageSpec
       
  1864             pageTitle: 'Specify Contents'
       
  1865             windowSpecSelector: page5_specifyIncludedClasses
       
  1866             enterCallbackSelector: enterContentsSpecification
       
  1867             canEnterQuerySelector: #canEnterContentsSelection
       
  1868             infoText: 'Define which (other) classes are to be included.
       
  1869                        Press "<I>Scan</I>" to include all classes of the package;
       
  1870                        browse to edit the contents manually.'
       
  1871         )
       
  1872 
       
  1873         (AssistantPageSpec
       
  1874             pageTitle: 'Specify Build Directory'
       
  1875             windowSpecSelector: page6_specifyBuildDirectorySpec
       
  1876             infoText: 'Define where the build-process is to be performed.
       
  1877                        All generated files are created below that directory.
       
  1878                        After deployment, the build directory is no longer needed
       
  1879                        (but you can keep it for a faster compile the next time).'
       
  1880         )
       
  1881 
       
  1882         (AssistantPageSpec
       
  1883             pageTitle: 'Build'
       
  1884             windowSpecSelector: page7_buildSpec
       
  1885             canEnterQuerySelector: #canEnterBuild
       
  1886             enterCallbackSelector: #restoreMakeOutputsContents
       
  1887             leaveCallbackSelector: #rememberMakeOutputsContents
       
  1888             infoText: 'Start the build-process. This will run make/bcc to compile
       
  1889                        all required classes and nsis to generate a self-installable
       
  1890                        executable. You must have the borland-cc and NullSoft NSIS
       
  1891                        packages installed for this to work.'
       
  1892         )
       
  1893 
       
  1894         (AssistantPageSpec
       
  1895             pageTitle: 'Deploy'
       
  1896             windowSpecSelector: page8_deploySpec
       
  1897             canEnterQuerySelector: #canEnterDeploy
       
  1898             infoText: 'Find the installer to be deployed (or test-run the binary).
       
  1899                        You can open a WindowsExplorer there to copy the files for
       
  1900                        deployment. After that, the build directory is no longer needed
       
  1901                        (but you can keep it for a faster compile the next time).'
       
  1902         )
       
  1903     ) decodeAsLiteralArray.
       
  1904 ! !
  1932 ! !
  1905 
  1933 
  1906 !ProjectBuilderAssistantApplication methodsFor:'update'!
  1934 !ProjectBuilderAssistantApplication methodsFor:'update'!
  1907 
  1935 
  1908 enterContentsSpecification
  1936 enterContentsSpecification