This chapter explains how to package your Impressario Product.
The following topics are discussed in this chapter:
Impressario provides an open printing and scanning environment. Third-party support for printers and scanners can be added to the Impressario environment by following the procedures described in this chapter.
There are two methods of packaging Impressario software for distribution: the swmgr software packaging and installation technology and tar archives. We recommend using swmgr, which users access with the Software Manager option in the System Toolchest, because of its flexibility and ease of use. Instructions for creating an image that can be installed by swmgr are in the Software Packager User's Guide. In the next section, Table 10-1 (for printers) and Table 10-2 (for scanners) define the locations, ownership, and privileges of the files that are typically needed to create an Impressario product.
If you prefer to create a tar archive, the following section describes how to create one for installing Impressario drivers.
To create a tar archive for your 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 command. Typically, a password must be provided to gain superuser access to a system. Ask your system administrator for assistance.
Copy the files that compose 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 according to the recommendations in “Packaging Impressario Printing Software” and “Packaging Impressario Scanning Software.” The chmod command is used to change file permissions and the chown 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, enter the following commands:
chmod 0644 foo chown root.sys foo |
Enter 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 to place that archive on the default tape device, enter the following command:
tar cvLf /dev/tape /usr/lib/print/mydriver /var/spool/lp/model/mymodel |
For detailed information on the tar command, refer to the tar(1) reference 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 provides Impressario support for the Blast family of printers. The Blast product line consists of the Blast 1, Blast 2CVX, and the Blast P+. Because each of the Blast printers provides similar functions, support for all of them is 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, the product is named “BlastPrint for Impressario 2.0.”
A typical Impressario printer-support product consists of the following files:
The files listed in Table 10-1 comprise the BlastPrint product. The files are listed with their absolute pathnames, permissions, and ownership.
Table 10-1. Typical Printing Product Files
Description | Pathname | Permissions | Owner |
---|---|---|---|
Model file | /var/spool/lp/model/blast_model | 0755 | lp.lp |
Printer 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 options | /var/spool/lp/gui_model/ELF/blast_model.gui | 0755 | lp.lp |
Graphical options | /usr/lib/X11/app-defaults/Blast | 0644 | root.sys |
Reference page | /usr/share/catman/u_man/cat1/blastprint.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. 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 command 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 command. Assuming you are making a tape distribution, you 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 copying the files to their installation directories, assigning ownership and permissions to the files, and archiving the files be automated in a shell script. This eliminates a lot of typing and provides a consistent distribution mechanism.
Once the distribution tape has been created, it should be installed on a new system, that is, one that has never had BlastPrint. This is done as superuser using the command
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). The Impressario test command testipr should be used with 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, you 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. Name your product “LowTechScan for Impressario 2.0.”
A typical Impressario scanner-support product consists of the following files:
Scanner driver | The executable program that obtains the data from a scanner. | |||
Graphical options program |
| |||
Graphical options resource file |
| |||
Reference page | A reference page should be created that describes the scanning product. By convention, this reference page is named with the product name. The reference page must be formatted using nroff and must be compressed before installation. A product reference page template and a Makefile to perform the required formatting, compression, and installation are provided in the directory /usr/impressario/man.
|
The files listed in Table 10-2 compose the LowTechScan product. The files are listed with their absolute pathnames, permissions, and ownership.
Table 10-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 |
Reference page | /usr/share/catman/u_man/cat1/lowtech.z | 0444 | root.sys |
Before creating the actual software distribution, copy the above files to the directories indicated and give them the specified ownership and permissions. Then run the scanners tool to verify that the correct string for the LowTech 100 scanner appears in the “Install New Scanner” dialog. Finally, install a LowTech 100 scanner using the scanners tool, and make sure that gscan is able to run the graphical options program from the “Scanner Specific Options” command in the Parameters menu.
Once the product installation has been verified, a software distribution can be created with the tar command. Assuming you are making a tape distribution, you 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 copying the files to their installation directories, assigning ownership and permissions to the files, and archiving the files be automated in a shell script. This eliminates a lot of typing and provides a consistent 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.