How do you incorporate external libraries Corona? I am attempting to use the excellent Penlight library, and have had little success bundling it with my app.
Here is what has failed to work for me so far. Any advice would be greatly appreciated.
My first attempt to include Penlight involved including the full source in its own folder, and modifying package.path to find the Lua files. Sadly, this approach failed.
One of the devs in #corona mentioned that Corona’s loader does not recognize modifications to package.path, a comment that conflicts with the require() documentation:
Otherwise require searches for a Lua loader using the path stored in [package.path][api.library.package.path].
My second attempted involved a more direct require(‘path.to.file’) approach. While this loads the initial Penlight module, it then fails to load the related Penlight dependencies.
What have other people done when bundling an external library into a Corona app? How should one go about doing this?