EGL command file

An EGL command file includes details for generating and deploying output, when you do work outside of the workbench.
You can create the file in either of two ways:

Once you have created the command file, you can pass it to the EGLCMD or EGLSDK command to begin generating. Here is an example use:
java EGLSDK "MyProject/Commands/commandFile.xml"
Here is an example EGL command file, which generates the parts in the files calculatorLib.egl and TestProgram.egl, each using the build descriptor TestProjectJavaBuildOptions in the build file TestProject.eglbld:
<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE EGLCOMMANDS PUBLIC "-//IBM//DTD EGLCOMMANDS 5.1//EN" "">

<EGLCOMMANDS>
  <generate
    file="EGLSource\libraries\calculatorLib.egl">
    <buildDescriptor name="TestProjectJavaBuildOptions"
      file="EGLSource\TestProject.eglbld">
    </buildDescriptor>
  </generate>
  <generate
    file="EGLSource\programs\TestProgram.egl">
    <buildDescriptor name="TestProjectJavaBuildOptions"
      file="EGLSource\TestProject.eglbld">
    </buildDescriptor>
  </generate>
</EGLCOMMANDS>

The previous command file involves generation by main part and its associates, as described in “Generation mode.”

Here is a second example, which generates the MyProgram part in accordance with the TestOptions build descriptor, which is in the TestProject build file:
<?xml version="1.0" encoding="UTF-8"?> 
<!DOCTYPE EGLCOMMANDS PUBLIC "-//IBM//DTD EGLCOMMANDS 5.1//EN" "">

<EGLCOMMANDS 
   eglpath="C:\MyProject\EGLSource;C:\common.eglar">
   <generatePart part="Mypackage.MyProgram">
      <buildDescriptor name="TestOptions"
                       file="C:\MyProject\EGLSource\TestProject.eglbld">
      </buildDescriptor>
   </generatePart>
</EGLCOMMANDS>

The previous command file involves generation by part, as described in “Generation mode.”

Here is a third example, which deploys output in the workspace that is specified in the invoking EGLCMD command, in accordance with a set of deployment descriptor files:
<?xml version="1.0" encoding="UTF-8"?> 
<!DOCTYPE EGLCOMMANDS PUBLIC "-//IBM//DTD EGLCOMMANDS 5.1//EN" ""> 
<EGLCOMMANDS >
   <deploy 
      deploymentDescriptorFile="/MyProject/EGLSource/*"/> 
</EGLCOMMANDS>

You can include multiple generate and generatePart elements in the command file, but at most one deploy element.

Reference details

An EGL command file is an XML file, and the file name must have the extension .xml, in any combination of uppercase and lowercase letters. The file content must conform to the following document type definition (DTD):
shared_resources\plugins\
com.ibm.etools.edt.common\dtd\eglcommands_6_0.dtd
shared_resources
The shared resources directory for your product, such as C:\Program Files\IBM\SDP70Shared on a Windows system or /opt/IBM/SDP70Shared on a Linux system. If you installed and kept a previous version of an IBM® product containing EGL before installing your current product, you may need to specify the shared resources directory that was set up in the earlier installation.
version
The installed version of the plugin. If more than one is present, use the one with the most recent version number, unless you have a reason to use an older version.

The following table shows the elements and attributes supported by the DTD. The element and attribute names are case sensitive.

Element Attribute Attribute value
EGLCOMMANDS (required) eglpath

The eglpath attribute is meaningful only if you are using the command file from EGLSDK. The value is ignored if the command file is invoked from the workbench batch interface.

The attribute identifies directories and EGLAR files to search when EGL uses an import statement to resolve the name of a part. The attribute also resolves references in build files.

The attribute is optional and, if present, references a quoted string that names one or more directories. Here is an example value: 
"c:/mySourceDirectory/EGLSource;c:/myELGAR.eglar"

Each path is absolute and is separated from the next by a semicolon.

buildDescriptor (optional; you can avoid specifying this value if you are using a master build descriptor, as described in “Build descriptor part.”) name

The name of a Build Descriptor part that guides generation. The build descriptor must be in an EGL build (.eglbld) file.

Build descriptor options that you specify when using the command take precedence over options in the build descriptor part (if any) that is listed in the EGL command file.

Please note that debugging information is never included in the generated output, even if you specify a debug build descriptor.

file

The path of the EGL file that contains the build descriptor. The path includes the file name. For EGLSDK, the path can be either absolute or relative to the directory in which you run the command. For EGLCMD, the path must be relative to the workspace.

The path must be in double quotes if the path includes a space.

deploy deployment DescriptorFile

Use this element to deploy parts, as described in “Introduction to EGL generation and deployment.” This element is meaningful only if the command file is accessed from the workbench batch interface (EGLCMD). The element is ignored if the command file is accessed from EGLSDK.

The deploymentDescriptorFile attributes includes the path of the EGL deployment descriptor file that you want to process. The file location is relative to the workspace root.

Embed the path in double quotation marks.

You can include only one deploy subcommand in a command file. Also, do not specify an asterisk (*) in place of a file name because, if you do, only the alphabetically first deployment descriptor is processed, and the command ends with an error.

generate file

Use this element to generate a main part and its associates, as described in “Generation mode.”

The file attribute includes the path of the EGL file that contains the part you want to generate. The path includes the file name. If you omit the file attribute, no generation occurs.

For EGLSDK, the path can be either absolute or relative to the directory in which you run the command. For EGLCMD, the path must be relative to the workspace.

The path must be in double quotes if the path includes a space.

generatePart part

Use this element to generate by part, as described in “Generation mode.”

The part attribute identifies the part to be generated. If you omit the part attribute, no generation occurs.


Feedback