Tools__ProjectBuilderAssistantApplication.st
author Patrik Svestka <patrik.svestka@gmail.com>
Wed, 14 Nov 2018 12:07:51 +0100
branchjv
changeset 3630 5e718e0a754e
parent 3342 1d1d2904c353
child 3429 bda211bf56ec
permissions -rw-r--r--
Issue #239: Fix all Smalltak/X source files to be in unicode (UTF8 without BOM) and prefixed by "{ Encoding: utf8 }" when any unicode character is present

- All source *.st files are now Unicode UTF8 without BOM
Files are in two groups (fileOut works this way in Smalltalk/X):
- containing a unicode character have "{ Encoding: utf8 }" at the header
- ASCII only are without the header
     1 "
     2  COPYRIGHT (c) 2009 by eXept Software AG
     3               All Rights Reserved
     4 
     5  This software is furnished under a license and may be used
     6  only in accordance with the terms of that license and with the
     7  inclusion of the above copyright notice.   This software may not
     8  be provided or otherwise made available to, or used by, any
     9  other person.  No title to or ownership of the software is
    10  hereby transferred.
    11 "
    12 "{ Package: 'stx:libtool2' }"
    13 
    14 "{ NameSpace: Tools }"
    15 
    16 AssistantApplication subclass:#ProjectBuilderAssistantApplication
    17 	instanceVariableNames:'packageToBuildHolder projectType projectTypeHolder
    18 		selectedProjectIndexHolder selectedProjectDefinition
    19 		listOfMatchingProjects listOfMatchingPackageIds
    20 		selectedProjectsComment hasProjectSelectedHolder newProjectsName
    21 		hideSTXProjects hideOtherApplicationClasses
    22 		hideOtherStartupClasses startMakeButtonEnabled
    23 		stopMakeButtonVisible makeOutputHolder newApplicationsName
    24 		listOfApplicationsInProject selectedApplicationIndexHolder
    25 		selectedApplication hasApplicationSelectedHolder
    26 		listOfStartupClassesInProject selectedStartupClassIndexHolder
    27 		selectedStartupClass hasStartupClassSelectedHolder
    28 		selectedApplicationsComment buildDirectoryHolder makeProcess
    29 		listOfClassesInProject makeOutputWindow projectBuilder
    30 		newStartupClassName usedCompilerHolder listOfNewProjectsName
    31 		newProjectsNameListExtendedComboBox productNameHolder
    32 		companyNameHolder compilerWarnMessageHolder
    33 		compilerWarnMessageVisibleHolder listOfPrerequisitesInProject
    34 		nameOfUsedCompilerSuiteHolder usedCompilerIndexHolder'
    35 	classVariableNames:'LastUsedCompiler Debugging'
    36 	poolDictionaries:''
    37 	category:'System-Support-Projects'
    38 !
    39 
    40 !ProjectBuilderAssistantApplication class methodsFor:'documentation'!
    41 
    42 copyright
    43 "
    44  COPYRIGHT (c) 2009 by eXept Software AG
    45               All Rights Reserved
    46 
    47  This software is furnished under a license and may be used
    48  only in accordance with the terms of that license and with the
    49  inclusion of the above copyright notice.   This software may not
    50  be provided or otherwise made available to, or used by, any
    51  other person.  No title to or ownership of the software is
    52  hereby transferred.
    53 "
    54 !
    55 
    56 documentation
    57 "
    58     a user friendly interface to the build process.
    59     Simply wraps up existing tools like the CodeGeneratorTool, the browsers
    60     and the ProjetBuilder
    61 
    62     [see also:]
    63         CodeGeneratorTool
    64         ProjectBuilder
    65         ProjectDefinition
    66 
    67     [author:]
    68         Claus Gittinger
    69 "
    70 !
    71 
    72 help
    73 "
    74   Packager - A Standalone-Executable Builder and Packager
    75 
    76     This assistant-application allows for standalone applications to be built very easily.
    77     It will generate all required classes, files, start the compilation process,
    78     generate a self-installable executable with a few mouse clicks.
    79 
    80     A simple demo application like the famous 'Hello World' can be generated in a few minutes.
    81 
    82   Prerequisites
    83 
    84     * Windows Users:
    85     Please install either the 'Borland Free Commandline Compiler Tools (bcc32)'
    86     or the 'Microsoft Visual-C++' package (also free).
    87      In addition, the 'NullSoft NSIS-Installer Package' is required.
    88 
    89     Due to limitations and bugs in the Visual-C++ compiler (limit on the size of
    90     string-constants), some Smalltalk code is still not compilable
    91     (currently, this affects classes which contain image-resource methods for big images).
    92     Although microsoft is doing their best (a relative measure) to make things better
    93     (they increase the string-limit with every new release), they still seem to be unable
    94     to figure out how ti use malloc for string-data).
    95     We are patiently waiting for a real fix and still using bcc in the meanwhile.
    96     Therefore, we recommend using the borland compiler suite.
    97     Please install it at its standard location ('C:\Borland') as our makefiles might
    98     still contain hard-coded paths (yes, we are ashamed about this).
    99 
   100     * Unix Users:
   101     You should already have the gcc compile suite (including all required header files)
   102     installed and ready to use. For a lack of time on our side, there is currently no
   103     self-installer support for Unix. The packager will generate a zipped tar file,
   104     which must be deployed and unpacked for use. This may change in the near future.
   105 
   106   Packages, Projects, PackageIDs and ProjectDefinitions
   107 
   108     Smalltalk basically uses two objects for packaging:
   109 
   110         * PackageIDs (also called ProjectID's occasionally)
   111         * ProjectDefinitions
   112 
   113     Older ST/X versions used instances of a Project class - this is now obsolete and
   114     removed from the system (although there are still some minor uses of it,
   115     which might remain there for backward compatibility for some time, as some customers
   116     have built their own packaging scheme around it).
   117 
   118   PackageIDs
   119 
   120     These are simple symbols and are attached to classes and methods. If a method has
   121     a packageID different from its class, it is called an extension method.
   122     PackageIDs must have a certain fixed format: they always contain exactly two parts,
   123     which are separated by a colon character: the module and the directory part.
   124     The module is used as main-selector on where and how the source code repository is
   125     accessed. The directory is a path below that repository. If checked out into the local
   126     filesystem, the module defines the top-level directory. Thus, if a packageID is
   127     'stx:libbasic', the corresponding sources will be found in the repository associated
   128     to the 'stx' module, under the directory 'libbasic'.
   129     In the local file system, it will be found under 'stx/libbasic'.
   130     As another example, if the packageID is 'exept:expecco/plugins/foo',
   131     the repository is whichever is associated with the 'exept' module, and the subdirectory
   132     is 'expecco/plugins/foo'. The local path to the sourcefiles would be
   133     'exept/expecco/plugins/foo'.
   134 
   135     Please notice that it does make sense to associate different repositories to different
   136     modules: for example, you could setup the sourceCodeManager to use CVS access to the
   137     exept repository for everything under the 'stx' module,
   138     and at the same time, use a local SVN repository for everything under the 'myCompany'
   139     module.
   140 
   141   ProjectDefinitions
   142 
   143     These describe the contents of a project, such as the classes to include,
   144     the set of extension methods, any additional compilation information.
   145     ProjectDefinitions come in 3 flavours:
   146 
   147         * GUI Application Definition
   148         * non-GUI Application Definition
   149         * ClassLibrary Definition
   150 
   151     ProjectDefinitions are stored and managed as class-instances, located as subclasses
   152     of one of ApplicationDefinition or LibraryDefinition.
   153     As classes, they are themself managed, compiled and packaged as part of the project
   154     (and also have the same PackageID as their components).
   155     They are also treated like any other class w.r.t. source code management.
   156 
   157   Packaging
   158 
   159     All classes and extension methods belonging to a single package are supposed to be
   160     loaded (and possibly unloaded) together. They are also usually deployed inside a single
   161     dynamic link library ('dll', for short). In the Unix world, these are called
   162     'shared object' or 'so'.
   163     Finally, they are stored in a common directory both on the local file system and in a
   164     source code repository (CVS, SVN, etc.).
   165 
   166   Structure of a Project
   167 
   168     The artefacts as manipulated by the packager are:
   169 
   170         * the ProjectDefinition class
   171           This defines the type of application (GUI / non-GUI),
   172           its contents (i.e. the set of classes to be included in the binary itself and
   173           the set of library-dll's to be included in the deployed package),
   174           and some other metadata, such as icon, title etc.
   175 
   176         * the ApplicationModel class
   177           This defines the GUI, and is typically created using the UI-Painter.
   178 
   179         * the Startup class
   180           This is the first class which gets control when the executable is started;
   181           it can analyze the command line arguments, read patches or updates,
   182           start background ptocesses, and will eventually open the applications GUI.
   183 
   184   Build Procedure
   185 
   186     All of the three components above can be generated by the packager to provide an
   187     initial framework for further work.
   188 
   189     After the definition of those classes, all required files are stored in a temporary
   190     build directory. This means that the above classes are filed out,
   191     and make- and other support files are generated.
   192 
   193     Finally, the actual build process is started. This requires an external C-compiler.
   194     Under windows, both Borland-C (free download available via the internet) and Microsoft's
   195     Visual-C++ (also available for free) can be used (the later with some limitations as explained above).
   196 
   197     A self-installing executable is built using the NullSoft NSIS package.
   198     This is also required to be installed before the packager is started.
   199 
   200     After the build, all required files are packaged in a single install-file.
   201     This is called 'MyApplicationSetup.exe' and found in the project-specific subdirectory
   202     of the build directory. For deployment, this single file has to be delivered to a customer
   203     and executed there.
   204 
   205     Summary: It has NEVER been easier to create a GUI application with Smalltalk.
   206 "
   207 ! !
   208 
   209 !ProjectBuilderAssistantApplication class methodsFor:'defaults'!
   210 
   211 defaultIcon
   212     <resource: #programImage>
   213 
   214     ^ ToolbarIconLibrary projectBuilderIcon
   215 !
   216 
   217 windowLabelTemplate
   218     ^ 'ST/X Packager: %1'
   219 ! !
   220 
   221 !ProjectBuilderAssistantApplication class methodsFor:'help'!
   222 
   223 flyByHelpSpec
   224     <resource: #help>
   225 
   226     ^ super flyByHelpSpec addPairsFrom:#(
   227 
   228 #'projectType'
   229 'Choose the type of Project you are about to deploy'
   230 
   231 #existingProjects
   232 'Projects with an existing ProjectDefinition of the chosen type (above)'
   233 
   234 #nameOfApplicationClass
   235 'For GUI applications: the name of your application class (subclass of ApplicationModel).
   236 This will be opened by the startup sequence and defines the UI.
   237 (Usually, these are named "XXXApplication" or "XXXApp")
   238 Click on the "Create"-button to create a simple helloWorld app to start with'
   239 
   240 #createNewApplication
   241 'Create a new simple dummy application (HelloWorld-like). 
   242 Press this button to get some template code to play with - but enter a name first'
   243 
   244 #nameOfStartupClass
   245 'This class contains the main method, in which the show starts when the executable runs.
   246 Its main task is to parse command line arguments (if any) and fire up the real application.
   247 It should inherit from StandaloneStartup.
   248 (Usually, these are named "XXXStart" or "XXXStartup")
   249 Click on the "Create"-button to create something to start with (will launch your application)'
   250 
   251 #createNewStartupClass
   252 'Create a new simple startup class which fires up the defined application.
   253 Press this button to get a standard startup class which does not care for command line args.
   254 But enter a name first'
   255 
   256 #browseSelectedProject
   257 'Open a SystemBrowser on the selected Project'
   258 
   259 #hideSTXBasePackages
   260 'Only show packages which are not already included in the basic ST/X delivery'
   261 
   262 #'listOfNewProjectsName'
   263 'PackageID (module:directory).
   264 The pull-down list contains packageIDs for which no ProjectDefinition exists (yet)'
   265 
   266 #'createNewProject'
   267 'PackageID (module:directory).
   268 Click to create a new (empty) ProjectDefinition for the given PackageID'
   269 
   270 #clearBuildDirectory
   271 'Clear the build directory'
   272 
   273 #makeAll
   274 'Build a self-installing deployable package'
   275 
   276 #makeApp
   277 'Build the app only (for test-running)'
   278 
   279 #makeExe
   280 'Build the executable only (for test-running)'
   281 
   282 #makeExeQuick
   283 'Quick build the executable only (for test-running). 
   284 Does not regenerate the header files. Only the target package files are recreated'
   285 
   286 #makeOutput
   287 'Displays the output of the build process (make command)'
   288 
   289 #openExplorer
   290 'Open a Windows Explorer on the build directory. You can double-click on the built executable there'
   291 
   292 #openFinder
   293 'Open a Finder on the build directory. You can double-click on the built executable there'
   294 
   295 #openFileBrowser
   296 'Open a Filebrowser on the build directory'
   297 
   298 #openTerminal
   299 'Open a terminal (console) in the build directory'
   300 
   301 #stopMake
   302 'Abort the ongoing build process. Please clear the build directory afterwards to remove any leftover garbage'
   303 
   304 #hideOtherStartupClasses
   305 'Hide startup classes from other packages. Uncheck to see them.\(Notice: the startup class really should be in the same package)'
   306 
   307 )
   308 
   309     "Modified: / 06-09-2012 / 16:09:10 / cg"
   310 ! !
   311 
   312 !ProjectBuilderAssistantApplication class methodsFor:'help specs'!
   313 
   314 helpSpec
   315     "This resource specification was automatically generated
   316      by the UIHelpTool of ST/X."
   317 
   318     "Do not manually edit this!! If it is corrupted,
   319      the UIHelpTool may not be able to read the specification."
   320 
   321     "
   322      UIHelpTool openOnClass:Tools::ProjectBuilderAssistantApplication
   323     "
   324 
   325     <resource: #help>
   326 
   327     ^ super helpSpec addPairsFrom:#(
   328 
   329 #companyName
   330 ''
   331 
   332 #hideOtherStartupClasses
   333 ''
   334 
   335 #productName
   336 ''
   337 
   338 #programName
   339 ''
   340 
   341 )
   342 ! !
   343 
   344 !ProjectBuilderAssistantApplication class methodsFor:'interface specs'!
   345 
   346 page1_projectTypeSelectionSpec
   347     "This resource specification was automatically generated
   348      by the UIPainter of ST/X."
   349 
   350     "Do not manually edit this!! If it is corrupted,
   351      the UIPainter may not be able to read the specification."
   352 
   353     "
   354      UIPainter new openOnClass:Tools::ProjectBuilderAssistantApplication andSelector:#page1_projectTypeSelectionSpec
   355      Tools::ProjectBuilderAssistantApplication new openInterface:#page1_projectTypeSelectionSpec
   356     "
   357 
   358     <resource: #canvas>
   359 
   360     ^ 
   361      #(FullSpec
   362         name: #'page1_projectTypeSelectionSpec'
   363         window: 
   364        (WindowSpec
   365           label: 'Project Selection'
   366           name: 'Project Selection'
   367           min: (Point 0 0)
   368           bounds: (Rectangle 0 0 626 394)
   369         )
   370         component: 
   371        (SpecCollection
   372           collection: (
   373            (FramedBoxSpec
   374               label: 'Project Type'
   375               name: 'FramedBox1'
   376               layout: (LayoutFrame 0 0.0 0 0 4 1.0 120 0)
   377               activeHelpKey: projectType
   378               labelPosition: topLeft
   379               translateLabel: true
   380               component: 
   381              (SpecCollection
   382                 collection: (
   383                  (VerticalPanelViewSpec
   384                     name: 'VerticalPanel1'
   385                     layout: (LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0)
   386                     horizontalLayout: leftSpace
   387                     verticalLayout: topSpace
   388                     horizontalSpace: 3
   389                     verticalSpace: 3
   390                     component: 
   391                    (SpecCollection
   392                       collection: (
   393                        (ViewSpec
   394                           name: 'Box1'
   395                           extent: (Point 10 10)
   396                         )
   397                        (RadioButtonSpec
   398                           label: 'GUI Application'
   399                           name: 'RadioButton1'
   400                           translateLabel: true
   401                           model: projectTypeHolder
   402                           isTriggerOnDown: true
   403                           onCallBackSelector: projectTypeChanged
   404                           select: #'GUI-Application'
   405                           extent: (Point 294 22)
   406                         )
   407                        (RadioButtonSpec
   408                           label: 'Non-GUI Application'
   409                           name: 'RadioButton2'
   410                           translateLabel: true
   411                           model: projectTypeHolder
   412                           isTriggerOnDown: true
   413                           onCallBackSelector: projectTypeChanged
   414                           select: #'NonGUI-Application'
   415                           extent: (Point 294 22)
   416                         )
   417                        (RadioButtonSpec
   418                           label: 'Class Library'
   419                           name: 'RadioButton3'
   420                           translateLabel: true
   421                           model: projectTypeHolder
   422                           isTriggerOnDown: true
   423                           onCallBackSelector: projectTypeChanged
   424                           select: Library
   425                           extent: (Point 294 22)
   426                         )
   427                        )
   428                      
   429                     )
   430                   )
   431                  )
   432                
   433               )
   434             )
   435            (FramedBoxSpec
   436               label: 'Existing Projects of this Type (PackageIDs)'
   437               name: 'FramedBox2'
   438               layout: (LayoutFrame 0 0.0 123 0 4 1.0 0 1)
   439               activeHelpKey: existingProjects
   440               labelPosition: topLeft
   441               translateLabel: true
   442               component: 
   443              (SpecCollection
   444                 collection: (
   445                  (VariableHorizontalPanelSpec
   446                     name: 'VariableHorizontalPanel1'
   447                     layout: (LayoutFrame 0 0 4 0 0 1 -26 1)
   448                     component: 
   449                    (SpecCollection
   450                       collection: (
   451                        (SequenceViewSpec
   452                           name: 'List1'
   453                           model: selectedProjectIndexHolder
   454                           hasHorizontalScrollBar: true
   455                           hasVerticalScrollBar: true
   456                           useIndex: true
   457                           sequenceList: listOfMatchingPackageIds
   458                         )
   459                        (TextEditorSpec
   460                           name: 'TextEditor1'
   461                           model: selectedProjectsComment
   462                           hasHorizontalScrollBar: true
   463                           hasVerticalScrollBar: true
   464                           isReadOnly: true
   465                           hasKeyboardFocusInitially: false
   466                         )
   467                        )
   468                      
   469                     )
   470                     handles: (Any 0.34560327198364 1.0)
   471                   )
   472                  (CheckBoxSpec
   473                     label: 'Hide ST/X Base Packages'
   474                     name: 'CheckBox1'
   475                     layout: (LayoutFrame -1 0 -18 1 0 1 4 1)
   476                     activeHelpKey: hideSTXBasePackages
   477                     model: hideSTXProjects
   478                     translateLabel: true
   479                   )
   480                  )
   481                
   482               )
   483             )
   484            )
   485          
   486         )
   487       )
   488 !
   489 
   490 page2_projectSelectionSpec
   491     "This resource specification was automatically generated
   492      by the UIPainter of ST/X."
   493 
   494     "Do not manually edit this!! If it is corrupted,
   495      the UIPainter may not be able to read the specification."
   496 
   497     "
   498      UIPainter new openOnClass:Tools::ProjectBuilderAssistantApplication andSelector:#page2_projectSelectionSpec
   499      Tools::ProjectBuilderAssistantApplication new openInterface:#page2_projectSelectionSpec
   500     "
   501 
   502     <resource: #canvas>
   503 
   504     ^ 
   505     #(FullSpec
   506        name: #'page2_projectSelectionSpec'
   507        window: 
   508       (WindowSpec
   509          label: 'Project Selection'
   510          name: 'Project Selection'
   511          min: (Point 0 0)
   512          bounds: (Rectangle 0 0 521 453)
   513        )
   514        component: 
   515       (SpecCollection
   516          collection: (
   517           (FramedBoxSpec
   518              label: 'New Project''s PackageID'
   519              name: 'FramedBox3'
   520              layout: (LayoutFrame 0 0.0 5 0 4 1.0 72 0)
   521              labelPosition: topLeft
   522              translateLabel: true
   523              component: 
   524             (SpecCollection
   525                collection: (
   526                 (ExtendedComboBoxSpec
   527                    name: 'NewProjectsNameListExtendedComboBox'
   528                    layout: (LayoutFrame 1 0 6 0 -113 1 34 0)
   529                    activeHelpKey: listOfNewProjectsName
   530                    model: newProjectsName
   531                    readOnly: false
   532                    miniScrollerHorizontal: true
   533                    postBuildCallback: postBuildNewProjectsNameListExtendedComboBox:
   534                  )
   535                 (ActionButtonSpec
   536                    label: 'Create'
   537                    name: 'Button1'
   538                    layout: (LayoutFrame -100 1 6 0 2 1 34 0)
   539                    activeHelpKey: createNewProject
   540                    translateLabel: true
   541                    model: createNewProject
   542                  )
   543                 )
   544               
   545              )
   546            )
   547           (FramedBoxSpec
   548              label: 'Existing Projects with ProjectDefinition'
   549              name: 'FramedBox4'
   550              layout: (LayoutFrame 0 0.0 70 0 4 1.0 -34 1)
   551              labelPosition: topLeft
   552              translateLabel: true
   553              component: 
   554             (SpecCollection
   555                collection: (
   556                 (VariableHorizontalPanelSpec
   557                    name: 'VariableHorizontalPanel2'
   558                    layout: (LayoutFrame 0 0 4 0 0 1 -26 1)
   559                    component: 
   560                   (SpecCollection
   561                      collection: (
   562                       (SequenceViewSpec
   563                          name: 'List2'
   564                          model: selectedProjectIndexHolder
   565                          hasHorizontalScrollBar: true
   566                          hasVerticalScrollBar: true
   567                          useIndex: true
   568                          sequenceList: listOfMatchingPackageIds
   569                        )
   570                       (TextEditorSpec
   571                          name: 'TextEditor2'
   572                          model: selectedProjectsComment
   573                          hasHorizontalScrollBar: true
   574                          hasVerticalScrollBar: true
   575                          isReadOnly: true
   576                          hasKeyboardFocusInitially: false
   577                          viewClassName: 'TextView'
   578                        )
   579                       )
   580                     
   581                    )
   582                    handles: (Any 0.35000000000000003 1.0)
   583                  )
   584                 (CheckBoxSpec
   585                    label: 'Hide ST/X Base Packages'
   586                    name: 'CheckBox1'
   587                    layout: (LayoutFrame -1 0 -17 1 0 1 5 1)
   588                    activeHelpKey: hideSTXBasePackages
   589                    model: hideSTXProjects
   590                    translateLabel: true
   591                  )
   592                 )
   593               
   594              )
   595            )
   596           (HorizontalPanelViewSpec
   597              name: 'HorizontalPanel1'
   598              layout: (LayoutFrame 0 0 -34 1 0 1 0 1)
   599              horizontalLayout: leftSpace
   600              verticalLayout: center
   601              horizontalSpace: 3
   602              verticalSpace: 3
   603              component: 
   604             (SpecCollection
   605                collection: (
   606                 (ActionButtonSpec
   607                    label: 'Browse Selected Project'
   608                    name: 'Button3'
   609                    activeHelpKey: browseSelectedProject
   610                    translateLabel: true
   611                    model: doBrowseProject
   612                    enableChannel: hasProjectSelectedHolder
   613                    useDefaultExtent: true
   614                  )
   615                 )
   616               
   617              )
   618            )
   619           )
   620         
   621        )
   622      )
   623 !
   624 
   625 page3_applicationSelectionSpec
   626     "This resource specification was automatically generated
   627      by the UIPainter of ST/X."
   628 
   629     "Do not manually edit this!! If it is corrupted,
   630      the UIPainter may not be able to read the specification."
   631 
   632     "
   633      UIPainter new openOnClass:Tools::ProjectBuilderAssistantApplication andSelector:#page3_applicationSelectionSpec
   634      Tools::ProjectBuilderAssistantApplication new openInterface:#page3_applicationSelectionSpec
   635     "
   636 
   637     <resource: #canvas>
   638 
   639     ^ 
   640     #(FullSpec
   641        name: #'page3_applicationSelectionSpec'
   642        window: 
   643       (WindowSpec
   644          label: 'Application Selection'
   645          name: 'Application Selection'
   646          min: (Point 0 0)
   647          bounds: (Rectangle 0 0 519 406)
   648        )
   649        component: 
   650       (SpecCollection
   651          collection: (
   652           (FramedBoxSpec
   653              label: 'New Application Class'
   654              name: 'FramedBox3'
   655              layout: (LayoutFrame 0 0.0 5 0 4 1.0 70 0)
   656              labelPosition: topLeft
   657              translateLabel: true
   658              component: 
   659             (SpecCollection
   660                collection: (
   661                 (InputFieldSpec
   662                    name: 'EntryField1'
   663                    layout: (LayoutFrame 1 0 6 0 -113 1 34 0)
   664                    activeHelpKey: nameOfApplicationClass
   665                    model: newApplicationsName
   666                    acceptOnReturn: true
   667                    acceptOnTab: true
   668                    acceptOnLostFocus: true
   669                    acceptOnPointerLeave: true
   670                    emptyFieldReplacementText: 'MyApplication'
   671                  )
   672                 (ActionButtonSpec
   673                    label: 'Create'
   674                    name: 'Button1'
   675                    layout: (LayoutFrame -100 1 6 0 1 1 34 0)
   676                    activeHelpKey: createNewApplication
   677                    translateLabel: true
   678                    model: createNewApplication
   679                  )
   680                 )
   681               
   682              )
   683            )
   684           (FramedBoxSpec
   685              label: 'Existing Applications'
   686              name: 'FramedBox4'
   687              layout: (LayoutFrame 0 0.0 72 0 4 1.0 -34 1)
   688              labelPosition: topLeft
   689              translateLabel: true
   690              component: 
   691             (SpecCollection
   692                collection: (
   693                 (VariableHorizontalPanelSpec
   694                    name: 'VariableHorizontalPanel2'
   695                    layout: (LayoutFrame 0 0 4 0 0 1 -26 1)
   696                    component: 
   697                   (SpecCollection
   698                      collection: (
   699                       (SequenceViewSpec
   700                          name: 'List2'
   701                          model: selectedApplicationIndexHolder
   702                          hasHorizontalScrollBar: true
   703                          hasVerticalScrollBar: true
   704                          useIndex: true
   705                          sequenceList: listOfApplicationsInProject
   706                          ignoreReselect: false
   707                        )
   708                       (TextEditorSpec
   709                          name: 'TextEditor2'
   710                          model: selectedApplicationsComment
   711                          hasHorizontalScrollBar: true
   712                          hasVerticalScrollBar: true
   713                          isReadOnly: true
   714                          hasKeyboardFocusInitially: false
   715                          viewClassName: 'TextView'
   716                        )
   717                       )
   718                     
   719                    )
   720                    handles: (Any 0.35000000000000003 1.0)
   721                  )
   722                 (CheckBoxSpec
   723                    label: 'Hide other Application Classes'
   724                    name: 'CheckBox1'
   725                    layout: (LayoutFrame -1 0 -18 1 0 1 4 1)
   726                    model: hideOtherApplicationClasses
   727                    translateLabel: true
   728                  )
   729                 )
   730               
   731              )
   732            )
   733           (HorizontalPanelViewSpec
   734              name: 'HorizontalPanel1'
   735              layout: (LayoutFrame 0 0 -34 1 0 1 0 1)
   736              horizontalLayout: leftSpace
   737              verticalLayout: center
   738              horizontalSpace: 3
   739              verticalSpace: 3
   740              component: 
   741             (SpecCollection
   742                collection: (
   743                 (ActionButtonSpec
   744                    label: 'Browse Selected App'
   745                    name: 'Button3'
   746                    translateLabel: true
   747                    model: doBrowseApplication
   748                    enableChannel: hasApplicationSelectedHolder
   749                    useDefaultExtent: true
   750                  )
   751                 (ActionButtonSpec
   752                    label: 'Launch Selected App'
   753                    name: 'Button4'
   754                    translateLabel: true
   755                    model: doLaunchApplication
   756                    enableChannel: hasApplicationSelectedHolder
   757                    useDefaultExtent: true
   758                  )
   759                 )
   760               
   761              )
   762            )
   763           )
   764         
   765        )
   766      )
   767 !
   768 
   769 page4_startupClassSelectionSpec
   770     "This resource specification was automatically generated
   771      by the UIPainter of ST/X."
   772 
   773     "Do not manually edit this!! If it is corrupted,
   774      the UIPainter may not be able to read the specification."
   775 
   776     "
   777      UIPainter new openOnClass:Tools::ProjectBuilderAssistantApplication andSelector:#page4_startupClassSelectionSpec
   778      Tools::ProjectBuilderAssistantApplication new openInterface:#page4_startupClassSelectionSpec
   779     "
   780 
   781     <resource: #canvas>
   782 
   783     ^ 
   784     #(FullSpec
   785        name: #'page4_startupClassSelectionSpec'
   786        window: 
   787       (WindowSpec
   788          label: 'Startup Class Selection'
   789          name: 'Startup Class Selection'
   790          min: (Point 0 0)
   791          bounds: (Rectangle 0 0 521 408)
   792        )
   793        component: 
   794       (SpecCollection
   795          collection: (
   796           (FramedBoxSpec
   797              label: 'New Startup Class'
   798              name: 'FramedBox3'
   799              layout: (LayoutFrame 0 0.0 5 0 4 1.0 70 0)
   800              labelPosition: topLeft
   801              translateLabel: true
   802              component: 
   803             (SpecCollection
   804                collection: (
   805                 (InputFieldSpec
   806                    name: 'EntryField1'
   807                    layout: (LayoutFrame 1 0 6 0 -113 1 34 0)
   808                    activeHelpKey: nameOfStartupClass
   809                    model: newStartupClassName
   810                    acceptOnReturn: true
   811                    acceptOnTab: true
   812                    acceptOnLostFocus: true
   813                    acceptOnPointerLeave: true
   814                    emptyFieldReplacementText: 'MyStandAloneStartup'
   815                  )
   816                 (ActionButtonSpec
   817                    label: 'Create'
   818                    name: 'Button1'
   819                    layout: (LayoutFrame -100 1 6 0 1 1 34 0)
   820                    activeHelpKey: createNewStartupClass
   821                    translateLabel: true
   822                    model: createNewStartupClass
   823                  )
   824                 )
   825               
   826              )
   827            )
   828           (FramedBoxSpec
   829              label: 'Existing Startup Classes'
   830              name: 'FramedBox4'
   831              layout: (LayoutFrame 0 0.0 72 0 4 1.0 -34 1)
   832              labelPosition: topLeft
   833              translateLabel: true
   834              component: 
   835             (SpecCollection
   836                collection: (
   837                 (VariableHorizontalPanelSpec
   838                    name: 'VariableHorizontalPanel2'
   839                    layout: (LayoutFrame 0 0 4 0 0 1 -26 1)
   840                    component: 
   841                   (SpecCollection
   842                      collection: (
   843                       (SequenceViewSpec
   844                          name: 'List2'
   845                          model: selectedStartupClassIndexHolder
   846                          hasHorizontalScrollBar: true
   847                          hasVerticalScrollBar: true
   848                          useIndex: true
   849                          sequenceList: listOfStartupClassesInProject
   850                        )
   851                       (TextEditorSpec
   852                          name: 'TextEditor2'
   853                          model: selectedStartupClassesComment
   854                          hasHorizontalScrollBar: true
   855                          hasVerticalScrollBar: true
   856                          isReadOnly: true
   857                          hasKeyboardFocusInitially: false
   858                          viewClassName: 'TextView'
   859                        )
   860                       )
   861                     
   862                    )
   863                    handles: (Any 0.35000000000000003 1.0)
   864                  )
   865                 (CheckBoxSpec
   866                    label: 'Hide other Startup Classes'
   867                    name: 'CheckBox1'
   868                    layout: (LayoutFrame -1 0 -20 1 0 1 2 1)
   869                    activeHelpKey: hideOtherStartupClasses
   870                    model: hideOtherStartupClasses
   871                    translateLabel: true
   872                  )
   873                 )
   874               
   875              )
   876            )
   877           (HorizontalPanelViewSpec
   878              name: 'HorizontalPanel1'
   879              layout: (LayoutFrame 0 0 -34 1 0 1 0 1)
   880              horizontalLayout: leftSpace
   881              verticalLayout: center
   882              horizontalSpace: 3
   883              verticalSpace: 3
   884              component: 
   885             (SpecCollection
   886                collection: (
   887                 (ActionButtonSpec
   888                    label: 'Browse Selected StartupClass'
   889                    name: 'Button3'
   890                    translateLabel: true
   891                    model: doBrowseStartupClass
   892                    enableChannel: hasStartupClassSelectedHolder
   893                    useDefaultExtent: true
   894                  )
   895                 )
   896               
   897              )
   898            )
   899           )
   900         
   901        )
   902      )
   903 !
   904 
   905 page5_specifyIncludedClasses
   906     "This resource specification was automatically generated
   907      by the UIPainter of ST/X."
   908 
   909     "Do not manually edit this!! If it is corrupted,
   910      the UIPainter may not be able to read the specification."
   911 
   912     "
   913      UIPainter new openOnClass:Tools::ProjectBuilderAssistantApplication andSelector:#page5_specifyIncludedClasses
   914      Tools::ProjectBuilderAssistantApplication new openInterface:#page5_specifyIncludedClasses
   915     "
   916 
   917     <resource: #canvas>
   918 
   919     ^ 
   920     #(FullSpec
   921        name: #'page5_specifyIncludedClasses'
   922        window: 
   923       (WindowSpec
   924          label: 'Project Selection'
   925          name: 'Project Selection'
   926          min: (Point 0 0)
   927          bounds: (Rectangle 0 0 521 400)
   928        )
   929        component: 
   930       (SpecCollection
   931          collection: (
   932           (FramedBoxSpec
   933              label: 'Project Contents'
   934              name: 'FramedBox3'
   935              layout: (LayoutFrame 0 0.0 5 0 4 1.0 -34 1)
   936              labelPosition: topLeft
   937              translateLabel: true
   938              component: 
   939             (SpecCollection
   940                collection: (
   941                 (SequenceViewSpec
   942                    name: 'List1'
   943                    layout: (LayoutFrame 0 0 0 0 0 1 0 1)
   944                    initiallyDisabled: true
   945                    hasHorizontalScrollBar: true
   946                    hasVerticalScrollBar: true
   947                    useIndex: false
   948                    sequenceList: listOfClassesInProject
   949                  )
   950                 )
   951               
   952              )
   953            )
   954           (HorizontalPanelViewSpec
   955              name: 'HorizontalPanel1'
   956              layout: (LayoutFrame 0 0 -34 1 0 1 0 1)
   957              horizontalLayout: center
   958              verticalLayout: center
   959              horizontalSpace: 3
   960              verticalSpace: 3
   961              component: 
   962             (SpecCollection
   963                collection: (
   964                 (ActionButtonSpec
   965                    label: 'Browse Project Definition'
   966                    name: 'Button3'
   967                    translateLabel: true
   968                    model: doBrowseProjectDefinitionClass
   969                    useDefaultExtent: true
   970                  )
   971                 (ActionButtonSpec
   972                    label: 'Update Contents (Scan)'
   973                    name: 'Button4'
   974                    translateLabel: true
   975                    model: doGenerateProjectContentsDefinition
   976                    useDefaultExtent: true
   977                  )
   978                 )
   979               
   980              )
   981            )
   982           )
   983         
   984        )
   985      )
   986 !
   987 
   988 page5b_specifyPrerequisitePackages
   989     "This resource specification was automatically generated
   990      by the UIPainter of ST/X."
   991 
   992     "Do not manually edit this!! If it is corrupted,
   993      the UIPainter may not be able to read the specification."
   994 
   995     "
   996      UIPainter new openOnClass:Tools::ProjectBuilderAssistantApplication andSelector:#page5b_specifyPrerequisitePackages
   997      Tools::ProjectBuilderAssistantApplication new openInterface:#page5b_specifyPrerequisitePackages
   998     "
   999 
  1000     <resource: #canvas>
  1001 
  1002     ^ 
  1003     #(FullSpec
  1004        name: #'page5b_specifyPrerequisitePackages'
  1005        window: 
  1006       (WindowSpec
  1007          label: 'Project Selection'
  1008          name: 'Project Selection'
  1009          min: (Point 0 0)
  1010          bounds: (Rectangle 0 0 521 400)
  1011        )
  1012        component: 
  1013       (SpecCollection
  1014          collection: (
  1015           (FramedBoxSpec
  1016              label: 'Prerequisite Packages'
  1017              name: 'FramedBox3'
  1018              layout: (LayoutFrame 0 0.0 5 0 4 1.0 -34 1)
  1019              labelPosition: topLeft
  1020              translateLabel: true
  1021              component: 
  1022             (SpecCollection
  1023                collection: (
  1024                 (SequenceViewSpec
  1025                    name: 'List1'
  1026                    layout: (LayoutFrame 0 0 0 0 0 1 0 1)
  1027                    initiallyDisabled: true
  1028                    hasHorizontalScrollBar: true
  1029                    hasVerticalScrollBar: true
  1030                    useIndex: false
  1031                    sequenceList: listOfPrerequisitesInProject
  1032                  )
  1033                 )
  1034               
  1035              )
  1036            )
  1037           (HorizontalPanelViewSpec
  1038              name: 'HorizontalPanel1'
  1039              layout: (LayoutFrame 0 0 -34 1 0 1 0 1)
  1040              horizontalLayout: center
  1041              verticalLayout: center
  1042              horizontalSpace: 3
  1043              verticalSpace: 3
  1044              component: 
  1045             (SpecCollection
  1046                collection: (
  1047                 (ActionButtonSpec
  1048                    label: 'Browse Project Definition'
  1049                    name: 'Button3'
  1050                    translateLabel: true
  1051                    model: doBrowseProjectDefinitionClassForPrereqs
  1052                    useDefaultExtent: true
  1053                  )
  1054                 (ActionButtonSpec
  1055                    label: 'Update Prerequisites (Scan)'
  1056                    name: 'Button4'
  1057                    translateLabel: true
  1058                    model: doGenerateProjectPrerequisitesDefinition
  1059                    useDefaultExtent: true
  1060                  )
  1061                 )
  1062               
  1063              )
  1064            )
  1065           )
  1066         
  1067        )
  1068      )
  1069 !
  1070 
  1071 page6a_specifyProjectAttributes
  1072     "This resource specification was automatically generated
  1073      by the UIPainter of ST/X."
  1074 
  1075     "Do not manually edit this!! If it is corrupted,
  1076      the UIPainter may not be able to read the specification."
  1077 
  1078     "
  1079      UIPainter new openOnClass:Tools::ProjectBuilderAssistantApplication andSelector:#page6a_specifyProjectAttributes
  1080      Tools::ProjectBuilderAssistantApplication new openInterface:#page6a_specifyProjectAttributes
  1081     "
  1082 
  1083     <resource: #canvas>
  1084 
  1085     ^ 
  1086     #(FullSpec
  1087        name: #'page6a_specifyProjectAttributes'
  1088        window: 
  1089       (WindowSpec
  1090          label: 'Project Selection'
  1091          name: 'Project Selection'
  1092          min: (Point 0 0)
  1093          bounds: (Rectangle 0 0 521 239)
  1094        )
  1095        component: 
  1096       (SpecCollection
  1097          collection: (
  1098           (FramedBoxSpec
  1099              label: 'Product Information'
  1100              name: 'FramedBox3'
  1101              layout: (LayoutFrame 0 0.0 5 0 4 1.0 116 0)
  1102              labelPosition: topLeft
  1103              translateLabel: true
  1104              component: 
  1105             (SpecCollection
  1106                collection: (
  1107                 (LabelSpec
  1108                    label: 'Product Name:'
  1109                    name: 'Label1'
  1110                    layout: (LayoutFrame 0 0 10 0 148 0 40 0)
  1111                    activeHelpKey: productName
  1112                    translateLabel: true
  1113                    adjust: left
  1114                  )
  1115                 (InputFieldSpec
  1116                    name: 'EntryField4'
  1117                    layout: (LayoutFrame 150 0.0 10 0 0 1.0 40 0)
  1118                    activeHelpKey: productName
  1119                    model: productNameHolder
  1120                    acceptOnLostFocus: true
  1121                    acceptOnPointerLeave: true
  1122                    viewClassName: ''
  1123                  )
  1124                 (LabelSpec
  1125                    label: 'Company Name:'
  1126                    name: 'Label2'
  1127                    layout: (LayoutFrame 0 0 45 0 148 0 75 0)
  1128                    activeHelpKey: companyName
  1129                    translateLabel: true
  1130                    adjust: left
  1131                  )
  1132                 (InputFieldSpec
  1133                    name: 'EntryField3'
  1134                    layout: (LayoutFrame 150 0.0 45 0 0 1.0 75 0)
  1135                    activeHelpKey: companyName
  1136                    model: companyNameHolder
  1137                    acceptOnLostFocus: true
  1138                    acceptOnPointerLeave: true
  1139                    viewClassName: ''
  1140                  )
  1141                 )
  1142               
  1143              )
  1144            )
  1145           (FramedBoxSpec
  1146              label: 'Executable'
  1147              name: 'FramedBox4'
  1148              layout: (LayoutFrame 0 0.0 124 0 4 1.0 200 0)
  1149              visibilityChannel: executableNameVisible
  1150              labelPosition: topLeft
  1151              translateLabel: true
  1152              component: 
  1153             (SpecCollection
  1154                collection: (
  1155                 (LabelSpec
  1156                    label: 'Name:'
  1157                    name: 'Label3'
  1158                    layout: (LayoutFrame 0 0 10 0 148 0 40 0)
  1159                    activeHelpKey: programName
  1160                    translateLabel: true
  1161                    adjust: left
  1162                  )
  1163                 (InputFieldSpec
  1164                    name: 'EntryField5'
  1165                    layout: (LayoutFrame 150 0.0 10 0 0 1.0 40 0)
  1166                    activeHelpKey: programName
  1167                    model: executableNameHolder
  1168                    isReadOnly: true
  1169                    acceptOnLostFocus: true
  1170                    acceptOnPointerLeave: true
  1171                    viewClassName: ''
  1172                  )
  1173                 )
  1174               
  1175              )
  1176            )
  1177           )
  1178         
  1179        )
  1180      )
  1181 !
  1182 
  1183 page6b_specifyBuildDirectorySpec
  1184     "This resource specification was automatically generated
  1185      by the UIPainter of ST/X."
  1186 
  1187     "Do not manually edit this!! If it is corrupted,
  1188      the UIPainter may not be able to read the specification."
  1189 
  1190     "
  1191      UIPainter new openOnClass:Tools::ProjectBuilderAssistantApplication andSelector:#page6b_specifyBuildDirectorySpec
  1192      Tools::ProjectBuilderAssistantApplication new openInterface:#page6b_specifyBuildDirectorySpec
  1193     "
  1194 
  1195     <resource: #canvas>
  1196 
  1197     ^ 
  1198     #(FullSpec
  1199        name: #'page6b_specifyBuildDirectorySpec'
  1200        window: 
  1201       (WindowSpec
  1202          label: 'Project Selection'
  1203          name: 'Project Selection'
  1204          min: (Point 0 0)
  1205          bounds: (Rectangle 0 0 521 361)
  1206        )
  1207        component: 
  1208       (SpecCollection
  1209          collection: (
  1210           (FramedBoxSpec
  1211              label: 'Build Directory'
  1212              name: 'FramedBox3'
  1213              layout: (LayoutFrame 0 0.0 5 0 4 1.0 115 0)
  1214              labelPosition: topLeft
  1215              translateLabel: true
  1216              component: 
  1217             (SpecCollection
  1218                collection: (
  1219                 (FilenameInputFieldSpec
  1220                    name: 'FilenameEntryField1'
  1221                    layout: (LayoutFrame 0 0.0 10 0 0 1.0 40 0)
  1222                    model: buildDirectoryHolder
  1223                    acceptOnPointerLeave: true
  1224                    viewClassName: FilenameWidgetWithHistory
  1225                  )
  1226                 (ActionButtonSpec
  1227                    label: 'Clear'
  1228                    name: 'Button1'
  1229                    layout: (LayoutFrame -127 1 50 0 -2 1 72 0)
  1230                    translateLabel: true
  1231                    model: clearBuildDirectory
  1232                  )
  1233                 )
  1234               
  1235              )
  1236            )
  1237           (FramedBoxSpec
  1238              label: 'Compiler / Toolchain'
  1239              name: 'FramedBox4'
  1240              layout: (LayoutFrame 0 0.0 116 0 4 1.0 190 0)
  1241              labelPosition: topLeft
  1242              translateLabel: true
  1243              component: 
  1244             (SpecCollection
  1245                collection: (
  1246                 (ComboListSpec
  1247                    name: 'ComboList1'
  1248                    layout: (LayoutFrame 0 0 10 0 137 0 40 0)
  1249                    model: usedCompilerHolder
  1250                    comboList: listOfPossibleCompilers
  1251                    useIndex: false
  1252                  )
  1253                 (LabelSpec
  1254                    label: 'Compiler Suite'
  1255                    name: 'Label2'
  1256                    layout: (LayoutFrame 163 0 10 0 0 1 40 0)
  1257                    translateLabel: true
  1258                    labelChannel: nameOfUsedCompilerSuiteHolder
  1259                    adjust: left
  1260                  )
  1261                 )
  1262               
  1263              )
  1264            )
  1265           (TextEditorSpec
  1266              name: 'TextEditor1'
  1267              layout: (LayoutFrame 2 0.0 190 0 -2 1.0 303 0)
  1268              level: -1
  1269              visibilityChannel: compilerWarnMessageVisibleHolder
  1270              model: compilerWarnMessageHolder
  1271              hasHorizontalScrollBar: true
  1272              hasVerticalScrollBar: true
  1273              miniScrollerHorizontal: true
  1274              backgroundColor: (Color 100.0 50.0 50.0)
  1275              hasKeyboardFocusInitially: false
  1276              postBuildCallback: postBuildWarnMessageView:
  1277            )
  1278           )
  1279         
  1280        )
  1281      )
  1282 !
  1283 
  1284 page7_buildSpec
  1285     "This resource specification was automatically generated
  1286      by the UIPainter of ST/X."
  1287 
  1288     "Do not manually edit this!! If it is corrupted,
  1289      the UIPainter may not be able to read the specification."
  1290 
  1291     "
  1292      UIPainter new openOnClass:Tools::ProjectBuilderAssistantApplication andSelector:#page7_buildSpec
  1293      Tools::ProjectBuilderAssistantApplication new openInterface:#page7_buildSpec
  1294     "
  1295 
  1296     <resource: #canvas>
  1297 
  1298     ^ 
  1299     #(FullSpec
  1300        name: #'page7_buildSpec'
  1301        window: 
  1302       (WindowSpec
  1303          label: 'Project Selection'
  1304          name: 'Project Selection'
  1305          min: (Point 0 0)
  1306          bounds: (Rectangle 0 0 679 492)
  1307        )
  1308        component: 
  1309       (SpecCollection
  1310          collection: (
  1311           (FramedBoxSpec
  1312              label: 'Make Output'
  1313              name: 'FramedBox3'
  1314              layout: (LayoutFrame 0 0.0 5 0 4 1.0 -106 1)
  1315              labelPosition: topLeft
  1316              translateLabel: true
  1317              component: 
  1318             (SpecCollection
  1319                collection: (
  1320                 (TextEditorSpec
  1321                    name: 'MakeOutputWindow'
  1322                    layout: (LayoutFrame 0 0 0 0 0 1 0 1)
  1323                    activeHelpKey: makeOutput
  1324                    model: makeOutputHolder
  1325                    hasHorizontalScrollBar: true
  1326                    hasVerticalScrollBar: true
  1327                    hasKeyboardFocusInitially: false
  1328                    postBuildCallback: postBuildMakeOutputWindow:
  1329                    viewClassName: 'TextCollector'
  1330                  )
  1331                 )
  1332               
  1333              )
  1334            )
  1335           (HorizontalPanelViewSpec
  1336              name: 'HorizontalPanel1'
  1337              layout: (LayoutFrame 0 0 -106 1 0 1 -72 1)
  1338              horizontalLayout: leftSpace
  1339              verticalLayout: center
  1340              horizontalSpace: 3
  1341              verticalSpace: 3
  1342              component: 
  1343             (SpecCollection
  1344                collection: (
  1345                 (ActionButtonSpec
  1346                    label: 'Make All'
  1347                    name: 'Button3'
  1348                    activeHelpKey: makeAll
  1349                    translateLabel: true
  1350                    model: doStartMakeAll
  1351                    enableChannel: startMakeButtonEnabled
  1352                    useDefaultExtent: true
  1353                  )
  1354                 (ActionButtonSpec
  1355                    label: 'Make App'
  1356                    name: 'Button17'
  1357                    activeHelpKey: makeAll
  1358                    visibilityChannel: osIsOSX
  1359                    translateLabel: true
  1360                    model: doStartMakeApp
  1361                    enableChannel: startMakeButtonEnabled
  1362                    useDefaultExtent: true
  1363                  )
  1364                 (ActionButtonSpec
  1365                    label: 'Make EXE only'
  1366                    name: 'Button5'
  1367                    activeHelpKey: makeExe
  1368                    translateLabel: true
  1369                    model: doStartMakeExe
  1370                    enableChannel: startMakeButtonEnabled
  1371                    useDefaultExtent: true
  1372                  )
  1373                 (ActionButtonSpec
  1374                    label: 'Quick Make EXE'
  1375                    name: 'Button16'
  1376                    activeHelpKey: makeExeQuick
  1377                    translateLabel: true
  1378                    model: doStartMakeExeQuick
  1379                    enableChannel: startMakeButtonEnabled
  1380                    useDefaultExtent: true
  1381                  )
  1382                 (ViewSpec
  1383                    name: 'Box1'
  1384                    extent: (Point 20 10)
  1385                  )
  1386                 (ActionButtonSpec
  1387                    label: 'Stop Make'
  1388                    name: 'Button4'
  1389                    activeHelpKey: stopMake
  1390                    visibilityChannel: stopMakeButtonVisible
  1391                    translateLabel: true
  1392                    model: doStopMake
  1393                    useDefaultExtent: true
  1394                  )
  1395                 )
  1396               
  1397              )
  1398            )
  1399           (HorizontalPanelViewSpec
  1400              name: 'HorizontalPanel2'
  1401              layout: (LayoutFrame 0 0 -70 1 0 1 -36 1)
  1402              horizontalLayout: leftSpace
  1403              verticalLayout: center
  1404              horizontalSpace: 3
  1405              verticalSpace: 3
  1406              component: 
  1407             (SpecCollection
  1408                collection: (
  1409                 (LabelSpec
  1410                    label: 'Build Directory'
  1411                    name: 'Label1'
  1412                    translateLabel: true
  1413                    useDefaultExtent: true
  1414                  )
  1415                 (ActionButtonSpec
  1416                    label: 'Finder'
  1417                    name: 'Button13'
  1418                    activeHelpKey: openFinder
  1419                    visibilityChannel: osIsOSX
  1420                    translateLabel: true
  1421                    model: doOpenFinder
  1422                    useDefaultExtent: true
  1423                  )
  1424                 (ActionButtonSpec
  1425                    label: 'Explorer'
  1426                    name: 'Button14'
  1427                    activeHelpKey: openExplorer
  1428                    visibilityChannel: osIsWindows
  1429                    translateLabel: true
  1430                    model: doOpenExplorer
  1431                    useDefaultExtent: true
  1432                  )
  1433                 (ActionButtonSpec
  1434                    label: 'Browser'
  1435                    name: 'Button11'
  1436                    activeHelpKey: openFileBrowser
  1437                    translateLabel: true
  1438                    model: doBrowseBuildDirectory
  1439                    useDefaultExtent: true
  1440                  )
  1441                 (ViewSpec
  1442                    name: 'Box2'
  1443                    extent: (Point 20 10)
  1444                  )
  1445                 (ActionButtonSpec
  1446                    label: 'Clear'
  1447                    name: 'Button12'
  1448                    activeHelpKey: clearBuildDirectory
  1449                    translateLabel: true
  1450                    model: doClearBuildDirectory
  1451                    useDefaultExtent: true
  1452                  )
  1453                 )
  1454               
  1455              )
  1456            )
  1457           (HorizontalPanelViewSpec
  1458              name: 'HorizontalPanel3'
  1459              layout: (LayoutFrame 0 0 -34 1 0 1 0 1)
  1460              horizontalLayout: leftSpace
  1461              verticalLayout: center
  1462              horizontalSpace: 3
  1463              verticalSpace: 3
  1464              component: 
  1465             (SpecCollection
  1466                collection: (
  1467                 (ActionButtonSpec
  1468                    label: 'Terminal in Build Directory'
  1469                    name: 'Button15'
  1470                    activeHelpKey: openTerminal
  1471                    translateLabel: true
  1472                    model: doOpenTerminal
  1473                    useDefaultExtent: true
  1474                  )
  1475                 )
  1476               
  1477              )
  1478            )
  1479           )
  1480         
  1481        )
  1482      )
  1483 !
  1484 
  1485 page7a_checkinSpec
  1486     "This resource specification was automatically generated
  1487      by the UIPainter of ST/X."
  1488 
  1489     "Do not manually edit this!! If it is corrupted,
  1490      the UIPainter may not be able to read the specification."
  1491 
  1492     "
  1493      UIPainter new openOnClass:Tools::ProjectBuilderAssistantApplication andSelector:#page7a_checkinSpec
  1494      Tools::ProjectBuilderAssistantApplication new openInterface:#page7a_checkinSpec
  1495     "
  1496 
  1497     <resource: #canvas>
  1498 
  1499     ^ 
  1500     #(FullSpec
  1501        name: #'page7a_checkinSpec'
  1502        window: 
  1503       (WindowSpec
  1504          label: 'Check Into Repository'
  1505          name: 'Check Into Repository'
  1506          min: (Point 0 0)
  1507          bounds: (Rectangle 0 0 679 492)
  1508        )
  1509        component: 
  1510       (SpecCollection
  1511          collection: (
  1512           (HorizontalPanelViewSpec
  1513              name: 'HorizontalPanel2'
  1514              layout: (LayoutFrame 10 0 10 0 0 1 44 0)
  1515              horizontalLayout: leftSpace
  1516              verticalLayout: center
  1517              horizontalSpace: 3
  1518              verticalSpace: 3
  1519              component: 
  1520             (SpecCollection
  1521                collection: (
  1522                 (ActionButtonSpec
  1523                    label: 'Checkin...'
  1524                    name: 'CheckinButton'
  1525                    activeHelpKey: openFinder
  1526                    visibilityChannel: osIsOSX
  1527                    translateLabel: true
  1528                    resizeForLabel: true
  1529                    model: doCheckin
  1530                    useDefaultExtent: true
  1531                  )
  1532                 )
  1533               
  1534              )
  1535            )
  1536           )
  1537         
  1538        )
  1539      )
  1540 !
  1541 
  1542 page7b_buildSpec
  1543     "This resource specification was automatically generated
  1544      by the UIPainter of ST/X."
  1545 
  1546     "Do not manually edit this!! If it is corrupted,
  1547      the UIPainter may not be able to read the specification."
  1548 
  1549     "
  1550      UIPainter new openOnClass:Tools::ProjectBuilderAssistantApplication andSelector:#page7b_buildSpec
  1551      Tools::ProjectBuilderAssistantApplication new openInterface:#page7b_buildSpec
  1552     "
  1553 
  1554     <resource: #canvas>
  1555 
  1556     ^ 
  1557     #(FullSpec
  1558        name: #'page7b_buildSpec'
  1559        window: 
  1560       (WindowSpec
  1561          label: 'Project Selection'
  1562          name: 'Project Selection'
  1563          min: (Point 0 0)
  1564          bounds: (Rectangle 0 0 679 492)
  1565        )
  1566        component: 
  1567       (SpecCollection
  1568          collection: (
  1569           (FramedBoxSpec
  1570              label: 'Make Output'
  1571              name: 'FramedBox3'
  1572              layout: (LayoutFrame 0 0.0 5 0 4 1.0 -106 1)
  1573              labelPosition: topLeft
  1574              translateLabel: true
  1575              component: 
  1576             (SpecCollection
  1577                collection: (
  1578                 (TextEditorSpec
  1579                    name: 'MakeOutputWindow'
  1580                    layout: (LayoutFrame 0 0 0 0 0 1 0 1)
  1581                    activeHelpKey: makeOutput
  1582                    model: makeOutputHolder
  1583                    hasHorizontalScrollBar: true
  1584                    hasVerticalScrollBar: true
  1585                    hasKeyboardFocusInitially: false
  1586                    postBuildCallback: postBuildMakeOutputWindow:
  1587                    viewClassName: 'TextCollector'
  1588                  )
  1589                 )
  1590               
  1591              )
  1592            )
  1593           (HorizontalPanelViewSpec
  1594              name: 'HorizontalPanel1'
  1595              layout: (LayoutFrame 0 0 -106 1 -2 1 -72 1)
  1596              horizontalLayout: leftSpace
  1597              verticalLayout: center
  1598              horizontalSpace: 3
  1599              verticalSpace: 3
  1600              component: 
  1601             (SpecCollection
  1602                collection: (
  1603                 (ActionButtonSpec
  1604                    label: 'Make All'
  1605                    name: 'Button3'
  1606                    activeHelpKey: makeAll
  1607                    translateLabel: true
  1608                    model: doStartMakeAll
  1609                    enableChannel: startMakeButtonEnabled
  1610                    useDefaultExtent: true
  1611                  )
  1612                 (ActionButtonSpec
  1613                    label: 'Make APP only'
  1614                    name: 'Button17'
  1615                    activeHelpKey: makeApp
  1616                    visibilityChannel: osIsOSX
  1617                    translateLabel: true
  1618                    model: doStartMakeApp
  1619                    enableChannel: startMakeButtonEnabled
  1620                    useDefaultExtent: true
  1621                  )
  1622                 (ActionButtonSpec
  1623                    label: 'Make EXE only'
  1624                    name: 'Button5'
  1625                    activeHelpKey: makeExe
  1626                    translateLabel: true
  1627                    model: doStartMakeExe
  1628                    enableChannel: startMakeButtonEnabled
  1629                    useDefaultExtent: true
  1630                  )
  1631                 (ActionButtonSpec
  1632                    label: 'Quick Make EXE'
  1633                    name: 'Button16'
  1634                    activeHelpKey: makeExeQuick
  1635                    translateLabel: true
  1636                    model: doStartMakeExeQuick
  1637                    enableChannel: startMakeButtonEnabled
  1638                    useDefaultExtent: true
  1639                  )
  1640                 (ViewSpec
  1641                    name: 'Box1'
  1642                    extent: (Point 20 10)
  1643                  )
  1644                 (ActionButtonSpec
  1645                    label: 'Stop Make'
  1646                    name: 'Button4'
  1647                    activeHelpKey: stopMake
  1648                    visibilityChannel: stopMakeButtonVisible
  1649                    translateLabel: true
  1650                    model: doStopMake
  1651                    useDefaultExtent: true
  1652                  )
  1653                 )
  1654               
  1655              )
  1656            )
  1657           (HorizontalPanelViewSpec
  1658              name: 'HorizontalPanel2'
  1659              layout: (LayoutFrame 0 0 -70 1 -2 1 -36 1)
  1660              horizontalLayout: leftSpace
  1661              verticalLayout: center
  1662              horizontalSpace: 3
  1663              verticalSpace: 3
  1664              component: 
  1665             (SpecCollection
  1666                collection: (
  1667                 (LabelSpec
  1668                    label: 'Build Directory:'
  1669                    name: 'Label1'
  1670                    translateLabel: true
  1671                    useDefaultExtent: true
  1672                  )
  1673                 (ActionButtonSpec
  1674                    label: 'Finder'
  1675                    name: 'Button13'
  1676                    activeHelpKey: openFinder
  1677                    visibilityChannel: osIsOSX
  1678                    translateLabel: true
  1679                    model: doOpenFinder
  1680                    useDefaultExtent: true
  1681                  )
  1682                 (ActionButtonSpec
  1683                    label: 'Explorer'
  1684                    name: 'Button14'
  1685                    activeHelpKey: openExplorer
  1686                    visibilityChannel: osIsWindows
  1687                    translateLabel: true
  1688                    model: doOpenExplorer
  1689                    useDefaultExtent: true
  1690                  )
  1691                 (ActionButtonSpec
  1692                    label: 'Browser'
  1693                    name: 'Button11'
  1694                    activeHelpKey: openFileBrowser
  1695                    translateLabel: true
  1696                    model: doBrowseBuildDirectory
  1697                    useDefaultExtent: true
  1698                  )
  1699                 (ViewSpec
  1700                    name: 'Box2'
  1701                    extent: (Point 20 10)
  1702                  )
  1703                 (ActionButtonSpec
  1704                    label: 'Clear'
  1705                    name: 'Button12'
  1706                    activeHelpKey: clearBuildDirectory
  1707                    translateLabel: true
  1708                    model: doClearBuildDirectory
  1709                    useDefaultExtent: true
  1710                  )
  1711                 )
  1712               
  1713              )
  1714            )
  1715           (HorizontalPanelViewSpec
  1716              name: 'HorizontalPanel3'
  1717              layout: (LayoutFrame 0 0 -34 1 -2 1 0 1)
  1718              horizontalLayout: leftSpace
  1719              verticalLayout: center
  1720              horizontalSpace: 3
  1721              verticalSpace: 3
  1722              component: 
  1723             (SpecCollection
  1724                collection: (
  1725                 (ActionButtonSpec
  1726                    label: 'Terminal in Build Directory'
  1727                    name: 'Button15'
  1728                    activeHelpKey: openTerminal
  1729                    translateLabel: true
  1730                    model: doOpenTerminal
  1731                    useDefaultExtent: true
  1732                  )
  1733                 )
  1734               
  1735              )
  1736            )
  1737           )
  1738         
  1739        )
  1740      )
  1741 !
  1742 
  1743 page8_deploySpec
  1744     "This resource specification was automatically generated
  1745      by the UIPainter of ST/X."
  1746 
  1747     "Do not manually edit this!! If it is corrupted,
  1748      the UIPainter may not be able to read the specification."
  1749 
  1750     "
  1751      UIPainter new openOnClass:Tools::ProjectBuilderAssistantApplication andSelector:#page8_deploySpec
  1752      Tools::ProjectBuilderAssistantApplication new openInterface:#page8_deploySpec
  1753     "
  1754 
  1755     <resource: #canvas>
  1756 
  1757     ^ 
  1758     #(FullSpec
  1759        name: #'page8_deploySpec'
  1760        window: 
  1761       (WindowSpec
  1762          label: 'Project Selection'
  1763          name: 'Project Selection'
  1764          min: (Point 0 0)
  1765          bounds: (Rectangle 0 0 520 478)
  1766        )
  1767        component: 
  1768       (SpecCollection
  1769          collection: (
  1770           (FramedBoxSpec
  1771              label: 'Files for Deployment'
  1772              name: 'FramedBox3'
  1773              layout: (LayoutFrame 0 0.0 5 0 4 1.0 0 1)
  1774              labelPosition: topLeft
  1775              translateLabel: true
  1776              component: 
  1777             (SpecCollection
  1778                collection: (
  1779                 (SubCanvasSpec
  1780                    name: 'FileBrowserSubCanvas'
  1781                    layout: (LayoutFrame 0 0 0 0 0 1 -34 1)
  1782                    hasHorizontalScrollBar: false
  1783                    hasVerticalScrollBar: false
  1784                    clientHolder: fileBrowserInstance
  1785                    createNewApplication: true
  1786                    createNewBuilder: true
  1787                  )
  1788                 (HorizontalPanelViewSpec
  1789                    name: 'HorizontalPanel1'
  1790                    layout: (LayoutFrame 0 0 -34 1 -2 1 0 1)
  1791                    horizontalLayout: centerMax
  1792                    verticalLayout: center
  1793                    horizontalSpace: 3
  1794                    verticalSpace: 3
  1795                    component: 
  1796                   (SpecCollection
  1797                      collection: (
  1798                       (ActionButtonSpec
  1799                          label: 'Windows Explorer'
  1800                          name: 'Button1'
  1801                          visibilityChannel: osIsWindows
  1802                          translateLabel: true
  1803                          resizeForLabel: true
  1804                          model: doOpenExplorer
  1805                          useDefaultExtent: true
  1806                        )
  1807                       (ActionButtonSpec
  1808                          label: ' Finder'
  1809                          name: 'Button3'
  1810                          visibilityChannel: osIsOSX
  1811                          translateLabel: true
  1812                          resizeForLabel: true
  1813                          model: doOpenFinder
  1814                          useDefaultExtent: true
  1815                        )
  1816                       (ActionButtonSpec
  1817                          label: 'Terminal'
  1818                          name: 'Button2'
  1819                          translateLabel: true
  1820                          resizeForLabel: true
  1821                          model: doOpenTerminal
  1822                          useDefaultExtent: true
  1823                        )
  1824                       )
  1825                     
  1826                    )
  1827                  )
  1828                 )
  1829               
  1830              )
  1831            )
  1832           )
  1833         
  1834        )
  1835      )
  1836 ! !
  1837 
  1838 !ProjectBuilderAssistantApplication class methodsFor:'misc specs'!
  1839 
  1840 newProjectsNameListSpec
  1841     "This resource specification was automatically generated
  1842      by the UIPainter of ST/X."
  1843 
  1844     "Do not manually edit this!! If it is corrupted,
  1845      the UIPainter may not be able to read the specification."
  1846 
  1847     "
  1848      UIPainter new openOnClass:Tools::ProjectBuilderAssistantApplication andSelector:#newProjectsNameListSpec
  1849      Tools::ProjectBuilderAssistantApplication new openInterface:#newProjectsNameListSpec
  1850     "
  1851 
  1852     <resource: #canvas>
  1853 
  1854     ^ 
  1855      #(FullSpec
  1856         name: newProjectsNameListSpec
  1857         window: 
  1858        (WindowSpec
  1859           label: 'NewApplication'
  1860           name: 'NewApplication'
  1861           min: (Point 0 0)
  1862           bounds: (Rectangle 0 0 131 207)
  1863           usePreferredExtent: true
  1864         )
  1865         component: 
  1866        (SpecCollection
  1867           collection: (
  1868            (SequenceViewSpec
  1869               name: 'ReferencePoint2'
  1870               layout: (LayoutFrame 0 0 0 0 0 1 0 1)
  1871               activeHelpKey: listOfNewProjectsName
  1872               model: newProjectsName
  1873               hasHorizontalScrollBar: true
  1874               hasVerticalScrollBar: true
  1875               miniScrollerHorizontal: true
  1876               miniScrollerVertical: false
  1877               useIndex: false
  1878               sequenceList: listOfNewProjectsName
  1879               doubleClickChannel: newProjectsNameListDoubleClickChannel
  1880               usePreferredHeight: true
  1881               useDynamicPreferredHeight: true
  1882             )
  1883            )
  1884          
  1885         )
  1886       )
  1887 ! !
  1888 
  1889 !ProjectBuilderAssistantApplication class methodsFor:'startup'!
  1890 
  1891 openOn:aProjectDefinitionOrStartupClass
  1892     ^ self new openOn:aProjectDefinitionOrStartupClass
  1893 
  1894     "Created: / 20-07-2012 / 12:33:25 / cg"
  1895 !
  1896 
  1897 openOnPackage:aPackageId
  1898     ^ self new openOnPackage:aPackageId
  1899 
  1900     "Created: / 20-07-2012 / 13:22:50 / cg"
  1901 ! !
  1902 
  1903 !ProjectBuilderAssistantApplication methodsFor:'actions'!
  1904 
  1905 buildDirectoryChanged
  1906     self updateButtonEnableState.
  1907 !
  1908 
  1909 clearBuildDirectory
  1910     self halt.
  1911 !
  1912 
  1913 createNewApplication
  1914     <resource: #uiCallback>
  1915 
  1916     |newAppName newAppClass|
  1917 
  1918     newAppName := self newApplicationsName value.
  1919     newAppName isEmptyOrNil ifTrue:[
  1920         Dialog warn:'Please enter the name of the Application-Class first.'.
  1921         ^ self
  1922     ].
  1923     newAppName isUppercaseFirst ifFalse:[
  1924         (Dialog confirm:(resources 
  1925                     stringWithCRs:'Class names must start with an uppercase character.\\Change to "%1"?'
  1926                     with:newAppName asUppercaseFirst))
  1927         ifFalse:[
  1928             ^ self
  1929         ].
  1930         newAppName := newAppName asUppercaseFirst.
  1931         self newApplicationsName value:newAppName.
  1932     ].
  1933 
  1934     self withWaitCursorDo:[
  1935         Class packageQuerySignal answer:(selectedProjectDefinition package)
  1936         do:[
  1937             newAppClass := ApplicationModel
  1938                             subclass:newAppName asSymbol
  1939                             instanceVariableNames:''
  1940                             classVariableNames:''
  1941                             poolDictionaries:''
  1942                             category:'Applications'.
  1943             SmalltalkCodeGeneratorTool createApplicationCodeFor:newAppClass.
  1944         ].
  1945         self updateListOfApplicationsInProject.
  1946         self selectedApplicationIndexHolder value:(listOfApplicationsInProject value indexOf:newAppClass).
  1947     ].
  1948 
  1949     "Modified: / 31-01-2011 / 18:29:50 / cg"
  1950 !
  1951 
  1952 createNewProject
  1953     <resource: #uiCallback>
  1954 
  1955     |newProjectID projectDefinitionType projectDefinitionClass projectClasses|
  1956 
  1957     newProjectID := self newProjectsName value.
  1958     newProjectID isEmptyOrNil ifTrue:[
  1959         Dialog warn:(resources string:'Please enter a packageID first.').
  1960         ^ self
  1961     ].
  1962     newProjectID asPackageId isModuleId ifTrue:[
  1963         Dialog warn:(resources stringWithCRs:
  1964 'Please enter a corrent packageID.
  1965 
  1966 All packages must be named like "%1:%2"
  1967 (%2 can be a path like "dir/dir/...").' with:(resources string:'module')allItalic
  1968                                         with:(resources string:'directory')allItalic).
  1969         ^ self
  1970     ].
  1971 
  1972     self withWaitCursorDo:[
  1973         projectDefinitionType := self projectType. "/ ProjectDefinition perform:(self projectTypeHolder value).
  1974 
  1975         projectDefinitionClass := ProjectDefinition
  1976                                     definitionClassForPackage:newProjectID
  1977                                     projectType: projectDefinitionType
  1978                                     createIfAbsent:true.
  1979 
  1980         projectDefinitionClass compileDescriptionMethods.
  1981         self updateListOfMatchingProjects.
  1982         self updateListOfNewProjectsName.
  1983 
  1984         self selectedProjectIndexHolder value:( self listOfMatchingProjects value indexOf:projectDefinitionClass).
  1985 
  1986         projectClasses := projectDefinitionClass allClasses.
  1987 
  1988 "/    projectDefinitionClass isGUIApplication ifTrue:[
  1989 "/        "/ see if it has an AppModel class
  1990 "/        (projectClasses contains:[:cls | cls isVisualStartable]) ifFalse:[
  1991 "/            (Dialog confirm:'Create an Application Class ?') ifTrue:[
  1992 "/                self halt.
  1993 "/            ].
  1994 "/        ].
  1995 "/    ].
  1996 
  1997 "/    projectDefinitionClass isLibrary ifFalse:[
  1998 "/        "/ see if it has a Startup class
  1999 "/        (projectClasses contains:[:cls | cls isStartable]) ifFalse:[
  2000 "/        ].
  2001 "/    ].
  2002 
  2003     ].
  2004 
  2005     "Modified: / 06-08-2012 / 16:55:54 / cg"
  2006 !
  2007 
  2008 createNewStartupClass
  2009     <resource: #uiCallback>
  2010 
  2011     |newClassName newStartupClass startupApplication|
  2012 
  2013     newClassName := self newStartupClassName value.
  2014     newClassName isEmptyOrNil ifTrue:[
  2015         Dialog warn:'Please enter the name of the Startup-Class first.'.
  2016         ^ self
  2017     ].
  2018     newClassName isUppercaseFirst ifFalse:[
  2019         (Dialog confirm:(resources 
  2020                     stringWithCRs:'Class names must start with an uppercase character.\\Change to "%1"?'
  2021                     with:newClassName asUppercaseFirst))
  2022         ifFalse:[
  2023             ^ self
  2024         ].
  2025         newClassName := newClassName asUppercaseFirst.
  2026         self newStartupClassName value:newClassName.
  2027     ].
  2028 
  2029     self withWaitCursorDo:[ 
  2030         |pkg|
  2031 
  2032         pkg := selectedProjectDefinition notNil 
  2033                     ifTrue:[selectedProjectDefinition package]
  2034                     ifFalse:[newProjectsName value].
  2035         Class packageQuerySignal answer:pkg
  2036         do:[
  2037             |startupClass|
  2038             
  2039             startupClass := self projectTypeIsNonGuiApplication
  2040                                 ifTrue:[ StandaloneStartupHeadless ]
  2041                                 ifFalse:[ StandaloneStartup ]. 
  2042             newStartupClass := startupClass
  2043                             subclass:newClassName asSymbol
  2044                             instanceVariableNames:''
  2045                             classVariableNames:''
  2046                             poolDictionaries:''
  2047                             category:'Applications'.   
  2048 
  2049             self projectTypeIsGuiApplication ifTrue: [startupApplication := selectedApplication].
  2050             SmalltalkCodeGeneratorTool createStartupCodeFor:newStartupClass forStartOf:startupApplication.
  2051         ].
  2052         self updateListOfStartupClassesInProject.
  2053         self selectedStartupClassIndexHolder value:(listOfStartupClassesInProject value indexOf:newStartupClass).
  2054     ].
  2055 
  2056     "Modified: / 31-01-2011 / 18:29:47 / cg"
  2057 !
  2058 
  2059 doAddClassToProject
  2060     <resource: #uiCallback>
  2061 
  2062     Transcript showCR:self class name, ': action for doAddClassToProject ...'.
  2063     self halt:'unimplemented'.
  2064 !
  2065 
  2066 doBrowseApplication
  2067     <resource: #uiCallback>
  2068 
  2069     |appClass|
  2070 
  2071     self hasApplicationSelected ifTrue:[
  2072         appClass := self listOfApplicationsInProject value at:(self selectedApplicationIndexHolder value).
  2073         UserPreferences systemBrowserClass 
  2074             openInClass:appClass class selector:#windowSpec.
  2075     ].
  2076 !
  2077 
  2078 doBrowseBuildDirectory
  2079     <resource: #uiCallback>
  2080 
  2081     projectBuilder isNil ifTrue:[ self getProjectBuilder ].
  2082     projectBuilder buildDirectory isNil ifTrue:[
  2083         Dialog information:'No build directory yet'.
  2084         ^  self
  2085     ].
  2086     UserPreferences fileBrowserClass
  2087         openIn:projectBuilder packageBuildDirectory asFilename
  2088 "/    projectBuilder packageBuildDirectory asFilename openExplorer
  2089 
  2090     "Created: / 20-08-2012 / 17:05:54 / cg"
  2091 !
  2092 
  2093 doBrowseProject
  2094     <resource: #uiCallback>
  2095 
  2096     UserPreferences systemBrowserClass openOnPackage:selectedProjectDefinition package.
  2097 !
  2098 
  2099 doBrowseProjectDefinitionClass
  2100     <resource: #uiCallback>
  2101 
  2102     |defClass|
  2103 
  2104     self hasProjectSelected ifTrue:[
  2105         defClass := self selectedProjectDefinition.
  2106         UserPreferences systemBrowserClass 
  2107             openInClass:defClass class selector:#classNamesAndAttributes.
  2108     ].
  2109 !
  2110 
  2111 doBrowseProjectDefinitionClassForPrereqs
  2112     <resource: #uiCallback>
  2113 
  2114     |defClass|
  2115 
  2116     self hasProjectSelected ifTrue:[
  2117         defClass := self selectedProjectDefinition.
  2118         UserPreferences systemBrowserClass 
  2119             openInClass:defClass class selector:#referencedPreRequisites "/ #mandatoryPreRequisites.
  2120     ].
  2121 !
  2122 
  2123 doBrowseStartupClass
  2124     <resource: #uiCallback>
  2125 
  2126     |startupClass|
  2127 
  2128     self hasStartupClassSelected ifTrue:[
  2129         startupClass := self listOfStartupClassesInProject value at:(self selectedStartupClassIndexHolder value).
  2130         UserPreferences systemBrowserClass 
  2131             openInClass:startupClass class selector:#main:.
  2132     ].
  2133 !
  2134 
  2135 doCheckin
  2136     <resource: #uiCallback>
  2137 
  2138     |package utilities|
  2139 
  2140     package := selectedProjectDefinition package.
  2141     utilities := (AbstractSourceCodeManager managerForPackage:package) utilities.
  2142 
  2143     AbortAllOperationRequest catch:[
  2144         self withWaitCursorDo:[
  2145             utilities
  2146                 checkinPackage:package
  2147                 classes:true
  2148                 extensions:true
  2149                 buildSupport:true
  2150                 askForMethodsInOtherPackages:true
  2151         ]
  2152     ]
  2153 !
  2154 
  2155 doClearBuildDirectory
  2156     <resource: #uiCallback>
  2157 
  2158     projectBuilder isNil ifTrue:[ self getProjectBuilder ].
  2159     projectBuilder buildDirectory notNil ifTrue:[   
  2160         self withWaitCursorDo:[
  2161             projectBuilder packageBuildDirectory asFilename recursiveRemove
  2162         ]
  2163     ].
  2164 
  2165     "Created: / 05-09-2012 / 10:35:54 / cg"
  2166 !
  2167 
  2168 doGenerateProjectContentsDefinition
  2169     self generatePackageContentsMethods
  2170 !
  2171 
  2172 doGenerateProjectPrerequisitesDefinition
  2173     self generatePackageContentsMethods
  2174 
  2175     "Created: / 19-01-2012 / 15:44:23 / cg"
  2176 !
  2177 
  2178 doLaunchApplication
  2179     <resource: #uiCallback>
  2180 
  2181     |appClass|
  2182 
  2183     self hasApplicationSelected ifTrue:[
  2184         appClass := self listOfApplicationsInProject value at:(self selectedApplicationIndexHolder value).
  2185         appClass open.
  2186     ].
  2187 !
  2188 
  2189 doOpenExplorer
  2190     projectBuilder isNil ifTrue:[ self getProjectBuilder ].
  2191     projectBuilder buildDirectory isNil ifTrue:[
  2192         Dialog information:'No build directory yet'.
  2193         ^  self
  2194     ].
  2195     projectBuilder packageBuildDirectory asFilename openExplorer
  2196 
  2197     "Modified: / 21-07-2012 / 12:29:21 / cg"
  2198 !
  2199 
  2200 doOpenFinder
  2201     projectBuilder isNil ifTrue:[ self getProjectBuilder ].
  2202     projectBuilder buildDirectory isNil ifTrue:[
  2203         Dialog information:'No build directory yet'.
  2204         ^  self
  2205     ].
  2206     projectBuilder packageBuildDirectory asFilename openFinder
  2207 
  2208     "Modified: / 21-07-2012 / 12:29:21 / cg"
  2209 !
  2210 
  2211 doOpenTerminal
  2212     projectBuilder isNil ifTrue:[ self getProjectBuilder ].
  2213     projectBuilder buildDirectory isNil ifTrue:[
  2214         Dialog information:'No build directory yet'.
  2215         ^  self
  2216     ].
  2217     projectBuilder packageBuildDirectory asFilename openTerminal
  2218 !
  2219 
  2220 doStartMake:whichTarget
  2221     <resource: #uiCallback>
  2222 
  2223     self stopMakeButtonVisible value:true.
  2224     self startMakeButtonEnabled value:false.
  2225 
  2226     self infoHolder value:'Building (make) - please wait...'.
  2227     makeOutputWindow clear.
  2228 
  2229     makeProcess := 
  2230             [
  2231                 [
  2232                     self runBuildProcess:whichTarget
  2233                 ] ensure:[
  2234                     self stopMakeButtonVisible value:false.
  2235                     self startMakeButtonEnabled value:true.
  2236                     makeProcess := nil.
  2237                     self updateButtonEnableState.
  2238                     self infoHolder value:''.
  2239                 ].
  2240             ] newProcess.
  2241 
  2242     makeProcess priority:4.
  2243     makeProcess priorityRange:(4 to:8).
  2244     makeProcess resume.
  2245 !
  2246 
  2247 doStartMakeAll
  2248     <resource: #uiCallback>
  2249 
  2250     self doStartMake:'all'
  2251 !
  2252 
  2253 doStartMakeApp
  2254     <resource: #uiCallback>
  2255 
  2256     self doStartMake:'app'
  2257 !
  2258 
  2259 doStartMakeExe
  2260     <resource: #uiCallback>
  2261 
  2262     self doStartMake:'exe'
  2263 !
  2264 
  2265 doStartMakeExeQuick
  2266     <resource: #uiCallback>
  2267 
  2268     self doStartMake:'exeQuick'
  2269 !
  2270 
  2271 doStopMake
  2272     <resource: #uiCallback>
  2273 
  2274     |p|
  2275 
  2276     (p := makeProcess) notNil ifTrue:[
  2277         makeProcess := nil.
  2278         self withWaitCursorDo:[
  2279             p terminate.
  2280             p waitUntilTerminated.
  2281         ].
  2282         makeOutputWindow endEntry.
  2283         makeOutputWindow cr.
  2284         makeOutputWindow nextPutLine:('Make Cancelled' colorizeAllWith:Color white on:Color red).
  2285         makeOutputWindow endEntry.
  2286     ].
  2287 
  2288     "Modified: / 26-09-2012 / 21:01:37 / cg"
  2289 !
  2290 
  2291 fetchSelectedProject
  2292     |selectedProjectIndex|
  2293 
  2294     selectedProjectIndex := self selectedProjectIndexHolder value.
  2295     (selectedProjectIndex ? 0) == 0 ifTrue:[
  2296         selectedProjectDefinition := nil.
  2297     ] ifFalse:[
  2298         selectedProjectDefinition := self listOfMatchingProjects value at:(selectedProjectIndex).
  2299     ].
  2300     self hasProjectSelectedHolder value:(selectedProjectDefinition notNil).
  2301 
  2302     "Created: / 04-09-2012 / 09:52:32 / cg"
  2303 !
  2304 
  2305 getProjectBuilder
  2306     projectBuilder := ProjectBuilder new.
  2307     projectBuilder package:(selectedProjectDefinition package).
  2308     projectBuilder usedCompilerForBuild:(usedCompilerHolder value).
  2309     ^ projectBuilder
  2310 
  2311     "Created: / 26-09-2012 / 20:57:32 / cg"
  2312 !
  2313 
  2314 projectTypeChanged
  2315     <resource: #uiCallback>
  2316 
  2317     self updateListOfMatchingProjects
  2318 !
  2319 
  2320 runBuildProcess:what
  2321     <resource: #uiCallback>
  2322 
  2323     self assert:makeOutputWindow notNil.
  2324     self assert:makeOutputWindow model == self makeOutputHolder.
  2325 
  2326     ActivityNotification handle:[:ex |
  2327         ex messageText notNil ifTrue:[
  2328             makeOutputWindow endEntry.
  2329             makeOutputWindow cr.
  2330             makeOutputWindow nextPutLine:(ex messageText colorizeAllWith:Color white on:Color blue).
  2331             makeOutputWindow endEntry.
  2332         ].
  2333         ex proceed.
  2334     ] do:[
  2335         self getProjectBuilder.
  2336         projectBuilder makeExeOnly:((what = 'exe') or:[what = 'exeQuick']).
  2337         projectBuilder makeAppOnly:(what = 'app').
  2338         projectBuilder makeQuick:(what = 'exeQuick').
  2339 
  2340         Error handle:[:ex |
  2341             ex creator = MessageNotUnderstood ifTrue:[ex reject].
  2342 
  2343             makeOutputWindow endEntry.
  2344             makeOutputWindow cr.
  2345             makeOutputWindow nextPutLine:(ex description colorizeAllWith:Color white on:Color red).
  2346             makeOutputWindow endEntry.
  2347             Debugging == true ifTrue:[ ex reject ].
  2348             ex proceed.
  2349         ] do:[
  2350             projectBuilder buildWithColorizedOutputTo:makeOutputWindow.
  2351         ].
  2352     ].
  2353 
  2354     "
  2355      Debugging := true.   
  2356      Debugging := false.   
  2357     "
  2358 
  2359     "Modified: / 07-06-2016 / 11:00:01 / cg"
  2360 !
  2361 
  2362 selectedApplicationChanged
  2363     |idx|
  2364 
  2365     ((idx := self selectedApplicationIndexHolder value) isNil
  2366     or:[idx == 0]) ifTrue:[
  2367         selectedApplication := nil.
  2368     ] ifFalse:[
  2369         selectedApplication := self listOfApplicationsInProject value at:idx.
  2370     ].
  2371     self hasApplicationSelectedHolder value:(selectedApplication notNil).
  2372 
  2373 "/    selectedApplication notNil ifTrue:[
  2374 "/        "/ generate startupClass code
  2375 "/        CodeGeneratorTool
  2376 "/            compile:(selectedProjectDefinition startupClassName_codeFor:(selectedApplication name))
  2377 "/            forClass:selectedProjectDefinition theMetaclass
  2378 "/            inCategory:'description - startup'.
  2379 "/    ].
  2380     self updateApplicationComment.
  2381     self updateButtonEnableState.
  2382 !
  2383 
  2384 selectedProjectChanged
  2385     self fetchSelectedProject.
  2386 
  2387     self updateComment.
  2388     self updateListOfApplicationsInProject.
  2389     self updateButtonEnableState.
  2390 
  2391     "Modified: / 04-09-2012 / 09:52:43 / cg"
  2392 !
  2393 
  2394 selectedStartupClassChanged
  2395     self selectedStartupClassIndexHolder value isNil ifTrue:[
  2396         selectedStartupClass := nil.
  2397     ] ifFalse:[
  2398         selectedStartupClass := self listOfStartupClassesInProject value at:(self selectedStartupClassIndexHolder value).
  2399     ].
  2400     self hasStartupClassSelectedHolder value:(selectedStartupClass notNil).
  2401 
  2402     selectedStartupClass notNil ifTrue:[
  2403         "/ generate startupClass code
  2404         Class packageQuerySignal
  2405             answer:selectedProjectDefinition package
  2406             do:[
  2407                 SmalltalkCodeGeneratorTool
  2408                     compile:(selectedProjectDefinition startupClassName_codeFor:(selectedStartupClass name))
  2409                     forClass:selectedProjectDefinition theMetaclass
  2410                     inCategory:'description - startup'.
  2411             ]
  2412     ].
  2413     self updateButtonEnableState.
  2414 
  2415     "Modified: / 31-01-2011 / 18:29:42 / cg"
  2416 ! !
  2417 
  2418 !ProjectBuilderAssistantApplication methodsFor:'aspects'!
  2419 
  2420 buildDirectoryHolder
  2421     <resource: #uiAspect>
  2422 
  2423     |buildDirectory|
  2424 
  2425     buildDirectoryHolder isNil ifTrue:[
  2426         buildDirectoryHolder := nil asValue.
  2427         buildDirectoryHolder onChangeSend:#buildDirectoryChanged to:self.
  2428     ].
  2429     buildDirectoryHolder value isEmptyOrNil ifTrue:[
  2430         buildDirectory := ProjectBuilder previousBuildDirectory.
  2431         buildDirectory isNil ifTrue:[
  2432             buildDirectory := UserPreferences current buildDirectory.
  2433             buildDirectory isNil ifTrue:[
  2434                 buildDirectory := Filename tempDirectory construct:'stx_build'.
  2435             ].
  2436         ].
  2437         buildDirectoryHolder value: buildDirectory.
  2438     ].
  2439     ^ buildDirectoryHolder.
  2440 !
  2441 
  2442 companyNameHolder
  2443     <resource: #uiAspect>
  2444 
  2445     companyNameHolder isNil ifTrue:[
  2446         companyNameHolder := 'MyCompany' asValue.
  2447     ].
  2448     ^ companyNameHolder.
  2449 !
  2450 
  2451 compilerWarnMessageHolder
  2452     <resource: #uiAspect>
  2453 
  2454     compilerWarnMessageHolder isNil ifTrue:[
  2455         compilerWarnMessageHolder := '' asValue.
  2456     ].
  2457     ^ compilerWarnMessageHolder.
  2458 !
  2459 
  2460 compilerWarnMessageVisibleHolder
  2461     <resource: #uiAspect>
  2462 
  2463     compilerWarnMessageVisibleHolder isNil ifTrue:[
  2464         compilerWarnMessageVisibleHolder := false asValue.
  2465     ].
  2466     ^ compilerWarnMessageVisibleHolder.
  2467 !
  2468 
  2469 execuableNameVisible
  2470     ^ self projectTypeIsNonGuiApplication
  2471 !
  2472 
  2473 executableNameHolder
  2474     |holder|
  2475 
  2476     (holder := builder bindingAt:#executableNameHolder) isNil ifTrue:[
  2477         builder aspectAt:#executableNameHolder put:(holder := nil asValue).
  2478     ].
  2479     ^ holder.
  2480 !
  2481 
  2482 hasApplicationSelectedHolder
  2483     <resource: #uiAspect>
  2484 
  2485     hasApplicationSelectedHolder isNil ifTrue:[
  2486         hasApplicationSelectedHolder := nil asValue.
  2487     ].
  2488     ^ hasApplicationSelectedHolder.
  2489 !
  2490 
  2491 hasProjectSelectedHolder
  2492     <resource: #uiAspect>
  2493 
  2494     hasProjectSelectedHolder isNil ifTrue:[
  2495         hasProjectSelectedHolder := nil asValue.
  2496     ].
  2497     ^ hasProjectSelectedHolder.
  2498 !
  2499 
  2500 hasStartupClassSelectedHolder
  2501     <resource: #uiAspect>
  2502 
  2503     hasStartupClassSelectedHolder isNil ifTrue:[
  2504         hasStartupClassSelectedHolder := nil asValue.
  2505     ].
  2506     ^ hasStartupClassSelectedHolder.
  2507 !
  2508 
  2509 hideOtherApplicationClasses
  2510     <resource: #uiAspect>
  2511 
  2512     hideOtherApplicationClasses isNil ifTrue:[
  2513         hideOtherApplicationClasses := true asValue.
  2514         hideOtherApplicationClasses onChangeSend:#updateListOfApplicationsInProject to:self.
  2515     ].
  2516     ^ hideOtherApplicationClasses.
  2517 !
  2518 
  2519 hideOtherStartupClasses
  2520     <resource: #uiAspect>
  2521 
  2522     hideOtherStartupClasses isNil ifTrue:[
  2523         hideOtherStartupClasses := true asValue.
  2524         hideOtherStartupClasses onChangeSend:#updateListOfStartupClassesInProject to:self.
  2525     ].
  2526     ^ hideOtherStartupClasses.
  2527 !
  2528 
  2529 hideSTXProjects
  2530     <resource: #uiAspect>
  2531 
  2532     hideSTXProjects isNil ifTrue:[
  2533         hideSTXProjects := true asValue.
  2534         hideSTXProjects onChangeSend:#updateListOfMatchingProjects to:self.
  2535     ].
  2536     ^ hideSTXProjects.
  2537 !
  2538 
  2539 listOfApplicationsInProject
  2540     <resource: #uiAspect>
  2541 
  2542     listOfApplicationsInProject isNil ifTrue:[
  2543         listOfApplicationsInProject := ValueHolder new.
  2544     ].
  2545     ^ listOfApplicationsInProject.
  2546 !
  2547 
  2548 listOfClassesInProject
  2549     <resource: #uiAspect>
  2550 
  2551     listOfClassesInProject isNil ifTrue:[
  2552         listOfClassesInProject := ValueHolder new.
  2553     ].
  2554     ^ listOfClassesInProject.
  2555 !
  2556 
  2557 listOfMatchingPackageIds
  2558     <resource: #uiAspect>
  2559 
  2560     listOfMatchingPackageIds isNil ifTrue:[
  2561         listOfMatchingPackageIds := ValueHolder new.
  2562     ].
  2563     ^ listOfMatchingPackageIds.
  2564 !
  2565 
  2566 listOfMatchingProjects
  2567     <resource: #uiAspect>
  2568 
  2569     listOfMatchingProjects isNil ifTrue:[
  2570         listOfMatchingProjects := ValueHolder new.
  2571     ].
  2572     ^ listOfMatchingProjects.
  2573 !
  2574 
  2575 listOfNewProjectsName
  2576 
  2577     <resource: #uiAspect>
  2578 
  2579     listOfNewProjectsName isNil ifTrue:[
  2580         listOfNewProjectsName := ValueHolder new.
  2581     ].
  2582     ^ listOfNewProjectsName.
  2583 !
  2584 
  2585 listOfPossibleCompilers
  2586     ^ Tools::ProjectBuilder listOfPossibleCompilers
  2587 
  2588     "Modified: / 05-09-2012 / 19:10:24 / cg"
  2589 !
  2590 
  2591 listOfPrerequisitesInProject
  2592     <resource: #uiAspect>
  2593 
  2594     listOfPrerequisitesInProject isNil ifTrue:[
  2595         listOfPrerequisitesInProject := ValueHolder new.
  2596     ].
  2597     ^ listOfPrerequisitesInProject.
  2598 
  2599     "Created: / 19-01-2012 / 15:39:34 / cg"
  2600 !
  2601 
  2602 listOfStartupClassesInProject
  2603     <resource: #uiAspect>
  2604 
  2605     listOfStartupClassesInProject isNil ifTrue:[
  2606         listOfStartupClassesInProject := ValueHolder new.
  2607     ].
  2608     ^ listOfStartupClassesInProject.
  2609 !
  2610 
  2611 makeOutputHolder
  2612     <resource: #uiAspect>
  2613 
  2614     makeOutputHolder isNil ifTrue:[
  2615         makeOutputHolder := ValueHolder new.
  2616     ].
  2617     ^ makeOutputHolder.
  2618 !
  2619 
  2620 nameOfUsedCompilerSuiteHolder
  2621     <resource: #uiAspect>
  2622 
  2623     nameOfUsedCompilerSuiteHolder isNil ifTrue:[
  2624         nameOfUsedCompilerSuiteHolder := nil asValue.
  2625     ].
  2626     ^ nameOfUsedCompilerSuiteHolder.
  2627 
  2628     "Created: / 03-09-2012 / 19:32:27 / cg"
  2629 !
  2630 
  2631 newApplicationsName
  2632     <resource: #uiAspect>
  2633 
  2634     "automatically generated by UIPainter ..."
  2635 
  2636     newApplicationsName isNil ifTrue:[
  2637         newApplicationsName := ValueHolder new.
  2638     ].
  2639     ^ newApplicationsName.
  2640 !
  2641 
  2642 newProjectsName
  2643     <resource: #uiAspect>
  2644 
  2645     newProjectsName isNil ifTrue:[
  2646         newProjectsName := nil asValue.
  2647     ].
  2648     ^ newProjectsName.
  2649 !
  2650 
  2651 newProjectsNameListDoubleClickChannel
  2652     "automatically generated by UIPainter ..."
  2653 
  2654     |holder|
  2655 
  2656     (holder := builder bindingAt:#newProjectsNameListDoubleClickChannel) isNil ifTrue:[
  2657         holder := TriggerValue new.
  2658         builder aspectAt:#newProjectsNameListDoubleClickChannel put:holder.
  2659         holder onChangeEvaluate:[       
  2660             newProjectsNameListExtendedComboBox notNil ifTrue: [
  2661                 newProjectsNameListExtendedComboBox closeMenu.
  2662             ]
  2663         ]
  2664     ].
  2665     ^ holder.
  2666 !
  2667 
  2668 newStartupClassName
  2669     <resource: #uiAspect>
  2670 
  2671     newStartupClassName isNil ifTrue:[
  2672         newStartupClassName := ValueHolder new.
  2673     ].
  2674     ^ newStartupClassName.
  2675 !
  2676 
  2677 osIsOSX
  2678    ^ OperatingSystem isOSXlike
  2679 !
  2680 
  2681 osIsUnix
  2682    ^ OperatingSystem isUNIXlike 
  2683 !
  2684 
  2685 osIsWindows
  2686    ^ OperatingSystem isMSWINDOWSlike
  2687 !
  2688 
  2689 productNameHolder
  2690     <resource: #uiAspect>
  2691 
  2692     productNameHolder isNil ifTrue:[
  2693         productNameHolder := 'MyProduct' asValue.
  2694     ].
  2695     ^ productNameHolder.
  2696 !
  2697 
  2698 projectType
  2699     ^ self projectTypeHolder value
  2700 
  2701     "Modified: / 20-07-2012 / 13:28:46 / cg"
  2702 !
  2703 
  2704 projectType:aProjectTypeSymbol
  2705     self assert:(ProjectDefinition projectTypes includes:aProjectTypeSymbol).
  2706     self projectTypeHolder value:aProjectTypeSymbol
  2707 
  2708     "Modified: / 20-07-2012 / 13:28:25 / cg"
  2709 !
  2710 
  2711 projectTypeHolder
  2712     <resource: #uiAspect>
  2713 
  2714     projectTypeHolder isNil ifTrue:[
  2715         projectTypeHolder := RadioButtonGroup new.
  2716         projectTypeHolder value:ProjectDefinition guiApplicationType.
  2717     ].
  2718     ^ projectTypeHolder.
  2719 
  2720     "Modified: / 20-07-2012 / 13:30:16 / cg"
  2721 !
  2722 
  2723 selectedApplicationIndexHolder
  2724     <resource: #uiAspect>
  2725 
  2726     selectedApplicationIndexHolder isNil ifTrue:[
  2727         selectedApplicationIndexHolder := ValueHolder new.
  2728         selectedApplicationIndexHolder onChangeSend:#selectedApplicationChanged to:self.
  2729     ].
  2730     ^ selectedApplicationIndexHolder.
  2731 !
  2732 
  2733 selectedApplicationsComment
  2734     <resource: #uiAspect>
  2735 
  2736     "automatically generated by UIPainter ..."
  2737 
  2738     selectedApplicationsComment isNil ifTrue:[
  2739         selectedApplicationsComment := '' asValue.
  2740     ].
  2741     ^ selectedApplicationsComment.
  2742 !
  2743 
  2744 selectedProjectDefinition
  2745     <resource: #uiAspect>
  2746 
  2747     ^ selectedProjectDefinition.
  2748 !
  2749 
  2750 selectedProjectIndexHolder
  2751     <resource: #uiAspect>
  2752 
  2753     selectedProjectIndexHolder isNil ifTrue:[
  2754         selectedProjectIndexHolder := ValueHolder new.
  2755         selectedProjectIndexHolder onChangeSend:#selectedProjectChanged to:self.
  2756     ].
  2757     ^ selectedProjectIndexHolder.
  2758 !
  2759 
  2760 selectedProjectsComment
  2761     <resource: #uiAspect>
  2762 
  2763     selectedProjectsComment isNil ifTrue:[
  2764         selectedProjectsComment := '' asValue.
  2765     ].
  2766     ^ selectedProjectsComment.
  2767 !
  2768 
  2769 selectedStartupClassIndexHolder
  2770     <resource: #uiAspect>
  2771 
  2772     selectedStartupClassIndexHolder isNil ifTrue:[
  2773         selectedStartupClassIndexHolder := ValueHolder new.
  2774         selectedStartupClassIndexHolder onChangeSend:#selectedStartupClassChanged to:self.
  2775     ].
  2776     ^ selectedStartupClassIndexHolder.
  2777 !
  2778 
  2779 startMakeButtonEnabled
  2780     <resource: #uiAspect>
  2781 
  2782     startMakeButtonEnabled isNil ifTrue:[
  2783         startMakeButtonEnabled := true asValue.
  2784     ].
  2785     ^ startMakeButtonEnabled.
  2786 !
  2787 
  2788 stopMakeButtonVisible
  2789     <resource: #uiAspect>
  2790 
  2791     stopMakeButtonVisible isNil ifTrue:[
  2792         stopMakeButtonVisible := false asValue.
  2793     ].
  2794     ^ stopMakeButtonVisible.
  2795 !
  2796 
  2797 usedCompilerHolder
  2798     <resource: #uiAspect>
  2799 
  2800     usedCompilerHolder isNil ifTrue:[
  2801         usedCompilerHolder := ValueHolder new.
  2802         usedCompilerHolder value:(LastUsedCompiler ? ProjectBuilder defaultUsedCompiler).
  2803         usedCompilerHolder onChangeSend:#checkCompilerAvailability to:self.
  2804     ].
  2805     ^ usedCompilerHolder.
  2806 
  2807     "Modified: / 04-09-2012 / 09:43:20 / cg"
  2808 ! !
  2809 
  2810 !ProjectBuilderAssistantApplication methodsFor:'initialization & release'!
  2811 
  2812 fileBrowserInstance
  2813     "setup the embedded fileBrowser (in the last page)"
  2814 
  2815     |targetDirectory browser|
  2816 
  2817     targetDirectory := projectBuilder packageBuildDirectory.
  2818 
  2819     browser := FileBrowserV2 new.
  2820     browser onDirectory:targetDirectory.
  2821     OperatingSystem isMSWINDOWSlike ifTrue:[
  2822         browser filter:'*.exe;*.com'.
  2823     ] ifFalse:[
  2824         browser filter:'*'.
  2825     ].
  2826     ^ browser.
  2827 !
  2828 
  2829 openOn:aProjectDefinitionOrStartupClass
  2830     |type "apps" projectDefinitionClass startupClass pageToGo|
  2831 
  2832     self allButOpen.
  2833     (aProjectDefinitionOrStartupClass inheritsFrom:StandaloneStartup) ifTrue:[
  2834         startupClass := aProjectDefinitionOrStartupClass.
  2835         type := ProjectDefinition nonGuiApplicationType.
  2836         projectDefinitionClass := startupClass projectDefinitionClass.
  2837         (projectDefinitionClass startupClass == startupClass) ifFalse:[
  2838             self halt.
  2839         ].    
  2840     ] ifFalse:[ 
  2841         projectDefinitionClass := aProjectDefinitionOrStartupClass.
  2842         projectDefinitionClass isFolderForProjectsDefinition ifFalse:[
  2843             projectDefinitionClass isLibraryDefinition ifTrue:[
  2844                 type := ProjectDefinition libraryType
  2845             ] ifFalse:[
  2846                 projectDefinitionClass isGUIApplication ifTrue:[
  2847                     type := ProjectDefinition guiApplicationType.
  2848                     startupClass := projectDefinitionClass startupClass
  2849                 ] ifFalse:[
  2850                     type := ProjectDefinition nonGuiApplicationType.
  2851                     startupClass := projectDefinitionClass startupClass
  2852                 ]
  2853             ].
  2854         ].
  2855     ].
  2856     self projectTypeHolder value:type.
  2857     self hideSTXProjects value:false.
  2858     selectedProjectDefinition := projectDefinitionClass.
  2859     self selectedProjectIndexHolder value:(self listOfMatchingPackageIds value indexOf:projectDefinitionClass package).
  2860     self hasProjectSelectedHolder value:true.
  2861 
  2862     pageToGo := 2.
  2863     (type == ProjectDefinition guiApplicationType) ifTrue:[
  2864         pageToGo := 3.
  2865         startupClass notNil ifTrue:[
  2866             self updateListOfStartupClassesInProject.
  2867             selectedStartupClass := startupClass.
  2868             self selectedStartupClassIndexHolder value:(self listOfStartupClassesInProject value indexOf:startupClass).
  2869             pageToGo := 5.
  2870         ]. 
  2871         "/ apps := (aProjectDefinitionClass classes select:[:cls | cls isKindOf:ApplicationModel])
  2872     ].
  2873     (type == ProjectDefinition nonGuiApplicationType) ifTrue:[
  2874         pageToGo := 4.
  2875         startupClass notNil ifTrue:[
  2876             self updateListOfStartupClassesInProject.
  2877             selectedStartupClass := startupClass.
  2878             self selectedStartupClassIndexHolder value:(self listOfStartupClassesInProject value indexOf:startupClass).
  2879             pageToGo := 5.
  2880         ]. 
  2881     ].
  2882     self gotoPage:pageToGo.
  2883     self openWindow.
  2884 
  2885     "Created: / 20-07-2012 / 12:34:02 / cg"
  2886 !
  2887 
  2888 openOnPackage:aPackageId
  2889     self allButOpen.
  2890     self projectTypeHolder value:(ProjectDefinition guiApplicationType).
  2891     self hideSTXProjects value:false.
  2892     self selectedProjectIndexHolder value:(self listOfMatchingPackageIds indexOf:aPackageId).
  2893     self hasProjectSelectedHolder value:true.
  2894     self gotoPage:2.
  2895     self openWindow.
  2896 
  2897     "Created: / 20-07-2012 / 13:24:38 / cg"
  2898 !
  2899 
  2900 postBuildMakeOutputWindow:aView
  2901     makeOutputWindow := aView.
  2902     makeOutputWindow lineLimit:10000.
  2903 
  2904     "Modified: / 05-09-2012 / 11:11:45 / cg"
  2905 !
  2906 
  2907 postBuildNewProjectsNameListExtendedComboBox:anExtendedComboBox
  2908 
  2909     |menu|
  2910 
  2911     menu := SubCanvas new.
  2912     menu client:self spec:#newProjectsNameListSpec builder:nil.
  2913     anExtendedComboBox closeOnSelect: false.
  2914     anExtendedComboBox menuWidget:menu.
  2915 
  2916     anExtendedComboBox editor 
  2917             immediateAccept:true;
  2918             acceptOnLeave:true;
  2919             acceptOnLostFocus:true;
  2920             acceptOnPointerLeave:true;
  2921             acceptOnReturn:true;
  2922             acceptOnTab:true.
  2923 
  2924     newProjectsNameListExtendedComboBox := anExtendedComboBox.
  2925 !
  2926 
  2927 postBuildWarnMessageView:aView
  2928     aView font:(Label defaultFont).
  2929 
  2930     "Created: / 05-09-2012 / 19:34:29 / cg"
  2931 !
  2932 
  2933 postBuildWith:aBuilder
  2934     super postBuildWith:aBuilder.
  2935     self updateListOfMatchingProjects.
  2936     self updateListOfNewProjectsName.
  2937 
  2938     Smalltalk addDependent:self.
  2939 !
  2940 
  2941 release
  2942     Smalltalk removeDependent:self.
  2943     super release
  2944 ! !
  2945 
  2946 !ProjectBuilderAssistantApplication methodsFor:'menu actions'!
  2947 
  2948 openDocumentation
  2949    self openHTMLDocument:'tools/misc/TOP.html#PACKAGER'.
  2950 ! !
  2951 
  2952 !ProjectBuilderAssistantApplication methodsFor:'private'!
  2953 
  2954 commentFromClass:aClass
  2955     |docMethod comment indents minIndent maxLineLength|
  2956 
  2957     docMethod := aClass class compiledMethodAt:#documentation.
  2958     docMethod notNil ifTrue:[
  2959         comment := docMethod comment.
  2960         comment := comment asStringCollection 
  2961                         collect:[:line | line withoutTrailingSeparators].
  2962         [comment notEmpty and:[comment first isBlank]] whileTrue:[ comment removeFirst ].
  2963         maxLineLength := (comment collect:[:line | line size]) max.
  2964         indents := comment collect:[:line | 
  2965                                         line isEmptyOrNil
  2966                                             ifTrue:[maxLineLength]
  2967                                             ifFalse:[ line findFirst:[:ch | ch isSeparator not]]].
  2968         (minIndent := indents min) > 1 ifTrue:[
  2969             comment := comment collect:[:line | line copyFrom:minIndent].
  2970         ].
  2971         comment := comment asString.
  2972     ].
  2973     ^ comment
  2974 !
  2975 
  2976 generatePackageContentsMethods
  2977     <resource: #uiCallback>
  2978 
  2979     selectedProjectDefinition
  2980         updateContentsMethodsCodeUsingCompiler:SmalltalkCodeGeneratorTool 
  2981         ignoreOldDefinition:true.
  2982 
  2983 "/    Class packageQuerySignal answer:(selectedProjectDefinition package)
  2984 "/    do:[
  2985 "/        selectedProjectDefinition 
  2986 "/            forEachContentsMethodsCodeToCompileDo:[:code :category |
  2987 "/                    SmalltalkCodeGeneratorTool
  2988 "/                        compile:code
  2989 "/                        forClass:selectedProjectDefinition theMetaclass
  2990 "/                        inCategory:category.
  2991 "/                ]
  2992 "/            ignoreOldDefinition:true
  2993 "/    ].
  2994     self updateListOfClassesInProject
  2995 
  2996     "Modified: / 31-01-2011 / 18:29:44 / cg"
  2997 !
  2998 
  2999 hasApplicationSelected
  3000     ^ self selectedApplicationIndexHolder value notNil
  3001 !
  3002 
  3003 hasBuildDirectorySpecified
  3004     ^ self buildDirectoryHolder value notEmptyOrNil
  3005 !
  3006 
  3007 hasProjectBuilder
  3008     ^ projectBuilder notNil
  3009 !
  3010 
  3011 hasProjectSelected
  3012     ^ self selectedProjectIndexHolder value notNil
  3013 !
  3014 
  3015 hasStartupClassSelected
  3016     ^ self selectedStartupClassIndexHolder value notNil
  3017 ! !
  3018 
  3019 !ProjectBuilderAssistantApplication methodsFor:'queries'!
  3020 
  3021 canEnterApplicationSelection
  3022     self hasProjectSelected ifFalse:[
  3023         self infoHolder value:'no project selected'. 
  3024         ^ false
  3025     ].
  3026     ^ true
  3027 
  3028     "Modified: / 23-08-2011 / 12:12:35 / cg"
  3029 !
  3030 
  3031 canEnterBuild
  3032     self hasBuildDirectorySpecified ifFalse:[
  3033         self infoHolder value:'no build directory specified'. 
  3034         ^ false
  3035     ].
  3036     ^ true
  3037 
  3038     "Modified: / 23-08-2011 / 12:13:29 / cg"
  3039 !
  3040 
  3041 canEnterContentsSelection
  3042     |prj cls impl mthd|
  3043 
  3044     self hasProjectSelected ifFalse:[
  3045         self infoHolder value:'no project selected'. 
  3046         ^ false
  3047     ].
  3048     "self hasApplicationSelected ifFalse:[^ false]." 
  3049     (self projectTypeIsLibrary or:[self hasStartupClassSelected]) ifFalse:[
  3050         self infoHolder value:'Must be either library or have a startup class'. 
  3051         ^ false
  3052     ].
  3053     prj := self selectedProjectDefinition.
  3054     prj isLibraryDefinition ifFalse:[
  3055         ([prj startupClassName] on:Error do:nil) notNil ifFalse:[
  3056             self infoHolder value:'Must have a startup class'. 
  3057             ^ false
  3058         ].
  3059         ([prj startupSelector] on:Error do:nil) notNil ifFalse:[
  3060             self infoHolder value:'Must have a startup selector'. 
  3061             ^ false
  3062         ].
  3063         (prj class compiledMethodAt:#startupSelector) isNil ifTrue:[
  3064             self infoHolder value:('Inherited startup selector is "%1"' bindWith:prj startupSelector). 
  3065             impl := prj class whichClassImplements:#startupSelector.
  3066             impl isNil ifTrue:[
  3067                 self infoHolder value:('Inherited startup selector (%1) not implemented in %2' 
  3068                                         bindWith:prj startupSelector
  3069                                         with:prj class name). 
  3070                 ^ false
  3071             ].
  3072         ].
  3073         (mthd := prj class compiledMethodAt:#startupClassName) package == prj package ifFalse:[
  3074             mthd package == PackageId noProjectID ifFalse:[
  3075                 self infoHolder value:('Startup class method (#startupClassName) of %3 must be in package "%1" (is in "%2")' 
  3076                     bindWith:prj package
  3077                     with:(prj class compiledMethodAt:#startupClassName) package
  3078                     with:prj class name). 
  3079                 ^ false
  3080             ].
  3081         ].
  3082         (mthd := prj class compiledMethodAt:#startupSelector) notNil ifTrue:[
  3083             mthd package == prj package ifFalse:[
  3084                 mthd package == PackageId noProjectID ifFalse:[
  3085                     self infoHolder value:('Startup class method (#startupSelector) of %3 must be in package "%1" (is in "%2")' 
  3086                         bindWith:prj package
  3087                         with:mthd package 
  3088                         with:prj class name). 
  3089                     ^ false
  3090                 ]
  3091             ].
  3092         ].
  3093         cls := Smalltalk classNamed:prj startupClassName.
  3094         cls isNil ifTrue:[
  3095             self infoHolder value:('Startup class "%1" does not exist' bindWith:prj startupClassName).
  3096             ^ false.
  3097         ].
  3098         (cls implements:(prj startupSelector)) ifFalse:[
  3099             (cls respondsTo:(prj startupSelector)) ifFalse:[
  3100                 self infoHolder value:('Startup class "%1" does not implement startup selector "%2"' 
  3101                         bindWith:cls name
  3102                         with:prj startupSelector). 
  3103                 ^ false
  3104             ].
  3105         ].
  3106     ].
  3107     self infoHolder value:nil.
  3108     ^ true.
  3109 
  3110     "Modified: / 04-09-2012 / 10:29:43 / cg"
  3111 !
  3112 
  3113 canEnterDeploy
  3114     self hasProjectBuilder ifFalse:[
  3115         self infoHolder value:'Nothing to deploy (please build first)'. 
  3116         ^ false
  3117     ].
  3118     self infoHolder value:nil. 
  3119     ^ true
  3120 
  3121     "Modified: / 04-09-2012 / 10:30:18 / cg"
  3122 !
  3123 
  3124 canEnterPrerequisitesSelection
  3125     |prj cls impl|
  3126 
  3127     self hasProjectSelected ifFalse:[
  3128         self infoHolder value:'no project selected'. 
  3129         ^ false
  3130     ].
  3131     ^ true.
  3132 
  3133     "Created: / 19-01-2012 / 15:37:30 / cg"
  3134 !
  3135 
  3136 canEnterStartupClassSelection
  3137     self hasProjectSelected ifFalse:[
  3138         self infoHolder value:'no project selected'. 
  3139         ^ false
  3140     ].
  3141     ^ self hasProjectSelected "and:[ self hasApplicationSelected ]"
  3142 
  3143     "Modified: / 23-08-2011 / 12:16:35 / cg"
  3144 !
  3145 
  3146 projectTypeIsGuiApplication
  3147     ^ self projectType == ProjectDefinition guiApplicationType
  3148 
  3149     "Modified: / 20-07-2012 / 13:29:59 / cg"
  3150 !
  3151 
  3152 projectTypeIsLibrary
  3153     ^ self projectType == ProjectDefinition libraryType
  3154 
  3155     "Modified: / 20-07-2012 / 13:29:24 / cg"
  3156 !
  3157 
  3158 projectTypeIsNonGuiApplication
  3159     ^ self projectType == ProjectDefinition nonGuiApplicationType
  3160 !
  3161 
  3162 projectTypeIsNotLibrary
  3163     ^ self projectTypeIsLibrary not
  3164 ! !
  3165 
  3166 !ProjectBuilderAssistantApplication methodsFor:'specs'!
  3167 
  3168 assistantSpec
  3169     |specs|
  3170 
  3171     specs := OrderedCollection new.
  3172     specs add:
  3173         #( AssistantPageSpec
  3174             pageTitle: 'Project Type Selection'
  3175             windowSpecSelector: page1_projectTypeSelectionSpec
  3176             enterCallbackSelector: updateListOfMatchingProjects
  3177             infoText: 'Define the <B>type</B> of project you are about to build.<P>
  3178 Choose <B>GUI-application</B> for a program which will show a graphical user interface,
  3179 <br><B>non-GUI-program</b> for a console program, 
  3180 <br>and <B>library</b>, for a framework to be
  3181 used by other programs (a loadable shared binary class library).'
  3182         ) decodeAsLiteralArray.
  3183 
  3184     specs add:
  3185         #(AssistantPageSpec
  3186             pageTitle: 'ProjectDefinition Selection'
  3187             windowSpecSelector: page2_projectSelectionSpec
  3188             enterCallbackSelector: updateListOfMatchingProjectsAndProjectIDs
  3189             leaveCallbackSelector: fetchAttributesFromProjectDefinition
  3190             infoText: 'Choose either an existing project definition or create a new one. 
  3191 These are subclasses of <I>ProjectDefinition</I> and define the type, name and contents of a project. 
  3192 <p>
  3193 Please enter a project-identifier which must have a well defined format in Smalltalk/X.
  3194 Notice that the ID directly reflects the project''s location within the source code repository 
  3195 (module:directoryPath). 
  3196 <br>If in doubt, use "<b>&lt;yourname&gt;:demos/xxx_n</b>".'
  3197         ) decodeAsLiteralArray.
  3198 
  3199     specs add:
  3200         #(AssistantPageSpec
  3201             pageTitle: 'Startup Application Selection'
  3202             windowSpecSelector: page3_applicationSelectionSpec
  3203             isEnabledQuerySelector: #projectTypeIsGuiApplication
  3204             canEnterQuerySelector: #canEnterApplicationSelection
  3205             enterCallbackSelector: updateListOfApplicationsInProject
  3206             infoText: 'Choose an existing application or create a new one. 
  3207 These are subclasses of <I>ApplicationModel</I> and define the GUI and control flow inside the application. 
  3208 Can also be left blank if the startup class does it all (stx build).'
  3209         ) decodeAsLiteralArray.
  3210 
  3211     specs add:
  3212         #(AssistantPageSpec
  3213             pageTitle: 'Startup Class Selection'
  3214             windowSpecSelector: page4_startupClassSelectionSpec
  3215             isEnabledQuerySelector: #projectTypeIsNotLibrary
  3216             canEnterQuerySelector: #canEnterStartupClassSelection
  3217             enterCallbackSelector: updateListOfStartupClassesInProject
  3218             infoText: 'Choose an existing startup-class or create a new one. 
  3219 <p>These are subclasses of <I>StandaloneStartup</I> and contain the main function,
  3220 which either starts the application (in case of a GUI application)
  3221 or directly performs the program''s task (in case of a non-GUI console program).<br> 
  3222 Command line arguments are usually interpreted there.
  3223 <p>Do not use one of the "StandAloneStartup"-classes, which you may find in the system: 
  3224 these are abstract, and to be used as superclass of your concrete startup.
  3225 <p>For a quick demo, enter a reasonable name, and press the "Create" button.'
  3226         ) decodeAsLiteralArray.
  3227 
  3228     specs add:
  3229         #(AssistantPageSpec
  3230             pageTitle: 'Specify Contents'
  3231             windowSpecSelector: page5_specifyIncludedClasses
  3232             enterCallbackSelector: enterContentsSpecification
  3233             canEnterQuerySelector: #canEnterContentsSelection
  3234             infoText: 'Check the list of other classes which are to be included. 
  3235 These are the classes which comprise your application 
  3236 (excluding any libraries, which are specified in the next step).
  3237 <p>
  3238 Press "<I>Update List</I>" to search for and include all classes of the package. 
  3239 <p>
  3240 Press "<I>Browse</I>" to edit the contents manually (this opens an editor on the defining method
  3241 in your project definition class).'
  3242         ) decodeAsLiteralArray.
  3243 
  3244     specs add:
  3245         #(AssistantPageSpec
  3246             pageTitle: 'Specify Prerequisites'
  3247             windowSpecSelector: page5b_specifyPrerequisitePackages
  3248             enterCallbackSelector: enterPrerequisitesSpecification
  3249             canEnterQuerySelector: #canEnterPrerequisitesSelection
  3250             infoText: 'Check the list of packages/libraries which are needed as prerequisites. 
  3251 These are required class libraries which should be packaged together with the application,
  3252 and will be present in the deployed binary.
  3253 <p>
  3254 Non-GUI programs will typically only require the basic class library 
  3255 and libcomp (the parser and bytecode compiler) to be read startup scripts and patches.
  3256 <p>
  3257 GUI programs will require a number of view- and widget support classes, which contain the
  3258 graphical user interface support classes.
  3259 <p>
  3260 Press "<I>Update</I>" to search for and include prerequisites.
  3261 <p>
  3262 "<I>Browse</I>" to edit the list manually.'
  3263         ) decodeAsLiteralArray.
  3264 
  3265     specs add:
  3266         #(AssistantPageSpec
  3267             pageTitle: 'Specify Project Attributes'
  3268             windowSpecSelector: page6a_specifyProjectAttributes
  3269             infoText: 'Define additional attributes. 
  3270 These will be shown during the installation of the deployed package and affect the name of the deployed self-installable file.'
  3271             enterCallbackSelector: updateProjectAttributes
  3272             leaveCallbackSelector: #rememberProjectAttributes
  3273         ) decodeAsLiteralArray.
  3274 
  3275     specs add:
  3276         #(AssistantPageSpec
  3277             pageTitle: 'Specify Build Directory'
  3278             windowSpecSelector: page6b_specifyBuildDirectorySpec
  3279             infoText: 'Define where the build-process is to be performed and which compiler to use. 
  3280 <P>All generated files are created below that directory. 
  3281 <P>After deployment, the build directory is no longer needed 
  3282 (but you can keep it for a faster compile the next time).
  3283 <P>Normally, the default values are ok, and there is no need to change anything here.'
  3284             enterCallbackSelector: #checkCompilerAvailability
  3285             leaveCallbackSelector: #rememberUsedCompiler
  3286         ) decodeAsLiteralArray.
  3287 
  3288     specs add:
  3289         #(AssistantPageSpec
  3290             pageTitle: 'Check Into Source Repository'
  3291             windowSpecSelector: page7a_checkinSpec
  3292             enterCallbackSelector: #checkSourceCodeManagerType
  3293             infoText: 'Optionally check the package''s source and build-support files into the 
  3294 source code repository.
  3295 <p>You can skip this for a quick test (a local build), 
  3296 or if you do not have/want a central repository.'
  3297         ) decodeAsLiteralArray.
  3298 
  3299     specs add:
  3300         #(AssistantPageSpec
  3301             pageTitle: 'Build'
  3302             windowSpecSelector: page7b_buildSpec
  3303             canEnterQuerySelector: #canEnterBuild
  3304             enterCallbackSelector: #restoreMakeOutputsContents
  3305             leaveCallbackSelector: #rememberMakeOutputsContents
  3306             infoText: 'Start the build-process. This will create an isolated build directory,
  3307 and run "<i>make</i>" there to compile all required classes.
  3308 <P>            
  3309 On Windows, it will use "<i>nsis</i>" to generate a self-installable executable, 
  3310 and you must have the compiler (borland-bcc, visual-c or mingw) and NullSoft NSIS packages installed for this to work.
  3311 Without NSIS, you can "zip" the folder where the "exe" is generated 
  3312 and unzip on a target machine.
  3313 <P>
  3314 On OS X, it will generate a "dmg" for deployment. You should have XCode or the "gcc" tool chain installed.
  3315 <P>
  3316 On Linux, an installable package will be generated. You should have the development support packages installed (gcc, Xlib etc.).
  3317 <P>
  3318 To try the application, open an Explorer/Finder on the directory and double click on the executable.
  3319 Alternatively, open a command window and type the name of the executable there. 
  3320 Sorry, but double-click in the ST/X file browser does not work.'
  3321         ) decodeAsLiteralArray.
  3322 
  3323     self projectTypeIsLibrary ifTrue:[
  3324         specs add:
  3325             #(AssistantPageSpec
  3326                 pageTitle: 'Deploy'
  3327                 windowSpecSelector: page8_deploySpec
  3328                 canEnterQuerySelector: #canEnterDeploy
  3329                 enterCallbackSelector: enterDeploySpecification
  3330                 infoText: 'Find the generated binary class library file here.
  3331 Because this is a library package (i.e. no application package), 
  3332 there is no deployable installer generated, just the binary (.so / .dll).'
  3333             ) decodeAsLiteralArray.
  3334     ] ifFalse:[   
  3335         specs add:
  3336             #(AssistantPageSpec
  3337                 pageTitle: 'Deploy'
  3338                 windowSpecSelector: page8_deploySpec
  3339                 canEnterQuerySelector: #canEnterDeploy
  3340                 enterCallbackSelector: enterDeploySpecification
  3341                 infoText: 'Find the installer-file to be deployed (or test-run the executable). 
  3342 You can open an Explorer/Finder there to copy the files for deployment. 
  3343 After that, the build directory is no longer needed. 
  3344 However, you can keep it for a faster compile the next time.'
  3345             ) decodeAsLiteralArray.
  3346     ].
  3347     ^ specs.
  3348 
  3349     "Modified: / 04-09-2012 / 09:49:50 / cg"
  3350 ! !
  3351 
  3352 !ProjectBuilderAssistantApplication methodsFor:'update'!
  3353 
  3354 checkCompilerAvailability
  3355     |cmd suite warnMsg1 warnMsg2 sep usedCompiler|
  3356 
  3357     cmd := 'cc'.
  3358     warnMsg1 := warnMsg2 := ''.
  3359 
  3360     usedCompiler := self usedCompilerHolder value.
  3361     usedCompiler = 'bcc' ifTrue:[
  3362         cmd := 'bcc32'.
  3363     ] ifFalse:[
  3364         usedCompiler = 'vc' ifTrue:[
  3365             cmd := 'cl'.
  3366             warnMsg1 := 'Due to bugs in this C-compiler, some classes may not be compilable.'.
  3367         ] ifFalse:[
  3368             usedCompiler = 'lcc' ifTrue:[
  3369                 cmd := 'lcc'.
  3370                 warnMsg1 := 'The LCC C-compiler suite is not officially supported.'.
  3371             ] ifFalse:[
  3372                 usedCompiler = 'tcc' ifTrue:[
  3373                     cmd := 'tcc'.
  3374                     OperatingSystem isMSWINDOWSlike ifTrue:[
  3375                         warnMsg1 := 'The Tiny C-compiler suite is not yet supported (linkage).'.
  3376                     ].
  3377                 ] ifFalse:[
  3378                     usedCompiler = 'gcc' ifTrue:[
  3379                         cmd := 'gcc'.
  3380                     ] ifFalse:[
  3381                         cmd := usedCompiler.
  3382                     ].
  3383                 ]
  3384             ]
  3385         ]
  3386     ].
  3387 
  3388     suite := ProjectBuilder suiteNameOfCompiler:(self usedCompilerHolder value).
  3389     self nameOfUsedCompilerSuiteHolder value:suite.
  3390 
  3391     (OperatingSystem canExecuteCommand:cmd) ifFalse:[
  3392         warnMsg2 :=
  3393 'The "%1"-command seems to be not in your path.
  3394 Please ensure that you installed the 
  3395 "%2" compiler suite correctly.
  3396 (However, the makefiles might know where to find the compiler)
  3397 ' bindWith:cmd with:suite.
  3398     ].
  3399 
  3400     (warnMsg1 notEmpty or:[warnMsg2 notEmpty]) ifTrue:[
  3401         sep := ''.
  3402         (warnMsg2 notEmpty) ifTrue:[ sep := '\\' withCRs ].
  3403 
  3404         self compilerWarnMessageHolder value:('Warning:
  3405 
  3406 ',warnMsg1,sep,warnMsg2).
  3407         self compilerWarnMessageVisibleHolder value:true.
  3408     ] ifFalse:[
  3409         self compilerWarnMessageVisibleHolder value:false
  3410     ].
  3411 
  3412     "Modified: / 06-09-2012 / 15:58:58 / cg"
  3413 !
  3414 
  3415 checkSourceCodeManagerType
  3416     |button scm package|
  3417 
  3418     button := self builder componentAt:'CheckinButton'.
  3419 
  3420     package := selectedProjectDefinition package.
  3421     scm := AbstractSourceCodeManager managerForPackage:package.
  3422     scm isNil ifTrue:[
  3423         scm := selectedApplication sourceCodeManager.
  3424         scm isNil ifTrue:[
  3425             scm := SourceCodeManager
  3426         ].
  3427     ].
  3428     scm isNil ifTrue:[
  3429         button disable
  3430     ] ifFalse:[
  3431         button label:(resources string:'Checkin (%1)...' with:scm managerTypeName)
  3432     ].
  3433 !
  3434 
  3435 delayedUpdate:something with:anArgument from:changedObject
  3436     changedObject == Smalltalk ifTrue:[
  3437         (something == #newClass
  3438         or:[something == #classRemove
  3439         or:[something == #projectOrganization]]) ifTrue:[
  3440             self updateListOfMatchingProjects.
  3441             self updateListOfNewProjectsName.
  3442             ^ self.
  3443         ].
  3444         ^ self.
  3445     ].
  3446 
  3447     "Created: / 10-09-2012 / 14:07:47 / cg"
  3448 !
  3449 
  3450 enterContentsSpecification
  3451     |toAdd|
  3452 
  3453     self updateListOfClassesInProject.
  3454 
  3455     toAdd := OrderedCollection new.
  3456 
  3457     "/ ensure that startup & app-class are in the list
  3458     selectedApplication notNil ifTrue:[
  3459         (selectedProjectDefinition classNames includes:selectedApplication name) ifFalse:[
  3460             toAdd add:selectedApplication.
  3461         ].
  3462     ].
  3463     selectedStartupClass notNil ifTrue:[
  3464         (selectedProjectDefinition classNames includes:selectedStartupClass name) ifFalse:[
  3465             toAdd add:selectedStartupClass.
  3466         ].
  3467     ].
  3468 
  3469     selectedProjectDefinition includeClasses:toAdd usingCompiler:nil.
  3470 
  3471     self updateListOfClassesInProject.
  3472 !
  3473 
  3474 enterDeploySpecification
  3475     |fileBrowserCanvas fileBrowser|
  3476 
  3477     self projectTypeIsLibrary ifTrue:[
  3478         fileBrowserCanvas := self builder componentAt:'FileBrowserSubCanvas'.
  3479         fileBrowser := fileBrowserCanvas application. 
  3480         fileBrowser filterModel value:('*' , ObjectFileLoader sharedLibraryExtension).
  3481     ].
  3482 !
  3483 
  3484 enterPrerequisitesSpecification
  3485     |toAdd|
  3486 
  3487     self updateListOfPrerequisitesInProject.
  3488 
  3489 "/    toAdd := OrderedCollection new.
  3490 "/
  3491 "/    "/ ensure that startup & app-class are in the list
  3492 "/    selectedApplication notNil ifTrue:[
  3493 "/        (selectedProjectDefinition classNames includes:selectedApplication name) ifFalse:[
  3494 "/            toAdd add:selectedApplication.
  3495 "/        ].
  3496 "/    ].
  3497 "/    selectedStartupClass notNil ifTrue:[
  3498 "/        (selectedProjectDefinition classNames includes:selectedStartupClass name) ifFalse:[
  3499 "/            toAdd add:selectedStartupClass.
  3500 "/        ].
  3501 "/    ].
  3502 "/
  3503 "/    selectedProjectDefinition includeClasses:toAdd usingCompiler:nil.
  3504 "/
  3505 "/    self updateListOfClassesInProject.
  3506 
  3507     "Created: / 19-01-2012 / 15:36:47 / cg"
  3508 !
  3509 
  3510 fetchAttributesFromProjectDefinition
  3511     self fetchSelectedProject.
  3512     selectedProjectDefinition notNil ifTrue:[
  3513         self productNameHolder value: selectedProjectDefinition productName.
  3514         self companyNameHolder value: selectedProjectDefinition companyName.
  3515     ].
  3516 
  3517     "Created: / 04-09-2012 / 09:50:46 / cg"
  3518 !
  3519 
  3520 rememberMakeOutputsContents
  3521     makeOutputHolder value:(makeOutputWindow contents)
  3522 !
  3523 
  3524 rememberProjectAttributes
  3525     self assert:selectedProjectDefinition notNil.
  3526     Class withoutUpdatingChangesDo:[
  3527         self productNameHolder value ~= selectedProjectDefinition productName ifTrue:[
  3528             selectedProjectDefinition class compile:(selectedProjectDefinition 
  3529                         productName_codeFor:(self productNameHolder value)).
  3530         ].
  3531         self companyNameHolder value ~= selectedProjectDefinition companyName ifTrue:[
  3532             selectedProjectDefinition class compile:(selectedProjectDefinition 
  3533                         companyName_codeFor:(self companyNameHolder value)).
  3534         ]
  3535     ].
  3536 !
  3537 
  3538 rememberUsedCompiler
  3539     LastUsedCompiler := self usedCompilerHolder value.
  3540 
  3541     "Created: / 04-09-2012 / 09:45:42 / cg"
  3542 !
  3543 
  3544 restoreMakeOutputsContents
  3545     makeOutputWindow contents:makeOutputHolder value
  3546 !
  3547 
  3548 update:something with:anArgument from:changedObject
  3549     changedObject == Smalltalk ifTrue:[
  3550         (something == #newClass
  3551         or:[something == #classRemove
  3552         or:[something == #projectOrganization]]) ifTrue:[
  3553             self enqueueDelayedUpdate:something with:anArgument from:changedObject.
  3554             ^ self.
  3555         ].
  3556         ^ self.
  3557     ].
  3558     super update:something with:anArgument from:changedObject
  3559 
  3560     "Modified: / 10-09-2012 / 14:08:17 / cg"
  3561 !
  3562 
  3563 updateApplicationComment
  3564     |comment|
  3565 
  3566     self selectedApplicationIndexHolder value notNil ifTrue:[
  3567         comment := self commentFromClass:selectedApplication.
  3568         comment isNil ifTrue:[
  3569             comment := 'Application has no comment' allItalic withColor:Color lightGray.
  3570         ].
  3571     ] ifFalse:[
  3572         comment := 'Please select an Application' allItalic withColor:Color lightGray.
  3573     ].
  3574     self selectedApplicationsComment value:comment.
  3575 !
  3576 
  3577 updateComment
  3578     |comment|
  3579 
  3580     self selectedProjectIndexHolder value notNil ifTrue:[
  3581         comment := self commentFromClass:selectedProjectDefinition.
  3582         comment isNil ifTrue:[
  3583             comment := 'Project has no comment' allItalic withColor:Color lightGray.
  3584         ].
  3585     ] ifFalse:[
  3586         comment := 'Please select a Project' allItalic withColor:Color lightGray.
  3587     ].
  3588     self selectedProjectsComment value:comment.
  3589 !
  3590 
  3591 updateListOfApplicationsInProject
  3592     |oldList applicationClasses package appClass appClassIndex|
  3593 
  3594     appClassIndex := nil.
  3595 
  3596     selectedProjectDefinition isNil ifTrue:[
  3597         applicationClasses := #()
  3598     ] ifFalse:[
  3599         package := selectedProjectDefinition package.
  3600 
  3601         applicationClasses := Smalltalk allClasses
  3602                                     select:[:cls |
  3603                                         ((cls isSubclassOf:ApplicationModel)
  3604                                         and:[ self hideOtherApplicationClasses value not
  3605                                               or:[ cls package = package ]])
  3606                                     ].
  3607         applicationClasses := applicationClasses asOrderedCollection.
  3608         applicationClasses sort:[:a :b | a name < b name].
  3609 
  3610 "/        startUpClassName := [ selectedProjectDefinition startupClassName ] ifError:[ nil ].
  3611 "/        startUpClassName notNil ifTrue:[
  3612 "/            startUpClass := Smalltalk classNamed:startUpClassName.
  3613 "/            startUpClass notNil ifTrue:[
  3614 "/                appClassIndex := applicationClasses indexOf:startUpClass.
  3615 "/                appClassIndex == 0 ifTrue:[ appClassIndex := nil ].
  3616 "/            ].
  3617 "/        ].
  3618     ].
  3619 
  3620     oldList := self listOfApplicationsInProject value.
  3621     oldList = applicationClasses ifFalse:[
  3622         appClass := selectedApplication.
  3623         appClassIndex := applicationClasses indexOf:appClass.
  3624         appClassIndex == 0 ifTrue:[ appClassIndex := nil ].
  3625 
  3626         self listOfApplicationsInProject value:applicationClasses.
  3627         self selectedApplicationIndexHolder value:appClassIndex.
  3628     ].
  3629 
  3630     "/ auto select first application
  3631     applicationClasses size == 1 ifTrue:[
  3632         self selectedApplicationIndexHolder value:1.
  3633     ].
  3634 !
  3635 
  3636 updateListOfClassesInProject
  3637     self listOfClassesInProject value:(selectedProjectDefinition classNames).
  3638 !
  3639 
  3640 updateListOfMatchingProjects
  3641     |query matching projectType idx|
  3642 
  3643     projectType := self projectType.
  3644     projectType = ProjectDefinition libraryType ifTrue:[
  3645         query := #isLibraryDefinition
  3646     ] ifFalse:[
  3647         projectType = ProjectDefinition guiApplicationType ifTrue:[
  3648             query := #isGUIApplication
  3649         ] ifFalse:[
  3650             projectType = ProjectDefinition nonGuiApplicationType ifTrue:[
  3651                 query := #isConsoleApplication
  3652             ] ifFalse:[
  3653                 self halt:'oops - unknown projectType'.
  3654                 projectType := ProjectDefinition guiApplicationType.
  3655             ].
  3656         ].
  3657     ].
  3658 
  3659     Class flushSubclassInfo.
  3660 
  3661     matching := ProjectDefinition allSubclasses
  3662                     select:[:defClass |
  3663                         |match|
  3664 
  3665                         match := false.
  3666 
  3667                         defClass isAbstract ifFalse:[
  3668                             (self hideSTXProjects value not
  3669                             or:[ defClass package asPackageId module ~= 'stx' ])
  3670                             ifTrue:[
  3671                                 match := defClass perform:query
  3672                             ].
  3673                         ].
  3674                         match
  3675                    ]. 
  3676 
  3677     matching sort:[:a :b | a name < b name].
  3678     self listOfMatchingProjects value:matching.
  3679     self listOfMatchingPackageIds value:(matching collect:[:def | def package]).
  3680 
  3681     idx := matching indexOf:selectedProjectDefinition.
  3682     idx == 0 ifTrue:[
  3683         self selectedProjectIndexHolder value:nil.
  3684     ] ifFalse:[
  3685         self selectedProjectIndexHolder value:idx.
  3686     ].
  3687 
  3688     "Modified: / 20-07-2012 / 15:04:15 / cg"
  3689 !
  3690 
  3691 updateListOfMatchingProjectsAndProjectIDs
  3692     self updateListOfMatchingProjects.
  3693     self updateListOfNewProjectsName.
  3694 
  3695     "Created: / 20-08-2012 / 19:33:12 / cg"
  3696 !
  3697 
  3698 updateListOfNewProjectsName
  3699     |loadedProjectIDsWithoutProjectDefinition|
  3700 
  3701     loadedProjectIDsWithoutProjectDefinition := 
  3702         Smalltalk allLoadedPackageIDs 
  3703             select:[:eachPackageID | 
  3704                 eachPackageID ~= PackageId noProjectID 
  3705                 and:[ (ProjectDefinition definitionClassForPackage: eachPackageID) isNil ].
  3706             ].
  3707     loadedProjectIDsWithoutProjectDefinition := loadedProjectIDsWithoutProjectDefinition asOrderedCollection.
  3708     loadedProjectIDsWithoutProjectDefinition 
  3709         addFirst:(UserPreferences current usersModuleName "OperatingSystem getLoginName",':','demos','/','demo1').
  3710     self listOfNewProjectsName value:loadedProjectIDsWithoutProjectDefinition.
  3711 
  3712     "Modified: / 20-08-2012 / 19:31:35 / cg"
  3713 !
  3714 
  3715 updateListOfPrerequisitesInProject
  3716     self listOfPrerequisitesInProject value:(selectedProjectDefinition effectivePreRequisites).
  3717 
  3718     "Created: / 19-01-2012 / 15:39:15 / cg"
  3719 !
  3720 
  3721 updateListOfStartupClassesInProject
  3722     |startupClasses package startUpClassName startUpClass startupClassIndex|
  3723 
  3724     startupClassIndex := nil.
  3725     self selectedStartupClassIndexHolder value:nil.
  3726 
  3727     selectedProjectDefinition isNil ifTrue:[
  3728         startupClasses := #()
  3729     ] ifFalse:[
  3730         package := selectedProjectDefinition package.
  3731 
  3732         startupClasses := Smalltalk allClasses
  3733                                     select:[:cls |
  3734                                         ((cls includesBehavior:StandaloneStartup)
  3735                                         and:[ self hideOtherStartupClasses value not
  3736                                               or:[ cls package = package ]])
  3737                                         or:[ cls == Smalltalk
  3738                                              and:[ self hideOtherStartupClasses value not ] ]
  3739                                     ].
  3740         startupClasses := startupClasses asOrderedCollection.
  3741         startupClasses sort:[:a :b | a name < b name].
  3742 
  3743         startUpClassName := [ selectedProjectDefinition startupClassName ] ifError:[ nil ].
  3744         startUpClassName notNil ifTrue:[
  3745             startUpClass := Smalltalk classNamed:startUpClassName.
  3746             startUpClass notNil ifTrue:[
  3747                 startupClassIndex := startupClasses indexOf:startUpClass.
  3748                 startupClassIndex == 0 ifTrue:[ startupClassIndex := nil ].
  3749             ].
  3750         ].
  3751     ].
  3752 
  3753     self listOfStartupClassesInProject value:startupClasses.
  3754     self selectedStartupClassIndexHolder value:startupClassIndex.
  3755 !
  3756 
  3757 updateProjectAttributes
  3758     self assert:selectedProjectDefinition notNil.
  3759     self productNameHolder value:(selectedProjectDefinition productName).
  3760     self companyNameHolder value:(selectedProjectDefinition companyName).
  3761     self executableNameHolder value:(selectedProjectDefinition applicationName).
  3762 ! !
  3763 
  3764 !ProjectBuilderAssistantApplication class methodsFor:'documentation'!
  3765 
  3766 version
  3767     ^ '$Header$'
  3768 !
  3769 
  3770 version_CVS
  3771     ^ '$Header$'
  3772 ! !
  3773