]> Creatis software - bbtk.git/commitdiff
#3425 BBTK Feature New Normal - PlugPackage Install Linux
authorEduardo DAVILA <davila@localhost.localdomain>
Fri, 15 May 2020 06:16:36 +0000 (08:16 +0200)
committerEduardo DAVILA <davila@localhost.localdomain>
Fri, 15 May 2020 06:16:36 +0000 (08:16 +0200)
kernel/cmake/BBTKConfigurePackage.cmake
kernel/cmake/PlugPackage.sh.in [new file with mode: 0644]
kernel/src/bbtkConfigurationFile.cxx

index d51f94925ed3cc831e2e5b43a89cc3bd533db5aa..cf1949eaa4996267ce0fc71231c65f818d499994 100644 (file)
@@ -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 (file)
index 0000000..395d365
--- /dev/null
@@ -0,0 +1,4 @@
+ACTUALDIR=$(pwd)
+bbPlugPackage  $ACTUALDIR
+
+
index e5b852945184c23a50ca9cd2aaa0b1e76b6af827..0cc14482644df612ee20a270eb203a308bf5cbee 100644 (file)
@@ -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