Dalee Lua

lua-users home
wiki

The original page: http://homepage.mac.com/dalee1/ no longer exists, it has been restored here for completeness

*[Lua4.0-MacOSX.tar.gz]


Lua 4.0 for Mac OS X - distribution by David Lee

N.B. - This note is not intended to describe Lua fully. It is an accompanyment to the Mac OS X distribution of Lua 4.0. For comprehensive documentation about the Lua programming language and visit www.lua.org.

These instructions accompany the Lua4.0-MacOSX download.

About Lua for Mac OS X

I created these Mac OS X frameworks so that other developers would find incorporating Lua into their projects very easy. Basically all this distribution is, is the original Lua source code wrapped up in Mac OS X Project Builder projects. I am providing them as a biproduct of my own projects which have included Lua and I though others may benefit from them. I should make it clear that I have not made any modifications to the source code in the original Lua distribution, I have just made it easier to add to Mac OS X projects by distributing these frameworks.

Lua for Mac OS X is comprised of two frameworks (lua_core.framework and lua_standard.framework) which are equivalent to the Lua libraries you compile on other platforms. Frameworks are broadly speaking equivalent in terms of functionality to a library. If you include these frameworks in your projects just include them and then you can use all the Lua API calls in them.

Altogether this package consists of 4 Project Builder projects:

* Lua Standard Library (implimented as a framework) * Lua Core Library (also a framework) * Lua interpreter (for running lua programs on the command line * Lua Compiler to speed up your lua scripts execution.

Compiling & Installation

The order you do this is important otherwise your builds will fail.

- First open the lua_core project in Project and build the framework. - Once built you should find 'lua_core.framework' (which appears as a folder) now exits in the 'build' folder in it's project folder. It should immediately be put either in ~yourusername/Library/Frameworks (if only you are going to use the Lua Frameworks) or in /System/Library/Frameworks (to allow all users to access the frameworks). - You can now build the lua_standard framework. - Put 'lua_standard.framework' in the same location you just put 'lua_core.framework' in.

- You can build lua_compiler and lua_interpreter now (in any order) and you should put the binaries you build into /bin for convenience. - If you prefer you can rename the binaries in the project 'build' folder. Perhaps rename the interpreter to 'lua' and the compiler to 'luac'. These two can then be put in your /bin directory. That's it. Simple.

Important:

To use these frameworks in your projects you will probably have to put the file lua.h into your project directory (and possibly some others, but the compiler will notify you). Simply add the following line you your main source code file: #include "lua.h"

You will find lua.h in the 'Framework Header' folder.

About Me

My name is David Lee and I am studying for a BSc in Software Engineering at the University of the West of England (UWE) in Bristol, UK. I am an avid supporter of the open source philosophy of writing software. All the credit for the actual implimentation of Lua should rightly go to the people from www.lua.org as Lua is fantastic. I just packaged their hard work.Give them a visit. Mail me if you found these frameworks helpful, or to let me know where this Lua port has been built into your projects:

David2.Lee@uwe.ac.uk

Credit Where Credit is due...

Lua is Copyright © 1994-2000 TeCGraf, PUC-Rio. All rights reserved.

Bash install script

David Blevins: Here is a little script I whipped up for compiling and installing according to the directions above.


#!/bin/bash

(cd lua_core && xcodebuild && sudo cp -r build/lua_core.framework /System/Library/Frameworks/ )

(cd lua_standard && xcodebuild && sudo cp -r build/lua_standard.framework /System/Library/Frameworks/ )

(cd lua_compiler && xcodebuild && sudo cp -r build/lua_compiler /usr/bin/luac )

(cd lua_interpreter && xcodebuild && sudo cp -r build/lua_interpreter /usr/bin/lua )

[Last Updated Saturday 25-08-2001 21:24]


RecentChanges · preferences
edit · history
Last edited February 7, 2005 2:00 am GMT (diff)