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