I’ve been trying to set up a CI/CD pipeline for our team so that they can push grasshopper and python scripts to a git repo and then have the repo automatically compile all the scripts into a valid Rhino Plugin and then deploy that to our modellers.
The issue is, the script compiler is hardcoded to build to the temp drive, which our build machine doesn’t have access to, and breaks the whole endeavor.
I see two solutions to this:
one is to allow local pathing for the temp directory in the RhinoScriptCompiler and testing it in a system account environment
two is, if the team is comfortable, just open sourcing the compiler so people can make changes as necessary
When (eventually, I presume) we can host our own internal package managers, this will be an important part of the code deployment process.
I checked the RhinoScriptCompiler code and I found two references to the system temporary files directory – Path.GetTempPath() and CSharpCodeProvider (which apparently uses the system temp folder by default). In both cases, I wonder if manually setting the TMP and/or TEMP env var(s) would fix things. That seems to be the approach taken by others…
As for private package repositories, have you seen this?
Hey folks we’re going to take some time to test this properly on our end as a number of things could be causing issues - we’ll report back once we have identified what we think are any specific problems related to the exe itself.
General takeaway for now is, a version of the rhino compiler designed specifically for build machines would be a very cool thing to exist - would allow us to push .gh files to git and wrap all our hard work into shiny plugins for our team!
@chris.welch I tried setting up a GitHub Action that uses RhinoScriptCompiler.exe. With the benefit of debug builds, I found that all the errors happened when writing output – the design of the application expects an interactive terminal, but this isn’t the case when running CI builds. I fixed the errors and I’ll send a daily build when I have one, so you can try it out.