Lua for Take Command, release 1.0

  • This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.
May 30, 2008
122
1
#1
I am pleased to announce the first release of my Lua plugin for JP Software's
Take Command command processor.

What is Lua for Take Command?
-----------------------------

Lua for Take Command (LuaTC hereafter) is a plugin for Take Command
(http://www.jpsoft.com) to embed a Lua (http://www.lua.org) interpreter in the
command processor. LuaTC allows TCC batch files to take advantage of the
powerful Lua scripting language from within TCC.

Why is it different from standalone Lua?
----------------------------------------

Standalone Lua scripts do not have access to the Take Command process, so they
cannot (for example) set environment variables, or run internal TCC commands
without starting a new TCC process. However, LuaTC has direct access to the
TCC API, and can easily do these things.

A simple example, to set a variable from within Lua:

lua tcc.env["A"]="Set from Lua"

Where can I get it?
-------------------

LuaTC is hosted on Google Code. The project home page is at

http://lua4nt.googlecode.com

The binary release can be downloaded from

http://lua4nt.googlecode.com/files/LuaTC-1.0.zip

The sources are available from Subversion, via

svn checkout http://lua4nt.googlecode.com/svn/trunk/ luatc

Issues and feature requests can be reported on the Issue Tracker at

http://code.google.com/p/lua4nt/issues/list

What documentation is there?
----------------------------

Documentation is in the file Lua.txt, bundled with the DLL in the binary
release, and also available in a source checkout.

What versions of Take Command and Lua are supported?
----------------------------------------------------

The plugin was built using Take Command 9.0 and Lua 5.1.4. The binary
distribution embeds Lua 5.1.4, but can be built with any version of Lua 5.1.
The plugin has been tested with Take Command 9, but should work with 4NT 8,
and maybe even 7, as well (earlier versions of 4NT did not have a plugin
interface).

The binary has Lua statically linked. It does not need a separate Lua DLL to
run. It can load external Lua modules, but if these are in C, they will need
to link to the Lua runtime in the plugin. This can be done, but is not trivial
to get right (see http://lua-users.org/wiki/LuaProxyDllFour and related pages
for some details on this). Using external Lua extension DLLs has not been
tested much, and should be considered unsupported at the moment. If anyone has
any success setting this up, comments on the lua4nt wiki would be much
appreciated!

Why is the project called Lua4NT?
---------------------------------

The original version of the code was written at a time when Take Command was
called 4NT, so Lua4NT seemed a good name. However, 4NT was since renamed, and
an alternative Lua interface was released by Thomas Lauer, also called Lua4NT.
When I came to release version 1.0, I decided to name the binary distribution
LuaTC, to avoid confusion. Renaming the project on Google Code is another
matter - I don't know how easy that would be, if it is even possible.

Feedback
--------

Feedback is welcome. I can be contacted either via the project issue tracker,
or by email at p.f.moore@gmail.com.