MSEL, NIST Center for Neutron Research Materials Science and Engineering Laboratory NIST Center for Neutron Research National Institute of Standards and Technology
Home Instruments Science Experiments SiteMap

Installing Tcl/Tk and Extensions

To use most of the crystallography software created at the NIST Center for Neutron Research, for example CMPR, LOGIC, and EXPGUI, you must have Tcl/Tk installed. In addition, CMPR requires the BLT package for graphics and some features in EXPGUI (e.g. liveplot) will not work without it, too. Most of my software works better when the Tix package is installed, but will run without Tix. Tix seems to be orphaned and I plan to eventually discontinue use of the package. This page has links to instructions for loading Tcl/Tk for Windows (-NT and -95), Linux and Silicon Graphics (IRIX) computers. The SGI/Linux instructions will probably be helpful for other UNIX computers.

What is Tcl/Tk?

Tcl/Tk is a scripting language combined with a graphical user interface builder that is portable, easy to use and free. Tix is a package that adds some nice GUI features to Tcl/Tk (Tix is currently unsupported) and BLT is a general purpose Tk toolkit that I use specifically for its scientific graphics capabilities.

UNIX versions

The latest stable release for Tcl/Tk is version 8.3, but I have not started to use this version. In fact on many computers, I am still using version 8.0. I have compiled notes on building Tcl/Tk for a number of platforms and versions:

Windows versions

For Windows I need Tcl/Tk with the BLT and Winexec packages (Winexec is needed to allow Tcl/Tk to run DOS .exe files.)

New! I have created a single distribution file containing fairly recent versions of these programs (how I created this distribution from pre-compiled binaries). The software versions are Tcl/Tk 8.2.3, BLT 2.4q and Winexec 0.6.0.1. To download this disribution, get file ftp://ftp.ncnr.nist.gov/pub/cryst/tcltk/tcltk82blt24qwinexec0601.exe (2686464 bytes). This is a self-expanding zip file, so running this file (for example, using START/RUN... and selecting this file you downloaded) will cause Tcl/Tk to be installed. I recommend installing in C:\TCL823\, but other locations can be used. I have done only minimal testing with this distribution, so feedback is appreciated.

Much more testing has been done with a pretty old set of codes (Tcl/Tk 8.0, BLT ~2.3...) that should be phased out already. To install this version of Tcl/Tk, download ftp://ftp.ncnr.nist.gov/pub/cryst/gsas/win/tcltk80p2+.exe (3604992 bytes). This is a self-expanding zip file, so running this file (for example, using START/RUN... and selecting this file you downloaded) will cause Tcl/Tk to be installed. I recommend installing in C:\TCL\, but other locations can be used. (This release of Tcl/Tk was compiled by Mumit Khan. I made some minor fixes to package loading and added the Winexec package.)

Note that you can have both versions of the Tcl/Tk loaded in different subdirectories. Your shortcut will determine which version of the Tcl/Tk is used (for example, see the CMPR or EXPGUI Windows documentation.


Neither the author nor the U.S. Government makes any warranty, expressed or implied, or assumes any liability or responsibility for the use of this information or the software described here. Brand names cited here are used for identification purposes and do not constitute an endorsement by NIST.


Comments, corrections or questions: crystal@NIST.gov
Last modified 24-March-2003