Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

To compile or not to compile? That is my question.

Status
Not open for further replies.

DANZIG

Technical User
Mar 8, 2001
142
US
Hello All, I'm just looking at tcl/tk for the first time, I normally write perl on a windows platform. TCL lookin intresting to me but in a network inviorment I often run scripts against systems lacking the perl subsys, the abality to comple perl is a very nice feature.

Is TCL a complileable language?

Thanks in advance.
 
There are several strategies for deploying Tcl applications, some of which involve compilation to binary, and some of which involve distributing some type of Tcl runtime.

If you really want to compile to binary, I'd suggest checking out the creatively named "Compiler" product from the Compiler Factory, I've not actually used the product yet, but I've heard from some people that it does a reasonable job.

The other options are described on The Tcler's Wiki ( specifically on the page "How can I compile Tcl type scripts into binary code",
As described on that page, there are a couple of options for creating a single-file distribution that don't involve actual compilation. Instead, they graft your script(s) and support files onto a statically compiled Tcl interpreter. The two options are TclPro Wrapper and Freewrap, both of which are open source and freely downloadable. I've used TclPro Wrapper several times quite successfully, and I've heard many people use Freewrap successfully as well. But both of these options can be quite tricky if you need to include binary shared libraries with your application.

Another approach described on that page is a tool called TclKit, which I'm warming up to quite a bit these days. It allows you to create what the author describes as "scripted documents." Deployment consists of a platform-specific, single-file Tcl runtime and a platform-independent, single-file application. (It's analogous to having a single-file Java Virtual Machine and then distributing all of your applications as JAR files.) Furthermore, the single-file application (which can consists internally of multiple scripts, support, and data files) can contain persistent information, in essence allowing you to store application data internally in an efficient database. The transactional database supports rollback and commit type operations, and is actually used to maintain both the data and the actual Tcl scripts. This supports some pretty slick deployment options, including safe web-based application updates. - Ken Jones, President
Avia Training and Consulting
866-TCL-HELP (866-825-4357) US Toll free
415-643-8692 Voice
415-643-8697 Fax
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top