Hi,
I have one question, how do I use LuaRocks modules with Corona SDK?
Hi,
I have one question, how do I use LuaRocks modules with Corona SDK?
I’ve had a quick play around with this. Basically you need to set up the package.path variable to include the directories you want. You’ve then got to correctly initialise your modules. I’ve stopped there as I realised that it was all unnecessary!
Thanks tap32 for responding:)
What do you mean by saying “I realised that it was all unnecessary”? Do you mean that there is no additional functionality that might be found useful in Corona development?
I use penlight library as standalone drop in package and find it very helpful, but many packages are only distributed as LuaRocks modules, I was playing around with package.path as well but never managed to get it to work.
In my case I was looking to use Busted a unit testing library. But then I realised that I didn’t actually need it to run in the Corona SDK, but independently. That won’t do for some people, as there are differences between normal Lua and Corona Lua, but it’s good enough for me.
Corona-Busted provides a lot of mocks to imitate the corona libraries, though I think they might be out of date (I never got them to run due to some issue with the Lib-Ev library.
https://github.com/Cluain/corona-busted
Have you tried cloning the penlight library and soft linking the files? That’s my usual approach and it tend to work fine. You can get the git repository from: https://github.com/stevedonovan/Penlight/tree/master/lua/pl
I’ve had a quick play around with this. Basically you need to set up the package.path variable to include the directories you want. You’ve then got to correctly initialise your modules. I’ve stopped there as I realised that it was all unnecessary!
Thanks tap32 for responding:)
What do you mean by saying “I realised that it was all unnecessary”? Do you mean that there is no additional functionality that might be found useful in Corona development?
I use penlight library as standalone drop in package and find it very helpful, but many packages are only distributed as LuaRocks modules, I was playing around with package.path as well but never managed to get it to work.
In my case I was looking to use Busted a unit testing library. But then I realised that I didn’t actually need it to run in the Corona SDK, but independently. That won’t do for some people, as there are differences between normal Lua and Corona Lua, but it’s good enough for me.
Corona-Busted provides a lot of mocks to imitate the corona libraries, though I think they might be out of date (I never got them to run due to some issue with the Lib-Ev library.
https://github.com/Cluain/corona-busted
Have you tried cloning the penlight library and soft linking the files? That’s my usual approach and it tend to work fine. You can get the git repository from: https://github.com/stevedonovan/Penlight/tree/master/lua/pl