From: Eduardo DAVILA Date: Fri, 15 May 2020 06:16:36 +0000 (+0200) Subject: #3425 BBTK Feature New Normal - PlugPackage Install Linux X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=abd698c56a530ace59570b9eea3117cf045ded26;p=bbtk.git #3425 BBTK Feature New Normal - PlugPackage Install Linux --- diff --git a/kernel/cmake/BBTKConfigurePackage.cmake b/kernel/cmake/BBTKConfigurePackage.cmake index d51f949..cf1949e 100644 --- a/kernel/cmake/BBTKConfigurePackage.cmake +++ b/kernel/cmake/BBTKConfigurePackage.cmake @@ -80,9 +80,18 @@ IF(NOT BBTK_CORE_PACKAGE) ${${BBTK_PACKAGE_NAME}_BINARY_DIR}/PlugPackage.bat COPYONLY ) - INSTALL ( FILES ${${BBTK_PACKAGE_NAME}_BINARY_DIR}/bbtkPackage DESTINATION "." ) + INSTALL ( FILES ${${BBTK_PACKAGE_NAME}_BINARY_DIR}/bbtkPackage DESTINATION "." ) INSTALL ( FILES ${${BBTK_PACKAGE_NAME}_BINARY_DIR}/PlugPackage.bat DESTINATION "." ) + ELSE(WIN32) + CONFIGURE_FILE( + ${BBTK_CMAKE_DIR}/PlugPackage.sh.in + ${${BBTK_PACKAGE_NAME}_BINARY_DIR}/PlugPackage.sh + COPYONLY + ) + INSTALL ( FILES ${${BBTK_PACKAGE_NAME}_BINARY_DIR}/bbtkPackage DESTINATION "share/bbtk" ) + INSTALL ( FILES ${${BBTK_PACKAGE_NAME}_BINARY_DIR}/PlugPackage.sh DESTINATION "share/bbtk" ) ENDIF (WIN32) + #--------------------------------------------------------------------------- ELSE(NOT BBTK_CORE_PACKAGE) SET(${BBTK_PACKAGE_NAME}_BINARY_DIR ${PROJECT_BINARY_DIR}) diff --git a/kernel/cmake/PlugPackage.sh.in b/kernel/cmake/PlugPackage.sh.in new file mode 100644 index 0000000..395d365 --- /dev/null +++ b/kernel/cmake/PlugPackage.sh.in @@ -0,0 +1,4 @@ +ACTUALDIR=$(pwd) +bbPlugPackage $ACTUALDIR + + diff --git a/kernel/src/bbtkConfigurationFile.cxx b/kernel/src/bbtkConfigurationFile.cxx index e5b8529..0cc1448 100644 --- a/kernel/src/bbtkConfigurationFile.cxx +++ b/kernel/src/bbtkConfigurationFile.cxx @@ -563,42 +563,70 @@ namespace bbtk } delete res; + std::string bbs_path; #ifdef _WIN32 - std::string bbs_path = path + "/bbs"; + bbs_path = path + "/bbs"; + XMLNode BBSPATH = BB.addChild((XMLCSTR)"bbs_path"); + BBSPATH.addText((XMLCSTR)bbs_path.c_str()); + Utilities::replace(bbs_path, INVALID_FILE_SEPARATOR, VALID_FILE_SEPARATOR); + mBbs_paths.push_back(bbs_path); #else - std::string bbs_path = path + "/share/bbtk/bbs" ; -#endif + bbs_path = path + "/share/bbtk/bbs" ; XMLNode BBSPATH = BB.addChild((XMLCSTR)"bbs_path"); BBSPATH.addText((XMLCSTR)bbs_path.c_str()); Utilities::replace(bbs_path, INVALID_FILE_SEPARATOR, VALID_FILE_SEPARATOR); mBbs_paths.push_back(bbs_path); -#ifdef _WIN32 - std::string pack_path = path + "/bin"; -#else - std::string pack_path = path ; + bbs_path = path + "/../../share/bbtk/bbs" ; + BBSPATH = BB.addChild((XMLCSTR)"bbs_path"); + BBSPATH.addText((XMLCSTR)bbs_path.c_str()); + Utilities::replace(bbs_path, INVALID_FILE_SEPARATOR, VALID_FILE_SEPARATOR); + mBbs_paths.push_back(bbs_path); + #endif + + std::string pack_path; +#ifdef _WIN32 + pack_path = path + "/bin"; XMLNode PACKPATH = BB.addChild((XMLCSTR)"package_path"); PACKPATH.addText((XMLCSTR)pack_path.c_str()); Utilities::replace(pack_path,INVALID_FILE_SEPARATOR,VALID_FILE_SEPARATOR); mPackage_paths.push_back(pack_path); -#ifdef _WIN32 pack_path = path + "/RelWithDebInfo"; PACKPATH = BB.addChild((XMLCSTR)"package_path"); PACKPATH.addText((XMLCSTR)pack_path.c_str()); Utilities::replace(pack_path,INVALID_FILE_SEPARATOR,VALID_FILE_SEPARATOR); mPackage_paths.push_back(pack_path); + pack_path = path + "/Debug"; PACKPATH = BB.addChild((XMLCSTR)"package_path"); PACKPATH.addText((XMLCSTR)pack_path.c_str()); Utilities::replace(pack_path,INVALID_FILE_SEPARATOR,VALID_FILE_SEPARATOR); mPackage_paths.push_back(pack_path); + pack_path = path + "/Release"; PACKPATH = BB.addChild((XMLCSTR)"package_path"); PACKPATH.addText((XMLCSTR)pack_path.c_str()); Utilities::replace(pack_path,INVALID_FILE_SEPARATOR,VALID_FILE_SEPARATOR); mPackage_paths.push_back(pack_path); +#else + pack_path = path ; + XMLNode PACKPATH = BB.addChild((XMLCSTR)"package_path"); + PACKPATH.addText((XMLCSTR)pack_path.c_str()); + Utilities::replace(pack_path,INVALID_FILE_SEPARATOR,VALID_FILE_SEPARATOR); + mPackage_paths.push_back(pack_path); + + pack_path = path+"/../../lib64/creatools" ; + PACKPATH = BB.addChild((XMLCSTR)"package_path"); + PACKPATH.addText((XMLCSTR)pack_path.c_str()); + Utilities::replace(pack_path,INVALID_FILE_SEPARATOR,VALID_FILE_SEPARATOR); + mPackage_paths.push_back(pack_path); + +#endif + + +#ifdef _WIN32 #endif