Ispirer Ispirer
 


Ispirer Home Page Ispirer SQLWays Product Page - PowerBuilder Conversion Request SQLWays

PowerBuilder 6.x-7.x - Extracting Source from PBL Files

In order to perform the conversion of the PowerBuilder application first you need to extract the script files of which each PowerBuilder Library (PBL) file consist. These are the files containing the definition of each object used in the application. There is only one way for PowerBuilder 6.x-7.x versions do this task - using tool developed by our team. 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”.

Download PBExtractor

Extracting Source from PBL Files Using Tool

  • Run PowerBuilder.
  • Create new application.
  • Click “Application” button:

  • Create new application (Menu File→New):

  • Select folder, type file name “pbextractor” for *.pbl file and press “Save” button:

  • Give name to the Application:

  • Do not generate template for it:

  • Create New Window.
  • Press “Window” button:

  • Click on button “New”:

  • Save the window as …:

  • Give name “w_pbextract” to the window and press “OK”.

  • Make double click on layout editor inside window’s border. Properties dialog for the window should be opened. Add title to window, for example “PbExtractor”:

  • Declare members for the window.
  • Declare Global Variables for window (you can find it at downloaded file “w_pbextract.srw”):

  • Declare Local External Function for window (you can find it at downloaded file “w_pbextract.srw”):.

  • Add 3 controls “StaticText” to window with names and text as on pictures (you can find it at downloaded file “w_pbextract.srw”).

  • Put them inside window’s border on layout editor and call Properties dialog.
  • Name and Text for the controls should be like these:

  • Add 2 controls “SingleLineEdit” to window with names and text as on pictures (you can find it at downloaded file “w_pbextract.srw”):

  • Put them inside window’s border on layout editor and call Properties dialog.
  • Name and Text for the controls should be like these:

  • Add control “CommandButton” to window with name and text as on picture (you can find it at downloaded file “w_pbextract.srw”):

  • Put it inside window’s border on layout editor and call Properties dialog.
  • Name and Text for the controls should be like these:

  • Place controls on window as on picture (you can find it at downloaded file “w_pbextract.srw”):

  • Add script for open event of window (you can find it at downloaded file “w_pbextract.srw”).
  • Make right click inside window’s border on layout editor:

  • Select “Open” event:

  • Copy event’s body from file w_pbextract:

  • Add functions to window:
  • Click on Menu Declare→Window Functions

  • Click “New” button to create a function:

  • Add function “of_parsetoarray” to window (you can find it’s declaration at downloaded file “w_pbextract.srw”):

  • Copy the body of function “of_parsetoarray” from downloaded file “w_pbextract.srw” (you can find it declaration at downloaded file “w_pbextract.srw”):

  • Add function “of_count_lines” to window (you can find it declaration at downloaded file “w_pbextract.srw”):

  • Copy the body of function “of_count_lines” from downloaded file “w_pbextract.srw” (you can find it’s declaration at downloaded file “w_pbextract.srw”).

  • Add function “of_extract” to window (you can find it declaration at downloaded file “w_pbextract.srw”):

  • Copy the body of function “of_extract” from downloaded file “w_pbextract.srw” (you can find it’s declaration at downloaded file “w_pbextract.srw”).

  • Add clicked event script for “CommandButton” control (you can find it declaration at downloaded file “w_pbextract.srw”):
  • Make right click on button in layout editor:

  • Select “Clicked” event:

  • Copy “Clicked” event’s body from file “w_pbextract.srw”:

  • Add open event script for application pbextractor (you can find it declaration at downloaded file “pbextractor.sra”):
  • close Window’s editor
  • select “pbextractor” application
  • click on “Script” button

  • select “Open” event from dropdown list:

  • Copy “Open” event’s script body from file “pbextractor.sra”:

  • Now you can Run application

Using PBExtractor

  1. Run PBExtractor
  2. Specify path to PBL or LST file in first text box “Path to PBL or LST file:”*. Should be specified existing pbl or lst file.
  3. Specify folder where extracted files should be placed in second text box “Folder for extracted files:”. Path should ended with “\” and should be specified existing directory.
  4. Press button “Extract…”

* Type of files:

PBL - PowerBuilder library you plan to extract sources 
LST - List of full paths to PBL files, separated by new line


Ispirer Home Page Ispirer SQLWays Product Page - PowerBuilder Conversion Request SQLWays

sqlways/powerbuilder/extracting-source-from-powerbuilder-6x-7x-files.txt · Last modified: May 07, 2018, 03:15:32 PM (external edit)
 
© 1999-2018, Ispirer Systems Ltd.
All Rights Reserved.  Privacy Statement