lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


As a personal experiment, I've taken a plunge into the dark waters of
binary distributions and I've created a Lua application for Mac OS X:
	http://www.tecgraf.puc-rio.br/~lhf/ftp/lua/5.2/Lua.zip

When you run Lua.app, it opens a window and lets you drag and drop Lua
programs into it to run them.

Lua.app was built using Platypus, a tool for wrapping scripts as Mac OS X apps:
	http://sveinbjorn.org/platypus

Like all Mac OS X apps, Lua.app is actually a folder and you can cd into it
or control-click and Show Package Contents. When you do this you'll see the
following in Lua.app/Contents/Resources:
	lua	- the Lua 5.2.2 binary
	script	- a shell script to invoke lua
	lib	- a library of precompiled Lua modules

You can adapt script to your liking. You can add or remove modules in lib.
Binary modules should be place directly in lib/ and Lua modules in lib/lua,
but you can change this by editing script. You can even use a different
version of Lua by simply replacing the Lua binary (and providing compatible
Lua modules).

I've added several of my Lua modules in lib:
	ascii85 base64 bc bn complex gdbm gpc interval
	mapm mathx md5 pdf qd random

Some of these include third-party libraries that are boring (but not
hard) to download and build. I hope they are useful. In any case, you
can easily adapt Lua.app to use your favorite modules. Perhaps this can
evolve into a community-maintained, module-rich, Lua app for Mac OS X.

Please note again that this is a personal experiment, not a Lua.org official
product. All feedback welcome.
--lhf