Creating the (Open)BeOS PCL5 printer driver

28 Jan 2003

If you already have a local copy of the OBOS source tree checked out from the CVS repository, then you are nearly there. If not, then see below about obtaining one.

Steps:

  1. Do a CVS update to make sure you have the latest files from the repository (specifically, the printer driver source)

  2. Compile the PCL5 driver. This driver needs to link against libprint.a which is created by the Canon Lips printer driver, so that one needs to be compiled too. Here's how:
    • Open a Terminal and 'cd' to the current/src/add-ons/print/drivers directory (relative to wherever you keep the local source tree on your drive)
    • type 'jam' and watch it go

    Hint: First open the 'Jamfile' and comment out the final line regarding the PDF driver. The PDF driver doesn't need to be built in order to create the PCL5 driver and contains a lot of files -- removing it (temporarily) will definitely speed up the build. Change the last line to look like this:

    #SubInclude OBOS_TOP src add-ons print drivers pdf ;
    
    That is, place a '#' at the beginning of the line, and save. This will prevent the PDF driver from being built when jam is run. When jam has finished, you can go back and restore the file as it was.

  3. If the build succeeded, you should have 3 new drivers:

       Canon LIPS3 Compatible
       Canon LIPS4 Compatible
       PCL5 Compatible

    These will all be located in:
    current/distro/x86.R1/beos/system/add-ons/print

    Copy the PCL driver (or all three, if you like) to the following directory:
    /boot/home/config/add-ons/Print

  4. Open the Printers panel from the 'Preferences' menu and click on the 'Add...' button to add a new printer. Then accept adding a Local Printer (the default) and you should see the new drivers appear in the 'Printer Type' drop down menu. Select "PCL5 Compatible", give the printer some name (call it "Laplace", in honor of Michael :-), connect to Parallel Port (more than likely) and you're set up.

  5. Now just pick a printing enabled app (such as StyledEdit) and try to print something. Hopefully, you should see your printer churning out some good stuff!


If you don't have a local copy of the source tree

Ok, the bad news... you'll have to download the whole thing. Certainly, the printer driver doesn't require every file in the repository, but it needs a lot of them, and trying to pick out the dependencies is not too easy (I damned sure don't want to try). On a 56K dialup, downloading the whole source tree will probably take about 45 mins - 1 hour. If you are not familiar with CVS, here's a quick set of commands you can use in a Terminal window to do an anonymous checkout:
export CVSROOT=:pserver:anonymous@cvs.open-beos.sourceforge.net:/cvsroot/open-beos
cvs login
cvs -z3 co -P current
Just press ENTER when asked for a password.


Now, for the worse news... you'll have to build the whole tree too. Well, actually, as before, you could skip certain parts of the build, but trying to determine which parts aren't needed is (much!) more effort than it's worth.

The jam tool only rebuilds files whose dependencies have changed since the previous build, thus making the process incremental. However, on a fresh set of source files, *ALL OF THEM* will have to be built. And no matter how fast a computer you have, THIS WILL TAKE HOURS!

So run 'jam', then go watch a movie, read a book, or go to sleep. When you come back, it will hopefully be done ;-) Once you've gotten over this hurdle, then do the steps above.