lua-users home
lua-l archive

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


2011/2/27 Sam Roberts <vieuxtech@gmail.com>:
> On Sat, Feb 26, 2011 at 2:49 PM, Petite Abeille
> <petite.abeille@gmail.com> wrote:
>> http://www.lua.org/work/doc/manual.html#pdf-package.config
>
> >From manual:
>
>  The fourth line is a string that, in a path in Windows, is replaced
> by the executable's directory. Default is '!'.
>
> The executable is the lua.exe, or the script.lua?

The executable of the process as defined by GetModuleFileName [1]
called with a NULL hModule. This may be lua.exe, or the exe of the
program embedding Lua.

> And why don't posix users get this?

Maybe because it's a less common practice on POSIX systems to install
files in locations relative to the binaries. Maybe like other
suggested because there is no easy way to get that executable path in
the POSIX API.

[1] http://msdn.microsoft.com/en-us/library/ms683197.aspx