Tcl 7.5 for Windows

by Scott Stanton
Sun Microsystems Laboratories
scott.stanton@eng.sun.com


Binary release
--------------

In addition to the source release, there is also a binary release for
Windows that contains precompiled versions of tcl75.dll, tk41.dll,
wish41.exe and the rest of the runtime environment.  This release
comes as a self-extracting setup.exe file that will take care of
correctly installing Tcl and Tk under the directory of your choice.
Look for the binary release in the same location as the source
release.  For most users, the binary release will be much easier to
install and use.  You only need the source release if you plan to
modify the core of Tcl, or if you need to compile with a different
compiler.  With the addition of the dynamic loading interface, it is
no longer necessary to have the source distribution in order to build
and use extensions.

Porting Notes
-------------

This is the directory where you compile Windows versions of Tcl.  This
directory also contains source files for Tcl that are specific to
Windows.  Tcl should compile under both Borland C++ 4.5 and Visual C++
2.0.  The resulting binaries are suitable for use under all versions
of Windows that have the Win32 API (including Windows 3.1 with
Win32s).

Furthermore, please feel free to send me any notes you might make
about porting to other compilers so I may include them in this file
for others to reference.

How To Compile And Install Tcl:
-------------------------------

(a) Check for patches as described in ../README.

(b) cd to the "win" subdirectory

(c) To compile with Borland C++ 4.5:

	Edit "makefile.bc" to update the TMPDIR and TOOLS macros to
	reflect your directory structure, then type:

		make -f makefile.bc

	In order to use the makefile as it is supplied, you will need
	to have a number of Unix-like utilities.  We are currently
	using the MKS Toolkit, although the GNU-ish tools would
	probably work as well.  The rule to automatically generate the
	.def file from the .obj files is the primary offender.
	Unfortunately none of the "_export" mechanisms work for Tcl,
	so we need to extract the list of symbols in a post-processing
	step.  The Visual C++ version of the makefile has a program
	call "dumpexts.exe" which does this post-processing.  If
	someone creates an equivalent program for BC++ object files, I
	would gladly use it instead of the existing method.

    To compile with Visual C++ 2.0:

	Edit "makefile.vc" to update the TMPDIR, TOOLS, and TOOLS16
	macros to reflect your directory structure, then type:

		nmake -f makefile.vc

	Note that the header files that come with VC++ 2.0 are out of
	date and should be replaced with the header files from the
	developer network CDs or later releases of VC++.

(d) Copy the "tcl.dll", "tcl16.dll" and "tclsh.exe" files to your binary
    installation directory (e.g.  c:\tcl\bin)

(e) Copy the files in ..\library to a directory called "lib\tcl7.5"
    (e.g. c:\tcl\lib\tcl7.5)

(f) If you do not put the library files in a directory that is
    parallel with the location of the binary directory, then you will
    need to set the environment variable "TCL_LIBRARY" to point to the
    actual location of the library files.

(g) At this point, you can play with Tcl by invoking the "tclsh"
    program and typing Tcl commands.

If you have trouble compiling Tcl, check out the following Web URL:
    http://www.sunlabs.com/cgi-bin/tcl/info.4.0
This is an on-line database of porting information.  We make no guarantees
that this information is accurate, complete, or up-to-date, but you may
find it useful.  If you get Tcl running on a new configuration, we would
be happy to receive new information to add to "porting.notes".  You can
also make a new entry into the on-line Web database.  We're also interested
in hearing how to change the configuration setup so that Tcl compiles out
of the box on more platforms.

Test suite
----------

There is a relatively complete test suite for all of the Tcl core in
the subdirectory "tests".  To use it type "make test" in this
directory.  This will generate a tcltest executable which you should
use to run the tests.  If you change to the test suite directory and
source the file "all", you will see a printout of the test files
processed.  If any errors occur, you'll see a much more substantial
printout for each error.  See the README file in the "tests" directory
for more information on the test suite.

Currently the tests are very dependent on the Unix environment.  In
order to pass many of the tests, you will need to have some of the
standard Unix commands.  The MKS toolkit is one possible source.

As of the alpha release, Tcl passes all of the tests except open.test
and exec.test.

Known Bugs
----------

Here is the current list of known bugs/missing features for the
Windows alpha version of Tcl:

- The binaries produced by VC++ don't support "exec" under Win32s.
- "exec" of command.com hangs in the kernel under Windows '95.  This
  is actually a bug in '95.  I think I know a workaround, but it isn't
  done yet.
- The library cannot be used by two processes at the same time under
  Win32s.  This is probably fixable, but may take a while.
- "file" command does not handle DOS paths properly.
- Under Win32s, "exec" generates temp files and leaves them lying
  around under some circumstances.

If you have comments or bug reports for the Windows version of Tcl,
please direct them to:

Scott Stanton
scott.stanton@eng.sun.com

or post them to the newsgroup comp.lang.tcl.
