Building workspaces/solutions

You can build and deploy workspaces/solutions while you are working in PowerBuilder, from a command line, or using PBAutoBuild standalone tool.

In the development environment

In the development environment, you can specify how you want the targets/projects in your workspace/solution to be built and deployed. Then you can build individual targets/projects or all the targets/projects in the workspace/solution. The following table summarizes where you set up build and deploy options, and how you start builds.

To do this

Do this

Set deploy options for most targets/projects

Select Properties from the pop-up menu for the target/project and select the Deploy tab. Check the box next to a project to build it when you select Deploy from the target/project's pop-up menu. Use the arrows to set the order in which projects are built.

Set options for each project in the target/project in the Project painter.

Set build and deploy options for the workspace/solution

Select Properties from the pop-up menu for the workspace/solution and select the order in which targets/projects should be built. You can check which projects and deploy configurations are currently selected on the Deploy Preview page.

Build, migrate, or deploy a selected target/project

Select Incremental Build, Full Build, Migrate, or Deploy from the pop-up menu for the target/project. Deploy builds the projects in the target/project in the order listed on the Deploy page of the target/project's properties dialog box.

Build or deploy all the targets/projects in the workspace/solution

Select Incremental Build, Full Build, or Deploy from the pop-up menu for the workspace/solution, from the Run menu, or from the PowerBar.

You can also use PowerScript Build to optimize build time, when DataWindows have not been modified. PowerScript Build will recompile PowerScripts only and skip DataWindow recompilation.


From a command line

When you deploy or build a workspace/solution from a command line, PowerBuilder starts, completes the build, and exits as soon as the operation is completed. To retain a log file for the session, you can send the contents of the Output window to a file. The following table shows command-line options for building and deploying targets/projects and workspaces/solutions.

Option

Description

/workspace workspacepath or solutionpath

Open the workspace workspacepath or solution solutionpath

/target targetpath or projectpath

Open the target targetpath or project projectpath

/deploy

Deploy the workspace/solution and exit

/fullbuild

Fully build the workspace/solution and exit

/incrementalbuild

Incrementally build the workspace/solution and exit

/output outputpath

Log the contents of the Output window to outputpath


As with other command-line options, you need only to use the initial letter or letters of the option name as long as the option is uniquely identified. The deploy, fullbuild, and incrementalbuild options can be used only with the workspace/solution option. You need to create projects and specify build and deploy options for the workspace/solution in PowerBuilder before you start a build from the command line. Deploy builds the projects in the target in the order listed on the Deploy page of the target's properties dialog box.

Example

This example assumes that the location of the PowerBuilder executable file is in your system path. It opens the workspace called CDShop, builds and deploys the targets in the workspace according to your specifications in the workspace and target properties, records the content of the Output window in the file D:\tmp\cdshop.out, and exits PowerBuilder:

pb250 /w D:\CDShop\CDShop.pbw /d /out D:\tmp\cdshop.out

The output from all the tab pages in the Output window and from all the projects is included in the output file.

There are additional command-line options you can use to start PowerBuilder. See Using command line arguments.

Using PBAutoBuild standalone tool

Instead of building the project from the PowerBuilder IDE, you can also build the project using a standalone tool (PBAutoBuild250.exe) in the command-line mode. PBAutoBuild250.exe can automate the entire build and deploy process without requiring PowerBuilder IDE installed or any PowerBuilder license running.

PBAutoBuild250 /f c:\salesdemo_local.json /l Log_PCBuild.log /le Log_PCError.log

For more details on how to build the PowerClient project with PBAutoBuild, refer to Building the PowerClient project with commands and Tutorial: Building your PowerClient project with commands.

For more details on how to build the Application project with PBAutoBuild, refer to Building a client/server application with commands and Tutorial: Building your client/server application with commands.

For more details on how to build the PowerServer project with PBAutoBuild, refer to Build & deploy using commands and Tutorial: Building your PowerServer project with commands.