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