Defining the project

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

Figure 27-1: Displaying project properties in the Project painter

Shown is the Project painter with its five zones. The executable file name in the sample is basic _ tutorial dot e x e. The platform selected for deployment is a Pocket P C device with an ARM operating system. The build directory field shows a single dot, indicating that the build will be done in the current directory. Temporary files created during the build will be deleted because the Delete Temporary Files check box is selected. The deployment target directory is set to backslash Program Files and the check boxes for deploying after build and adding a shortcut to the Start menu are selected. Nothing is selected in zone 4 and default version information is listed in zone 5.

When you build a project object, you specify the following components of your application:

After you create a project, you might need to update it because your library list has changed or because you want to change your compilation options.

StepsTo define a project:

  1. Open a project in the Project painter by:

  2. Specify or modify options as needed.

    If you opened an existing project or a project created using the wizard, previously selected options display in the workspace. For information about each option, see “Executable application project options”.

  3. When you have finished defining the project object, save the object by selecting File>Save from the menu bar.

    PocketBuilder saves the project as an object in the specified library. Like other objects, projects are listed in the System Tree and the Library painter.

Executable application project options

Table 27-3 describes each of the options you can specify in the Project painter for executable applications. You can also specify many of these options in the Application wizard in the Project page of the New dialog box.

Table 27-3: Project options

Option

What you specify or select

Executable File Name

Specify a name for the executable. The name must have the extension EXE.

Resource File Name

(Optional) Specify a PocketBuilder resource file (PKR) for your executable if you dynamically reference resources (such as bitmaps and icons) in your scripts and you want the resources included in the executable file instead of having to distribute them separately.

You can type the name of a resource file in the box or click the button next to the box to browse your directories for the resource file you want to include. For more information, see “Distributing resources”.

Sign the application

(Usually signed; required to be signed by some operators such as AT&T and Orange) Specify that you want to sign the application and select a certificate to use by clicking the Application Certificate button.

Platform to Build

Select the platform for your application in the Select a Build Platform dialog box; you can build and deploy to only one platform for a given project. Desktop, PocketPC Device (ARM), and Smartphone Device (SPARM) are always listed. You deploy projects to Windows Mobile 5 or later emulators as you would to a Pocket PC or Smartphone device.

If you have installed Windows Mobile 2003 emulators on your machine, the emulators are also listed as available platforms. If emulators are installed, you can select an emulator and click the Configure button to display the Windows CE Platform Manager Configuration dialog box, allowing you to add or test connections to additional devices and emulators.

Build Directory

Select a directory where you want to build your application. The default build directory is (.), which is the directory that contains the main PocketBuilder application library.

Delete Temporary Files After Build

Select the check box to delete temporary files after the build. The files include the executable and dynamic libraries deployed to the device.

Target Directory

Select a directory on the device or emulator where you want to deploy your application. The default deployment directory for a Pocket PC device or emulator is \Program Files. The default deployment directory for a Smartphone device or emulator is \Storage\Program Files.

Deploy After Build

Select this to deploy the application after the build is complete. If the check box is not selected, then using the Deploy menu item for a target or using the Deploy PowerBar button results in only a build, not a deploy.

Launch Application

Select this if you want to launch the application immediately upon deployment to a device or emulator.

Add Shortcut to Start Menu

(Not an option for the Desktop platform) Select to add a Start menu item for the deployed application on the device or emulator. For a Pocket PC, the path is Start>Programs. For a Smartphone, the path is Start>Accessories. You can override the default directory by changing the DeviceShortcutPath entry in the PocketBuilder registry.

Deploy Today Item

(Not an option for the Desktop or older emulator platforms) Select to deploy a custom item to the Today screen of a device. You enter the Today item properties on the Today Item page of the Properties view for the Application object. For more information, see “Application object properties for a custom Today item”.

Create CAB File for Distribution

(Not an option for the Desktop platform) Select this if you want PocketBuilder to build a CAB file for deployment to a device or emulator. For more information about building and distributing CAB files, see “Delivering your application to end users”.

Sign the CAB File

(Not an option for the Desktop or Pocket PC platform) Specify that you want to sign the CAB file and select a certificate to use by clicking the CAB Certificate button. For more information about signing CAB files, see “Signing an application and CAB file”.

Version

Specify your own values for the Company Name, Product Name, Description, Copyright, and Version fields associated with the executable file. These values become part of the Version resource associated with the executable file, and—if you deploy to the desktop—most of these values display on the Version tab page of the Properties dialog box for the file in Windows Explorer. The Company Name and Product Name fields are placed in the CAB file for your own reference.

PKD

Select this check box to define a library as a dynamic library to be distributed with your application.

Resource File Name

Specify a resource file for a dynamic library if library objects use resources (such as bitmaps and icons) and you want to include the resources in the dynamic library instead of having to distribute them separately. The file name cannot be specified in the wizard.