The PPR component known as PPR Popup is a small application which runs on client PCs. It is used in a computing lab environment. In such an environment people will sit down at a computer and try to print. There is generally no login procedure for the computer, so if a password is required for printing, PPR Popup can be used to prompt for it.
Of course, computing labs run many different operating systems. By using Tcl/Tk and Itcl/Itk/Iwidgets, it was possible to write an application that runs under Win32, MacOS, and X Windows with little change.
Unfortunately, there are gaps in the documentation which explains how to install and use Tcl and friends on some of these platforms. These gaps slowed down the PPR Popup project considerably. This document attempts to present the hard-to-find information gained during the PPR Popup project.
The first difficulty was in identifying usable distributions of Tcl for each of the three above-named platforms.
The Tcl web sites appear to be in the midst of a shakup. Tcl has traditionally been available from http://www.scriptics.com/. This site appears to have been taken over by Activestate). It is being kept up to date and current versions of Tcl and some related packages are available for download. But it the CVS repository is on Sourceforge.net. Sourceforge also has packages available for download that don't appear on the Scriptics pages. Many of these packages are on the Tcl project page, but others are on their own project pages and can be easily found through the Tcl project page and Itcl and friends from the Sourceforge.net.
The first step is to unpack, build, and install Tcl:
$ tar zxvf tcl8.3.3.tar.gz $ cd tcl8.3.3/unix $ ./configure --prefix=/usr/local $ make $ su # make install # exit $ cd ../..
Then, Tk:
$ tar zxvf tk8.3.3.tar.gz $ cd tk8.3.3/unix $ ./configure --prefix=/usr/local $ make $ su # make install # exit $ cd ../..
The, Itcl/Itk:
$ tar zxvf itcl3.2.1_src.tgz $ cd itcl3.2.1 $ ./configure --prefix=/usr/local $ make $ su # make install # exit $ cd ..
Installing Iwidgets is a little weird, you have to do it inside the Itcl build directory:
$ cd itcl3.2.1 $ tar zxvf ../iwidgets4.0.0.tar.gz $ cd iwidgets4.0.0 $ ./configure $ su # make install # exit $ cd ../..
We had considerable difficulty finding a set of binary distributions for MacOS which worked together and were sufficiently stable. The necessary files were eventually located on Sourceforge.
Tcl and Tk can be downloaded from the Tcl Project Page. There is a binary distribution of Tcl/Tk 8.3.4 which seems reasonably stable.
To find ITcl, ITk, and IWidgets, one must go to the binary distribution of ITcl/Itk/IWidgets version 3.1 works with Tcl/Tk 8.3.4.
For Microsoft Windows computers we selected the ActiveTcl 8.3.4.2 distribution from Activestate.
The only problem with this distribution is that it contains far more than we need. It consumes about 24 Megabytes of disk space and takes a fairly long time to install.
The first area of incompatibility between platforms involves how scripts are run.
On Unix and Unix-like systems such as BSD and Linux things work fairly well. Any modern operating system of this family supports the #! comment at the top of the script file as a way to specify the interpreter.
Things are not quite so bright on Microsoft Windows machines. You basically have two choices. One, you can rely on the operating system's file extension handling. Generally this will be set up so that .tcl files are run by Wish, though it is difficult to know if it will be the copy of Wish that you expected it to be. The other is that you can create a shortcut that explicitly invokes the Wish interpreter you want with the script name as a command line argument.
It is most unclear to us what is the normal way to run Tcl scripts under MacOS. What we did discover was that we could make a copy of Wish, open it in Resedit, and paste the script into a Text resource with ID number ????. There is even a little program that will do this for you.
Of course, every script done this way requires an extra copy of Wish, which eats up a few hundred kilobytes of hard disk space. It would be worse if it were not for the fact that a good deal of Tcl and Tk are in two dynamicly linked libraries.
Another area of incompatibility is