This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
developer:zoorhinoplugin [2020/11/25] sandy [Creating Rhino C++ Plug-ins that use the Zoo] |
— (current) | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Creating Rhino C++ Plugins that use the Zoo ====== | ||
- | > **Developer: | ||
- | > **Summary: | ||
- | |||
- | ===== Overview ===== | ||
- | Zoo 5.0 allows 3rd party plug-in developers to add licensing support for their products to the Zoo. | ||
- | |||
- | The Rhino 5.0 C++ SDK allows developers to write plug-ins for Rhino that use the Rhino license manager and obtain licenses from Zoo servers. | ||
- | |||
- | |||
- | ===== Requirements ===== | ||
- | Rhino C++ plug-ins are MFC dynamic link libraries. Thus, to create a plug-in for Rhino, you will need one of the following development tools: | ||
- | |||
- | - Microsoft Visual C++ 2005 (required for Rhino 5.0 32-bit) | ||
- | - Microsoft Visual C++ 2010 (required for Rhino 5.0 64-bit) | ||
- | - [[http:// | ||
- | |||
- | Note, the Express Editions of Microsoft Visual Studio will **not** work, as they do not include MFC. | ||
- | |||
- | Also, all Rhino plug-ins that use the Rhino license manager to access the Zoo must be signed with an Authenticode certificate issued by McNeel Plug-in Security. These certificates are free, but must be requested by each developer. Developers must agree to the //Terms of Use// before a certificate is issued. For more information on plug-in signing, see the following: | ||
- | |||
- | [[developer: | ||
- | |||
- | ===== Creating a Rhino C++ Plug-in ===== | ||
- | The following are the general steps required to create a Rhino plug-in. | ||
- | - Make sure you have the [[http:// | ||
- | - Make sure you have the [[http:// | ||
- | - Launch Microsoft Visual Studio 2010. | ||
- | - Create a new project, in C++, based on the **Rhino 5.0 Plug-in** project template. | ||
- | - Build your plug-in. | ||
- | - Launch Rhino and use **PlugInManager** to install your plug-in (to verify that it was built properly). | ||
- | |||
- | ===== Adding Licensing Support to your Plug-in Project ===== | ||
- | After you have built and tested your basic plug-in, you can add licensing support as follows: | ||
- | - Add a new .CPP file to your project. | ||
- | - In this .CPP file, declare a new class that is derived from **CRhinoLicenseValidator**. | ||
- | - Override the **CRhinoLicenseValidator:: | ||
- | - Override and implement the **CRhinoLicenseValidator:: | ||
- | - Create one (and only one) static instance of your object. | ||
- | - In your plug-in' | ||
- | - Build your plug-in. | ||
- | - [[developer: | ||
- | - Launch Rhino and test your plug-in. When your plug-in is loaded for the first time, you will be prompted to enter a license. | ||
- | {{: | ||
- | |||
- | ===== Managing your License ===== | ||
- | Rhino plug-ins that use the Rhino license manager appear in the Licenses page of the Options dialog. Here, the user is allowed to view and manage the license. | ||
- | |||
- | {{: | ||
- | |||
- | ===== Rhino Plug-in Sample ===== | ||
- | [[https:// | ||
- | |||
- | \\ | ||
- | |||
- | {{tag> | ||