Download and Installation

Download

Here are the latest packages of implementation files, choose the appropriate zipped file:

Note that compiler version gcc-4.8.4 is not compiling the sources, the problem is not yet solved. (This compiler complains a simple #define expression.)

Build wish8.6

Change into the installation path of your distribution, i.e.

cd /usr/local/sources/tk8.6.6

It is recommended to use the latest patch level of version 8.6, but it's possible to compile with an older package of version 8.6. Then untar/unzip one of the packages:

tar -tzf tk8.6.6-revised-2017-02-18.tgz
unzip -x tk8.6.6-revised-2017-02-18.zip

Because this is a new implementation, it's recommended to compile it with debug information; example:

cd unix
./configure --enable-symbols --prefix=/usr/local
make
make install

Hopefully it will compile without any problems. Currently only gcc and clang are tested.

Important note: The Makefile of the Tk distribution does not provide uninstallation, so probably you should build a package for the installation.

Build wish8.5

Mac OS X wish8.6 has event loop issues, and some may wish to compile wish8.5 instead of wish8.6. The revised implementation supports the installation with wish8.5, but the Makefile has to be modified. Change into the installation path of your distribution, i.e.

cd /usr/local/sources/tk8.5.9

It is recommended to use the latest patch level of version 8.5. Save "Makefile.in" before extracting the package, otherwise it will be replaced, but you need the original one. (Because I do not have a Mac, I will describe the process for Linux.)

mv unix/Makefile.in /tmp

Then untar/unzip one of the packages:

tar -tzf tk8.6.6-revised-2017-02-18.tgz
unzip -x tk8.6.6-revised-2017-02-18.zip

Recover Makefile.in, build the Makefile, and patch the Makefile:

cd unix
mv /tmp/Makefile.in .
./configure --enable-symbols --prefix=/usr/local
patch -p0 < makefile-for-8-5.patch

And now the normal build process should work:

make
make install

I've attached my own Makefile for an example.

Important note: The Makefile of the Tk distribution does not provide uninstallation, so probably you should build a package for the installation.

Integration into private project

If you wan't to integrate this widget into you own project, then you need an additional implementation file: tkMisc.c from project Scidb. The Tk project is using this annoying and destructive MODULE_SCOPE=hidden for the build of the library. This makes it impossible to use functions which are not declared as external. File tkMisc.c provides some of the unaccessible functions, required for the build of the text widget. But Tk_FontObjCmd() has not been re-implemented, this means that resolving font names in command "inspect" does not work. For an example Makefile download the Makefile from project Scidb. For the initialization of the widget see this code snippet: