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]\acubench80.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:\Micro Focus\Acucbl800\acubench\acubench80.exe /build c:\project1\project1.pjt
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.
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]\acubench80.exe /build [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, the script builds three programs residing in two workspaces and prints compiler success or failure messages to the screen:
@echo off rem ------------------------------------------------------------- set bench_80="C:\microfocus\acucbl800\acubench\acubench80" echo ************************************************************* echo ... now building program1 %bench_80% /build c:\project1\sample1.pjt program1.psf IF %errorlevel%==0 ECHO Success. IF NOT %errorlevel%==0 ECHO Fail. echo. echo ... now building program5 %bench_80% /build c:\project1\sample1.pjt program5.psf IF %errorlevel%==0 ECHO Success. IF NOT %errorlevel%==0 ECHO Fail. echo. echo ... now building sample25 %bench_80% /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 a new /extract option:
acubench /extract AcuBench.Bin
This results in a number of .Asp files, which can be modified. After modifying them, you need to rebundle the files back into AcuBench.Bin, with a new /bundle option:
acubench /bundle AcuBench.Bin
We advise you to make a backup copy of AcuBench.Bin before attempting this procedure.