TCL script compiler

nf@ncc.up.pt

TCLsc

TCLsc (TCL script compiler) is a tool for Tcl developers.

Do you want to keep your customers from seeing and modifying your source code? TCLsc Compiler allows you to compile a Tcl script into a binary application or package library, so that your source code doesn't leave your site.

TCLsc makes it easy to create evaluations copies of your Tcl applications or packages. Lastly, TCLsc allows the use of all functionalities of TCL/TK.

How does it work?

TCLsc converts the user Tcl source files into byte codes, that are evaluated during execution by the TCLsc byte-code engine. A great part of TCLsc byte-code engine is implemented in TCL, and a small part is written in C.

TCLsc reads the user TCL source files, and then compiles them together with the TCLsc byte-code engine(TCL part), creating a byte code version of the script. This byte code version of the code is added to a C file. This C file is then compiled with the TCLsc library and Tcl/tk libraries.

Obtaining TCLsc

The latest binary distribution is available here.

The TCLsc has been tested with Tcl/TK 8.x in RedHat 6.x and Debian 2.1.

TCLsc requires the Tcl/Tk 8.x installled.

Installing TCLsc

Briefly, all you need to get up and running is the following:
  1. Gunzip and untar the distribution.
  2. Execute the TCLsc_setup script(or make 'source TCLsc_setup')
  3. Go to the tests directory and write 'make' to run the tests. The tests will create a binary application and a library.
  4. To compile a script, you must create a TCLsc makefile(some examples are available in the tests directory) and then write in the command line 'TCLsc yourTCLscmakefile'

Future development

My current development plans include the implementation of the following features:
  1. Add more options to the TCLsc makefile.
  2. Allow the use of TCL extensions like TclX, Expect, etc.
  3. Create a graphical interface to generate and manipulate the TCLsc makefiles.
  4. Implement a certificate based expiration and configuration to be used by the compiler and binaries created.
  5. Write the TCLsc documentation.
When all this is done I pretend to release version 1.0. After releasing version 1.0 one possible objective may be the optimization of code, but i will see this later.

Updates / News:

Date
Release
News
December 5, 1999 0.1 Finally the first release of TCLsc. TCLsc (TCL script compiler) is a tool for Tcl developers. TCLsc generates binary Tcl packages and binary applications from Tcl files.
It converts the tcl code into byte codes that are evaluated during execution. If your script works with regular tclsh or wish so the compiled version will work, with no code modification.
December 8, 1999 0.2 Added an option to generate evaluation binaries to the TCLsc compilation makefile.
December 12, 1999 0.3 Added a Readme file and a configuration script to setup some variables required to TCLsc.
Correction of the problems with some of the libraries required with TCLsc.
Added an option to compile the TCLsc executables as tcl shell. Now is possible to create three types of executables: packages libraries, tcl applications and tk applications.
As soon as possible 0.4