PDA

View Full Version : pas2lua and Lua for Delphi/FPC v1a Released!



jdarling
02-08-2006, 04:22 PM
Finally, after weeks of work, I've got pas2lua and Lua for Delphi/FPC to a point that I feel worthy of calling a release.

pas2lua and Lua for Delphi/FPC is a collection of source files to use Lua scripting inside of Delphi/FPC/Lazarus. Its in its infancy, but already shows alot of progress. The origional Lua wrapper files were taken from the LuaEdit (http://www.luaedit.net/) project and then modified to work inside of FPC and Lazarus as well as Delphi.

pas2lua is an application for reading in existing pascal files and generating wrapper files to surface the objects and methods presented within them to Lua. This product is still under development, but due to the loads of e-mails it has generated I'm placing it up for download. IN OTHER WORDS CHECK OFTEN FOR UPDATES!

Things not yet implemented:<ul>
Multiple Indexed properties are not currently handled propertly
Support for single indexed properties is minimal
Overloaded methods are not yet handled (the processor handles them, I just haven't updated the output script to handle them).
Var, out, const method properties are not yet handled, supported by processor, just not output script
[/list]
If you fix any of these issues or issues that I'm not already aware of, please let me know and I'll be happy to put your fixes into the download along with your name (if you so desire).

product download page (http://www.eonclash.com/ViewProduct.php?ProductID=21)

jdarling
03-08-2006, 04:24 PM
Package update. Now supports conversion of multi-indexed properties and public/published properties to the full extents. Also now makes public and published var's available. No read/write testing yet, but that will come in a future build, the info is there I just haven't wrote the code yet :)

Let me know what you think.

JernejL
30-08-2006, 06:01 PM
this is REALLY REALLY interesting, will it work with lazarus as well?

jdarling
30-08-2006, 06:29 PM
Yes, it works with Lazarus. Actually the demos shipped with it have lazaraus projects with them. Here shortly a new version will be put out, alot of bug fixes and advancements have been made in the engine and translator.

JernejL
31-08-2006, 03:36 PM
i'm looking around and can't figure out, i thought it would translate the pascal into lua code.. but seems like it generates pascal code for the program interpreter or something?

jdarling
31-08-2006, 06:10 PM
It generates a wrapper for pascal code in pascal code. Basically it generates a wrapper that lets you use your pascal methods and objects from within Lua. So for example you can use a TSprite inside of lua (create a new one, or register an existing one).

KawaGeo
05-09-2006, 04:42 PM
Jeremy

I understand you were using Lua bindings for Pascal from LuaEdit. The version of Lua was a little bit old. You can use mine for Lua 5.1 if you like. It is at http://luaforge.net/projects/luatut/ and download luatut v0.1 which contains full Lua interpreter clone written in Pascal and fully converted Lua 5.1 header in Pascal.

jdarling
05-09-2006, 05:38 PM
Unfortunately when I try and use your version of Lua 5.1 I get an error saying that "lua_gethook can not be found in lua5.1.dll". I've downloaded the latest binary of lua5.1 to try and fix and still it complains. This is in FPC/Lazarus witch is a requirement of the pas2gen application and library package. Other then that (if I comment out the parts that need lua_gethook and don't try to make use of them) it seems to work. I can send you a test project that shows the problem if you would like.

KawaGeo
06-09-2006, 05:26 PM
Apparently, FPC checks every entry point in a given DLL whether used or not, whereas Delphi doesn't. Doesn't FPC have a switch to disable the checking?

BTW, I am expecting an updated Lua5.1.dll with lua_gethook() soon. Check LuaScene at luaforge.net if it is available.

Geo

Clootie
06-09-2006, 05:35 PM
Try compile and link with smartlinking enabled - this should remove this problem.