Prev | Next |
Build Scripts
The 'Build' page enables you to enter commands to build your project. You can use Enterprise Architect Local Paths and environment variables in composing your command line(s). You can choose to create your own build script, entering various shell commands. You can also choose to simply run an external program or batch file such as an Ant script.
Access
On the Execution Analyzer window, either:
- Locate and double-click on the required script and select the 'Build > Build' page or
- Click on in the window Toolbar, select the Package in which to create a new script, and select the 'Build > Build' page
Ribbon |
Code > Configure > Analyzer > Edit Analyzer Scripts Execute > Run > Analyzer |
Context Menu |
Project Browser | Right-click on Package | Execution Analyzer |
Keyboard Shortcuts |
|
Execute Command As:
Batch File
Use this option to create a shell script. The script is executed in a system command window. Environment variables can be accessed by commands in this script.
Process
Use this option to run a single program.
The command should specify the path to the program, plus any command line arguments. If the path or arguments contain spaces surround them with quotes; for example: "c:\program files (x86)\java\bin\javac.exe"
Build Script
Write your script in the large text box, using the windows shell commands; the format and content of this section depends on the actual compiler you use to build your project. Here are some examples:
Visual Studio:
"C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE\devenv.com" /Rebuild Debug RentalSystem.sln
Visual Studio using a Local Path:
"%VsCompPath%\devenv.exe" /build Debug Subway.sln
Java:
C:\Program Files (x86)\Java\jdk1.6.0_22\bin\javac.exe" -g -cp "%classpath%;." %r*.java
Java using a Local Path:
"%JAVA%\bin\javac.exe" -g -cp "%classpath%;." %r*.java
Wildcard Java builds %r
Source files in sub folders can be built using the %r token. The token has the effect of causing a recursive execution of the same command on any files in all sub folders. See the example above.
Default Directory
The default directory path in which the build script process will run.
Parse Output
This enables you to select a method for automatically parsing the compiler output.
If you select this option, output from the script is logged in the System Output window; Enterprise Architect parses the output according to the syntax you specify.
Deploy after Build
Check this box to cause the Deploy Script to be executed immediately after this Script completes.
Notes
To execute the Build Script, click on the Package in the Project Browser and either:
- Right-click on any Toolbar and select 'Analyzer Toolbars | Build', or
- Press or
- Select the 'Execute > Run > Build > Build' ribbon option