How can we make xod-libraries easy to install?
It seemed natural to me to develop a library with this kind of structure:
awg # my name
count # lib name
sawtooth # "patch"
misc files like makefile
tools/ # etc. for development
But, that isn’t convenient for installing into the xod-workspace. Because, you want the stuff undef lib/ to be installed in $xodworkspace/lib. Github only provides “zip everything” (or clone, of course).
The Arduino IDE has a similar problem.
What if xod allowed zipfiles in the xodworkspace? And, it treated them like a parallel file system. So, if you zip has lib/, then it adds them to libs. We’d have to decide if the other files are ignored.
How about examples? The zipfile thing would allow including those…
We actually look a bit further on the problem you’ve described. We have a (yet) very basic package manager. If you have a development experience with Python (pip), Ruby (gem), or NodeJS (npm) you know the idea.
Currently, the only way to “properly” publish and install a library is using the
xodc CLI. When you want to publish a library to the world, do:
$ xodc publish --owner=awg /path/to/workspace/count
When you want to install a library in the current workspace, do:
$ xodc install awg/count
You may be surprised, but the
xod/common-hardware are just regular libraries of a user with name
xod. Their privelege is a pure marketing. The libraries index lists all libraries published in the repository. No surprise, the libraries by
xod are the only ones: we did not provide any docs on creating and publishing libraries. You’re conqueror , sorry for the poor assistance.
To make things more straightforward we should:
- Write down few guides on creating custom libraries
- Describe how to browse and install a library
- Embed search in the cloud right into the Quick Search window
- Make it possible to publish/install with GUI inside XOD IDE
This would be the main topic for one of the upcoming development sprints.