+ //=========================================================================
+ void ConfigurationFile::InitializeDotBbtkStructure()
+ {
+ mDot_bbtk_path = Utilities::GetUserSettingsDir();
+ mDot_bbtk_is_new = false;
+ if (!Utilities::FileExists(mDot_bbtk_path)) mDot_bbtk_is_new = true;
+ Utilities::CreateDirectoryIfNeeded(mDot_bbtk_path);
+
+ mDoc_path = Utilities::MakeUserSettingsFullFileName("doc");
+ Utilities::CreateDirectoryIfNeeded(mDoc_path);
+
+ std::string bbdoc_path =
+ Utilities::MakeUserSettingsFullFileName("doc/bbdoc");
+ Utilities::CreateDirectoryIfNeeded(bbdoc_path);
+
+ // Create help_contents.html if does not exist
+ std::string filename = Utilities::MakeUserSettingsFullFileName("doc/help_contents.html");
+ if (!Utilities::FileExists(filename))
+ {
+ bbtkDebugMessage("config",1,
+ "* Creating [" << filename << "]" << std::endl);
+ // The path to the doc folder (=mInstall_path+"/"+mDoc_rel_path)
+ std::string doc_path = mInstall_path + "/"
+ + BBTK_STRINGIFY_SYMBOL(BBTK_DOC_REL_PATH) + "/";
+ Utilities::MakeValidFileName(doc_path);
+
+ std::ofstream f;
+ f.open(filename.c_str(), std::ios::out );
+ f << "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD "
+ << "HTML 4.01 Transitional//EN\">"
+ << "<html><head><title>Help Contents - bbtk "
+ << GetVersion() << "</title>"
+ << "<meta http-equiv=\"Content-Type\" content=\"text/html; "
+ << "charset=iso-8859-1\"></head><H1>Help Contents</H1>"
+ << "<a href=\"bbdoc/index-category.html#demo\" "
+ << "target=\"information\">Demos</a><br>"
+ << "<a href=\"bbdoc/index-category.html#example\" "
+ << "target=\"information\">Examples</a>"
+ << "<H2>Guides</H2>"
+ << "<a href=\""
+ << doc_path
+ << "bbtkUsersGuide/bbtkUsersGuide.pdf"
+ << "\" target=\"information\">User's Guide</a><br>"
+ << "<a href=\""
+ << doc_path
+ << "bbtkDevelopersGuide/bbtkDevelopersGuide.pdf"
+ << "\" target=\"information\">Developer's Guide</a><br>"
+ << "<a href=\""
+ << doc_path
+ << "bbtkPackageDevelopersGuide/bbtkPackageDevelopersGuide.pdf"
+ << "\" target=\"information\">Package Developer's Guide</a><br>"
+ << "<a href=\""
+ << doc_path
+ << "doxygen/bbtk/main.html"
+ << "\" target=\"information\">bbtk library doxygen doc</a><br>"
+ << "<H2>Boxes</H2>"
+ << "<a target=\"information\" href=\"bbdoc/index-alpha.html\">"
+ << "Alphabetical list</a><br>"
+ << "<a target=\"information\" href=\"bbdoc/index-package.html\">"
+ << "List by package</a><br>"
+ << "<a target=\"information\" href=\"bbdoc/index-category.html\">"
+ << "List by category</a><br>"
+ << "<a target=\"information\" href=\"bbdoc/index-adaptors.html\">"
+ << "List of adaptors</a><br>"
+ << "</body>"
+ << "</html>";
+ } // if
+
+ mTemp_path = Utilities::MakeUserSettingsFullFileName("tmp");
+ Utilities::CreateDirectoryIfNeeded(mTemp_path);