Packaging your application
This section takes a brief look at two of the ways you might
use to distribute deployment files and your application files:
- Building a tarfile
for your application - Building packages for your application
Building a tarfile for your application
One approach is to use the UNIX tar (tape
archive) utility to copy the deployment files and your application
files to a tarfile. You can then distribute this
tarfile to each end-user computer and, once it is there, extract
all of the files from it.
Locating the files to be archived
Before you create the tarfile, make sure you have all the
files to be archived:
- Application
files You need to know the directory where your application files
are stored and be able to access it. - PowerBuilder deployment files You need to install the deployment files in a directory you
can access so that they can be archived.
Creating the tarfile
Here’s a typical example. Suppose your application
files are stored in this directory:
1 |
/home/samk/myapp |
And the deployment files are located here:
1 |
/opt/pb7dk |
The following command will create a tarfile named myapp.tar
that includes the application files as well as the deployment files
files and subdirectories:
1 |
tar -cvf myapp.tar -C /home/samk myapp -C /opt pb7dk |
Extracting from the tarfile
Once you’ve created the tarfile, you can distribute
it to each end-user computer and install the deployment files and
application files from it. To do this, you extract those files from
the tarfile by executing the tar utility again.
For instance, this command extracts all files from the tarfile
named myapp.tar and copies them to the current directory:
1 |
tar -xvf myapp.tar |
For more information on the tar utility, see
your UNIX documentation.
Adjusting pathnames in the shell startup files When using the tarfile approach to distribution, you need
to make sure that all of the pathnames in the two shell startup
files (pb.cshrc and pb.profile) are correct for the end-user computer.
You can then proceed to use these files (by appending them to the
.cshrc and .profile files in end-user home directories).
Building packages for your application
On Solaris, another approach is to set up your distribution
media to include packages for both your application files and the
PowerBuilder deployment files.
You can build packages for your application files by following
the standard Solaris software packaging procedures. Once these packages
are complete, you can translate them to your distribution media
by using the Solaris pkgtrans utility. You can also use pkgtrans
to translate the existing PowerBuilder deployment files packages
from the PowerBuilder CD-ROM to your distribution media.
When your distribution media is complete, you can use it to
add all of these packages to end-user computers.
For more information on software packaging
and the pkgtrans utility, see your Solaris documentation.