From eed8ea39d85400821040ac75855608cafb3e72d5 Mon Sep 17 00:00:00 2001 From: "Nicolas \"Pixel\" Noble" Date: Thu, 26 Nov 2009 02:56:10 +0100 Subject: Adding self-paq feature for lua-interface-light. --- src/lua-interface.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/lua-interface.cpp b/src/lua-interface.cpp index c26df03..d05b95a 100644 --- a/src/lua-interface.cpp +++ b/src/lua-interface.cpp @@ -998,10 +998,18 @@ virtual int startup() throw (GeneralException) { built.write(lua_interface_light_lua, size_lua_interface_light_lua); try { + bool passthru = true; + try { + new Archive(argv[0], ARCHIVE_EXECUTABLE); + } + catch (...) { + passthru = false; + } L->load(&built); L->push("lua_interface_light_main"); L->gettable(LUA_GLOBALSINDEX); - L->call(0, 1); + L->push(passthru); + L->call(1, 1); interactive = L->toboolean(); L->pop(); if (interactive) { -- cgit v1.2.3