Updating the application

When you update an application and publish the updates, the revision number is incremented automatically unless you clear the check box in the Publish Version group box on the Publish page.

PowerBuilder creates a new directory on the server for the new version with a new application manifest file, and updates the deployment manifest file in the top-level directory. Figure 10-3 shows an overview of the directory structure for an application with one revision. The deployment manifest for each version is saved in a numbered file, which enables you to force a rollback from the server if you need to. For more information, see “Rolling back”.

Figure 10-3: Published file structure

On the server, the application directory contains the publish.htm file, setup and configuration files, and subdirectories for each version of the application.

Online only applications

If the application is available online only, the latest updates are always downloaded before the application runs.

Online and offline applications

If the application is available offline as well as online, the user is notified of new updates according to the update strategy you specified in the wizard or Project painter. Whether the application was originally installed from the Web, a file server, or a CD or DVD, the intelligent updater component always checks for updates on the Web.

When to check for updates

You can specify that the application never checks for updates (if it does not require automatic updating or uses a custom update), or that it checks for updates either before or after it starts. If you specify a check after the application starts and an update is available, it can be installed the next time the application is run. For high-bandwidth network connections, you might want to use the before startup option, and for low-bandwidth network connections or large applications, use the after startup option to avoid a delay in starting the application. If you specify that the intelligent updater performs the check after the application starts, you can choose to perform the check every time the application starts or only when a specified interval has elapsed since the last check.

If an update is available, a dialog box displays to inform the user, who can choose to download the update immediately or skip the current update and check again later. The user cannot skip the update if you have specified that it is mandatory. You set all these properties on the Install/Update page.

Figure 10-4: Checking for updates

After a new update is published, client computers can check for and download updates.

Intelligent notifier

When you select either of the check for updates options for an application that is available offline, the Notify tab page is enabled. The notifier enables users to check for updates and download them manually while the application is running. When the application starts, a notifier icon displays in the task bar. By default, the icon is a PowerBuilder icon, but you can choose a custom icon in the Project painter.

The pop-up menu that displays when a user right-clicks the notifier icon displays the current version and contains Check for Update, Retrieve Update, Restart with New Version, Poll for Updates, and Options menu items.

The Check for Update option is enabled when you first open the pop-up menu.

Check for Update opens a pop-up window that contains information about the availability of updates. If any are available, the Retrieve Update item is enabled, and if the update is downloaded and installed, the Restart with New Version item is enabled.

Selecting the Poll for Updates item enables or disables polling for updates. When Poll for Updates is enabled, the notifier checks for updates at the interval specified in the dialog box that displays when the user selects the Options item. In this dialog box, the user can also specify the title of the pop-up window that displays when the user selects Check for Update.