How to use PowerGen and PowerVCS to Automate the PowerBuilder Build Process:

4. Script the Build

All of the operations described above can be performed by command line. The details of the command line syntax are described in separate documents, but the basic operations we outlined in the previous section (Building the PowerBuilder Application from the Latest Checked In Source) can be scripted as follows:

PowerVCS get –f *.* -t c:\build –p –r > log.txt

Pwrgn11.exe /K=PBExample.gen PBExample.olf

Pwrgn11.exe /A=PBExample.gen

The first line retrieves the source, the second line performs the Bootstrap Import and the third line performs the Build. In this example the results of the PowerVCS get are redirected to a log file, log.txt and the output of PowerGen is saved in the default ouput log, powergen.log. PowerGen will return error conditions by writing an error file that can be queried and used to control the flow of the build.