I’m currently working on a Processing extension to the Openframe platform
open source platform for artists, curators and art enthusiasts to share, discover and display digital art.
… basically, a smart digital picture frame running on a Raspberry Pi. I would now like to add support for contributed libraries and would like to get some advice on how to best approach it.
In Openframe, all artwork is selected on a Webapp and provided to the device via a public URL. When the user selects artwork, it gets downloaded to the Raspberry Pi. The Processing extension currently accepts a ZIP file, extracts it on the Pi and uses processing-java
to compile and run the sketch. This works well as long as there are no contributed libraries used by the sketch. If a library is missing compiling the sketch would obviously fail.
I can imagine two different solutions:
- Find and install required libraries automatically
Ideally, the user wouldn’t have to do anything. I thought this could work similarly to the contribution manager in Processing by using the list of available libraries. Since the manager doesn’t actually do installations automatically, I’m not sure if this is realistic. Is this even a good idea? Libraries and code are changing over time. So maybe it is a good idea to keep everything together. Generally, is there any way to figure out what libraries are used by the sketch? - Add the libraries to sketch package
I remember, a long time ago, Processing also supported a folder with libraries within the sketch folder. Is this still possible? I can’t find any info on it anymore. To keep a working code base together, it still seems to be a good idea to me. Why has this feature been dropped? If the feature doesn’t exist anymore, the extension could use these libraries and move them to the Processing sketch folder on the Pi. Would adding alibraries
folder to the sketch cause any conflicts in Processing?
Another method would be to provide a precompiled sketch to the frame. I want to add support for this too, but don’t want to make it mandatory for sketches with contributed libraries.
What do you guys think?
Thanks.