lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

I have slightly changed the Visual C++ projects I created to compile Lua for
I have added some resources, to make more Windows-like binaries.
They includes version information (I use it a lot and find it very useful)
and the now official Lua icon. Even the DLL have this icon, so programs can
access it from the DLL resource.

The version informations are:
"Comments", "Lua - An Extensible Extension Language\0"
"CompanyName", "TeCGraf, PUC-Rio\0"
"FileDescription", VER_FILE_DESC
"FileVersion", "4.0.01\0"
"InternalName", "Lua\0"
"LegalCopyright", "Copyright © 1994-2000 TeCGraf, PUC-Rio\0"
"LegalTrademarks", "\0"
"OriginalFilename", VER_FILE_NAME
"ProductName", "Lua\0"
"ProductVersion", "4.0\0"
"URL", "\0";
"E-MAIL", "\0"
"AUTHORS", "W. Celes, R. Ierusalimschy & L. H. de Figueiredo\0"

VER_FILE_DESC and VER_FILE_NAME are dependent on the generated binary:
#define VER_FILE_DESC	"Lua Interpreter"
#define VER_FILE_NAME	"Lua.exe"

#define VER_FILE_DESC	"Lua Compiler"
#define VER_FILE_NAME	"LuaC.exe"

#define VER_FILE_DESC	"Lua DLL"
#define VER_FILE_NAME	"Lua.dll"

#define VER_FILE_DESC	"Lua Lib DLL"
#define VER_FILE_NAME	"LuaLib.dll"

#define VER_FILE_DESC	"Lua+Lib DLL"
#define VER_FILE_NAME	"Lua+Lib.dll"

Note I added a Lua+Lib.dll file, grouping Lua and its standard library.
I think it is easier to distribute one DLL instead of two.

Let me know if these informations are accurate or if you want to change them
before I do the actual release.

I also have integrated the small bug fix of Roberto on the "return ;" (if I
recall correctly).
I can't remember if there are other bugs signaled on the list. If there are
any, I would like to integrate them.

And I added the AuxLib functions to the functions exported in LuaLib.dll. I
didn't do it in the previous release because they are not documented in the
official Lua doc. But now that I have the Claudio Terra's documentation, I
know what they are for. Sort of. These functions probably have changed on
Lua 4.0, and I still lack a view of the global picture (which I probably can
get from the lualib sources), but it is still an useful document.

My projects now compile all the files in multithreaded DLL (the .exe were
single threaded). The main advantage is that generated files are smaller, as
they statically linked against the MSVCRT.dll, ie. the C run-time DLL of
Visual C++.
In the previous version, if you didn't cleaned the DLL projects after
generating the libs, the generated DLLs were bloated as they actually used
the previous .obj files... It took me some time to figure out what was going

I also added some project dependencies. Before, you had to compile the
projects in a given order, now VC take care of this. The DLLs use also the
.lib as they are compatible now.
I will distribute the .lib for those wanting to link against these.

I would also include the Reuben Thomas' bitwise logical operator library,
but I am a bit reluctant to add non-official extensions. Perhaps as a
secondary DLL?
Perhaps Lua 4.1 will include such binary operators, as they can be quite
useful to parse file headers, among other things.
The regex library is interesting too, but needs to use an external regex
library, so it is likely to bloat the binary. A secondary DLL is the logical
place for such a library. (Speaking of the Windows world, of course.)

I will also create small projects, to test my binaries, and to provide some
elementary samples on how to use Lua in a C project (and to learn how to do
it, actually!). It seems there is a need for such a project, as shows a
recent message asking how to do a "Hello world!" program.

A note on the Lua website thread:
I prefer over, as it is more explicit. Don't
forget Lua is a Portuguese common word, so it can be an astronomical or
poetical site as well...
Note I used capital initials, as domain names are case-insensitives, and it
is more readable.
About the cybersquatter: I hate this kind of guy (parasitic), but I must
admit they can grade a name. They ask for a reasonable amount of money, as
Lua have little selling value over a domain name such as!
That said, of course I vote against buying this domain name to such a


Philippe Lhoste (Paris -- France)
Professional programmer and amateur artist