When you are ready to deploy an application to users, you publish it to the server. Users can then download the application, usually from a publish page that contains a link to the server.
Figure 10-1: Deploying an intelligent update application
You need to:
After you develop a PowerBuilder application that will be published as a .NET Windows Forms application with intelligent update capabilities, if you did not create a project when you built the application, select the .NET Windows Forms Application wizard or project icon on the Project page of the New dialog box to build a project.
To specify that the application uses intelligent update, select the check box on the Specify Support for Smart Client page in the wizard. Selecting this check box enables additional pages in the wizard:
On the Specify Application Running Mode page, specify whether the application can be used both online and offline (the default), or online only.
On the Specify How Application Will be Installed page, specify whether the user installs the application from a Web site, a shared path, or from a CD or DVD.
On the Specify Application Update Mode page, specify whether the application checks for updates before starting, after starting, or neither. For more information, see “Updating the application”.
You can also select the Publish as a Smart Client Application check box on the General page in the Project painter. Selecting the check box enables the tab pages in the dialog box where you set publishing properties. You can set additional properties in the Project painter. For example, if you want to publish the application to an FTP site, select that option and specify details on the Publish page.
The publish location, specified on the Publish page in the Project painter, determines where the application files are generated or copied to when you publish the application. It can be an HTTP address, an FTP site, or a UNC address.
The install location, specified on the Install/Update page, determines where the end user obtains the initial version of the application. It can be an HTTP address or UNC address, by default the same address as the publish location specified in the wizard, or a CD or DVD. The install location does not need to be the same as the publish location. For example, you can publish the application to an FTP site, but specify that users get the application and updates from a Web site.
The update location, also specified on the Install/Update page, determines where the user obtains updated versions of the application. If the install location is an HTTP address or UNC address, the update location is always the same as the install location. If the application was installed from a CD or DVD, updates must be obtained from an HTTP or UNC address.
Applications installed using intelligent update typically run with a limited set of permissions based on a security zone that depends on how the application was originally installed. Full Trust is used for applications installed from a CD or DVD, Local Intranet Trust is used when the application is installed from a network share, and Internet Trust is used when the application is run or installed from the Web. In PowerBuilder 11, Full Trust is always used.
Full trust permissions are required for local intranet deployment. When you deploy and run an application from a network path (either a path on a mapped drive or a UNC path), the .NET Framework on the computer must be configured to have Full Trust permissions at runtime. To set these permissions, select Administrative Tools>Microsoft .NET Framework 2.0 Configuration from the Windows control panel. In the .NET Framework Configuration tool, expand My Computer and select Runtime Security Policy>Machine>Code Groups>All_Code>LocalIntranet_Zone. Select Properties from the pop-up menu and select FullTrust in the Permission set drop-down list on the Permission Set tab page.
After you set publish properties, click the Publish button on the toolbar in the Project painter to publish the application to the server.
PowerBuilder checks whether your publish settings are valid and prompts you to correct them if necessary. If the application is not up to date, PowerBuilder rebuilds and redeploys it before publishing it to the server. The files that the application needs at runtime are then published to the server. If you select the defaults in the wizard, the application is deployed to a subdirectory of the IIS root directory on your local computer, usually C:\Inetpub\wwwroot.
If you encounter problems when publishing the application, see “Troubleshooting tips for Windows Forms applications”.
The following additional files are created on the server:
The application manifest is
an XML file that describes the deployed application, including all
the files included in the deployment, and is specific to a single
version of the application. The file is named appname.exe.manifest
,
where appname is the name of your Windows Forms
application. This file is stored in a version-specific subdirectory
of the application deployment directory.
The deployment manifest is
an XML file that describes an intelligent update deployment, including
the current version and other deployment settings. The file is named appname.application
,
where appname is the name of your Windows Forms
application. It references the correct application manifest for
the current version of the application and must therefore be updated
when you make a new version of the application available. The deployment
manifest must be strongly named. It can contain certificates for
publisher validation.
If you specified any prerequisites for the application, such as the .NET Framework or database drivers, PowerBuilder uses a bootstrapper program to collect the details in a configuration file called configuration.xml and adds the prerequisites to a setup.exe program. For more information, see “Using the bootstrapper”.
The publish.htm file is a Web page that is automatically generated and published along with the application. The default page contains the name of the application and links to install and run the application and, if you specified any, a button to install prerequisites.
By default, the application name is the same as the name of the target and the company name is Sybase, Inc. In this publish page, both have been changed by setting the Product Name and Company Name properties on the General page in the Project painter.