Adding Libraries: Lime?

Do I just add lime.lua to the library list or do I have to add the other files too? [import]uid: 49013 topic_id: 8453 reply_id: 308453[/import]

You have to add them all [import]uid: 8366 topic_id: 8453 reply_id: 30334[/import]

At this point the Libraries section only knows about the specific files. A future update might be a little smarter about that if I figure out a good way to handle it. :slight_smile: Possibly by allowing a folder to be specified as a library, and then the contents all being added, etc.

Jay
[import]uid: 9440 topic_id: 8453 reply_id: 30372[/import]

My concern is this:

Let’s say I wanted to use lime, do I just require(“lime”) - or do I have check all of the lime lua files to get all of the required files copied when I launch/publish a project? (This is if I’m not using a base folder for a new project - just defining a project name.)

I’ve been running through all of the lime tutorials and was trying to do the first tutorial in CPM. It didn’t work… but when I drag/dropped the tutorial folder contents into CPM it worked.

Me thinks from now on, I should use a base folder and put all the lime files there instead of trying to run without the optional base folder. :slight_smile:

J: Thanks for such a great tool! You’re the best. [import]uid: 49013 topic_id: 8453 reply_id: 30383[/import]

Hey sorry I only just found this thread, would it be helpful at all if there was a compact version of Lime that had all the code in a single file? Not sure if it os possible yet but is it was, would it be useful? [import]uid: 5833 topic_id: 8453 reply_id: 33230[/import]

For me? Yeah, way useful. If there’s not a compelling reason for multiple files, throw them all in together. Even if I wasn’t using CPM I’d rather deal with 1 file than several (if possible).

Jay
[import]uid: 9440 topic_id: 8453 reply_id: 33303[/import]

Ditto as long as it does not lead to slowness. Current segmentation may be done for optimized execution. On a related note though, I would love to be able to put things like Lime in the libraries section in CPM and forget about it. I would love it if CPM then substituted for the copy to main.lua folder need… Lets say I have 30 samples using Lime, or any other library, each time the library gets updated I have to copy the new version over the old version in each of the sample app folders… It gets old after a while. Would be great if CPM could help us with this. Thanks [import]uid: 11904 topic_id: 8453 reply_id: 33341[/import]

@ksan, unless I’m not understanding what you mean, CPM will already help with that. I’ll use the Crawl Space Library as an example since it’s just a single file. http://www.crawlspacegames.com/crawl-space-corona-sdk-library/

I have that file on my hard drive and it’s dragged in as an asset in probably a dozen different projects. While I could go into each project, right-click on that file in the asset list, and choose Copy to Project, I just leave it as-is – a dynamic asset.

Whenever Crawl Space Games updates the lib I just put the new copy in place of the old copy on my hard drive – and then every project that uses that file grabs the latest copy when I launch the project the next time.

Reading that over again it sounds more complicated than it actually is – basically, just drag the library file you want to use into the asset list of the project where you want to use it. No need to actually copy it into multiple places on your hard drive.

Jay
[import]uid: 9440 topic_id: 8453 reply_id: 33350[/import]

You’re absolutely right. My bad. I’ve done what you describe with other assets but not lua files. I see how I can do it. Will try. Thanks [import]uid: 11904 topic_id: 8453 reply_id: 33352[/import]

The main reason for them being in separate files is that it makes it much easier to debug and manage for both myself and users. I will still keep it in separate files but also try to merge it in a single file for people that wish to have that.

The single file would probably only be updated once for each release but that should be enough. [import]uid: 5833 topic_id: 8453 reply_id: 33364[/import]

I now have all of my libraries in a folder called (amazingly) Libraries with Lime as a subfolder of that.

I just dragged this main Libraries folder into CPM and it works great!

Note: All folders are excluded from Launch/Publish so that build works correctly!

[import]uid: 8366 topic_id: 8453 reply_id: 34751[/import]

Glad to hear it works well with it all being in separate files as I think it will be trickier then I originally thought to get it working nicely in a single file. [import]uid: 5833 topic_id: 8453 reply_id: 34753[/import]

Glad to hear it works well with it all being in separate files as I think it will be trickier then I originally thought to get it working nicely in a single file. [import]uid: 5833 topic_id: 8453 reply_id: 34754[/import]