After you click Finish in the wizard, PowerBuilder creates a .NET Windows Forms project in the target library that you selected and opens the project in the Project painter. The painter displays all the values you entered in the wizard and allows you to modify them. It also displays additional properties that you can set only in the painter.
Tab page |
Properties |
---|---|
General |
The output path is where the application is deployed in the file system. This is not the same as the location where the application is published if you choose to publish the application as a smart client application. The build type determines whether the project is deployed as a debug build (default selection) or a release build. You use debug builds for debugging purposes. If you select Release, no PDB files are generated. Release builds have better performance, but when you run a release build in the debugger, the debugger does not stop at breakpoints. Clear the Enable DEBUG Symbol check box if you do not want any DEBUG preprocessor statements you have added to your code to be included in your deployed application. This selection does not affect and is not affected by the project’s debug build or release build setting. For more information about using preprocessor statements, see “About conditional compilation”. |
Resource Files |
PowerBuilder .NET Windows Forms do not support PBR files, and they are unable to locate images embedded in PBD files. You can, however, search a PBR file for images required by the application. All resource files must be relative to the path of the .NET Windows Forms target. If the files your application requires are in another directory, copy them into the target’s directory structure and click the Search PBR, Add Files, or Add Directory button again. Clear the check box in the Recursive column for a directory to deploy only the files in the directory, or select it to deploy files in its subdirectories as well. The Publish Type column indicates whether the file is a static file that should be installed in the Application directory, or application-managed data that should be installed in a Data directory. For more information, see “Resource files and publish type”. |
Library Files |
Use the Library Files tab page to make sure all the PowerBuilder library files (PBLs or PBDs) that contain DataWindow or query objects used by the application are deployed with the application. PBD files can contain only DataWindow and Query objects PBD files that you deploy to .NET as resource files can contain only DataWindow and Query objects. If your application references a PBD file that contains other PowerBuilder objects, such as functions or user objects, you must deploy it as a PBL file. If your application uses external functions, use the Add button to include the DLL files in which they reside to the list of files to be deployed. You can also add PowerBuilder runtime files, including pbshr110.dll and pbdwe110.dll (if the project uses DataWindows), on this page, or you can add them on the Prerequisites page. |
Version |
Use the Version tab page to specify information that displays in the generated executable file’s Properties dialog box in Windows Explorer. The company name is used if you publish the application. For more information, see “Publish the application”. |
Post-build |
Use the Post-build page to specify a set of commands to be executed after building the application, but before the deployment process starts. A command can be the name of a stand-alone executable file or an operating system command such as copy or move. You can save a separate processing sequence for debug builds and release builds. (You change the build type of a project deployment on the General tab of the Project painter.) |
Run |
Use the Run page to specify any command line arguments that the application requires, as well as the name of the working directory in which the application starts. |
The remaining pages in the Project painter are enabled if you checked the smart client check box in the wizard or on the General page. Check this box if you want to publish the application to a server so that users can download it and install updates as you make them available. For more information, see Chapter 10, “Intelligent Deployment and Update.”
Click the Add Files button on the Resource Files page to select image files that your application requires. PowerBuilder .NET Windows Forms do not support PBR files, and they are unable to locate images embedded in PBD files. All resource files must be relative to the path of the .NET Windows Forms target. If the files your application requires are not in the directory structure accessible from the Choose Required Resource Files dialog box, copy them into the directory structure, then reopen the dialog box.
Image files are designated as Include files. They are installed in the same directory as the application’s executable files, libraries, and other static files. You can also specify that a file’s Publish Type is “Data File.” Files of this type are installed to a data directory. When an update to the application occurs, a data file might be migrated by the application.
The data directory is intended for application-managed data—data that the application explicitly stores and maintains. To read from and write to the data directory, you can use code enclosed in a conditional compilation block to obtain its path:
string is_datafilename long li_datafileid is_datafilename="datafile.txt" #if defined PBWINFORM Then if System.Deployment.Application. ApplicationDeployment.IsNetworkDeployed=true then is_datafilename=System.Windows.Forms. Application.LocalUserAppDataPath+ "\\"+is_datafilename end if #end if li_datafileid = FileOpen (is_datafilename, linemode!, write!, lockwrite!, append!)
For more information about using preprocessor symbols and conditional compilation, see Chapter 13, “Referencing .NET Classes in PowerScript.”
Other files, such as database drivers and PowerBuilder DLLs, should be included on the Prerequisites page if you are publishing a smart client application, or on the Library Files page.