Application Bootstrapping
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.
Bootstrapper for intelligent update
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 the figure in Publication Process and Results.
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.
How the bootstrapper works
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.
Prerequisites Page Customizations
The selections available on the Prerequisites page can be
customized by adding a new subdirectory to the PowerBuilder
12.0DotNETpbiuBootStrapper
Packages directory. To this subdirectory, add the
package you want to make available and an XML configuration file
that specifies where to obtain the package and what to check on
the user�s system to determine whether the package needs
to be installed.
PowerBuilder does not supply a tool to customize prerequisites.
You can use the PowerBuilder Runtime Packager tool to build an MSI
file that contains the database drivers and other PowerBuilder runtime
files that your application needs, and use the configuration.xml file
in the BootStrapperPackages
1-PBRuntime directory as an example when creating
your own configuration.xml file.
You can use the dotNetInstaller open source tool to set up
your own customizations. It can be downloaded from the CodePlex Web site.
A comparison of Windows Installer tools is available on the InstallSite organization�s Web site.
Packages on the Prerequisites page
There are two packages available on the Prerequisites page:
the .NET Framework 2.0 runtime files and the Sybase PowerBuilder
.NET Runtime Library. If you look in the BootStrapperPackages directory,
you see two subdirectories, each of which contains a configuration.xml file.
To enable your application to deploy the .NET Framework 2.0
package, you need to copy the .NET Framework 2.0 redistributable
package, dotnetfx.exe, to the 0-dotnetfx directory.
This file can be downloaded from the Microsoft Web site. You also
need to edit the configuration.xml file to
ensure that the application name and locations specified in the
file are correct for your installation. The file uses http://localhost/SampleApp as
the source URL for the package.
The Sybase PowerBuilder .NET Runtime package is in the 1-PBRuntime subdirectory.
The PBRuntime.msi file installs the same files
as the PowerBuilder Runtime Packager (with .NET and all database
interfaces and other options selected) into a directory on the target
computer, and it installs the same .NET assemblies into the global
assembly cache. See Installing assemblies in the global assembly cache.
If you do not require all the files included in the package,
you can create your own package. See Prerequisites
Page Customizations
.
For information about the Runtime Packager, see the chapter
on deployment in Application Techniques.
For information about editing configuration.xml files,
see the tutorial for the dotNetInstaller available on the Code Project Web site.