From: Christophe Bourcier Date: Wed, 19 Apr 2023 12:40:13 +0000 (+0200) Subject: Improve new MG license mechanism to be binary compatible 2.14/2.15 X-Git-Tag: V9_11_0b1 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=43fa4d03a179248613352fd17804bdf8c9a85ebb;p=plugins%2Fghs3dprlplugin.git Improve new MG license mechanism to be binary compatible 2.14/2.15 --- diff --git a/src/GHS3DPRLPlugin/CMakeLists.txt b/src/GHS3DPRLPlugin/CMakeLists.txt index 31c42ba..b9bf88a 100644 --- a/src/GHS3DPRLPlugin/CMakeLists.txt +++ b/src/GHS3DPRLPlugin/CMakeLists.txt @@ -47,7 +47,7 @@ SET(_link_LIBRARIES TKGeomBase TKGeomAlgo TKCDF - ${MESHGEMS_TETRA_HPC_LIBRARY} + ${MESHGEMS_CVM_LIBRARY} ${SMESH_SMESHimpl} ${SMESH_SMESHEngine} ${SMESH_SMESHDS} diff --git a/src/GHS3DPRLPlugin/MG_TetraHPC_API.cxx b/src/GHS3DPRLPlugin/MG_TetraHPC_API.cxx index cb348a5..beb5b95 100644 --- a/src/GHS3DPRLPlugin/MG_TetraHPC_API.cxx +++ b/src/GHS3DPRLPlugin/MG_TetraHPC_API.cxx @@ -589,24 +589,13 @@ bool MG_TetraHPC_API::LibData::Compute( const std::string& outFile ) // MG license std::string errorTxt; status_t ret; -#if MESHGEMS_VERSION_HEX > MESHGEMS_215 - // need to unlock Tetra license only once - std::string SPATIAL_LICENSE = SMESHUtils_MGLicenseKeyGen::GetKey(errorTxt); - ret = meshgems_tetra_hpc_unlock_product(SPATIAL_LICENSE.c_str()); - if STATUS_IS_ERROR( ret ) - { - AddError( SMESH_Comment( "Problem with SPATIAL_LICENSE to unlock Tetra_HPC: ") << errorTxt ); - return false; - } - else - MESSAGE("SPATIAL_LICENSE unlock Tetra_HPC: " << ret); -#else - if ( !SMESHUtils_MGLicenseKeyGen::SignMesh( _tria_mesh, errorTxt )) + + // use cvm for tetra_hpc + if ( !SMESHUtils_MGLicenseKeyGen::SignMesh( _tria_mesh, "cvm", errorTxt )) { AddError( SMESH_Comment( "Problem with library SalomeMeshGemsKeyGenerator: ") << errorTxt ); return false; } -#endif // Set surface mesh ret = tetra_hpc_set_input_mesh( _session, _tria_mesh );