LF_RunDefaultScript
BOOL LF_RunDefaultScript(lua_State* L)
Parameters:
L: Lua state
Returns:
TRUE if successful, FALSE otherwise
Description:
First, the function tries to require
a module with the predefined name <boot
. If package.preload["<boot"]
contains a function, then it is run.
Else, the starting (or “default”) Lua script is searched in the plugin’s directory, in the following order:
The plugin name with the extension
.lua
, e.g.:luaplug.dll -> luaplug.lua
If the plugin name contains a hyphen, then its part preceding the last hyphen is looked for, e.g.:
luaplug-x64.dll -> luaplug.lua
.
This mechanism allows the default script to be either embedded into the application or external.