Tix supports all of these versions of Tcl and Itcl so you can freely choose a version of Tcl or Itcl that works best for you. The following steps guide you through the process of building the Tix binary for your choice of the version(s) of Tcl or Itcl on Unix platforms.
IMPORTANT: Do not arrange your source directory in any other way. Do not change the names for these directories. Otherwise Tix will not be configured properly./home/src/tcl7.4/ /home/src/tk4.0/ /home/src/itcl2.1/ /home/src/Tix4.1.0/
Note that Tcl 7.6b1/Tk 4.2b1 are not yet supported by Tix. Support for Tcl7.6b1/Tk4.2b1 has been planned for the next release of Tix.
The easiest way to select the compilation targets is to use the setup.tcl program. To run this program, you must already have wish version 4.0 or later installed in your system. You can start the setup.tcl by changing to the Tix source directory and typing:
The following screen will pop up:cd /home/src/Tix4.1.0/ wish setup.tcl
(Screen 3.1)
Press the "Set Up The Tix Package" button and this will bring you to the next screen:
(Screen 3.2)
You can now select the compilation targets by clicking on the check buttons. If you are not sure about what an item means, you can simply clicks on that item and a help message will show up at the bottom of the screen. In the figure above, we have selected two targets: Tcl7.4/Tk4.1 and Itcl 2.0.
If you have installed the sources as described in step 1 above, you don't need to type anything into the "source directory" entry boxes. Those directories will be automatically detected by the setup.tcl program later on. If you have installed some sources in non-standard directories (which we strongly advise against), you can enter the names of these directory in the respective entry boxes. In the following figure, the Tcl 7.4 directory is set to /home/foo/tcl7.4:
(Screen 3.3)
There are other options under the X Window Files, Compiler Options, and Installation Options headings. Usually there is no need to type anything into these entry boxes. On some systems, you may need to set the X Window directories to:
(Screen 3.4)
By default, the cc compiler will be used. However, on some systems, you may need to set the compiler to a non-standard compiler. For example, you may need to set it to gcc:
(Screen 3.5)
You should set these options only if you know exactly what you are doing. Ask a local expert when in doubt.
You may notice that there are two buttons labeled with "Use Embedded TK". Also known as ET, it provides an easy way to compile your Tcl script and C source code into a single executable binary. You can read the file ET.txt to find out more about ET.
(Screen 4.1)
Assuming you have already build Tcl/Tk or Itcl in step 2, you would have used the configure program and the output of screen 4.1 should look fairly familiar to you. The lines at the top of the screen shows the arguments to the configure program and the rest are the output by configure.
Normally configure will successfully end by printing "Tix configuration is complete". You may then proceed to step 5 below. If configure reports any errors, though, you need to go back to step 3 and enter alternative options.
You may also invoke the configure program directly outside of the graphical setup.tcl program. You can find out the options of configure by executing configure --help in your shell.
When this fininshes, you will get the binaries in the respetive target directories. For example, if you have selected the Tcl7.4/Tk4.1 and Itcl 2.0 targets, you will get the following executables:cd /home/src/Tix4.1.0/ make
/home/src/Tix4.1.0/unix-tk4.0/tixwish /home/src/Tix4.1.0/itcl2.0/itixwish
You can type the following command in your shell:
This will open up the Tix demo window. You can click on the "Run Sample Programs" tab and execute the sample programs:cd /home/src/Tix4.1.0/demos env TIX_LIBRARY=/home/src/Tix4.1.0/library ../unix-tk4.0/tixwish widget
(Screen 6.1)
Type "make install" to install Tix's binaries and script files in standard places:
In the default configuration information will be installed in /usr/local so you'll need write permission on this directory. If you'd like to use a default installation directory, you can change the "exec_prefix" and "prefix" options in step 3, reconfigure, rebuild Tix and then type "make install".cd /home/src/Tix4.1.0 make install
If you have trouble compiling Tix, I'd suggest looking at the files docs/FAQ.html and docs/Porting.html. It contains information that people have sent me about changes they had to make to compile Tix in various environments.
I make no guarantees that this information is accurate, complete, or up-to-date, but you may find it useful. If you get Tix running on a new configuration and had to make non-trivial changes to do it, I'd be happy to receive new information to add to docs/Porting.html. I'm also interested in hearing how to change the configuration setup so that Tix compiles on additional platforms "out of the box".