From: Christophe Bourcier Date: Wed, 19 Apr 2023 12:35:53 +0000 (+0200) Subject: Improve new MG license mechanism to be binary compatible 2.14/2.15 X-Git-Tag: V9_11_0a1~3 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=e45bf25e416ed842419d0cdb8178e69a6f68324f;p=plugins%2Fhexoticplugin.git Improve new MG license mechanism to be binary compatible 2.14/2.15 --- diff --git a/src/HexoticPlugin/MG_Hexotic_API.cxx b/src/HexoticPlugin/MG_Hexotic_API.cxx index a9b713c..0f99de3 100644 --- a/src/HexoticPlugin/MG_Hexotic_API.cxx +++ b/src/HexoticPlugin/MG_Hexotic_API.cxx @@ -41,9 +41,6 @@ extern "C"{ #include } -#define MESHGEMS_VERSION_HEX (MESHGEMS_VERSION_MAJOR << 16 | MESHGEMS_VERSION_MINOR << 8 | MESHGEMS_VERSION_PATCH) -#define MESHGEMS_215 (2 << 16 | 15 << 8 | 0) - struct MG_Hexotic_API::LibData { // MG objects @@ -677,24 +674,11 @@ bool MG_Hexotic_API::LibData::Compute() std::string errorTxt; status_t ret; -#if MESHGEMS_VERSION_HEX > MESHGEMS_215 - // unlock Hexa license only once - std::string SPATIAL_LICENSE = SMESHUtils_MGLicenseKeyGen::GetKey(errorTxt); - ret = meshgems_hexa_unlock_product(SPATIAL_LICENSE.c_str()); - if STATUS_IS_ERROR( ret ) - { - AddError( SMESH_Comment( "Problem with SPATIAL_LICENSE to unlock Hexa: ") << errorTxt ); - return false; - } - else - MESSAGE("SPATIAL_LICENSE unlock Hexa: " << ret); -#else - if ( !SMESHUtils_MGLicenseKeyGen::SignMesh( _tria_mesh, errorTxt )) + if ( !SMESHUtils_MGLicenseKeyGen::SignMesh( _tria_mesh, "hexa", errorTxt )) { AddError( SMESH_Comment( "Problem with library SalomeMeshGemsKeyGenerator: ") << errorTxt ); return false; } -#endif // Set surface mesh ret = hexa_set_surface_mesh( _session, _tria_mesh );