| Andreas Rozek |
|
Distributions for Win32 PlatformsSince neither an investigation within the internet nor a request posted to the Lua mailing list brought the desired result, the auther finally had to create the required TkLua distribution for Win32 platforms himself... This web pages describes the author's effort to build Win32 distributions of Lua/LuaC 4.0, tolua, TkLua 4.0a1 and LuaSocket 1.4. Both the final distributions as well as any project and resource files for Microsoft 's Visual Studio 6.0 may be downloaded from here - the latter allow you to built the distribution yourself. Surprisingly, "porting" Lua turned out to be easier than expected: all packages presented below are the result of an effort of little more than two full working days (with 7.5 hours each) - including the installation of Microsoft Visual Studio and the initial practice based on the help facility that comes with VC6!
Please, also consider my "Hints for Reading" and the "List of Recent Changes". OverviewThe list of topics given below directly guides you to the desired information - just click on a topic of your choice:
LuaThis port of the Lua runtime system is based on the original source code [1] (including bugfixes from [10]), the "official" port for Win32 platforms [2] as well as project and resource files found in an "inofficial" port [3]. The distribution was built without any changes to the source code, everything the author had to do himself was to set up appropriate project files for Microsoft Visual Studio 6.0 and to write ".def" files containing the entry points for any Lua libraries (DLLs). Additionally, a Lua icon (Lua.ico) was taken from the "inofficial" port [3]. As a result of this effort, two libraries (LuaCore.dll and LuaLib.dll) and an executable (Lua.exe) were built - the latter may be invoked from a command line shell and runs any given stand-alone Lua script. LuaCPresumably, porting the Lua compiler LuaC would not have required any changes to the source code as well - however, the compiler seems to require far more library entry points than the runtime system. For the time being, these entry points have not yet been included in the abovementioned ".def" files. As a consequence, the Lua compiler (LuaC.exe) is not yet available from the author (you may, however, use the one found in the "official" port [2] instead). toluaThe actual implementation of Lua's interface to Tcl/Tk (TkLua) uses "tolua" to simplify the construction of any "glue" code which maps Lua values to C/C++ structures or functions and vice-versa. Thus, a successful port of TkLua first requires to port tolua as well. Fortunately again, a tolua "port" does not require any changes to the source code - all the author had to do was to apply the patches described in [6] and to write a ".def" file for the tolua library. As a result of this effort, a single executable (toLua.exe) and a separately loadable library (toLuaLib.dll) were built. TkLuaTkLua implements a comfortable Tcl/Tk interface for Lua programs. For a successful build certain Tcl/Tk ".lib" files must be available - the simplest way to get them is by installation of the Tcl/Tk sources. Upon compilation of the Tcl/Tk distribution, both the required ".lib" files and the corresponding libraries are available - this helps to avoid any problems due to incompatibilities (between ".lib" files and the corresponding libraries) from the very beginning. Since Lua has been built to be invoked from a command line shell only, TkLua requires its own Windows executable (in addition to the sheer port which - again - does not require any changes to the source code). The author has developed such a program based on the "windowing shell" (wsh) from Tcl/Tk and the original Lua shell. As a result of this effort, a separately loadable library (TkLuaLib.dll) and an executable (TkLua.exe) were built - the latter may be invoked both from a command line shell and from within Windows. LuaSocketThe LuaSocket extension provides a number of functions for communication across data networks. Like before, "porting" the package is achieved by creation of a "def" file for the LuaSocket library and the integration of this library into the executables of Lua and TkLua. The result of this effort are a separately loadable library (LuaSocketLib.dll) and new versions of the Lua and TkLua executables (LuaSocket.exe and TkLuaSocket.exe). Distributions and Project FilesIf you are only interested in the result of the author's porting activities, you may just download the binary files as a single ZIP archive - the following section contains a description of how to install them:
Otherwise, you may download the source files written/modified by the author and the corresponding project files for Microsoft Visual Studio 6.0 as well:
(Please note: none of these archive files contains any (unmodified) source code from the original distributions of Lua, tolua, TkLua or LuaSocket - you will have to download them separately). Installation GuideFor the time being, there is no installation script - if need be, the author may try to provide such a script (assuming plenty of requests). Thus, the installation must be performed manually as follows:
Upon successful completion of all these installation steps, Lua, TkLua, LuaSocket and tolua should have become available on your system (some Lua modules which belong to LuaSocket and provide support for upper layer protocols such as ftp, http and smtp plus some utility functions can be found in subfolder "Socket" within the Lua installation directory) You may use the author's Lua programming examples or programs from the "Acquainting" series to test your installation. References
|
| http://www.Andreas-Rozek.de/Lua/Distributions/index_en.html | (last Modification: 11.06.2002) |