|
|
YOUR FEEDBACK
Did you read today's front page stories & breaking news?
SYS-CON.TV SYS-CON.TV WEBCASTS |
POWERBUILDER LINKS YOU MUST CLICK ON Product Review
PowerBuilder Product Review: PowerGen by E. Crane Computing
The proven workhorse for PowerBuilder build automation
By: Al Soucy
Oct. 27, 2006 08:00 PM
Digg This!
Page 1 of 2
next page »
We discovered PowerGen when we were looking for a command line utility for importing objects into PowerBuilder. At the time (PowerBuilder V5.0) we were struggling with a source control system whose SCC-API interface was having all kinds of trouble with PowerBuilder (as most source control systems did at the time). As a result we cobbled together our own check-in/check-out utility using PowerGen's command line operations.
What is PowerGen? It has two major functions. The first is producing PB deliverables from PBLs. To do this it offers regeneration, PBD and DLL creation, and EXE creation. To support the users' complete automation requirements it also includes, copy, import, export, and optimize functions. With a separate utility VersionEdit, delivered with PowerGen, it can also modify version resource information. (VersionEdit also works with any standard Windows executable such as EXE and DLL.) The second major function is producing PBLs from source objects. Starting with only the PB objects in their *.sr* exported source format, PowerGen can create PBLs and repopulate them with their constituent objects. First introduced for PB 5.0, this function is called Bootstrap Import (a term since appropriated by other products). It allows "source traceable builds," an essential element of a good Software Configuration Management (SCM) process. It also lets you maintain only object-level source in your Source Control system, without resorting to versioning PBLs, which was never a good practice. A sister function of the Bootstrap Import, the Synchronize function, will update a set of PBLs with modified source. In the Synchronize function PowerGen examines each object in the PBL and compares it with the exported source. It updates the object in the PBL only if it's changed. It also adds new objects, represented in export files, but not present in the PBL, and removes objects that exist in the PBL, but have no corresponding source. The advantage of the Synchronize function over the Bootstrap Import is that the Synchronize function is usually an order of magnitude faster.
The PowerGen 'Project' New projects are created from existing PB applications defined in Targets, Workspaces, and PB.INI files. A project can also be created by choosing the application PBL and adding the libraries individually. (See Figure 1) When presented in the PowerGen's GUI, the applications in the project are shown in the top list and the PBLs in the selected application are shown in the bottom list. Note that the paths used in the project can be specified as "relative paths." This allows for greater portability between specific build environments. PowerGen provides a lot of control for the build process. Each PBL is marked as included or excluded from the regeneration process. This has proven efficient for applications sharing PBLs, because the shared PBLs are regenerated the first time they appear and are then subsequently just referenced in the library list. This saves time in the build. Likewise PBDs or DLLs can be created selectively for each PBL, avoiding redundant operations. Each PBL can be turned into its own PBD or its objects can be included with the EXE. Another useful feature is that PowerGen will relocate the deliverables, PBDs/DLLs/EXE to a specified directory. Finally, as part of the build process PowerGen can, optionally, optimize the PBLs. One capability unique to PowerGen is that it can create a mix of PBDs and DLLs for a single application. Although DLLs (machine code) haven't been widely used, there are cases where specific functions in an application will benefit. If those functions are confined to just one or a few PBLs then PowerGen can create DLLs for just those PBLs. This functionality provides an opportunity to optimize the delivery environment without unduly burdening the build environment. The project is saved as a separate file with a .gen extension. The file is ASCII and is fully documented with the understanding that users may want to modify or create their projects programmatically. Although the information saved in the project file has been expanded through the various releases of PowerGen, each new PowerGen version can open any previous version's projects. See Listing 1. Most of PowerGen's options are saved in the project file although a few are saved in the registry. The ones saved in the registry are judged to be more germane to the build environment than a specific project. For example, the option of whether the resulting PB applications exhibit "New Visual Styles" is saved in the Registry.
Command Line and GUI The command line syntax generally consists of "switches" introduced by a slash (/) with parameters separated by spaces. Command lines can be simple. For example, Pwrgn105.exe /A=Examples.gen will build all of the applications defined in the project, Examples.gen. This means it will regenerate the PBLs and create PBDs and EXEs as defined in the project. (See Figure 2) Note that the name of the PowerGen EXE corresponds to the version of PB that you're using; Pwrgn105.exe corresponds to PB10.5. A more complicated example is: Pwrgn105.exe /K=Examples.gen /PBG /P=PBExamfe.pbl /RP /L=Example.log /A=Example This command line synchronizes an individual PBL, PBExamfe.pbl in the example application defined in the project file, Examples.gen. The /PBG switch indicates that the synchronize function should use the corresponding PBG file, PBExamfe.pbg, to get information about the objects that belong in the PBL. The /RP switch specifies doing a full regeneration following synchronization and the /L parameter names the file where the output log is saved. PowerGen signals a failure from a command line operation by writing a file containing an error code. Scripts can be branch-based in the absence or existence of the file. For example:
If Exist Power1.err Goto ERROR You can see the scripts that we use at NH-DHHS on the E. Crane Web site on their support pages, http://ecrane.com/scripts.htm. Page 1 of 2 next page »
PBDJ LATEST STORIES . . .
SUBSCRIBE TO THE WORLD'S MOST POWERFUL NEWSLETTERS SUBSCRIBE TO OUR RSS FEEDS & GET YOUR SYS-CON NEWS LIVE!
|
SYS-CON FEATURED WHITEPAPERS MOST READ THIS WEEK BREAKING POWERBUILDER / SYBASE NEWS
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||