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