A basic framework for rapid desktop application development using Lua & IUP
C++ C Lua
Switch branches/tags
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
bin add Lua-SQLite3 module Apr 30, 2010
examples added crc32 and md5 funcs Nov 30, 2009
include add Lua-SQLite3 module Apr 30, 2010
lib
reference first commit Nov 25, 2009
tools first commit Nov 25, 2009
.gitignore first commit Nov 25, 2009
FILEFORMAT first commit Nov 25, 2009
README general cleanup Nov 28, 2009
crc32.c added crc32 and md5 funcs Nov 30, 2009
crc32.h added crc32 and md5 funcs Nov 30, 2009
hton.h general cleanup Nov 28, 2009
libluadesk.c added crc32 and md5 funcs Nov 30, 2009
libluadesk.h general cleanup Nov 28, 2009
linker.h general cleanup Nov 28, 2009
linker.lua general cleanup Nov 28, 2009
lua.ico
luadesk.cbp added crc32 and md5 funcs Nov 30, 2009
luadesk.manifest first commit Nov 25, 2009
main.c
md5.c added crc32 and md5 funcs Nov 30, 2009
md5.h
pen.cur
resource.h
resource.rc first commit Nov 25, 2009
script.h first commit Nov 25, 2009

README

LuaDesk

A basic script host for rapid desktop application development using Lua & IUP. Currently focused on Windows deployment, but can be adapted to GTK+ and Motif. 

Summary:

Using LuaDesk, one can build a stand-alone, interactive executable with a GUI that has no external dependencies using the Lua language. Functionally think of it as VB for ubergeeks - but no compiler is needed. The primary purpose is to allow rapid (rabid?) application development for small to medium-sized portable desktop "applets" or "vertical market" programs. Current uses include a basic POS system, postage meter interface, and various data-mining/reporting tools.

Given that IUP is statically linked, this means that life gets much easier when we statically link ALL third-party Lua libraries used by the scripts. It also gives the benefit of a single file deployment/installation. Downsides are a more complicated build/project and a bunch of extra work. Currently included libraries are: LuaFileSystem and LuaCurl. Future additions will be a XML parser and LPEG. LuaSQL & LuaSocket are being looked at, but may take awhile. Feel free to help out ;)

How to:

So how do you turn your own (or on of the example) scripts into an executable? Just run the luadesk executable, and it will launch the embedded "linker" script. Follow the prompts to select one or more Lua scripts (plain-text or compiled) and specify an output file. The way it works internally is modeled after how self-extracting archives work. All "linked" files are appended to the host executable and a table of contents is created at the end. But instead of writing each packaged file to storage when the host is launched, each linked file (Lua script in this case) is run through the Lua Virtual Machine.

Any syntax or runtime script errors will be displayed as a pop-up when you run the output executable (and will cause the program to immediately exit). Have fun!

References: 

Lua - http://www.lua.org/
IUP - http://www.tecgraf.puc-rio.br/iup/
LuaFileSystem - http://www.keplerproject.org/luafilesystem/