Tcl HomeTcl Home Hosted by
ActiveState

Google SiteSearch
Highlights | Frequently Asked Questions | Requirements

Protect your source code!

TclPro Compiler translates your Tcl scripts into bytecode files so that you can distribute your applications without providing access to the original Tcl source code. TclPro Compiler protects your proprietary interest when you distribute applications to customers. It also simplifies maintenance and support by preventing customers from modifying the Tcl code of the application. TclPro Compiler allows you to retain all the benefits of working with a dynamic scripting language, while regaining the advantages of distributing applications in compiled form.

Product highlights

Source code protection. The bytecodes generated by TclPro Compiler use a lower-level representation that hides the original source code.

Flexible output. The output of TclPro Compiler is a Tcl script that can be used anywhere normal Tcl scripts can be used, such as the source command, the eval command, or even a startup file invoked directly from a Unix shell.

Portability. The bytecodes generated by TclPro Compiler are portable across all platforms supported by TclPro: bytecodes generated on one platform may be used on a different platform.

Frequently asked questions

Q. Can I use compiled bytecodes with any Tcl application?
A. Yes, as long as the application uses Tcl 8.0.3 or later. TclPro includes a special bytecode loader package that reads in and evaluates bytecodes; you can link this package into your applications or distribute it separately as a Tcl package.

Q. Will TclPro Compiler make my applications load faster?
A. We think that TclPro Compiler should provide a modest performance benefit, because without it your code has to be compiled each time the application is run. However, the size of the benefit depends significantly on the specific application.

Q. Does TclPro Compiler work with extensions?
A. Yes, but if the extensions define their own control structures (such as methods in object-oriented extensions) TclPro Compiler won't be able to compile the bodies of the control structures. TclPro Compiler will leave these bodies in source form, where they will be compiled on-the-fly by the normal Tcl 8.x mechanisms. Thus you can still use the compiler with extensions, but you won't get quite as much source code protection. TclPro Compiler has special support for the incorporated open source extensions ([incr Tcl], Expect, and TclX), so that their methods are obfuscated, and we will provide support for additional extensions in the future.

Q. Can I invoke bytecode files directly from my Unix shell as applications?
A. Yes. TclPro Compiler provides a mechanism for adding header lines to bytecode files to provide facilities like the #! mechanism used to invoke scripts under Unix.

Q. Can commands like info body be used to discover the bodies of compiled procedures?
A. No. TclPro Compiler compiles the bodies of procedures to bytecodes. For compiled procedures, the info body command returns a comment string saying that the procedure has been compiled so its body isn't available.

Q. Do my customers have to purchase TclPro licenses in order to use my compiled applications?
A. No. Your TclPro license agreement gives you the right to redistribute, royalty-free, a bytecode reader file along with your compiled applications.

Requirements

System hardware/software

TclPro Compiler is available as a ready-to-run application for the following platforms. The bytecode files may also be used on these same platforms:

  • Windows 95, 98, NT 4.0 (Intel), 2000
  • Solaris 2.5, 2.6, 7 (SPARC)
  • HP-UX 10.20
  • Linux (Intel, Red Hat 5.0+, SuSE 6.0+)
  • SGI IRIX 6.3+
Note: The Linux distribution is for the Intel platform and the glibc2 C library.

Tcl versions

TclPro Compiler works with the following versions of Tcl:

  • Tcl 8.0.3 or higher, excluding 8.1
  • Tk 8.0.3 or higher, excluding 8.1