Appendix B. PowerBuilder Compiler

Installing PowerBuilder Compiler

PowerBuilder Compiler includes the OrcaScript tool (orcascr210.exe), the PowerBuilder Compiler tool (pbc210.exe), and the PBAutoBuild tool (pbautobuild210.exe).

PowerBuilder Compiler can be installed through the PowerBuilder Installer.

  1. Start the PowerBuilder Installer (you must have administrator privileges to run the installer).

  2. Select to agree to the license terms and click Continue.

  3. Click Modify under PowerBuilder 2021.

  4. Select PowerBuilder Compiler from the Programs tab.

  5. Click Install to begin the installation.

  6. Click Finish when installation completes.

The PowerBuilder Compiler setup program does not support upgrade installation.

To silently install PowerBuilder Compiler, you can download its offline installation package and then run the following command:

PowerBuilderCompiler.exe /s

Software requirements

PowerBuilder Runtime must be installed first before you can install PowerBuilder Compiler, as PowerBuilder Compiler requires a runtime to run.

System requirements

Make sure your operating system is one of the following supported systems before you install and run PowerBuilder Compiler.

  • Windows 8.1 32- or 64-bit

  • Windows 10 32- or 64-bit

  • Windows Server 2012 R2

  • Windows Server 2016

  • Windows Server 2019

About PBC210.exe

What is PBC210.exe

PBC210.exe is a standalone app that is used to compile or deploy PowerBuilder projects using DOS commands on Windows. It must be installed to a machine where PowerBuilder Runtime has already been installed. It is provided separately and is currently free for use.

Although there is no major difference between compilation using PBC210.exe and compilation (Run > Full Build/Incremental Build) in PowerBuilder IDE, there are minor differences between deployment using PBC210.exe and deployment in PowerBuilder IDE (Run > Deploy). Please see the following table for details.

Difference

PowerBuilder

PBC210.exe

Resource files

You can specify a separate resource file to associate with a specific .pbl file.

Only a general resource file for all PBLs is included.


Compiling/Deploying PowerBuilder Projects Using PBC210.exe

You can either compile or deploy PowerBuilder projects using PBC210.exe.

  1. Prepare the PowerBuilder projects in PowerBuilder IDE.

    Make sure the PBT file is not read-only.

    Make sure PBL name contains no multi-byte characters. PBC tool will fail to run when PBL name contains multi-byte characters.

  2. In the command window, type PBC210 and the supported parameters such as /d, etc.

    For the PBC210.exe supported parameters, see PBC210.exe supported parameters.

    Note: You can create and generate the command using the PBC runtime parameters for deployment in PowerBuilder IDE, and then copy and paste the command to the command window. In the PowerBuilder IDE, click New > Project > Application to create the command with PBC runtime parameters. You may refer to Creating a project and Defining an executable application project in PowerBuilder Users Guide for more details on creating and defining a project.

PBC210.exe supported parameters

PBC210.exe supports the following three categories of parameters:

  • Parameters for compiling PowerBuilder projects.

  • Parameters for deploying PowerBuilder projects.

  • Parameter for displaying PBC210.exe help.

/c (and other compiling parameters)

/c is used to compile the PowerBuilder projects and then saves the changes into the related PBLs.

/c supports:

  1. two file types: .pbw or .pbt (.pbl is not supported currently).

  2. two compilation modes: /f for full compilation; and /i for incremental compilation. If not specified, full compilation will be used by default.

Examples:

This example compiles test11.pbw in full compilation mode:

pbc210 /c test11.pbw

This example compiles test11.pbw in incremental compilation mode:

pbc210 /c test11.pbw /i

/d (and other deployment parameters)

/d is used to deploy the PowerBuilder projects to EXE and DLL/PBD files. It supports two file types: .pbw or .pbt (.pbl is not supported currently). For example, pbc210 /d test11.pbw.

It also supports the compilation modes (/f for full compilation and /i for incremental compilation) and the following optional parameters for deployments. For example, pbc210 /d "test11.pbt" /o "test11.exe" /r "test11.pbr" /w n /f /m y /tr n /in n /op 0 /x 32 /bg y /p "PowerBuilder Enterprise Series" /cp "Appeon" /de "Appeon Product File" /cr "Contains licensed copyright material by Appeon" /v "1.0.0.1" /fv "1.0.0.1" /ge 1 /le 0 /ps n

Please see the following table for details about these parameters.

Parameters

Description

/o

Name of the application executable file to be created.

All the other related files will be deployed to the same folder as the exe file. For example: /o d:\fo\test11.exe. If not specified, the same name as the PBT file will be used.

PowerBuilder IDE -> Project Painter: Executable file name option

/r

Name of a PBR (PowerBuilder resource file) that will be used to build the executable file. For example, /r test11.pbr.

PowerBuilder IDE -> Project Painter: Resource file name option

/x

Whether the platform to run the exe file is 32-bit or 64-bit. Values are 32 (the default) and 64. For example, /x 32.

32-bit exe file can only run with the 32-bit runtime files, and 64-bit exe file can only run with the 64-bit runtime files.

PowerBuilder IDE -> Project Painter: Platform option

/cp

Name of the company. Default value is “Appeon”.

If there’s space in the company name, the name should be quoted, for example, /cp "Appeon SZ".

PowerBuilder IDE -> Project Painter: Company name option

/p

Name of the product. Default value is “PowerBuilder Enterprise Series”.

If there’s space in the product name, the name should be quoted, for example, /p "PowerBuilder Enterprise Series".

PowerBuilder IDE -> Project Painter: Product name option

/de

Description of the product. Default value is “Appeon Product File”.

If there’s space in the description, the description should be quoted, for example, /de "Appeon Product File".

PowerBuilder IDE -> Project Painter: Description option

/cr

Copyright statement of the product. Default value is “Contains licensed copyright material by Appeon Inc. and others. Use and distribution of Sybase copyright material and licensed material is governed by Appeon End-user License Agreement.”.

If there is space in the copyright description, the description should be quoted, for example, /cr "All rights reserved.".

PowerBuilder IDE -> Project Painter: Copyright option

/v

Version of the software. Default value is “1.0.0.1”.

PowerBuilder IDE -> Project Painter: Product version option (Properties displayed for executable)

/fv

Version of the file. Default value is “1.0.0.1”.

PowerBuilder IDE -> Project Painter: File version option (Properties displayed for executable)

/vn

Version of the software which consist of four integer values representing the major version number, minor version number, fix version number, and build number, with each value separated by a decimal point, for example "11.0.0.3012".

PowerBuilder IDE -> Project Painter: Product version option (Executable version used by installer)

/fvn

Version of the file which consists of four integer values representing the major version number, minor version number, fix version number, and build number, with each value separated by a decimal point, for example "11.0.0.3012".

PowerBuilder IDE -> Project Painter: File version option (Executable version used by installer)

/w

Whether to use the Windows classic style. Values are:

  • y – use the Windows classic style.

  • n – (default) use the PowerBuilder style.

PowerBuilder IDE -> Project Painter: Windows classic style option

/m

Whether to generate machine code executables and dynamic libraries. Values are:

  • y – generate machine code.

  • n – (default) generate pseudo code.

PowerBuilder IDE -> Project Painter: Pcode option and Machine code option

/tr

Whether to generate a trace file for troubleshooting or profiling your application when you run the executable file. Values are y and n (the default).

This parameter takes effect only when machine code executable is generated.

PowerBuilder IDE -> Project Painter: Trace information option

/in

Whether to display context information (such as object, event, and script line number) for runtime errors. Values are y and n (the default).

This parameter takes effect only when machine code executable is generated.

PowerBuilder IDE -> Project Painter: Error context information option

/op

Optimization level. Values are:

  • 0 - (default) Optimize for speed

  • 1 - Optimize for space

  • 2 - None

This parameter takes effect only when machine code executable is generated.

PowerBuilder IDE -> Project Painter: Optimization option

/bg

Whether to enable any code that you placed in DEBUG symbol conditional compilation code blocks. Values are y (the default) and n.

PowerBuilder IDE -> Project Painter: Enable DEBUG symbol option

/ge

Whether to generate manifest. Values are:

  • 0 - (default) No manifest

  • 1 - Embedded manifest

  • 2 - External manifest

PowerBuilder IDE -> Project Painter: Generation options option

/le

Execution level of manifest. This parameter takes effect only when /ge is set to 1 or 2. Values are:

  • 0 - (default) As Invoker

  • 1 - Highest Available

  • 2 - Require Administrator

PowerBuilder IDE -> Project Painter: Execution level option

/ps

Whether to allow access to the protected system UI. Values are y and n (the default). This parameter takes effect only when /ge is set to 1 or 2.

PowerBuilder IDE -> Project Painter: Allow access to protected system UI option

/pd

Whether to generate the PBD/DLL file for a PBL. Values are:

  • y - (default) to generate PBD/DLL file

  • n - not to generate PBD/DLL file

PowerBuilder IDE -> Project Painter: PBD option

When there are more than one PBLs in an application, each PBL can have its own /pd value. For example, when there are three PBLs, /pd nnn indicates only EXE file is generated and no PBD/DLL file is generated; /pd yny indicates the first and the third PBLs will have PBD/DLL files generated; /pd n indicates the first PBL will not have PBD/DLL file generated, and the second and the third PBL will have PBD/DLL files generated because the default value is y.

If you specify to generate the EXE file only without the PBD/DLL file, make sure to test that the EXE file can run correctly.

/rt

The version of PowerBuilder Runtime that will be used to compile the application executable, for example, /rt 19.2.0.0000.

If this parameter is not set, then the runtime version configured in the PowerBuilder IDE will be used; and if no PowerBuilder IDE is installed on the current machine, then the latest runtime within the same major version as PowerBuilder Compiler will be used.


/h

/h is used for displaying the help of PBC210.exe parameters.

Example: pbc210 /h