summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNicolas "Pixel" Noble <pixel@nobis-crew.org>2009-11-26 02:56:10 +0100
committerNicolas "Pixel" Noble <pixel@nobis-crew.org>2009-11-26 02:56:10 +0100
commiteed8ea39d85400821040ac75855608cafb3e72d5 (patch)
treea71c5cced2651237ad3bdee0d3195b39749a8a12 /src
parent44fbfcc3dd5ce15e97b23e92ce044dc4f205f38f (diff)
Adding self-paq feature for lua-interface-light.
Diffstat (limited to 'src')
-rw-r--r--src/lua-interface.cpp10
1 files changed, 9 insertions, 1 deletions
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) {