To make it easier to manage multiple small projects, AcuBench has a command-line interface that allows you to generate and build workspaces from the Windows cmd shell.
The AcuBench command-line interface allows you to generate and build an entire workspace, or any program within a workspace. By default, whichever project mode is currently active for the project (as recorded in the .pjt file) is used to determine the compiler settings used for the build.
It is important to remember that only a single instance of each AcuBench version can run on a given machine. This means that you must close the IDE before using the command-line interface.
The syntax for building a workspace using the command-line interface is as follows:
[acupath]\acubench.exe /build [projectdir]\[workspace.pjt]
For example, if you have AcuBench installed in the default directory, and you would like to generate and build a workspace called Project1, use the following command:
C:\Program Files (x86)\Micro Focus\extend x.x.x\acubench\acubench.exe /build C:\project1\project1.pjt
where x.x.x is the extend version number.
From the command-line interface, the /build and /rebuild flags are interchangeable. With either parameter, AcuBench checks whether code has changed since the last build. If any part of the program has changed, the code is regenerated and compiled. This is the same behavior that you get when you execute a Build Workspace command from the AcuBench Build menu.
The syntax for generating a workspace using the command-line interface is as follows:
[acupath]\acubench.exe /generate [projectdir]\[workspace.pjt]
For example, if you have AcuBench installed in the default directory, and you would like to generate a workspace called Project1, use the following command:
C:\Program Files (x86)\Micro Focus\extend x.x.x\acubench\acubench.exe /generate C:\project1\project1.pjt
AcuBench regenerates the code but does not build the programs. This is the same behavior that you get when you execute a Regenerate Workspace command from the AcuBench Build menu.
All output messages generated during the build are recorded in a file called build.log, placed in the project directory for the workspace being built. If this log file does not exist, it is created. If the log file already exists, messages generated by the new build are appended to the existing log. The log file also includes the start and end times for the build.
To generate and build a single program in a project, the syntax is as follows:
[acupath]\acubench.exe /build [projectdir]wkspc.pjt prg.psf
To generate a single program in a project, the syntax is as follows:
[acupath]\acubench.exe /generate [projectdir]wkspc.pjt prg.psf
To generate and build multiple workspaces at the same time, you can create Windows script (batch) files. In the following example, using extend 10.0.0, the script builds three programs residing in two workspaces and prints compiler success or failure messages to the screen:
@echo off rem ------------------------------------------------------------- set bench_10="C:\Program Files (x86)\Micro Focus\extend 10.0.0\acubench\acubench" echo ************************************************************* echo ... now building program1 %bench_10% /build C:\project1\sample1.pjt program1.psf IF %errorlevel%==0 ECHO Success. IF NOT %errorlevel%==0 ECHO Fail. echo. echo ... now building program5 %bench_10% /build C:\project1\sample1.pjt program5.psf IF %errorlevel%==0 ECHO Success. IF NOT %errorlevel%==0 ECHO Fail. echo. echo ... now building sample25 %bench_10% /build C:\demos\demos.pjt sample25.psf IF %errorlevel%==0 ECHO Success. IF NOT %errorlevel%==0 ECHO Fail. echo.
Likewise, a script file could be used to build several complete workspaces and create a log file, or send a message to the system administrator when the builds are complete.
You can extract all of the skeletons from AcuBench.Bin by executing acubench with the /extract option:
acubench /extract AcuBench.Bin
This results in a number of .asp files (for example, AcuCbl.asp), which can be modified. After modifying them, you need to rebundle the files back into AcuBench.Bin, with the /bundle option:
acubench /bundle AcuBench.Bin