X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=kernel%2Fsrc%2FbbtkConfigurationFile.cxx;h=e91dcfdfc4ef94f15becf5452c0b593db689cdc8;hb=d3e9248abd5502eeca0c84974cccf885d4744d8c;hp=e5b852945184c23a50ca9cd2aaa0b1e76b6af827;hpb=42286a16f16c8af07589bbbe30c157770b73bbb2;p=bbtk.git diff --git a/kernel/src/bbtkConfigurationFile.cxx b/kernel/src/bbtkConfigurationFile.cxx index e5b8529..e91dcfd 100644 --- a/kernel/src/bbtkConfigurationFile.cxx +++ b/kernel/src/bbtkConfigurationFile.cxx @@ -436,18 +436,16 @@ namespace bbtk char copyFile[250]; if (!Utilities::FileExists(configXmlTmp)) // bbtk_config.xml.tmp not found (not installed) - { - // if "bbtk_path/bbtk_config.xml.tmp" doesn't exist, hard-create a minimum version in .bbtk - CreateConfigXML( rootDirectory );// create .bbtk - } - else - { - sprintf(copyFile,"cp %s %s/bbtk_config.xml ",configXmlTmp,rootDirectory ); - if (!Utilities::FileExists(configPath)) - { - system(copyFile); - } - } + { + // if "bbtk_path/bbtk_config.xml.tmp" doesn't exist, hard-create a minimum version in .bbtk + CreateConfigXML( rootDirectory );// create .bbtk + } else { + sprintf(copyFile,"cp %s %s/bbtk_config.xml ",configXmlTmp,rootDirectory ); + if (!Utilities::FileExists(configPath)) + { + system(copyFile); + } // FileExists configPath + } // FileExists configXmlTmp return; // ------------------------------------------------------------------ @@ -563,42 +561,76 @@ 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; 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"; + pack_path = path + "/bin"; 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"); + +// 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 + "/Release"; + + 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