I’ve read through the main thread on the script compiler and done some basic tests myself (which have failed), but I was hoping that someone with working knowledge of the code behind the compiler could clarify a couple points for me.
I’m talking about python code exclusively here
@stevebaer, I remember you mentioning that the import statement does not play well with the compiler. I have several projects I’d like to protect, all of which are built on a combination of python std-lib modules (like math, time), rhino modules (sc, rs, RhinoCommon), random .NET libs (e.g. an OpenCV wrapper/image processing lib) and my own modules. It’s easy enough i suppose to break the compartmentalization of my own code and copy-paste everything into one file, but does this mean i need to copy the code from the other modules verbatim as well? Does one need to do anything special to have the references to rhinoscriptsyntax or RhinoCommon function properly in a compiled plugin? And how would i go about calling functions from a .NET assembly? does throwing the .dll file into the compiler take care of this?
I would really like to know if there’s a good(easy?) solution for protecting my code if i wanted to, say, prevent people from fiddling with it or sell it; more specifically, it would be AWESOME not to have to refactor thousands of lines of python into more thousands of lines of c# for a true plugin.