Step 6 - Compilation and Deployment

To compile your 64-bit PowerBuilder application you first need to decide what deployment method you will use. PowerBuilder supports 3 deployment methods, and we strongly recommend considering the last 2 options while you are in process of investing to modernize your existing application:

  1. Client/Server (manual client/server deployment) (read more)

  2. PowerClient (automated client/server deployment) (read more)

  3. PowerServer (cloud-native app deployment) (read more)

Client/Server Deployment

Create a Project Object for the specific 64-bit version of your application.

  • The Project painter for executable applications allows you to streamline the generation of executable files and dynamic libraries.

  • You can select if the executable runs on 32-bit or 64-bit machines by setting the Platform option. (read more)

If you automate the build of your application, you can use the PBC (standalone compiler), ORCA, or PBAutoBuild:

  • PBC - If you will be using the PowerBuilder Compiler then you must use the "/x 64" parameter in order to compile your 64-bit application; otherwise, a 32-bit executable is created by default. Here is a simple example: pbc190 /d MyApp.pbt /x 64.

  • ORCA - If you will be using the ORCA then you need to use the "x64" argument in order to compile your 64-bit application; otherwise, a 32-bit executable is created by default. Here is simple example: build executable exeName iconName pbrName pbdflags [machinecode] [newvstylecontrols] [x64].

  • PBAutoBuild - (available in PowerBuilder 2021 and newer) If you will be using PBAutoBuild210 then you need to set the "Platform" property to 1 in the build file in order to compile your 64-bit application; otherwise, a 32-bit executable is created by default. Here is simple example: PBAutoBuild210 /f buildFile /l logFile /le errorFile". (read more)

Once your application is compiled, you will also need to manage packaging & distributing the appropriate runtime files to your end users. Since this is a manual process, it is important to carefully follow the Installation Checklist, and we strongly recommend using the Runtime Packager to minimize chance that required runtime DLLs are missing.

If using the Runtime Packager:

  • Select the proper PowerBuilder 64-bit Components in order to generate the runtime package needed for 64-bit apps.

  • Keep in mind where your application will look for the runtime files. The runtime file location is no longer recorded in the PATH environment variable; instead it is recorded in the system registry: HKEYLOCALMACHINE\SOFTWARE\Sybase\PowerBuilder Runtime. (read more)

If manually packaging the runtime DLLs:

  • The core runtime files (and majority of additional runtime files) can be used universally for 32-bit and 64-bit projects. So you can package these as before.

  • If the application uses RichText features, package either the TX Text Control ActiveX 28.0 (64-bit) or Microsoft RichEdit Control (64-bit) runtime DLLs, as applicable. (read more)

  • Include the 64-bit version of the Visual C++ runtime, Active Template, and GDI+ libraries (e.g. msvcr100.dll, msvcp100.dll, atl100.dll, etc.). These DLLs are located in %AppeonInstallPath%\Common\PowerBuilder\Runtime [version]\x64.

The best practice is to place all the runtime DLLs in one folder and then place the folder in the same directory as the application executable, so that you can flexibly switch runtime packages in the configuration file (executable-name.xml). (read more)

PowerClient Deployment

Create a PowerClient Project Object for the specific 64-bit version of your application: (read more)

  • Once you have created a PowerClient project, you can open it from the System Tree and modify the properties as necessary.

  • In the General Page of the PowerClient Project Object, you can select if the application compiles to 32-bit or 64-bit by setting the Platform option accordingly. Follow these instructions.

If you automate the build of your application, you MUST use the PBAutoBuild (available in PowerBuilder 2021 and newer):

  • PBAutoBuild - (available in PowerBuilder 2021 and newer) If you will be using PBAutoBuild210 then you need to set the "Platform" property to 1 in the build file in order to compile a 64-bit version; otherwise, a 32-bit version is created by default. Here is simple example: PBAutoBuild210 /f buildFile /l logFile /le errorFile". (read more)

Once your application is compiled, you do not need to manage packaging & distributing the appropriate runtime files to your end users. This is automatically handled for you by PowerClient.

PowerServer Deployment

Create a PowerServer Project Object for the specific 64-bit version of your application: (read more)

  • Once you have created a PowerServer project, you can open it from the System Tree and modify the properties as necessary.

  • In the General Page of the PowerServer Project Object, you can select if the application compiles to 32-bit or 64-bit machines by setting the Platform option accordingly. Follow these instructions.

If you automate the build of your application, you MUST use the PBAutoBuild (available in PowerBuilder 2021 and newer):

  • PBAutoBuild - (available in PowerBuilder 2021 and newer) If you will be using PBAutoBuild210 then you need to set the "Platform" property to 1 in the build file in order to compile a 64-bit version; otherwise, a 32-bit version is created by default. Here is simple example: PBAutoBuild210 /f buildFile /l logFile /le errorFile". (read more)

Once your application is compiled, you do not need to manage packaging & distributing the appropriate runtime files to your end users. This is automatically handled for you by PowerServer.