English 中文(简体)
How To Distribute a Project Built In a Interpreted Language?
原标题:

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?
最佳回答

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

问题回答

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.





相关问题
How to create data structure in Tcl?

I am translating some lisp code to Tcl and wonder if there is anything like lisp s defstruct in Tcl for creating data structures? If nothing is built into Tcl, what extension packages to Tcl would ...

(Tcl/Expect) clear screen after exit

I want to clear the screen (on the local machine) after exiting from my (semi) interactive expect script. Can I do that from within the script? Here s what I tried, that failed. #!/usr/bin/expect -f ...

Implementation question in web-development

We are testing a DSL modem s web pages (the HTTP server is running on the modem). We have an automation tool that configures various options on the web pages by sending POSTS of the respective web ...

Linking Tcl/Tk to Python 2.5

I have an existing Python 2.4 and it is working properly with tkinter as I tested it using python import _tkinter import Tkinter Tkinter._test() Now, I have installed ...

热门标签