Using the Project painter

You use the Project painter to create and maintain PowerBuilder projects that build all these different objects. The Project painter allows you to streamline the generation of the files your target needs and to rebuild easily when you make changes. There is a wizard to help you set up each project type.

The following table lists the types of projects you can create and what you can build using the project.

Project

What it builds

Application

An executable file and optional dynamic libraries that need to be installed/updated to the client manually.

PowerClient

An executable file and optional dynamic libraries that can be installed/updated automatically from a server.

PowerServer

An executable file and optional dynamic libraries that can be installed/updated automatically from a server and DataWindow objects and embedded SQLs that run as RESTFul Web APIs in a cloud-based n-tier architecture.


For how to create a new project, see Creating a project.

Creating a project

You can create a new project when you create a new target using the Target wizard. You can also create a project at any time from the Project Object page in the New dialog box if you have already created a target of the appropriate type.

The following procedure describes how to create a new project from the Project Object page.

To create a new project object from the Project Object page:

  1. Select File>New or click the New button in the PowerBar to open the New dialog box.

  2. Select the Project Object tab.

  3. Select the target in which you want to create the project from the Target drop-down list on the top of the window.

  4. Select the wizard or project type you need and click OK.

    If you select a wizard (such as Application Wizard), complete the wizard screens to create a new project with most of its properties specified. Use the context-sensitive Help if you are not sure what to enter. You can open the Project painter now or later to modify the properties if necessary and to build the project.

    If you do not select a wizard, the Project painter for the type of object you selected opens so that you can specify properties of the project object.

    Once you have created a project, you can open it from the System Tree.

    Projects can be modified only in the painter

    Unlike most other PowerBuilder objects, a project object cannot be edited in the Source editor.

Target-relative paths and shared projects

All paths used in projects are stored as target-relative paths, if possible. If you later move the application to a different location in the file system, or another user copies or checks out the application, the paths are adjusted relative to the new target location.

For example, suppose user A has an application target stored in the following directory structure, where pbl_1.pbl contains the application object:

C:\target1\target1.pbt
C:\target1\pbls\pbl_1.pbl
C:\target1\pbls\pbl_2.pbl
C:\target1\res\target1.pbr
C:\target1\out\target1.exe

When user B copies the application to the following directory structure, no changes need to be made in the Project painter, because the paths reflect the new directory structure:

D:\PB\My Targets\Target 1\target1.pbt
D:\PB\My Targets\Target 1\pbls\pbl_1.pbl
D:\PB\My Targets\Target 1\pbls\pbl_2.pbl
D:\PB\My Targets\Target 1\res\target1.pbr
D:\PB\My Targets\Target 1\out\target1.exe

A projects that was created in an earlier version of PowerBuilder using hard-coded paths must be opened and resaved before the files it references are modified with target-relative paths.

If a path is not on the drive where the target is stored, then the path is stored as an absolute path. For example, the path to image files stored on a shared network directory such as J:\res\images\common is stored as an absolute path in the project file.

References to files outside the target path

If a project references a PBL or another file on a local drive that is outside the path of the target, make sure that the PBL or file is copied to the new target location and that it is referenced correctly in the project.