How To Create ORCAScripts for PowerBuilder

Steps to create Orcascipt file for an application.

Refresh libraries from existing source files ( refreshed from SVN by CruiseControl Server).

  1. Start the session using the following statement

start session

 

  1. Connect with the workspace using the following statement

 scc get connect properties “C:\CCNET\ccnet_ws_pb11.5.pbw”

 

  1. Set a log file in a specified path so that it logs all the success or failure information by using the following statement.

scc set connect property logfile “C:\CCNET\trunk\build_application_name.log”

 

  1. Append the log information to the existing log using the following statement.

      scc set connect property logappend TRUE

 

  1. Delete/RePlace all the tempfiles using the following statement.

Scc set connect property deletetempfiles “FALSE”

 

  1. Set the target file, refresh it and import all the source files using the following statement.

scc connect Offline

scc set target “C:\CCNET\trunk\src\nonadmin\<app>.pbt” ImportOnly refresh_all

scc refresh target migrate

 

Build the application.

  1. Build all the libraries (PBLs) inside the application using the following statements.

build library “C:\CCNET\trunk\src\<app>\<app>.pbl” “” pbd

build library “C:\CCNET\trunk\src\common\<app>\<app>.pbl” “” pbd

 

  1. Build the executable using the following statements.

build executable “C:\CCNET\trunk\src\<app>\<app>.exe” “” “” “yyyy”

 

Note: Here number of ‘y’s depends on the number of pbls inside the application. Example, If we have 3 PBLs including common libraries then we have to keep 3 ‘y’s in the statement.

 

  

Deploy the executables in a specific path.

  1. Move all the pbds to a specific path using the following statement.

file copy “C:\CCNET\trunk\src\<app>\<app>.pbd”  “C:\CCNET\trunk\bin\<app>\<app>.pbd”

file copy “C:\CCNET\trunk\src\common\<app>\<app>.pbd” “C:\CCNET\trunk\bin\<app>\<app>.pbd”

 

  1. Move all the exe to a specific path using the following statement.

file copy “C:\CCNET\trunk\src\<app>\<app>.exe”  “C:\CCNET\trunk\bin\<app>\<app>.exe”

 

Close the connection and ends up the session using the following statements.

scc close

end session

 

Over To You

Have you used ORCAScripts to build and deploy your PowerBuilder application? Do you have any suggestions for an alternative tool to achieve the same? Do leave your comments below.

 

 

 

 

 

 

About pbgeeks 12 Articles

PBGeeks is a website for PowerBuilder Professionals to come together and explore the new features being released in PB. Participate in the Forum and exchange your thoughts with the other PB Gurus. Job seekers can find plenty of most recent jobs all around the world in the Jobs Listing section. Employers can post their job openings to be made available to the entire PB community.