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, 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 PBAutoBuild 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: PBAutoBuild220 /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 (64-bit) or Microsoft RichEdit Control (64-bit) runtime DLLs, as applicable. (read more)
-
Include the 64-bit version of the Visual C++ runtime and GDI+ libraries (e.g. vcruntime140.dll, vcruntime140_1.dll, concrt140.dll, msvcp140.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)