Table of Contents
PowerBuilder 9.x - Extracting Source from PBT Files
In order to perform the conversion of the PowerBuilder application first you need to extract the script files that each PowerBuilder Target (PBT) file consists of. These are the files containing the definition of each object used in the application. There are two ways to do this task using tool developed by our team or do it manually from PowerBuilder. One more benefit of using PBExtractor is collecting information about lines of code for each type of file and total amount of this files. All information is saved into “total_information.log”.
NOTE: If you are planning to use Ispirer MnMTK for migration of extracted PowerBuilder files, ensure that it saves them in one of the following encodings:
Extracting Source from PBT Files Using PBExtractor
- Download and extract http://ispirer.net/downloads/pbextractor9.0.zip.
- Run PowerBuilder.
- In PowerBuilder create Workspace with any name.
- Create a new target with name “pbextractor”.
- Open the target in “Edit Source” mode and copy from extracted folder all the content from the file “pbextractor.sra” except for “open event”.
- Import file “w_pbextract.srw” to library.
- Add “open event” to the target (Open (w_pbextract);).
- Run PBExtractor.
During extraction a file total_information.log will be created with full information about extraction and files <PB_library_name.lst> with information about library objects.
Extracting Source from PBT Files Manually
For this purpose please go to the “Tools” menu and run the “Library Painter” as it is specified in the screen-shot below:
In the opened “Library Painter” window please browse to one of the pbt files from your PowerBuilder project, select all the objects in the left-hand pane, click the right mouse button on the selected objects and choose “Export” in the menu, like in the picture below:
After that you will be prompted to specify the location of each object exported, which definition will be stored in its own file (SRD, SRU, SRW, SRF & etc.) in the specified location.
The same set of actions needed to be performed for each PBT file in the project to acquire the definitions of all the objects in the project.