Difference between revisions of "Build Configurations"

From VSI OpenVMS Wiki
Jump to: navigation, search
openvms>Sergey.vorfolomeev
(Custom build configurations)
 
(14 intermediate revisions by 5 users not shown)
Line 1: Line 1:
'''New in version 0.0.22'''
+
A project build configuration defines how the project should be built. You can have multiple build configurations for a project so that you can build the same code for different purposes.<br>
 +
By default, there are two build configurations:
 +
* '''DEBUG''', which is necessary for debugging
 +
* '''RELEASE''', which produces binaries for your project deployment.
 +
If necessary, you can add custom build configurations for your project.
  
== Named build configurations ==
+
== Working with build configurations ==
 +
=== Editing build configurations ===
 +
You can edit the list of build configurations the same way you edit the project settings:
 +
# Press ''F1'' and run the ''VMS-IDE: Edit VMS project settings'' command or use the [[VMS_IDE_Project_Explorer|Project Explorer]] view
 +
# Find the ''builds'' section
 +
# Make the required changes
  
 +
=== Changing current build configuration ===
 +
To change the current build configuration:
 +
# Open the [[VMS_IDE_Project_Explorer|Project Explorer]] view
 +
# In the ''PROJECT DESCRIPTION'' section, right-click the ''buildName'' parameter, then select ''Change''
 +
# In the popup list select the required configuration.
 +
 +
== Build configuration parameters ==
 +
Each build configuration includes the following parameters:
 +
* '''label''' - unique name of the build configuration. Note: the label is also used as the name of the output folder.
 +
* '''description''' - description of the build configuration
 +
* '''command''' - command (MMS or COM file) to build or clean the project
 +
* '''parameter''' - parameter to pass over to the command
 +
 +
=== Default build configuration ===
 +
If the command is empty, the default [[Auto-generating MMS|auto-created MMS]] file is used to build the project. The '''parameter''' value is used to specify the type of the build: ''DEBUG'' or ''RELEASE''.
 +
 +
=== Custom build configurations ===
 +
If the user defined command is an '''MMS''' file, it is processed via "MMS/EXTENDED_SYNTAX/DESCR=<MMS file> ''parameter''" command.<br>
 +
 +
If the user defined command is a '''COM''' file, it is executed with "@<COM file> ''parameter''" command.<br>
 +
 +
In case of '''CLEAN''' order the resulting command will be: <br>
 +
* for MMS: "MMS/EXTENDED_SYNTAX/DESCR=<MMS file> ''parameter'' CLEAN"
 +
* for COM: "@<COM file> CLEAN"
 +
 +
'''NOTE:''' It is recommended that the user-defined build procedure creates resulting files in '''<project root>/<output folder>/<build label>''' directory.
 +
 +
=== Example ===
 +
<pre>
 
     "builds": {
 
     "builds": {
 
         "configurations": [
 
         "configurations": [
Line 21: Line 59:
 
                 "description": "My own build release",
 
                 "description": "My own build release",
 
                 "command": "executable.mms",
 
                 "command": "executable.mms",
                 "parameter": ""  
+
                 "parameter": "/MACRO=(\"OUTDIR=OUT\",\"CONFIG=RELEASE\")"  
 
             },
 
             },
 
             {
 
             {
Line 31: Line 69:
 
         ]
 
         ]
 
     }
 
     }
 
+
</pre>
* '''label''' - unique label, name of build configuration. Also this value is used as output folder.
 
* '''description''' - description
 
* '''command''' - command to build, clean project
 
* '''parameter''' - parameter to pass into command
 
 
 
In case of command is empty the default auto-created MMS file is used to build project. Parameter is used to distinguish DEBUG and RELEASE.<br>
 
If the user defined command is MMS file, it is processed via command "MMS/EXTENDED_SYNTAX/DESCR=<MMS file> '''parameter'''", so the parameter is treated as a target.<br>
 
If the user defined command is COM file, it is executed like "@<COM file> '''parameter'''".<br>
 
In the '''CLEAN''' operation '''parameter''' will be just "CLEAN" string.<br>
 
 
 
Editing of '''builds''' is the same as editing of '''project settings'''.<br>
 
 
 
To change current build configuration click "Change" on the '''buildName:''' line.<br>
 
 
 
To debug a project, there must be a build configuration named '''DEBUG'''.<br>
 
 
 
Changes in '''task2cmd''': parameter for any build and clean command must be named build configuration label.<br>
 
  
 
[[Category:VMS IDE]]
 
[[Category:VMS IDE]]

Latest revision as of 08:34, 20 March 2020

A project build configuration defines how the project should be built. You can have multiple build configurations for a project so that you can build the same code for different purposes.
By default, there are two build configurations:

  • DEBUG, which is necessary for debugging
  • RELEASE, which produces binaries for your project deployment.

If necessary, you can add custom build configurations for your project.

Working with build configurations

Editing build configurations

You can edit the list of build configurations the same way you edit the project settings:

  1. Press F1 and run the VMS-IDE: Edit VMS project settings command or use the Project Explorer view
  2. Find the builds section
  3. Make the required changes

Changing current build configuration

To change the current build configuration:

  1. Open the Project Explorer view
  2. In the PROJECT DESCRIPTION section, right-click the buildName parameter, then select Change
  3. In the popup list select the required configuration.

Build configuration parameters

Each build configuration includes the following parameters:

  • label - unique name of the build configuration. Note: the label is also used as the name of the output folder.
  • description - description of the build configuration
  • command - command (MMS or COM file) to build or clean the project
  • parameter - parameter to pass over to the command

Default build configuration

If the command is empty, the default auto-created MMS file is used to build the project. The parameter value is used to specify the type of the build: DEBUG or RELEASE.

Custom build configurations

If the user defined command is an MMS file, it is processed via "MMS/EXTENDED_SYNTAX/DESCR=<MMS file> parameter" command.

If the user defined command is a COM file, it is executed with "@<COM file> parameter" command.

In case of CLEAN order the resulting command will be:

  • for MMS: "MMS/EXTENDED_SYNTAX/DESCR=<MMS file> parameter CLEAN"
  • for COM: "@<COM file> CLEAN"
NOTE: It is recommended that the user-defined build procedure creates resulting files in <project root>/<output folder>/<build label> directory.

Example

    "builds": {
        "configurations": [
            {
                "label": "DEBUG",
                "description": "DEBUG",
                "command": "",
                "parameter": "DEBUG" 
            },
            {
                "label": "RELEASE",
                "description": "RELEASE",
                "command": "",
                "parameter": "RELEASE" 
            },
            {
                "label": "myOwnRelease",
                "description": "My own build release",
                "command": "executable.mms",
                "parameter": "/MACRO=(\"OUTDIR=OUT\",\"CONFIG=RELEASE\")" 
            },
            {
                "label": "myOwnDebug",
                "description": "My own build debug",
                "command": "build.com",
                "parameter": "DEBUG" 
            }
        ]
    }