1. Javier García
  2. PowerBuilder
  3. Friday, 10 July 2020 12:06 PM UTC

Hello:

we have a big PB project with more than 300 pbl's, that is compiled every week.

Each PBL is compiled into the corresponding PBD file.

Sometimes we need to compile a single PBD file to correct some bug before the total weekly compilation.

 

We are considering using the PBC190 compiling tool to compile and deploy the project without manual intervention, as today we are compiling manually.

We have successfully compiled the full application using PBC190, but we can't find a way to compile a single PBD file in case of need. The documentation states that only .pbw or .pbt files are supported (not PBL), so I'm guessing that there is no way to compile a single PBL file into a PBD as we are currently done manually from the IDE.

Anyone can confirm this, or is there any way to compile a single PBL into the correspondent PBD without compiling the whole project?

Thanks in advance.

 

Olan Knight Accepted Answer Pending Moderation
  1. Friday, 10 July 2020 14:27 PM UTC
  2. PowerBuilder
  3. # 1


Assuming the PBL you want to compile into a PBD is in the Library List of the currentapplication, simply right-click on the PBL then select OPTIMIZE. When that's finished, right-click the same PBL and select BUILD RUNTIME LIBRARY and you'll create an updated PBL.


Later  -

Olan

 

Comment
There are no comments made yet.
Roland Smith Accepted Answer Pending Moderation
  1. Friday, 10 July 2020 12:59 PM UTC
  2. PowerBuilder
  3. # 2

You could create a windowless app in PowerBuilder that uses ORCA functions to do that.

Here are the ORCA functions you need:

PBORCA_SessionOpen
PBORCA_SessionSetLibraryList
PBORCA_SessionSetCurrentAppl
PBORCA_DynamicLibraryCreate
PBORCA_SessionClose

 

Comment
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Friday, 10 July 2020 15:48 PM UTC
  2. PowerBuilder
  3. # 3

Hi Javier;

  Unfortunately, the PBC does not offer that feature currently. Please submit a Support Ticket for this as an enhancement request.

  Olan's or Roland's IDE approach would achieve this or you could also use the PB "ORCAScript" feature as another alternative to the PBC handicap.

Note that OrcaScript is not ORCA. ORCA is a C++ API calling interface.

Regards ... Chris

Comment
There are no comments made yet.
mike S Accepted Answer Pending Moderation
  1. Friday, 10 July 2020 15:54 PM UTC
  2. PowerBuilder
  3. # 4

i do this all the time - use orcascript

https://docs.appeon.com/pb2019/pbug/apbs02.html

 

 

Comment
  1. mike S
  2. Friday, 10 July 2020 16:48 PM UTC
to be clear, orcascript is not the same as the PBC. it is sort of the same, but has more features. harder to setup since you need to script it yourself, but well worth the trouble.



it would have been cool if appeon had created an orcascript generator that would create the orcascript file from a project
  1. Helpful
  1. René Ullrich
  2. Monday, 13 July 2020 08:16 AM UTC
Hi Mike,

I've written a VBS-Script that reads PBT and SRJ file and creates a orca script, that builds PBLs from (local) source files, compiles it and builds EXE and PBDs.
  1. Helpful
  1. mike S
  2. Monday, 13 July 2020 11:39 AM UTC
René,

that sounds pretty cool for full builds. for single or a few PBDS, then you still need to probably write orcascript. Unless you add a front end to your VBS that would allow a user to select one or more pbls to build stand alone.



PB used to have a 'bug' in it (i think appeon was the one who 'fixed' it) where if you had an object open in the IDE, then went to the library painter and right clicked a pbl and selected "build pbd", the IDE would error, and then build JUST that selected pbd. If you dont have an object open, then the IDE will recompile too much stuff and usually break things. the only way to build a single pbd now is to use orcascript or a 3rd party tool.

  1. Helpful
There are no comments made yet.
Yiannis Papadomichelakis Accepted Answer Pending Moderation
  1. Monday, 13 July 2020 08:04 AM UTC
  2. PowerBuilder
  3. # 5

We have the same problem. We want to build single libraries (usually libraries that contain custom objects) but we dont want rebuild / regenerate the entire application.

For this reason, we use PowerGen from E.Crane computing. You can create projects, mix pbds and dlls and more.

You you want, you can generate pbds, without the regenerating / rebuild process.

 

Comment
There are no comments made yet.
mike S Accepted Answer Pending Moderation
  1. Monday, 13 July 2020 11:52 AM UTC
  2. PowerBuilder
  3. # 6

sample orcascript to build a patch.pbl:

I copy the pbl to be built to a 'build' subdirectory.  That allows me to run the build and also work in the original pbl file without breaking stuff.   I have a batch file that runs this, and the batch file also copies the built pbd to another directory.  I use batch (.bat) files to do the copy instead of orcascript because i use dropbox as a virtual file server and orcascript's file copy can interfere with dropbox (seems orcascript wants an exclusive lock).  the dos copy command works better.  

Note that i do not even need all the source libraries, only the source from the application object - module1 and module2 can just be PBDs.  

 

 BUILD.DAT file:

start session
file copy "patch.pbl" "build\patch.pbl"

set liblist "build\sbtpatch.pbl; C:\App90\SOURCE\main.pbl; C:\App90\module2.pbd;C:\App90\module1.pbd"
set application "C:\App90\SOURCE\main.pbl" "MyAppName"

build library "build\patch.pbl" "" pbd
end session

 

this bat file runs the above DAT file.  I could have put the file copy from the DAT file to this file instead, but i originally had just the one line in the bat file that ran the orcascript (before i started to use dropbox).  either way works.  I save the output from orcascript run to a log file in case something doesn't work.

BUILD.BAT file:

OrcaScr170 build.dat >build.log

copy "build\patch.pbd" "patch.pbd"
copy "build\patch.pbd" "..\patch.pbd"

Comment
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.