X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=kernel%2Fsrc%2FbbtkConfigurationFile.cxx;h=eaeca60440d756f923a2791230111a67359e8740;hb=2d564c78c449d67b1d85511ba9601d3afb57c924;hp=5731b70dcb5bacf40fe84ab85916515284d5f589;hpb=1f618dcff23eeff52dbe5a6edfcd52f5a90222b8;p=bbtk.git diff --git a/kernel/src/bbtkConfigurationFile.cxx b/kernel/src/bbtkConfigurationFile.cxx index 5731b70..eaeca60 100644 --- a/kernel/src/bbtkConfigurationFile.cxx +++ b/kernel/src/bbtkConfigurationFile.cxx @@ -2,8 +2,8 @@ Program: bbtk Module: $RCSfile: bbtkConfigurationFile.cxx,v $ Language: C++ - Date: $Date: 2010/11/02 10:15:43 $ - Version: $Revision: 1.34 $ + Date: $Date: 2011/03/08 16:56:13 $ + Version: $Revision: 1.37 $ =========================================================================*/ /* --------------------------------------------------------------------- @@ -38,30 +38,25 @@ #include "bbtkXML.h" #include "bbtkUtilities.h" +#include "creaSystem.h" + #if defined(WIN32) # include // for getcwd # include #endif - - namespace bbtk { - //==================================================================== /// Constructor ConfigurationFile::ConfigurationFile() { - - mFile_separator = VALID_FILE_SEPARATOR; + mFile_separator = VALID_FILE_SEPARATOR; // ==> Set system paths mBin_path = Utilities::GetExecutablePath(); - - - /* EED 23 Mars 2009 #ifdef MACOSX mInstall_path = mBin_path + "/../../../.."; @@ -70,7 +65,6 @@ namespace bbtk #endif */ #ifdef MACOSX - std::string macPath("Contents/MacOS"); int sbp = mBin_path.length(); int smp = macPath.length(); @@ -78,12 +72,10 @@ namespace bbtk { mBin_path = mBin_path + "/../../.."; } - - #endif - mInstall_path = mBin_path + "/.."; - +///\TODO : better use ?? + mInstall_path = mBin_path + "/.."; // The relative path to the doc folder (=BBTK_DOC_REL_PATH) // mDoc_rel_path = BBTK_STRINGIFY_SYMBOL(BBTK_DOC_REL_PATH); @@ -122,9 +114,6 @@ namespace bbtk bbtkMessage("config",1," ==> bbs : '"< data : '"< First we look for bbtk_config.xml in "." @@ -248,7 +241,6 @@ namespace bbtk + BBTK_STRINGIFY_SYMBOL(BBTK_DOC_REL_PATH) + "/"; Utilities::MakeValidFileName(doc_path); - std::ofstream f; f.open(filename.c_str(), std::ios::out ); f << "