lua-users home
lua-l archive

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


Shmuel Zeigerman wrote:
Ignacio Burgueño wrote:
For instance, I'm building a rock that installs precompiled versions
of lrexlib. It installs rex_pcre.dll where luarocks specified, and
pcre.dll in the same directory. However, I can't require rex_pcre,
because rex_pcre.dll depends on pcre.dll. This dependency isn't
handled by a plain LoadLibrary. Windows performs a lookup using the
usual rules. For it to work, with a vanilla Lua installation, I have
to copy pcre.dll to somewhere in my PATH, or worse, to system32.

(Not replying to the main proposal but rather to the cited example).

If an lrexlib rock installs pcre.dll into the same directory as rex_pcre.dll, then the rock is wrong! pcre.dll should be either somewhere on Windows PATH, or in the directory where lua.exe resides.


Why? Imagine two different applications are using different versions of PCRE. If my rock installs its version of PCRE in the Windows path, it's most likely to break the other applications. Whenever possible, its best to not drop dlls in the path. It breaks the isolation of the rock. Also, consider what happens when you remove the rock. Do you remove the dll you put on the path? What happens if you stepped onto the dll of another application? Removing the dll will break it.

Regards,
Ignacio Burgueño