To ensure that your application can be successfully installed and run, you must first make sure that all components on which it depends are already installed on the target computer. For example, most applications have a dependency on the .NET Framework. The correct version of the common language runtime must be present on the destination computer before the application is installed. You can use tools to help you install the .NET Framework and other redistributable packages as a part of your installation, a practice often referred to as bootstrapping.
The bootstrapper is a simple setup packager that can be used to install application prerequisites such as the .NET Framework, MDAC, database drivers, or PowerBuilder runtime files. You specify what prerequisites your application has and where they can be found. The bootstrapper downloads and installs the prerequisites.
If you select one or more prerequisites on the Prerequisites page, PowerBuilder generates a Windows executable program named Setup.exe that installs these dependencies before your application runs. The packages are copied to a SupportFiles directory on the server.
If a Setup.exe is generated, the Publish.htm page contains a link to install just the application, and a button to install both the application and the bootstrapped components, as shown in Figure 10-2.
The bootstrapper lets you provide users with a simple, automated way to detect, download, and install an application and its prerequisites. It serves as a single installer that integrates the separate installers for all the components making up an application.
When the user clicks the Install button on the Publish.htm page, the bootstrapper downloads and installs the application and the prerequisites you specified if they are not already installed on the user’s computer.
For example, suppose you specified that the application required the .NET Framework and the PowerBuilder runtime files. If neither of these components is already installed on the user’s computer, they both display in the Installation dialog box. If both are already installed, they do not display. If the user clicks the Advanced button on the Installation dialog box, the Components List dialog box displays. This dialog box shows that both components are already installed.
The bootstrapper also detects whether a component is supported on the target computer’s operating system. If the component cannot run on the target platform, the bootstrapper notifies the user and ends the installation before downloading the component.