Tcl HomeTcl Home Hosted by
ActiveState

Google SiteSearch

This page contains information about Tcl 7.5 and Tk 4.1. The original versions of these releases were made on April 21, 1996, and the most recent set of patches (patch level 1) was released on August 2, 1996. This is the first cross-platform release of Tcl and Tk, running on Windows, Macintosh, and Unix platforms. The Tcl 7.6/Tk 4.2 versions are much better.

Table of Contents

Download Binary Releases for Windows and Macintosh
Download Source Releases for UNIX, Windows and Macintosh
What's New in Tcl 7.5 and Tk 4.1
Patches
Known Bugs
Incompatibilities
License Terms

Downloading Binary Releases for Windows and Macintosh

Pre-compiled releases are available for the following Windows and Macintosh platforms. When you download Tcl and Tk you get two programs, wish and tclsh, supporting script libraries, and on-line reference documentation. These programs are general purpose platforms for scripting applications with Tcl. Wish includes the graphical user interface toolkit Tk. These packages are ready to use after installation.

Downloading Source Releases for UNIX, Windows and Macintosh

If you're running on a platform other than the ones listed above, or if you want to make modifications to Tcl and Tk, you'll need to retrieve the source releases, which are available separately for Tcl and Tk in several different forms:

Windows Source Releases:

Macintosh Source Releases:

UNIX Source Releases:

Download one of the following files:

When you retrieve a Tcl or Tk release, you'll get a compressed tar file with a name like tcl7.5.tar.gz or tcl7.5.tar.Z. These files are identical except for the technique used to compress them (.gz files are generally smaller than .Z files). To unpack the distribution, invoke shell commands like the following, depending on which version of the release you retrieved:

gunzip -c tcl7.5p1.tar.gz | tar xf -
zcat tcl7.5p1.tar.Z | tar xf -
unzip tcl75p1.zip

Each of these commands will create a directory named tcl7.5, which includes the sources for all platforms, documentation, and the script library for Tcl 7.5. To compile and install the distribution, follow the instructions in the README file in the distribution directory. Be sure to compile Tcl before Tk, since Tk depends on information in Tcl.

Tcl and Tk should compile with little or no effort on any platform that runs a UNIX-like operating system and the X Window System. This includes workstations from Sun, HP, IBM, SGI, and DEC, PCs running a number of Unix operating systems such as Solaris, Linux, SCO UNIX, and FreeBSD, plus many other platforms such as Cray and NEC supercomputers.

What's New in Tcl 7.5 and Tk 4.1

These releases have many new features, which are summarized below. See the README files in the distributions for more complete information on what has changed.

  • Tcl and Tk now run on PCs and Macintoshes in addition to UNIX machines. Tcl 7.5 and Tk 4.1 run on PCs under Win3.1 (with Win32s), Windows 95, or Windows NT. They also run on both PowerMacs and 68K Macs. The releases are fairly complete functionally, but they still use the Motif look and feel. Native look and feel for PCs and Macs will become available in another six months or so.
  • Tcl supports dynamic loading of extensions with the load command, and a new package command provides version control. Tcl and Tk can be linked as shared libraries and Tk is a proper package that can be loaded dynamically into Tcl applications.
  • Tcl has a new interp command for creating additional interpreters. It allows you to execute untrusted scripts using a generalization of Borenstein's and Rose's Safe-Tcl.
  • The event loop has moved from Tk to Tcl, and Tcl has a whole new I/O system that supports non-blocking I/O and sockets. It also provides better cross-platform portability with respect to file names and end-of-line sequences.
  • Tcl has a new clock command that provides time retrieval and formatting just like the TclX facilities.
  • Tk has a new grid geometry manager, which is similar to George Howlett's table geometry manager.
  • Text widgets have better performance when there are large numbers of tags, and they have better facilities for retrieving information from the text.

Tcl 7.5 and Tk 4.1 are backwards-compatible with Tcl 7.4 and Tk 4.0 at the level of Tcl scripts: scripts written for the earlier releases should work on these new releases as well. There are a few incompatible changes at the level of C APIs; see the README files for details.

Patches

Patches are available to correct several problems discovered in Tcl 7.5 and Tk 4.1 after they were released. As additional bugs are found, more patches will be released. At present, the following patches are available for Tcl 7.5 and Tk4.1:

If you are downloading a release for the first time, be sure to get the highest patch level that is available. The patch level appears in file names as a p followed by a number, such as p1 or p2. If you already have an older patch level of Tcl 7.5 and Tk 4.1 installed, there are two ways you can upgrade to a higher patch level. The easiest way is simply to fetch the full source release for the latest patch level and use it to replace your older source release.

If you wish to conserve network bandwidth, you can fetch "patch" files that only contain differences from one patch level to another, then use the patch program to apply the patches to your existing source base. To apply a patch file, do the following:

  • Fetch the patch file.
  • If the release has already been built and/or installed, type make distclean in the unix subdirectory of the distribution you plan to patch.
  • Change to the top-level source directory for the appropriate release.
  • Apply the patch. If the patch file is named tk4.1p1.patch.gz, type the following command to your shell:
    gunzip -c tk4.1p1.patch.gz | patch -p
    
    If you don't have the "patch" or "gunzip" programs installed on your machine, you can fetch free versions from any of a number of public FTP sites around the Internet, such as ftp://prep.ai.mit.edu/pub/gnu .
  • Follow the instructions in the README file to rebuild the distribution.

Patches must be applied in order for a given release. For example, you must apply Tk 4.1p1 and Tk 4.1p2 before applying Tk 4.1p3. In addition, patches should be applied in clean distribution directories: if you have modified some of the files locally then the patches may not apply correctly. The patch program will generate error messages and leave .rej files around if there are problems applying a patch.

Known Bugs

So far, we know about the following problems with the Tcl 7.5 and Tk 4.1 releases:

  • The exec command is still very flakey under Win3.1, and even under Windows 95 and NT it still isn't perfect (although it mostly works).

Incompatibilities

These releases should not introduce any significant compatibility problems for Tcl scripts, but they do change a few of the C APIs. Below is a list of all known incompatibilities.

  1. The procedure Tcl_EnterFile no longer exists. However, a new procedure Tcl_MakeFileChannel provides similar functionality. Tcl_GetOpenFile still exists but only works under UNIX. Tcl_CreatePipeline also remains, but it too works only under UNIX now; use Tcl_OpenCommandChannel for better portability.
  2. Tcl doesn't export any global C variables anymore, because this doesn't work with Windows DLLs. The C variables tcl_AsyncReady and tcl_FileCloseProc have been replaced with procedures Tcl_AsyncReady and Tcl_SetFileCloseProc. The C variable tcl_RcFileName has been replaced with a Tcl variable tcl_rcFileName (use Tcl_SetVar to set the Tcl variable, instead of assigning to the old C variable).
  3. Files are no longer shared between interpreters by default: if a file is opened in one interpreter, it cannot normally be used in other interpreters. However, the new procedure Tcl_ShareHandle allows files to be shared between interpreters if requested explicitly.
  4. The procedure Tk_CreateMainWindow no longer exists. Instead, Tk_Init does everything that Tk_CreateMainWindow used to do.
  5. The procedures Tk_EventInit and Tk_CreateFileHandler2 have been eliminated. Tk_EventInit is no longer needed since the event loop is always available. Tk_CreateFileHandler doesn't make sense with the new notifier in Tcl, but you can get the same effect with the new "event source" mechanism (see the Notifier.3 manual entry in Tcl).
  6. Tk doesn't export any global C variables anymore, because this doesn't work with Windows DLLs. The C variable tk_NumMainWindows has been replaced with the procedures Tk_GetNumMainWindows, and the variable tk_CanvasTagsOption has been replaced with the procedures Tk_CanvasTagsParseProc and Tk_CanvasTagsPrintProc.
  7. The interface to Tk_RestrictProc has changed so that the restrict procedure can ask for an event to be discarded, as well as processed or deferred.