r428 - trunk
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Wed Jan 16 07:23:36 EST 2008
Author: icculus
Date: 2008-01-16 07:23:36 -0500 (Wed, 16 Jan 2008)
New Revision: 428
Modified:
trunk/lua_glue.c
Log:
Export the base archive's path and the app binary path to Lua.
Modified: trunk/lua_glue.c
===================================================================
--- trunk/lua_glue.c 2008-01-16 11:50:02 UTC (rev 427)
+++ trunk/lua_glue.c 2008-01-16 12:23:36 UTC (rev 428)
@@ -1493,6 +1493,7 @@
{
const char *envr = cmdlinestr("locale", "MOJOSETUP_LOCALE", NULL);
char *homedir = NULL;
+ char *binarypath = NULL;
char locale[16];
char ostype[64];
char osversion[64];
@@ -1525,6 +1526,7 @@
registerLuaLibs(luaState);
homedir = MojoPlatform_homedir();
+ binarypath = MojoPlatform_appBinaryPath();
// !!! FIXME: I'd like to change the function name case for the lua hooks.
@@ -1571,6 +1573,8 @@
set_string(luaState, GLuaLicense, "lualicense");
set_string(luaState, logLevelString(), "loglevel");
set_string(luaState, homedir, "homedir");
+ set_string(luaState, binarypath, "binarypath");
+ set_string(luaState, GBaseArchivePath, "basearchivepath");
set_string_array(luaState, GArgc, GArgv, "argv");
lua_newtable(luaState);
set_string(luaState, "base", "base");
@@ -1623,6 +1627,7 @@
lua_setfield(luaState, -2, "archive");
lua_setglobal(luaState, MOJOSETUP_NAMESPACE);
+ free(binarypath);
free(homedir);
// Set up localization table, if possible.
More information about the mojosetup-commits
mailing list