Premake Internals
|
Program entry point. More...
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include "premake.h"
#include "lua_shimtable.h"
Functions | |
int | premake_init (lua_State *L) |
int | premake_locate_executable (lua_State *L, const char *argv0) |
int | premake_test_file (lua_State *L, const char *filename, int searchMask) |
const buildin_mapping * | premake_find_embedded_script (const char *filename) |
int | premake_load_embedded_script (lua_State *L, const char *filename) |
int | premake_getEmbeddedResource (lua_State *L) |
Program entry point.
const buildin_mapping* premake_find_embedded_script | ( | const char * | filename | ) |
Locate a file in the embedded script index. If found, returns the contents of the file's script.
int premake_getEmbeddedResource | ( | lua_State * | L | ) |
Give the lua runtime raw access to embedded files.
int premake_init | ( | lua_State * | L | ) |
Initialize the Premake Lua environment.
int premake_load_embedded_script | ( | lua_State * | L, |
const char * | filename | ||
) |
Load a script that was previously embedded into the executable. If successful, a function containing the new script chunk is pushed to the stack, just like luaL_loadfile would do had the chunk been loaded from a file.
int premake_locate_executable | ( | lua_State * | L, |
const char * | argv0 | ||
) |
Locate the Premake executable, and push its full path to the Lua stack. Based on: http://sourceforge.net/tracker/index.php?func=detail&aid=3351583&group_id=71616&atid=531880 http://stackoverflow.com/questions/933850/how-to-find-the-location-of-the-executable-in-c http://stackoverflow.com/questions/1023306/finding-current-executables-path-without-proc-self-exe
int premake_test_file | ( | lua_State * | L, |
const char * | filename, | ||
int | searchMask | ||
) |
Checks one or more of the standard script search locations to locate the specified file. If found, returns the discovered path to the script on the top of the Lua stack.