]> Creatis software - bbtk.git/blob - kernel/src/bbtkConfigurationFile.cxx
764024a04d4e0552ff3994da7cceba4a74219e58
[bbtk.git] / kernel / src / bbtkConfigurationFile.cxx
1 /*=========================================================================                                                                               
2   Program:   bbtk
3   Module:    $RCSfile: bbtkConfigurationFile.cxx,v $
4   Language:  C++
5   Date:      $Date: 2009/01/28 11:54:04 $
6   Version:   $Revision: 1.27 $
7 =========================================================================*/
8
9 /* ---------------------------------------------------------------------
10
11 * Copyright (c) CREATIS-LRMN (Centre de Recherche en Imagerie Medicale)
12 * Authors : Eduardo Davila, Laurent Guigues, Jean-Pierre Roux
13 *
14 *  This software is governed by the CeCILL-B license under French law and 
15 *  abiding by the rules of distribution of free software. You can  use, 
16 *  modify and/ or redistribute the software under the terms of the CeCILL-B 
17 *  license as circulated by CEA, CNRS and INRIA at the following URL 
18 *  http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html 
19 *  or in the file LICENSE.txt.
20 *
21 *  As a counterpart to the access to the source code and  rights to copy,
22 *  modify and redistribute granted by the license, users are provided only
23 *  with a limited warranty  and the software's author,  the holder of the
24 *  economic rights,  and the successive licensors  have only  limited
25 *  liability. 
26 *
27 *  The fact that you are presently reading this means that you have had
28 *  knowledge of the CeCILL-B license and that you accept its terms.
29 * ------------------------------------------------------------------------ */                                                                         
30
31 /**
32  *\file
33  *\brief Class bbtk::ConfigurationFile
34  */
35
36 #include "bbtkConfigurationFile.h"
37 #include "bbtkMessageManager.h"
38 #include "bbtkXML.h"
39 #include "bbtkUtilities.h"
40
41 #if defined(WIN32)
42 # include <direct.h> // for getcwd
43 # include <windows.h>
44 #endif
45
46
47
48
49 namespace bbtk
50 {
51
52   //====================================================================
53   /// Constructor
54   ConfigurationFile::ConfigurationFile()
55   {
56
57     mFile_separator = VALID_FILE_SEPARATOR;
58     
59     // ==> Set system paths 
60     mBin_path = Utilities::GetExecutablePath();
61     
62 #ifdef MACOSX
63     mInstall_path = mBin_path + "/../../../..";
64 #else
65     mInstall_path = mBin_path + "/..";
66 #endif
67     
68     
69     // The relative path to the doc folder (=BBTK_DOC_REL_PATH)
70     //    mDoc_rel_path = BBTK_STRINGIFY_SYMBOL(BBTK_DOC_REL_PATH);
71     // The path to the doc folder (=mInstall_path+"/"+mDoc_rel_path)
72     //    mDoc_path = mInstall_path + "/" + mDoc_rel_path;
73     // Have to create bbtk user's dirs if needed 
74
75     // LG 27/01/09 : doc is now user dependent 
76     //               and located in user's .bbtk dir /doc
77     // All dirs under .bbtk user's dir are set and created by:
78     InitializeDotBbtkStructure();
79
80     // The relative path to the doc folder (=BBTK_BBS_REL_PATH)
81     mBbs_rel_path = BBTK_STRINGIFY_SYMBOL(BBTK_BBS_REL_PATH);
82     // The path to the bbs folder (=mInstall_path+"/"+mBbs_rel_path)
83     mBbs_path = mInstall_path + "/" + mBbs_rel_path;
84     
85     mData_path = mInstall_path + "/" + BBTK_STRINGIFY_SYMBOL(BBTK_DATA_REL_PATH);
86     
87     Utilities::replace( mBin_path, 
88                         INVALID_FILE_SEPARATOR,
89                         VALID_FILE_SEPARATOR);
90     Utilities::replace( mInstall_path,
91                         INVALID_FILE_SEPARATOR,
92                         VALID_FILE_SEPARATOR);
93     Utilities::replace( mBbs_path,
94                         INVALID_FILE_SEPARATOR,
95                         VALID_FILE_SEPARATOR);
96     Utilities::replace( mData_path,
97                         INVALID_FILE_SEPARATOR,
98                         VALID_FILE_SEPARATOR);
99     
100     bbtkMessage("Config",1," ==> bin    : '"<<mBin_path<<"'"<<std::endl);
101     bbtkMessage("Config",1," ==> prefix : '"<<mInstall_path<<"'"<<std::endl);
102     bbtkMessage("Config",1," ==> doc    : '"<<mDoc_path<<"'"<<std::endl);
103     bbtkMessage("Config",1," ==> bbs    : '"<<mBbs_path<<"'"<<std::endl);
104     bbtkMessage("Config",1," ==> data   : '"<<mData_path<<"'"<<std::endl);
105
106
107
108     
109     // bbs_paths
110     // always add "." (current working directory) at the begining
111     mBbs_paths.push_back( "." ); 
112     // add system bbs path 
113     mBbs_paths.push_back(mBbs_path);
114     // add toolsbbtk/appli 
115 //EED    std::string toolsappli_rel_path(mFile_separator);
116     std::string toolsappli_rel_path("/");
117 //EED    toolsappli_rel_path +=  "toolsbbtk" + mFile_separator + "appli";
118     toolsappli_rel_path +=  "toolsbbtk/appli";
119     //
120     //-----------------------------------------------------------
121     // LG : REMOVE BUGGY PATH WITH include *:
122     // 
123     //    mBbs_paths.push_back(mBbs_path + toolsappli_rel_path);
124     //-----------------------------------------------------------
125     int iStrVec,sizeStrVec;
126     
127     sizeStrVec = mBbs_paths.size();
128     for (iStrVec=0;iStrVec<sizeStrVec;iStrVec++){
129       Utilities::replace( mBbs_paths[iStrVec] , INVALID_FILE_SEPARATOR , VALID_FILE_SEPARATOR);
130     }
131     
132     
133     // always add "." (current working directory) at the begining
134     mPackage_paths.push_back(".");   
135     // add system bin path (for build tree / standalone folder install)
136     mPackage_paths.push_back(mBin_path);
137     // add system lib path (for install tree)
138     //EED    mPackage_paths.push_back(mInstall_path + mFile_separator + "lib");
139     mPackage_paths.push_back(mInstall_path + "/lib");
140 #ifdef WIN32
141     // add bin/Debug bin/Release paths (for build/install tree)
142     //EED    mPackage_paths.push_back(mBin_path + mFile_separator + "Debug");
143     mPackage_paths.push_back(mBin_path + "/Debug");
144     //EED    mPackage_paths.push_back(mBin_path + mFile_separator + "Release");
145     mPackage_paths.push_back(mBin_path + "/Release");
146 #endif
147     
148     sizeStrVec = mPackage_paths.size();
149     for (iStrVec=0;iStrVec<sizeStrVec;iStrVec++){
150       Utilities::replace( mPackage_paths[iStrVec] , INVALID_FILE_SEPARATOR , VALID_FILE_SEPARATOR);
151     }
152     
153     
154     
155     GetHelp(2);
156     
157     // ==> First we look for bbtk_config.xml in "."
158     char buf[2048];
159     const char *currentDir = getcwd(buf, 2048);
160     
161     if( !currentDir )
162       {
163         std::cerr << "Path was too long to fit on 2048 bytes ?!?" << std::endl;
164         // \todo : what else?
165         // How abort a constructor and warn the caller function?
166         // LG : throw an exception 
167       }
168     
169     //    std::string configXmlFullPathName = currentDir + mFile_separator + "bbtk_config.xml";
170     std::string configXmlFullPathName = currentDir ;
171     configXmlFullPathName += "/bbtk_config.xml";
172     Utilities::replace( configXmlFullPathName , INVALID_FILE_SEPARATOR , VALID_FILE_SEPARATOR);
173     
174     if ( Utilities::FileExists( configXmlFullPathName ))
175       {
176         bbtkMessage("Config",1, "ConfigurationFile : [" << configXmlFullPathName << 
177                     "] found in current directory" << std::endl); 
178         //Read(configXmlFullPathName.c_str());
179         // traiter le fichier local     
180       }
181     
182     // ==> Then we look for bbtk_config.xml in ".bbtk"
183     else 
184       {
185         configXmlFullPathName = Utilities::MakeUserSettingsFullFileName("bbtk_config.xml");
186         if (!Utilities::FileExists( configXmlFullPathName ))
187           {         
188             // ==> Nothing found, we create bbtk_config.xml in ".bbtk"
189             InstallPath ();
190           }
191       }
192     
193     // In any case, deal with bbtk_config.xml!
194     Read(configXmlFullPathName.c_str());
195   }
196   //=========================================================================
197
198   //=========================================================================
199   /// Destructor
200   ConfigurationFile::~ConfigurationFile()
201   {
202   }
203   //=========================================================================
204   
205   //=========================================================================
206   void ConfigurationFile::InitializeDotBbtkStructure()
207   {
208     mDot_bbtk_path = Utilities::GetUserSettingsDir();
209     mDot_bbtk_is_new = false;
210     if (!Utilities::FileExists(mDot_bbtk_path)) mDot_bbtk_is_new = true;      
211     Utilities::CreateDirectoryIfNeeded(mDot_bbtk_path);
212     
213     mDoc_path = Utilities::MakeUserSettingsFullFileName("doc");
214     Utilities::CreateDirectoryIfNeeded(mDoc_path);
215
216     std::string bbdoc_path = 
217       Utilities::MakeUserSettingsFullFileName("doc/bbdoc");
218     Utilities::CreateDirectoryIfNeeded(bbdoc_path);
219     
220     // Create help_contents.html if does not exist
221     std::string filename = Utilities::MakeUserSettingsFullFileName("doc/help_contents.html");
222     if (!Utilities::FileExists(filename))
223       {
224         bbtkDebugMessage("Config",1, 
225                          "* Creating [" << filename << "]" << std::endl);
226         // The path to the doc folder (=mInstall_path+"/"+mDoc_rel_path)
227         std::string doc_path = mInstall_path + "/" 
228           + BBTK_STRINGIFY_SYMBOL(BBTK_DOC_REL_PATH) + "/";
229         Utilities::MakeValidFileName(doc_path); 
230         std::ofstream f;
231         f.open(filename.c_str(), std::ios::out );
232         f << "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD "
233           << "HTML 4.01 Transitional//EN\">"
234           << "<html><head><title>Help Contents - bbtk "
235           << GetVersion() << "</title>"
236           << "<meta http-equiv=\"Content-Type\" content=\"text/html; "
237           << "charset=iso-8859-1\"></head><H1>Help Contents</H1>"
238           << "<a href=\"bbdoc/index-category.html#demo\" "
239           << "target=\"information\">Demos</a><br>"
240           << "<a href=\"bbdoc/index-category.html#example\" "
241           << "target=\"information\">Examples</a>"
242           << "<H2>Guides</H2>"
243           << "<a href=\""
244           << doc_path 
245           << "bbtkUsersGuide/bbtkUsersGuide.html"
246           << "\" target=\"information\">User's Guide</a><br>"
247           << "<a href=\""
248           << doc_path
249           << "bbtkPackageDevelopersGuide/bbtkPackageDevelopersGuide.html"
250           << "\" target=\"information\">Package Developer's Guide</a><br>"
251           << "<a href=\""
252           << doc_path
253           << "doxygen/bbtk/main.html"
254           << "\" target=\"information\">bbtk library doxygen doc</a><br>"
255           << "<H2>Boxes</H2>"
256           << "<a target=\"information\" href=\"bbdoc/index-alpha.html\">"
257           << "Alphabetical list</a><br>"
258           << "<a target=\"information\" href=\"bbdoc/index-package.html\">"
259           << "List by package</a><br>"
260           << "<a target=\"information\" href=\"bbdoc/index-category.html\">"
261           << "List by category</a><br>"
262           << "<a target=\"information\" href=\"bbdoc/index-adaptors.html\">"
263           << "List of adaptors</a><br>"
264           << "</body>"
265           << "</html>";
266       }
267
268
269     mTemp_path = Utilities::MakeUserSettingsFullFileName("tmp");
270     Utilities::CreateDirectoryIfNeeded(mTemp_path);
271
272   }
273   //=========================================================================
274
275   //=========================================================================
276   void ConfigurationFile::CreateConfigXML( char *rootDirectory )
277   {
278     FILE *fp;
279     char configXml[250];
280     sprintf (configXml , "%s/bbtk_config.xml", rootDirectory);
281     bbtkDebugMessage("Config",1, "in CreateConfigXML[" << configXml << "]" << std::endl);
282     fp = fopen (configXml, "w");
283     fprintf(fp, "<?xml version=\"1.0\" encoding=\"iso-8859-1\"?>\n");
284     fprintf(fp, "<config>\n");
285     fprintf(fp, "   <bbs_path>     </bbs_path>\n");
286     fprintf(fp, "   <package_path> </package_path>\n");
287     fprintf(fp, "</config>\n");
288     fclose(fp);
289   }
290   //=========================================================================  
291
292         
293         
294
295   //=========================================================================
296   void ConfigurationFile::InstallPath ()
297   {
298     
299     /*--------------------------------------------------
300       New policy for bbtk_config.xml :
301       
302       if bbtk_config.xml found in current directory (user is an aware user!)
303       use it!
304       
305       else if bbtk_config.xml found in HOME/.bbtk (user already worked with it)
306       use it!
307       
308       else if bbtk_config.xml.tmp found in /usr/local/bin or c:\\Program Files\\BBTK\\bin
309       copy it as .bbtk/bbtk_config.xml
310       
311       else (nothing installed)
312       create a minimum version in HOME/.bbtk
313       ----------------------------------------------------*/
314     
315     
316     // -----------------------------------------------------------------
317 #if defined(__GNUC__)
318     
319     // ------------------ create some usefull strings ----------------
320     // installed bbtk_path
321     char bbtk_path[100];
322     strcpy(bbtk_path, "/usr/local/bin");
323     
324     // rootDirectory
325     char rootDirectory[200];
326     sprintf( rootDirectory,  "%s/.bbtk", getenv("HOME"));
327     
328     // configPath
329     char configPath[200];
330     sprintf(configPath, "%s/bbtk_config.xml",rootDirectory);
331     
332     // configXmlTmp
333     char configXmlTmp[250]; 
334     sprintf(configXmlTmp, "%s/bbtk_config.xml.tmp", bbtk_path);
335     
336     // copyFile
337     char copyFile[250];
338     
339     if (!Utilities::FileExists(configXmlTmp)) // bbtk_config.xml.tmp not found (not installed)
340       {  
341         // if "bbtk_path/bbtk_config.xml.tmp" doesn't exist, hard-create a minimum version in .bbtk
342         CreateConfigXML( rootDirectory );// create .bbtk
343       }
344     else
345       {
346         sprintf(copyFile,"cp %s  %s/bbtk_config.xml ",configXmlTmp,rootDirectory );
347         if (!Utilities::FileExists(configPath))
348           {
349             system(copyFile);
350           }
351       }
352     return;
353     
354     // ------------------------------------------------------------------
355 #elif defined(WIN32)
356     
357     
358     // installed bbtk_path
359     char bbtk_path[100];
360     strcpy(bbtk_path, "\"c:\\Program Files\\BBTK\\bin\"");
361     char bbtk_path2[100];
362     strcpy(bbtk_path2, "c:\\Program Files\\BBTK\\bin");
363     
364     // rootDirectory
365     char rootDirectory[200];  
366     sprintf(rootDirectory, "%s\\.bbtk",getenv("USERPROFILE"));
367     //  std::cout << "[" << rootDirectory << "]" << std::endl;
368     
369     // configPath
370     char configPath[200];
371     sprintf(configPath, "%s\\bbtk_config.xml",rootDirectory);
372     
373     // makeDir
374     char makeDir[250];
375     sprintf( makeDir, "mkdir \"%s\" ", rootDirectory);
376     
377     // configXmlTmp
378     char configXmlTmp[250]; 
379     sprintf(configXmlTmp, "%s\\bbtk_config.xml.tmp", bbtk_path2);
380     
381     // copyFile
382     char copyFile[250];
383     
384     if (!Utilities::FileExists(configXmlTmp)) // bbtk_config.xml.tmp not found
385       {
386         // if "bbtk_path/bbtk_config.xml.tmp" doesn't exist, hard-create a minimum version in .bbtk
387         CreateConfigXML( rootDirectory );// create .bbtk
388         return;
389       }  
390     
391     sprintf(copyFile,"copy %s\\bbtk_config.xml.tmp \"%s\"\\bbtk_config.xml ",bbtk_path,rootDirectory );
392     
393     int attribs = GetFileAttributes (rootDirectory);
394     bbtkMessage("Config",1,std::hex << attribs << " " << FILE_ATTRIBUTE_DIRECTORY << std::endl);
395     if ( attribs != 0xFFFFFFFF)
396       {
397         if ((attribs & FILE_ATTRIBUTE_DIRECTORY) == FILE_ATTRIBUTE_DIRECTORY ) /// \TODO : check !
398           {
399             if ( GetFileAttributes( configPath ) == 0xFFFFFFFF)
400               {
401                 system(copyFile);  
402               } 
403           }
404       } 
405     else 
406       {
407         system(makeDir);
408         system(copyFile); 
409       }    
410     return;  
411     // ------------------------------------------------------------------    
412 #else
413 /// \todo  ConfigurationFile::InstallPath() : exit when for not WIN32 and not__GNUC__
414
415   return;    
416 #endif
417
418 }
419   //=========================================================================
420
421
422
423   //=========================================================================
424   // Gets the list of directories holding bb scripts, packages, dll, ... from the xml file
425   //      bbtk_config.xml
426   
427   void ConfigurationFile::Read(const std::string& filename)
428   {
429     
430     bbtkDebugMessage("Config",1,"ConfigurationFile::Read(" <<filename << ")" << std::endl);
431     
432     mConfig_xml_full_path = filename;
433     XMLResults* res = new XMLResults;
434     XMLNode BB = XMLNode::parseFile((XMLCSTR)filename.c_str(),(XMLCSTR)"config",res);
435     
436     if ( res->error != eXMLErrorNone ) 
437       {
438         std::string mess = GetErrorMessage(res,filename);
439         delete res;
440         bbtkDebugMessage("Config",1,mess<< std::endl);
441         bbtkError(mess);
442       }
443     delete res;
444     
445     bbtkDebugMessage("Config",1,"OK" << std::endl);
446   
447     int i,j;
448     
449     // Description
450     for (i=0,j=0; i<BB.nChildNode((XMLCSTR)"description"); i++) 
451       {
452         std::string val;
453         GetTextOrClear(BB.getChildNode((XMLCSTR)"description",&j),val);
454         mDescription += val;
455       }    
456     
457     // Url
458     if( BB.nChildNode((XMLCSTR)"url") ) 
459       GetTextOrClear(BB.getChildNode((XMLCSTR)"url"),mUrl);
460     
461     // Data_Path
462     if( BB.nChildNode((XMLCSTR)"data_path") ) 
463       GetTextOrClear(BB.getChildNode((XMLCSTR)"data_path"),mData_path);
464     
465     // install_path
466     //  if( BB.nChildNode((XMLCSTR)"install_path") )
467     //   GetTextOrClear(BB.getChildNode((XMLCSTR)"install_path"),mInstall_path);
468     
469     // add user bbs paths
470     for (i=0,j=0; i<BB.nChildNode((XMLCSTR)"bbs_path"); i++) 
471       {
472         std::string val;
473         GetTextOrClear(BB.getChildNode((XMLCSTR)"bbs_path",&j),val);
474         mBbs_paths.push_back(val);
475       }
476     
477     // package_paths
478     
479     // add user package path
480     for (i=0,j=0; i<BB.nChildNode((XMLCSTR)"package_path"); i++) 
481       {
482         std::string val;
483         GetTextOrClear(BB.getChildNode((XMLCSTR)"package_path",&j),val);
484         mPackage_paths.push_back(val);
485       }
486     
487     // default_temp_dir
488     /*
489     if( BB.nChildNode((XMLCSTR)"default_temp_dir") ) 
490       GetTextOrClear(BB.getChildNode((XMLCSTR)"default_temp_dir"),mDefault_temp_dir);
491     
492     if ( mDefault_temp_dir == "$") // no value found in config_xml
493       {
494         size_t pos = mConfig_xml_full_path.find("bbtk_config.xml");
495         mDefault_temp_dir = mConfig_xml_full_path.substr (0,pos); 
496       }    
497     */
498
499     GetHelp(2);
500   }
501   //=========================================================================
502   
503   //=========================================================================
504   bool ConfigurationFile::AddPackagePathsAndWrite( const std::string& path )
505   {
506     bbtkDebugMessageInc("Config",9,
507                         "ConfigurationFile::AddPackagePathsAndWrite("
508                         <<path<<")"<<std::endl);
509     
510      XMLResults* res = new XMLResults;
511     XMLNode BB = 
512       XMLNode::parseFile((XMLCSTR)Get_config_xml_full_path().c_str(),
513                          (XMLCSTR)"config",res);
514     
515     if ( res->error != eXMLErrorNone ) 
516       {
517         std::string mess = GetErrorMessage(res,Get_config_xml_full_path());
518         delete res;
519         bbtkDebugMessage("Config",1,mess<< std::endl);
520         bbtkError(mess);
521       }
522    delete res;
523
524 #ifdef _WIN32
525     std::string bbs_path = path + "/bbs";
526 #else
527     std::string bbs_path = path + "/share/bbtk/bbs" ;
528 #endif
529     XMLNode BBSPATH = BB.addChild((XMLCSTR)"bbs_path");
530     BBSPATH.addText((XMLCSTR)bbs_path.c_str());
531     Utilities::replace(bbs_path, INVALID_FILE_SEPARATOR, VALID_FILE_SEPARATOR);
532     mBbs_paths.push_back(bbs_path);
533  
534 #ifdef _WIN32
535     std::string pack_path = path + "/bin";
536 #else
537     std::string pack_path = path ;
538 #endif
539     XMLNode PACKPATH = BB.addChild((XMLCSTR)"package_path");
540     PACKPATH.addText((XMLCSTR)pack_path.c_str());
541     Utilities::replace(pack_path,INVALID_FILE_SEPARATOR,VALID_FILE_SEPARATOR);
542     mPackage_paths.push_back(pack_path);
543
544 #ifdef _WIN32
545     pack_path = path + "/Debug";
546     PACKPATH = BB.addChild((XMLCSTR)"package_path");
547     PACKPATH.addText((XMLCSTR)pack_path.c_str());
548     Utilities::replace(pack_path,INVALID_FILE_SEPARATOR,VALID_FILE_SEPARATOR);
549     mPackage_paths.push_back(pack_path);
550     pack_path = path + "/Release";
551     PACKPATH = BB.addChild((XMLCSTR)"package_path");
552     PACKPATH.addText((XMLCSTR)pack_path.c_str());
553     Utilities::replace(pack_path,INVALID_FILE_SEPARATOR,VALID_FILE_SEPARATOR);
554     mPackage_paths.push_back(pack_path);
555 #endif
556
557
558     XMLError err = BB.writeToFile((XMLCSTR)Get_config_xml_full_path().c_str());
559     if ( err != eXMLErrorNone ) 
560       {
561         std::string mess = GetErrorMessage(res,Get_config_xml_full_path());
562         bbtkDebugMessage("Config",1,mess<< std::endl);
563         bbtkError(mess);
564       }
565
566     return true;
567   }
568   //=========================================================================
569
570   //=========================================================================
571   void ConfigurationFile::GetHelp(int level) const
572   {
573     bbtkDebugMessageInc("Config",9,"ConfigurationFile::GetHelp("<<level
574                         <<")"<<std::endl);
575     
576     const std::string config_xml_full_path      = Get_config_xml_full_path();    
577     const std::string description               = Get_description();
578     const std::string url                       = Get_doc_path();
579     const std::string data_path                 = Get_data_path();
580     const std::string default_temp_dir          = Get_default_temp_dir();    
581     const std::string file_separator            = Get_file_separator();    
582     const std::vector<std::string>bbs_paths     = Get_bbs_paths();
583     const std::vector<std::string>package_paths = Get_package_paths();
584     
585     bbtkMessage("Help",level, "============="   << std::endl);           
586     bbtkMessage("Help",level, "Configuration"   << std::endl);
587     bbtkMessage("Help",level, "============="   << std::endl);
588     bbtkMessage("Help",level, "bbtk_config.xml    : [" << config_xml_full_path  << "]" << std::endl); 
589     bbtkMessage("Help",level, "Documentation Path : [" << url             << "]" << std::endl);
590     bbtkMessage("Help",level, "Data Path          : [" << data_path       << "]" << std::endl);
591     bbtkMessage("Help",level, "Temp Directory     : [" << default_temp_dir << "]" << std::endl);
592     bbtkMessage("Help",level, "File Separator     : [" << file_separator  << "]" << std::endl);
593
594     std::vector<std::string>::const_iterator i;
595            
596     bbtkMessage("Help",level, "BBS Paths   " << std::endl);     
597     for (i = bbs_paths.begin(); i!=bbs_paths.end(); ++i )
598     {
599       bbtkMessage("Help",level,"--- ["<<*i<<"]"<<std::endl);
600     }    
601     
602     bbtkMessage("Help",level, "PACKAGE Paths : " << std::endl);     
603     for (i = package_paths.begin(); i!=package_paths.end(); ++i )
604     {
605       bbtkMessage("Help",level,"--- ["<<*i<<"]"<<std::endl);
606     }
607
608     bbtkDebugDecTab("Config",9);
609   }
610   //=========================================================================
611
612
613 } // namespace bbtk