|
What is Lua Plugin?
Lua Plugin is a REALbasic plugin that allows execution of Lua scripts from within a REALbasic app. The API is similar to the RBScript API. There is a Print event that is called when Lua wants to print something, and an Input event when Lua needs input from the user. Lua Plugin has been built with Lua 4.0.
What do I need to run Lua Plugin?
The Lua Plugin has only been (minimally) tested with the classic and carbon versions of REALbasic 4.0.2, though it will very likely work with 4.5 as well. There is no 68K version of the plugin, so it must be used on a PPC Macintosh.
How much does Lua Plugin cost?
Lua Plugin is free. We would appreciate an
email message if you use Lua Plugin.
How do I use Lua Plugin?
See the accompanying documentation.
What are the limitations on distributing
Lua Plugin?
Lua Plugin is free, but it is not "public
domain". It is copyrighted, and amianduri reserves
all rights. Please see the COPYRIGHT file for details.
What is the project folder for?
If you have downloaded the version of the plugin that comes with source, here are a few notes:
- Although the source is free to use, modify, and distribute as you see fit, amianduri holds the copyrights to it. Please read the COPYRIGHT file for details.
- The project that comes with the source is for Metrowerk's CodeWarrior 7. I have not tested it with any other version of CodeWarrior (nor any other development tools, for that matter).
- The plugin cannot be built right out of the box. It requires two other components. The first is the Lua source, which can be downloaded from the Lua website at www.lua.org. Make sure to get the released version of Lua, which is version 4.0. The second component is the REALbasic Plugins SDK, which can be obtained from REAL Software at http://webster.realsoftware.com/realbasic/about/plugins.html. Make sure to get the 4a1 SDK. Place both the Lua source folder and the REALbasic Plugins SDK folder in the Lua Plugins project folder, which is located in the Lua Plugin folder. Open the LuaPlugin.mcp project file in CodeWarrior 7 and build the Create FAT Plugin target. This will create the "Lua Plugin" in the same folder as the project. Lua Plugin is a FAT plugin in the sense that it contains two versions of the plugin in one file. One version works with the PPC version of REALbasic and one version works with the Carbon/MacOS X version of REALbasic. There is no 68K version of Lua Plugin.
- There is one incompatibility between the Lua source and Apple's Universal Headers for Carbon, which I have attempted to solve. One of Apple's files is called Debugging.h, and it contains a macro called check. Unfortunately, there is a check() function in lparser.c in the Lua distribution. As a workaround, I have undef'd the check symbol in the file CommonCarbonPrefix.h. That should allow the Lua source to compile in the Carbon build of the plugin.
- There are several incompatibilities between CodeWarrior 7 and the 4a1 REALbasic Plugins SDK. The primary problem is that two files that are included in PluginMain.cpp of the SDK are no longer part of the CodeWarrior installation. Those files are SetupA4.h and A4Stuff.h. Those two files do not provide any necessary functionality for either the PPC or the Carbon builds of a REALbasic plugin, but without them PluginMain.cpp won't build. I have provide of these files that will allow the Lua Plugin to build. It is important to note that these two files are not part of the REALbasic Plugins SDK.
- One other issue that may be of some concern is the fact that the function __sinit() is not called for the Carbon version of the Lua Plugin. This should not be a problem. __sinit()'s job is to call the constructors of any static objects. Lua Plugin does have one static variable. But it is not an object. So the lack of a __sinit() call should not be a problem.
How do I contact amianduri?
Send email to will@amianduri.com
We would appreciate any comments and bug
reports.
Warranty
Lua Plugin and any support from amianduri
are provided "as is" and without warranty, express
and implied, including but not limited to any implied warranties
of merchantability and fitness for a particular purpose. In no
event will amianduri be liable for any damages, including
lost profits, lost savings, or other incidental or consequential
damages, even if amianduri is advised of the possibility
of such damages, or for any claim by you or any third party.
Version History
v1.0
Acknowledgments
Lua 4.0 is copyright © 1994-2002 TeCGraf, PUC-Rio and is being developed by Waldemar Celes, Roberto Ierusalimschy, and Luiz Henrique de Figueiredo (see http://www.lua.org).
REALbasic is copyright © 1997-2002 REAL Software, Inc. (see http://realbasic.com/).
|