This chapter explains how to package your Impressario Product.
The topics discussed in this chapter are:
Impressario provides an open printing and scanning environment. Third party support for printers and scanners can be plugged into the Impressario environment by following the procedures described in this chapter.
![]() | Note: As of this writing, Silicon Graphics is in the process of making its inst software packaging and installation technology available to its developers. The inst software packaging mechanism is far superior to the use of tar archives. When available, inst software packaging should be used instead of tar archives. |
The current method for creating an Impressario software distribution uses the tar(1) file archiving program. To create a software distribution use the following procedure.
Become superuser. The creation of all tape archives and the subsequent installation of the product by the end user must be done as superuser. Becoming superuser is typically accomplished by either logging in as root or executing the su(1M) command. Typically, a password must be provided to gain superuser access to a system. Ask your system administrator for assistance.
Copy the files that comprise your product from your development area to the directories into which they will be installed. See "Packaging Impressario Printing Software" and "Packaging Impressario Scanning Software" for the files typically installed by printing and scanning products.
Change the permissions and ownership of each file in accordance with the recommendations in "Packaging Impressario Printing Software" and "Packaging Impressario Scanning Software." The chmod(1) command is used to change file permissions and the chown(1) command is used to change file ownership. For example, to give the file foo read/write permission for the owner and read-only permission for all others, and to specify a root owner and sys group, execute the following commands:
chmod 0644 foo chown root.sys foo |
Run the tar command and specify the absolute pathname of each file that is part of the distribution. For example, to create an archive consisting of two files and place that archive on the default tape device, execute the following command:
tar cvLf /dev/tape /usr/lib/print/mydriver /var/spool/lp/model/mymodel
|
For detailed information on the tar program, refer to the tar(1) manual page.
Optionally, you may include in your distribution a shell script that removes the files that are installed by your product. This allows customers to reclaim the disk space used by your product if your product is no longer being used.
To illustrate better the process of packaging Impressario printing support software, let us create a fictitious product. The product will provide Impressario support for the Blast family of printers. The Blast product line consists of the Blast 1, Blast 2CVX, and the Blast P+. Since each of the Blast printers is similar in functionality, support for all of them will be provided by a single model file.
Impressario printing support products typically are named with the printer family, the word Print and the lowest version number of Impressario that supports the product. In keeping with this convention, we will name our product "BlastPrint for Impressario 1.2".
A typical Impressario printer support product consists of the following files:
The files listed in Table 11-1 comprise the BlastPrint product. The files are listed with their absolute pathnames, ownership, and permissions.
Table 11-1. Typical Printing Product Files
Description | Pathname | Permiss. | Owner |
|---|---|---|---|
Model file | /var/spool/lp/model/blast_model | 0755 | lp.lp |
Driver | /usr/lib/print/blaster | 0755 | lp.lp |
POD files | /usr/lib/print/data/blast_model.config /usr/lib/print/data/blast_model.status /usr/lib/print/data/blast_model.log | 0664 0664 0664 | lp.lp lp.lp lp.lp |
Graphical | /var/spool/lp/gui_model/ELF/blast_model.gui | 0755 | lp.lp |
Before creating the actual software distribution, the above files must be copied to the directories indicated and given the specified ownership and permissions. Once this is done, the Impressario test program testiconfig(1) can be run to verify that the product conforms to Impressario product installation specifications.
To run the testiconfig program on the BlastPrint product, execute the following:
cd /usr/impressario/tests/print ./testiconfig blast_model |
Once the product installation has been verified, a software distribution can be created. This is done using the tar(1) command. Assuming we are making a tape distribution, we would issue the following command (note the use of the line continuation character `\' to allow the command line to extend over multiple lines):
tar cvLf /dev/tape /var/spool/lp/model/blast_model \
/usr/lib/print/blaster \
/usr/lib/print/data/blast_model.config \
/usr/lib/print/data/blast_model.status \
/usr/lib/print/data/blast_model.log \
/var/spool/lp/gui_model/ELF/blast_model.gui \
/usr/lib/X11/app-defaults/Blast \
/usr/share/catman/u_man/cat1/blastprint.z
|
The resulting tape archive represents the BlastPrint product.
It is recommended that the copying of the files to their installation directories, the assigning of ownership and permissions, and the archiving of the files all be automated in a shell script. This eliminates a large amount of typing and provides a reproducible distribution mechanism.
Once the distribution tape has been created, it should be taken to a new system (in other words, one that has never had BlastPrint installed) and installed. This is done using the following command as superuser:
tar xvf /dev/tape |
Once BlastPrint has been installed, the testiconfig program should again be run to verify that the installation is complete and correct. A printer should then be connected to the system and registered with the spooling system using the Printer Manager (printers(1M)). The Impressario test program testipr(1) should be run on the newly installed printer to verify that it is able to print all supported Impressario file formats and options.
If the printer was installed with the name myblaster, it can be tested by executing the commands:
cd /usr/impressario/tests/print ./testipr myblaster |
This completes the creation of an Impressario printer support product.
To illustrate the process of packaging Impressario scanning software, we will create a fictitious product to provide Impressario support for the LowTech 100 scanner.
Impressario scanning products are typically named with the scanner family, the word Scan, and the lowest version number of Impressario that supports this product. We will name our product "LowTechScan for Impressario 1.2".
A typical Impressario scanner support product consists of the following files:
| Scanner driver | The executable program that gets the data from a scanner. | |||
| Graphical options program |
| |||
| Graphical options resource file |
| |||
| Manual page | A manual page should be created that describes the scanning product. By convention, this manual page should be named with the product name. The manual page must be formatted using nroff(1) and must be compressed before installation. A product manual page template and a Makefile to perform the required formatting, compression, and installation is provided in the directory /usr/impressario/man.
|
The files listed in Table 11-2 comprise the LowTechScan product. The files are listed with their absolute pathnames, ownership, and permissions
Table 11-2. Typical Scanning Product Files
Description | Pathname | Permissions | Owner |
|---|---|---|---|
Scanner driver | /usr/lib/scan/drv/lowtech | 0755 | root.sys |
Graphical options program | /usr/lib/scan/opt/lowtech | 0755 | root.sys |
Graphical options resources | /usr/lib/X11/app-defaults/Lowtech | 0644 | root.sys |
Manual page | /usr/share/catman/u_man/cat1/lowtech.z | 0444 | root.sys |
Before creating the actual software distribution, the above files must be copied to the directories indicated and given the specified ownership and permissions. Then the scanners(1M) tool should be run to verify that the correct string for the LowTech 100 scanner appears in the "Install New Scanner" dialog. The scanners tool should be used to install a LowTech 100 scanner, and gscan(1) should be able to run the graphical options program from the "Scanner Specific Options" command on the "Parameters" menu.
Once the product installation has been verified, a software distribution can be created. This is done using the tar(1) command. Assuming we are making a tape distribution, we would issue the following command (note the use of the line continuation character `\' to allow the command line to extend over multiple lines):
tar cvLf /dev/tape /usr/lib/scan/drv/lowtech \
/usr/lib/scan/opt/lowtech \
/usr/lib/X11/app-defaults/Lowtech \
/usr/share/catman/u_man/cat1/lowtech.z
|
The resulting tape archive represents the LowTechScan product.
It is recommended that the copying of the files to their installation directories, the assigning of ownership and permissions, and the archiving of the files all be automated in a shell script. This will eliminate a large amount of typing and provides a reproducible distribution mechanism.
Once the distribution tape has been created, it should be taken to a new system (in other words, one that has never had LowTechScan installed) and installed. This is done using the following command as superuser:
tar xvf /dev/tape
|
Once LowTechScan has been installed, the scanners and gscan programs should again be run to verify that the installation is complete and correct.
This completes the creation of an Impressario scanner support product.