1. David Peace (Powersoft "The PowerBuilder & C# People")
  2. PowerBuilder
  3. Monday, 10 July 2017 13:12 PM UTC


I'm looking to use the PB exe compiler in order to perform unattended builds. I need to perform a get latest from source control prior to the build and also increment version numbers. Has anyone any thoughts on how best to achieve this?



Accepted Answer
Thomas George Accepted Answer Pending Moderation
  1. Tuesday, 11 July 2017 13:28 PM UTC
  2. PowerBuilder
  3. # Permalink

We use a combination of tools to achieve this. Our overall scripting for builds is done in ant, which is kind of like an XML version of C's make files, if you're familiar with that. Within an ant xml file, we get our source code from CVS, and use PowerGen to bootstrap import the source text files into PBLs. I'm not sure why we don't use ORCA script directly but rather paid to use PowerGen, but it's been that way since 2005. Then after the compile we tag the source code with that build's version number.

Not sure of your plans beyond PB 2017, but, unless things have changed, PB 2018 is supposed to eliminate the use of PBLs, so you may have to rewrite the whole thing for that anyway, so you may want to keep that in mind before spending a lot of time automating builds with PBLs. 

I'm kind of wondering what the compile scenario will be like in PB 2018 and beyond, without PBLs.

  1. David Peace (Powersoft "The PowerBuilder & C# People")
  2. Tuesday, 11 July 2017 14:02 PM UTC
HI Both

Many thanks for the input. We currently use PowerGen too. This extracts the code from our source control and builds the PBLs, like you it has been this way since 2000. However, the routines do not fit the new library/folder structures we use for shared code across our numerous applications. We have to have an installed PB IDE to allow the routine to edit objects in the PBLs before performing the build so I was just musing on how we might achieve this going forward, in the short term.

Once the PBLs are gone then we would just script our source control to get latest to disk and compile using the command line compiler. This I believe will be a much simpler routine.

I do not see any point in spending a huge effort to achieve what we already have but if someone have a magic idea I was quite willing to borrow it :)



  1. Helpful
  1. Gary Collins
  2. Wednesday, 16 August 2017 22:33 PM UTC
We use PowerGen too.  I started using it because ORCAScript was buggy and unstable.  Just wanted to note that I have used "pbc170.exe /c foobar.pbt" to compile an app from *.pbt, *.pbg, *.sr* files.  I'm still tinkering with it.  However, after limited testing it seems more stable to me than OrcaScript was in 12.5 

So, a script that might do it:

//command line get source from source control. 

svn checkout /pb/myapp/trunk

//use source control to get version number

svn info -r HEAD | rev.txt

//use command line append to generate user object source to contain revision info

type revhdr.txt rev.txt revftr.txt > revision.sru

//do command line compile using pbc

pbc170 /c foobar.pbt

pbc170 /d foobar.pbt


Note that pbc170.exe also has the /fv and /v command line switches that set the version info.  e.g.  

pbc170 /d /v "" /fv ""

revhdr and revftr are just text files that "wrap" your version number into a simple user object that you instantiate to get the revision number.

  1. Helpful
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Monday, 10 July 2017 13:26 PM UTC
  2. PowerBuilder
  3. # 1

Hi David;

   Unfortunately, the PBC compiler does not interact with SCM software systems. To refresh your PBL's with the latest source from your SCM repository, I would suggest using PB 2017's built-in ORCAScript feature for that. Then use the PBC to complete the compilation process.

Regards ... Chris

  1. Roland Smith
  2. Tuesday, 11 July 2017 13:43 PM UTC
The new compile tool doesn't connect to the website and verify you are licensed. My understanding was that the same would be true of calling the ORCA functions directly but I have not verified that.

  1. Helpful
  1. David Peace (Powersoft "The PowerBuilder & C# People")
  2. Tuesday, 11 July 2017 14:18 PM UTC
Hi Roland

I'm guessing that your bootstrap product might be a solution?

  1. Helpful
  1. Gary Collins
  2. Wednesday, 16 August 2017 21:25 PM UTC
1.  The \Appeon\Powerbuilder\AutoCompiler\\pbc.pdf documentation states that AutoCompile is free.  (Page 4) 

2.  Orcascr170.exe is in the \Appeon\AutoCompile 17.0 directory after installation using the installer in \Appeon\Powerbuilder\AutoCompiler\AutoCompile.exe 

3.  The orca.pdf lists its subject as "This book describes the Appeon OpenLIbrary API (ORCA), which is part of Powerbuilder" (Note use of word 'open'.) There was no mention of licensing requirements that I could see.


  1. Helpful
There are no comments made yet.
  • Page :
  • 1

There are no replies made for this question yet.
However, you are not allowed to reply to this question.