Setting up each end user
Once you’ve added the deployment and application
files to the target computer, you must perform some additional tasks
to properly set up each end user who needs to run PowerBuilder applications:
- Edit shell startup
files - Copy the .WindU file
- Configure printers
Editing shell startup files
This task involves editing each end user’s shell
startup file (.cshrc or .profile) to include environment variables
and path specifications required by the PowerBuilder deployment
files.
For existing Wind/U users If you already use the Wind/U product from Bristol
Technology, you might find that the environment variables and path
specifications in the pb.cshrc and pb.profile files conflict with
your current configuration. In this case, skip the step of editing
shell startup files.
Instead, you can use a copy of the shell script pbstart (in
the pb7 directory) whenever you want to start your PowerBuilder
application. This script sidesteps conflicts by defining the necessary
environment variables and path specifications temporarily and then
executes your application. you need to edit the script to specify
your application’s executable file and rename it appropriately.
For C shell users When you installed PowerBuilder, a file called pb.cshrc was
installed. You need to insert the entire contents of this file into
each end user’s .cshrc file (which is in the end user’s
home directory).
Here’s an example of an easy way you
might do this. It appends pb.cshrc to your .cshrc file (assuming
that the pb7 directory is in /export/home):
1 |
cat /export/home/pb7/pb.cshrc >> $HOME/.cshrc |
You can then source the .cshrc file:
1 |
source $HOME/.cshrc |
For Bourne and Korn shell users When you installed PowerBuilder, a file called pb.profile
was installed. You need to insert the entire contents of this file into
each end user’s .profile file (which is in the end user’s
home directory).
Here’s an example of an easy way you might do this.
It appends pb.profile to your .profile file (assuming that the pb7
directory is in /export/home):
1 |
cat /export/home/pb7/pb.profile >> $HOME/.profile |
Setting the user’s library path
Compiled code applications have dependencies on the C or C++ shared libraries
that were used when they were compiled and may behave unpredictably
if there are other versions of the libraries in the user’s
library search path. If you are deploying a compiled code application
on a system on which a different version of the C++ compiler
is installed, you must make sure that you distribute the libraries
with the application and that the directory where you install them
appears in the user’s library path before any others installed
on their system.
The library path environment variable is called LIBPATH on
AIX systems, SHLIB_PATH on HP-UX, and LD_LIBRARY_PATH
on Solaris.
Copying the .WindU file
This task involves copying an initialization file required
by the PowerBuilder deployment files to each end user’s
home directory. The file you need to copy is installed in the pb7
directory. It is named:
1 |
.WindU |
Make sure that individual end users own their copy of this
file and have write access to it.
Backing up an earlier .WindU file An end user might already have a copy of this file in the
home directory from a previous PowerBuilder deployment files install.
you probably want to back up the earlier .WindU file before copying
in the new one. That way, users can restore any customizations they
made to this file.
Configuring printers
To enable end users to print from PowerBuilder applications,
you must insert printer setup information into the .WindU file in
each end user’s home directory. This information is used
by Xprinter (part of the Wind/U layer of PowerBuilder)
to address your particular printers.
You can perform this task in either of two ways:
- Using the Printer
Setup dialog in a PowerBuilder application - Editing the .WindU file
Using the Printer Setup dialog PowerBuilder provides a function named PrintSetup that you
can code in an application to display the Printer Setup dialog.
If your application includes this function (typically through a File>Printer
Setup menu item), you can execute it to do the job. When the Printer
Setup dialog displays, you can set up any printers you need. As
you do, configuration information is inserted into the .WindU file.
For more information on the PrintSetup function,
see the PowerScript Reference
.
Editing the .WindU file Xprinter closely follows the Microsoft Windows approach to
printer configuration. As a result, it includes [windows], [devices], and [ports] sections
in its initialization file (.WindU), where you must provide appropriate
entries for your printers.
For example, suppose you wanted to use a SPARCprinter II attached
to a local computer. You could edit the .WindU file and insert these
lines in the [windows], [devices],
and [ports] sections:
1 |
[windows] |
1 |
device=SPRN,PostScript,lp: |
1 |
1 |
[devices] |
1 |
SunPics SPARCprinter=SPRN PostScript,lp: |
1 |
1 |
[ports] |
1 |
lp:=lpr -P SPARCprinterII -h |
For details on what entries you should insert into .WindU
to configure your printers, look in the online Help file named windu.hlp.
To open this Help file, enter these commands from a shell prompt:
1 |
cd $PBHOME/bin |
1 |
hyperhelp windu.hlp |
Another way to display windu.hlp is to go to the online Help
tool in your PowerBuilder application and open the file from there.