Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create new projects not tied to the Rhino build #13

Open
jrz371 opened this issue Jan 23, 2023 · 3 comments
Open

Create new projects not tied to the Rhino build #13

jrz371 opened this issue Jan 23, 2023 · 3 comments

Comments

@jrz371
Copy link
Collaborator

jrz371 commented Jan 23, 2023

Currently the Import_glTF and Export_glTF projects are tied into the Rhino build. New import/export projects should be made referencing the glTF-Loader/Newtonsoft.Json/RhinoCommon nuget packages so other developers can build the plugins on their own machines and load them into Rhino.

@visose
Copy link

visose commented Jan 27, 2023

My suggestion to fix the root cause of the problem:

  • The original Netwonsoft Json.NET is included in Rhino 8.
  • The RhinoCommon Nuget package includes Json.NET as a transitive package, with the same version used in Rhino 8, so projects that reference RhinoCommon know not to include it in their output folder and will use the correct version.
  • The *.Rhino.dll version is left just for legacy reasons in case there are older plugins that require it.
  • Maybe: Add a check when loading plugins where if they contain any .NET library that ships with Rhino it blocks loading it? (these libraries should appear as dependencies in the Rhinocommon Nuget package).

@jrz371
Copy link
Collaborator Author

jrz371 commented Jan 30, 2023

I have a branch broken off here that adds support for building by a third party

https://github.com/mcneel/glTF-IO/tree/joshua/ThirdPartyBuild

The sources are linked and the project file use Nuget packages. My only reason for not merging it is the RhinoCommon nuget packages don't yet have some SDK additions and they won't compile.

@visose
Copy link

visose commented Jan 30, 2023

I see you are creating the projects in the same way as in my fork, by individually linking the relevant .cs files from other project folders. I only did it this way to minimize the amount of changes needed to get it working, but I wouldn't do it like this in your case.

I would restructure the solution so you have one project as a "library" project with no reference to Rhino Plugin and Command, and the plugin projects then consume this project, but also can be used by third parties.

This will be easier to mantain, as adding/moving/renaming files will break new the projects with linked files, and as a side effect will also help to structure the project better.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants