Results 1 to 6 of 6

Thread: Best way to add lua libraries and plugins?

  1. #1
    Join Date
    Dec 2004
    Posts
    103

    Default Best way to add lua libraries and plugins?

    As explained in my thread about transition from G5 to G6, I'm implementing several components in LUA.
    What's the best approach to ensure that my own code will not be deleted/overwritten by G6 updates?

  2. #2
    Join Date
    Jan 1998
    Location
    Jupiter, FL
    Posts
    13,553

    Default

    Best way is to add a user specific lua include directory

    modify package.path to include a Personal Lua directory. In the next Girder release I will add GIRDERSETTINGS\Lua as a personal Lua path directory.

    Code:
    local settings = gir.settings()
    local path = settings.settingsPath .. "/Lua/?.lua;" .. settings.settingsPath .. "/Lua/?/init.lua;"
    package.path = package.path .. ";" .. path
    Ron
    No support through PM

  3. #3
    Join Date
    Dec 2004
    Posts
    103

    Default

    Cool! That will secure my devs, thanks.

    I've several external interactions that are based on XML, but lxp which is provided in G6 is providing a poor way to manipulate XML. LuaXPath (http://luaxpath.luaforge.net/) provides several helpful methods.
    Could you think about adding it as part of the libraries included in G6?
    Whatever the answer is, your solution will provide me the way to add all external libraries without any risk.

  4. #4
    Join Date
    Jan 1998
    Location
    Jupiter, FL
    Posts
    13,553

    Default

    Looks like that is just a lua file. When I drop it into Girder it fails a lot of its own tests, not sure what is going on. Some work some dont.
    Ron
    No support through PM

  5. #5
    Join Date
    Dec 2004
    Posts
    103

    Default

    I've used it in the standalone LUA environment, but I will check it against girder.

  6. #6
    Join Date
    Dec 2004
    Posts
    103

    Default

    Works perfeclty fine in Girder: test.lua + xpath.lua + module directory put in lua.

    Files are here: http://files.luaforge.net/releases/l.../luaxpath/v1.1

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •