summaryrefslogtreecommitdiff
path: root/lua-interface-light.lua
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 /lua-interface-light.lua
parent44fbfcc3dd5ce15e97b23e92ce044dc4f205f38f (diff)
Adding self-paq feature for lua-interface-light.
Diffstat (limited to 'lua-interface-light.lua')
-rw-r--r--lua-interface-light.lua22
1 files changed, 15 insertions, 7 deletions
diff --git a/lua-interface-light.lua b/lua-interface-light.lua
index ae115f9..b34baf9 100644
--- a/lua-interface-light.lua
+++ b/lua-interface-light.lua
@@ -142,23 +142,31 @@ local function generate_dlg()
}
end
-function lua_interface_light_main()
- local dlg = generate_dlg()
+function lua_interface_light_main(passthru)
+ if not passthru then
+ local dlg = generate_dlg()
- dlg:show()
- iup.MainLoop()
- dlg:hide()
+ dlg:show()
+ iup.MainLoop()
+ dlg:hide()
+ else
+ okay = true
+ end
if commandline then return true end
if not okay then return false end
- if not pcall(Archive, input_file_text.value) then
- error(error_not_archive_locale[system_locale])
+ if not passthru then
+ if not pcall(Archive, input_file_text.value) then
+ error(error_not_archive_locale[system_locale])
+ end
end
if not pcall(load, "archive_main.lua") then
+ if passthru then return lua_interface_light_main(false) end
error(error_wrong_archive_locale[system_locale])
end
if not type(archive_main) == "function" then
+ if passthru then return lua_interface_light_main(false) end
error(error_bad_lua_locale[system_locale])
end