
                          BUILDING THE UNIX BINARIES

   There are several versions of Tcl/Tk being used today. The newer Tcl
   7.5 release is are becoming popular because they can run on Windows,
   Unix and Macintosh. However, many people are still using Tcl 7.4.
   Another popular variant of Tcl is Itcl , which adds object-oriented
   functionality to the Tcl language. Both version Itcl 2.0 and Itcl 2.1
   are being widely used now.

   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.

  1. DOWNLOAD THE TCL, TK AND/OR ITCL SOURCES

   You may have already installed Tcl, Tk and Itcl on your system. The
   installed binaries usually reside in the /usr/local/ directory.
   However, the build process of Tix doesn't use the installed binaries
   because doing that may result in subtle version conflects. Instead,
   Tix uses only the binaries from the Tcl, Tk and Itcl source
   directories. Install sources of these packages if they are not already
   in your system.

     * Tcl 7.4/Tk4.0: Install the final release of Tcl 7.4 and Tk 4.0
       (with or without the p1, p2 and p3 patches). Available at
       ftp://ftp.sunlabs.com/pub .

     * Tcl 7.5/Tk4.1: Install the final release of Tcl 7.5 and Tk 4.1
       (with or without the p1 patch). Available at
       ftp://ftp.sunlabs.com/pub . (Tix Does not work with the alpha or
       beta versions of Tcl 7.5 and Tk 4.1.)

     * Itcl 2.0: Install the final release of Itcl 2.0. Available at
       ftp://ftp.neosoft.com/pub/tcl/alcatel/extensions/itcl2.0.tar.gz
       .

     * Itcl 2.1: Install the final release of Itcl 2.1. Available at
       ftp://ftp.neosoft.com/pub/tcl/NEW/itcl2.1.tar.gz 

   Make sure that the source directory of these package reside in the
   same directory as Tix. For example, if I am compiling Tix 4.1.0 for
   Tcl 7.4 and Itcl 2.1, my source directory would look like this:

  /home/src/tcl7.4/
  /home/src/tk4.0/
  /home/src/itcl2.1/
  /home/src/Tix4.1.0/

   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.

   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.

  2. BUILD TCL, TK AND/OR ITCL

   Tcl, Tk and Itcl comes with installation guides and should be easy to
   build. In case you have any problems building these packages, you can
   send your questions to the comp.lang.tcl newsgroup or to the
   respective authors of these packages. You may also send mail to
   tix-support@xpi.com.

  3. SELECT THE APPROPRIATE COMPILATION TARGET(S)

   Tix can be configured to build with different combination of Tcl/Tk
   and Itcl. Each configuration is referred to as a Compilation Target.

   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:

  cd /home/src/Tix4.1.0/
  wish setup.tcl

   The following screen will pop up:

   [IMAGE]

   (Screen 3.1)

   Press the "Set Up The Tix Package" button and this will bring you to
   the next screen:

   [IMAGE]

   (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:

   [IMAGE]

   (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:

   [IMAGE]

   (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:

   [IMAGE]

   (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.

  4. CONFIGURE TIX

   Once you have finished selecting the compilation targets and entering
   the options, you can start configuring Tix by pressing the "Run GNU
   configure ..." button at the lower right corner of screen 3.2. This
   will start the configure program, which will check the characteristics
   of your system and set up the Makefile's needed to build the Tix
   targets you selected in step 3. The following screen will pop up:

   [IMAGE]

   (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.

  5. BUILD TIX

   Now it's time to build Tix. This can be done by typing "make" in the
   Tix source directory:

  cd /home/src/Tix4.1.0/
  make

   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:

  /home/src/Tix4.1.0/unix-tk4.0/tixwish
  /home/src/Tix4.1.0/itcl2.0/itixwish

  6. EXPERIMENTING WITH TIX

   Tix comes with a large number of demo programs. You can run these
   program by running the demos/widget script with the tixwish or
   itixwish you have built in step 5. Make sure that you have set the
   TIX_LIBRARY variable accordingly. If you haven't installed Tcl
   and/or Tk then you'll need to set your TCL_LIBRARY and TK_LIBRARY
   environment variable as well (see the Tcl and Tk README files for
   information on this).

   You can type the following command in your shell:

  cd /home/src/Tix4.1.0/demos
  env TIX_LIBRARY=/home/src/Tix4.1.0/library ../unix-tk4.0/tixwish widget

   This will open up the Tix demo window. You can click on the "Run
   Sample Programs" tab and execute the sample programs:

   [IMAGE]

   (Screen 6.1)

  7. INSTALLING TIX

   If you are sufficiently convinced that Tix works properly, you can
   install the Tix binaries and scripts on your system. If you are
   paranoid, these is a small set of test scripts that tests the behavior
   of Tix under various configurations. You can type "make test" to run
   these tests. Hopefully it will report "0 error(s) found".

   Type "make install" to install Tix's binaries and script files in
   standard places:

  cd /home/src/Tix4.1.0
  make install

   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".

  8. TROUBLE SHOOTING

   If make fails then you'll have to personalize the Makefile's for your
   site or possibly modify the distribution in other ways. First check
   the files docs/FAQ.html and docs/Porting.html to see if there are
   hints for compiling on your system. If you need to modify Makefile's,
   there are comments at the beginning of it that describe the things you
   might want to change and how to change them.

   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".

     _________________________________________________________________

   Last modified Sep 30 20:43 

