Page 1 of 1
Using LuaXML in a .love file
Posted: Thu Mar 10, 2011 1:36 pm
by YuShin
Hi,
I am trying to deal with an XML file in my love program.
I use
LuaXML an it works fine, though i have to add a lua.exe in the game directory, which i suppose makes it windows-only, or at least require the user to have Lua installed on other platforms.
My problem is that when i try to build the .love file, it fails to find 'LuaXML_lib', but there is LuaXML_lib.c, .dll and .so in the file.
This
thread suggests using love.filesystem.require(), but since I can't find it in the wiki i suppose it has been deleted.
Has anyone else encoutered this problem?
Re: Using LuaXML in a .love file
Posted: Thu Mar 10, 2011 3:20 pm
by bartbes
love.filesystem.require has been superseded by require. (It allows for custom loaders.) Furthermore, love's loader doesn't (and can't) support loading binaries. Unfortunately this means that distributing c modules is near-impossible when not providing stand-alone binaries.
Re: Using LuaXML in a .love file
Posted: Fri Mar 11, 2011 3:40 am
by leiradel
You can try one of the Lua-only XML parsers available at
http://lua-users.org/wiki/LuaXml.
Cheers,
Andre
Re: Using LuaXML in a .love file
Posted: Fri Mar 11, 2011 11:45 am
by YuShin
That's what i'm doing now
, yet they have less features
.
Thank you for your answers.
Re: Using LuaXML in a .love file
Posted: Sat Jun 23, 2012 10:15 am
by ejmr
YuShin wrote:Hi,
I am trying to deal with an XML file in my love program.
I use
LuaXML an it works fine, though i have to add a lua.exe in the game directory, which i suppose makes it windows-only, or at least require the user to have Lua installed on other platforms.
My problem is that when i try to build the .love file, it fails to find 'LuaXML_lib', but there is LuaXML_lib.c, .dll and .so in the file.
This
thread suggests using love.filesystem.require(), but since I can't find it in the wiki i suppose it has been deleted.
Has anyone else encoutered this problem?
A friend of mine encountered this on his Windows computer; I am doing my portion of development on Linux and did not run into any problems, but he consistently had trouble loading LuaXML.dll. Ultimately it turned out the problem was caused by him using a 64-bit version of Lua while the library was not compiled for that. Installing the 32-bit version of LOVE fixed the problem for him and now he can use it without any problems.
Re: Using LuaXML in a .love file
Posted: Sat Jun 23, 2012 12:10 pm
by coffee
Advanced Tiled Loader uses LuaXML. Kadoba should be familiar enough with it for help you.
viewtopic.php?f=5&t=2567
Re: Using LuaXML in a .love file
Posted: Sun Jun 24, 2012 1:18 am
by Kadoba
Advanced Tiled Loader uses the pure lua version and I don't have any experience with the C-binding one. I can't really help, sorry.
Re: Using LuaXML in a .love file
Posted: Sun Jun 24, 2012 6:20 am
by coffee
Kadoba wrote:Advanced Tiled Loader uses the pure lua version and I don't have any experience with the C-binding one. I can't really help, sorry.
Oh sorry about the confusion. I was mislead by your header in external/xml.
Code: Select all
-- XML parser from http://lua-users.org/wiki/LuaXml
Not same library, probably a lot more of XML/Lua combos libs have that (obvious) name.