I have a plugin written in C# that has a simple installer. (Mac and Windows). I also have developed some ancilary grasshopper files that would be useful to my plugin users.
The grasshopper scripts are a mix of grasshopper python components and other grasshopper components. So far I have just distributed the *.gh files and asked my users to open them manually.
Ideally I would like these to be distributed alongside my plugin so my users can easily access them.
Do you include the .gh files in the installer, or do your users download these as a separate step (not clear from your description)?
Iâm not sure we have any âbest practicesâ for this, but this is a good opportunity to discuss it. I think @piac distributes some sample files with the Weaverbird plugin. @piac Is that approach something that would work in the short term for @Jack_Minardi?
In the long term, for GH2 and RhinoWIP, we should consider some mechanism to add example files from plugins. In Rhino for example, one could add a file path to the File Explorer:
I like the way Processing and Arduino IDE have sample files. A library has a folder in the package called âExamplesâ there devs can add scripts. The addition of this path to the examples menu is done automatically:
@stevebaer@dale@will@DavidRutten Does it make sense to consider some sort of extension to the .rhi system that includes the ability to discover if the RHI has an âExamplesâ directory, and if so, register it somewhere in the Rhino UI if there is an rhp that exposes some functionality? Same for GH if there is a gha? We would have to consider how devs distributing without an RHI can participate in adding examples for their plugin.
I donât think so. Seems like something very custom that weâll break. I can see some SDK access so the rhp or gha can register examples, but not the installer engine itself.
Hey @fraguada thanks for the detailed response. Currently my users download the GH files as as separate step and store them on their computer.
I really like your suggestion of copying Arduinoâs âExamplesâ collection. When Iâve worked with Arduino previously this has been a very seamless experience, and a great way to quickly get up and running with a new library.
@stevebaer I think as long as there is some way to register examples that would be nice, I donât really need it through the installer engine.
Hey @Jack_Minardi, this should help explain the processâŚ
One thing to note⌠A set of python commands counts as an individual plug-in. We donât support multiple plug-ins per RHI installer, so this will have to be a separate RHI to your main plug-in. If youâre rolling your own installer, than you can do whatever you want
Ok thanks for the info. Would is be possible to hook into the main plugin install and run a script that just puts the python files where they need to be?