From db07db3f6cdec03e9c16142c8e6a9d49801c5ae1 Mon Sep 17 00:00:00 2001 From: David Walter Seikel Date: Wed, 22 Feb 2012 02:08:13 +1000 Subject: Create constants.lsl at run time from LSL.lua, and use the same infrastructure to generate calls for OpenSim to deal with. --- LuaSL/src/LuaSL_compile.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'LuaSL/src/LuaSL_compile.c') diff --git a/LuaSL/src/LuaSL_compile.c b/LuaSL/src/LuaSL_compile.c index a4d54db..873e6c4 100644 --- a/LuaSL/src/LuaSL_compile.c +++ b/LuaSL/src/LuaSL_compile.c @@ -2119,7 +2119,9 @@ boolean compilerSetup(gameGlobals *game) } // Compile the constants. - snprintf(buf, sizeof(buf), "%s/src/constants.lsl", PACKAGE_DATA_DIR); + snprintf(buf, sizeof(buf), "lua -e 'require(\"LSL\").gimmeLSL()' > %s/constants.lsl", PACKAGE_DATA_DIR); + system(buf); + snprintf(buf, sizeof(buf), "%s/constants.lsl", PACKAGE_DATA_DIR); compileLSL(game, NULL, "FAKE_SID", buf, TRUE); return TRUE; -- cgit v1.1