Information on using Hanzim with MicroSloth Windows:
---------------------------------------------------

Due to Herculean efforts at Sun, Tcl/Tk was ported to run on both Windows and
Macintosh platforms, so you should be able to run Hanzim there as well.

1) Running the Binary

The file "hanzim.exe" contains a binary compiled using Visual C++ 6.0 with
Tcl/Tk 8.3.  (THIS MAY BE OUT OF DATE, and if so will remain so until I can
some assistance from a Windows programmer, since I don't want to be one.)  You
need to have these DLLs installed, along with Chinese fonts (these can be
found in the subdirectory "Windows" where you obtained this distribution.

NOTE, I haven't figured out yet how to link the included hanzim.exe against
multiple versions of Tcl/Tk; unlike under Unix, therefore, a specific version
(8.3 at the moment) is required.

NOTE, Windows 95 users need to have special software to use 16-bit fonts
(unless they already have a Chinese or similar version of Windows).  Windows
98 and NT should work.  Once you have all this set up, you must take care to
ensure that the program can find the library directory where the databases
are.  This defaults to C:\Program Files\Hanzim\Data, and to change it you need
to either run from the DOS command line with the "-d" option or recompile the
program.  (Creating a shortcut with the appropriate argument will work as
well.)

There are currently some shortcomings with the Windows version, which will go
away when I get some more time to fiddle, or someone provides some
assistance.  (They are not heavy-work items, but they do require at least
a modicum of direct attention...)

- Traditional characters may not work.
- The help message for command line arguments is incorrect.
- Selection grabbing may not work.


2) Compiling the Program

With a C compiler, you should theoretically be able to compile this program
on Windows.  However, some makefile fiddling and other adjustments are
required.  Before attempting compilation, try to use the binary that is
included (see above).  If you have a later Tcl/Tk version than 8.3, or if you
want to hard-compile in a different database directory from C:\Program
Files\Hanzim\Data, you will need to recompile.  I don't know much about
Windows compilation, but I succeeded in building hanzim using Visual C++ 6.0
by the following procedure:

1) Start a new project using the "Win32 Application" template, and add the
   .c and .h files to the code and headers directories.  Also, add the
   "tcl8.3.h" and "tk8.3.h" (or whatever version) to the headers directory --
   these are usually found in C:\Program Files\Tcl\include.
2) Go into "Settings" and add the Tcl include directory to the include
   directories, and make sure "_WINDOWS" is listed under the #defines.
3) Add the two .lib files in C:\Program Files\Tcl\lib (or wherever else) to
   the project (not a subdirectory -- select 'add to project').
4) Build.

I'd like to make things a little more self-starting; if you are interested in
helping out with this please email me at arobert@cogsci.ucsd.edu.

Codewise, all of the platform-dependent stuff sits in hanzim.C; it is already
modified to initialize for Windows if the -D_WINDOWS option is given in the
compilation (otherwise -DUNIX should be given).  See the comments therein for
further information.

The file "makefile.vc" was the result of trying to massage one of the
makefiles that came with the tcl/tk distribution (for Microsoft Visual C++) to
work for this program.  To use it, copy it to "makefile" and use "Open
Workspace" under VC6.0 (or various other methods under earlier versions --
you've got to love Microsoft :) to open it and define a project around it.

Good luck!

NOTE, Tcl/Tk and some Chinese fonts are available in the subdirectory
"Windows" where you downloaded this distribution.
