views:

115

answers:

2

Hello,
I've started a project(developer text editor) in a interpreted language(Tcl/Tk) and another with Perl(both are open-source), but with some time, when it gets in a Beta version, I will need to distribute it for the users(developers of course), but I want to know some things about this:

  • It's possible to compile it to a executable?
    • How?
    • Can I compile for other platforms?
  • Or in this case it's better to use a compiled language or a interpreted?
  • Is usual things like this?
  • In the users machine, he will need to have Tcl/Tk or Perl?
+4  A: 

Both Tcl and Perl can be compiled into executables. For windows, there's perl2exe and perlcc for systems running UNIX style operating systems. As for Tcl, there is freewrap and starpacks.

If you're just doing this for the benefit of a single executable, and eliminating the need for installing Perl and other dependencies, then there's no real reason you can't do this. It's quite a nice method for testing your application without having to constantly compile, though defeats the point of using an interpreted language in the first place.

Also take a look at The Simplest Steps to Converting TCL TK to a Stand Alone Application, this page is also useful, How can I compile Tcl type scripts into binary code

Dave
+1 Good links and descriptions **;**
Nathan Campos
For Tcl, starkits/starpacks (referred to in the links above) are now considered standard for stand-alone application deployment. Freewrap is less common but is still being updated. Choosing between them may depend on whether you need any of the extensions each one includes.
Colin Macleod
Starpacks are definetly worth a look, they make it really easy to produce a single binary that bundles TCL and your application ito one simple .exe
Jackson
Strangely, many years after the introduction of starkits and starpacks, no other interpreted language has yet to come up with anything that comes close to the power and flexibility of starpacks, starkits and tclkits.
Bryan Oakley
+1  A: 

The usual and common way for such scripts is to distribute the source. A binary would only work on some very specific systems but Tcl/Tk/Perl runs on so many systems, so that would be a really big restriction for no real reason. It also helps other developers more to reuse your scripts in some good way. In most cases, even when somebody could execute your binary, it wouldn't be of much help without the source.

Albert
Why do you say "for no real reason"? Me, personally, would never use the thing if I had to install Perl/Tcl/whatever, but with a standalone executable, I might.
erikkallen
For no real reason because it is trivial to install Perl/Tcl but it makes it unusable otherwise. And most systems, almost all systems I know (except Windows) come with Perl/Tcl preinstalled.
Albert

related questions