Updated 2013-10-07 02:49:22 by RLE

Mo Dejong 29-July-2005

Inspired by Building JACL with msys I try to do my part to advance the cause of TclJava.

In this page I will try to relate some (hopefully) useful information for any other newish tclers who might want to try TclBlend on Windows. (Based on my experience trying to get it working)

These steps are for TclBlend 1.3.3, the current stable release.


First (Downloads):

  1. Go to http://sourceforge.net/project/showfiles.php?group_id=10894
  2. Download msys_mingw8.zip (or newer version)
  3. Download tcl8411-src.zip
  4. Download tk8411-src.zip (compiling Tk is optional)
  5. Download thread262.zip (down near the bottom)
  6. Go to http://sourceforge.net/project/showfiles.php?group_id=13005
  7. Download tclBlend133.zip

Second (Unzip):

  1. Unzip msys_mingw8.zip to whereever you want to keep it (I put mine on the root of the C drive.) It will create a top level directory called msys and a directory tree underneath containing all necessary files for msys/mingw operation.
  2. Create a src directory somewhere convenient. I used /src (C:\msys\src if looking at it from outside msys.)
  3. Unzip tcl8411-src.zip into the src directory
  4. Unzip tk8411-src.zip into the src directory (optional)
  5. Unzip thread262.zip into the src directory
  6. Unzip tclBlend133.zip into the src directory

Third (Install JDK):

  1. Go to java.sun.com
  2. download/install desired jdk/j2sdk to somewhere either in the msys directory tree or wherever else desired.

Fourth (Build Tcl):

  1. mkdir /build
  2. mkdir /build/tcl
  3. cd /build/tcl
  4. /src/tcl8.4.11/win/configure --prefix=/opt/tclblend --enable-threads
  5. make
  6. make install

Fifth (Optionally Build Tk):

  1. mkdir /build/tk
  2. cd /build/tk
  3. /src/tk8.4.11/win/configure --prefix=/opt/tclblend --enable-threads --with-tcl=/build/tcl
  4. make
  5. make install

Sixth (Build Thread package):

  1. mkdir /build/thread
  2. cd /build/thread
  3. /src/thread2.6.2/configure --prefix=/opt/tclblend --enable-threads --with-tcl=/build/tcl
  4. make
  5. make install

Seventh (Build Tcl Blend):

  1. mkdir /build/tclblend
  2. cd /build/tclblend
  3. /src/tclBlend1.3.3/configure --prefix=/opt/tclblend --with-tcl=/build/tcl --with-thread=/build/thread --with-jdk=/c/j2sdk1.4.2
  4. make
  5. make install

NOTE: In the Tcl Blend build the path /c/j2sdk1.4.2 is used. This is a unix style path alias for C:/j2sdk1.4.2. If your JDK install is in another location then you would need to pass another path. For example, a JDK installed in C:/jdk131 would be passed as --with-jdk=/c/jdk131. Note also that the client VM is used by default.

NOTE: At this point Everything is installed and should be working. You could delete /build and /src if you wanted to. You will find it all in /opt/tclblend (C:\msys\opt\tclblend). Run TclBlend from the msys shell by starting the jtclsh or jwish scripts found in /opt/tclblend/bin. Run TclBlend from a cmd.exe shell or from the Windows explorer via the jtclsh.bat batch file found in C:\msys\opt\tclblend\bin. These scripts will setup all the environment variables needed to run Tcl Blend. Note that Msys + Mingw is required to build Tcl Blend under Windows, but Msys + Mingw is not required once Tcl Blend has been installed.
 $ /opt/tclblend/bin/jtclsh
 % package require java
 % exit

 From the Windows Explorer, double click on jtclsh.bat in C:\msys\opt\tclblend\bin
 % package require java
 % exit

Comments: If you want to use tkcon, it can be run like so:

Run tkcon as:
 jwish tkcon.tcl

Once in tkcon do:
 package require java

See also TclBlend, mingw