diff options
author | albert-github <albert.tests@gmail.com> | 2019-05-31 18:03:45 (GMT) |
---|---|---|
committer | albert-github <albert.tests@gmail.com> | 2019-05-31 18:03:45 (GMT) |
commit | 4ad23e5d18fc294e00844fd8557f8c5dd6254d6e (patch) | |
tree | 54add50b60dc75b677dc62afc84aad4014b0d9a2 /src/htmlgen.cpp | |
parent | fa9dda01e6c013c7fe9be99b21d8bbf3c95c0482 (diff) | |
download | Doxygen-4ad23e5d18fc294e00844fd8557f8c5dd6254d6e.zip Doxygen-4ad23e5d18fc294e00844fd8557f8c5dd6254d6e.tar.gz Doxygen-4ad23e5d18fc294e00844fd8557f8c5dd6254d6e.tar.bz2 |
Show git version information
The original version has as features:
- getting the git version number for usage in doxygen
- making the doxygen version number inclusion dependent on the VERSION file
The disadvantage of the chosen methodology was that an extra correction step was necessary, by defining getter methods to retrieve the values this correction can be hidden.
The information is coming from different sources:
- the VERSION file
- the git "repository and build system (when present)
Furthermore there are a couple of places where the version information is used (a.o. doxygen and doxywizard executable, though the doxygenwizard was only done "half hearted")
The handling of the VERSION file has been made in such a way that it is comparable with the generation of the git version changes.
For a better abstraction the version handling is all done in a separate directory.
Diffstat (limited to 'src/htmlgen.cpp')
-rw-r--r-- | src/htmlgen.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/htmlgen.cpp b/src/htmlgen.cpp index d89bb49..cd45e5f 100644 --- a/src/htmlgen.cpp +++ b/src/htmlgen.cpp @@ -858,7 +858,7 @@ void HtmlGenerator::writeSearchData(const char *dir) { searchCss = mgr.getAsString("search.css"); } - searchCss = substitute(replaceColorMarkers(searchCss),"$doxygenversion",versionString); + searchCss = substitute(replaceColorMarkers(searchCss),"$doxygenversion",getVersion()); t << searchCss; Doxygen::indexList->addStyleSheetFile("search/search.css"); } @@ -867,20 +867,20 @@ void HtmlGenerator::writeSearchData(const char *dir) void HtmlGenerator::writeStyleSheetFile(QFile &file) { FTextStream t(&file); - t << replaceColorMarkers(substitute(ResourceMgr::instance().getAsString("doxygen.css"),"$doxygenversion",versionString)); + t << replaceColorMarkers(substitute(ResourceMgr::instance().getAsString("doxygen.css"),"$doxygenversion",getVersion())); } void HtmlGenerator::writeHeaderFile(QFile &file, const char * /*cssname*/) { FTextStream t(&file); - t << "<!-- HTML header for doxygen " << versionString << "-->" << endl; + t << "<!-- HTML header for doxygen " << getVersion() << "-->" << endl; t << ResourceMgr::instance().getAsString("header.html"); } void HtmlGenerator::writeFooterFile(QFile &file) { FTextStream t(&file); - t << "<!-- HTML footer for doxygen " << versionString << "-->" << endl; + t << "<!-- HTML footer for doxygen " << getVersion() << "-->" << endl; t << ResourceMgr::instance().getAsString("footer.html"); } @@ -905,7 +905,7 @@ void HtmlGenerator::startFile(const char *name,const char *, t << substituteHtmlKeywords(g_header,convertToHtml(filterTitle(title)),relPath); t << "<!-- " << theTranslator->trGeneratedBy() << " Doxygen " - << versionString << " -->" << endl; + << getVersion() << " -->" << endl; //static bool generateTreeView = Config_getBool(GENERATE_TREEVIEW); static bool searchEngine = Config_getBool(SEARCHENGINE); if (searchEngine /*&& !generateTreeView*/) @@ -970,7 +970,7 @@ QCString HtmlGenerator::writeLogoAsString(const char *path) "<img class=\"footer\" src=\""; result += path; result += "doxygen.png\" alt=\"doxygen\"/></a> "; - result += versionString; + result += getVersion(); result += " "; return result; } @@ -1023,7 +1023,7 @@ void HtmlGenerator::writeStyleInfo(int part) //t << "H1 { text-align: center; border-width: thin none thin none;" << endl; //t << " border-style : double; border-color : blue; padding-left : 1em; padding-right : 1em }" << endl; - t << replaceColorMarkers(substitute(ResourceMgr::instance().getAsString("doxygen.css"),"$doxygenversion",versionString)); + t << replaceColorMarkers(substitute(ResourceMgr::instance().getAsString("doxygen.css"),"$doxygenversion",getVersion())); endPlainFile(); Doxygen::indexList->addStyleSheetFile("doxygen.css"); } @@ -2441,7 +2441,7 @@ void HtmlGenerator::writeSearchPage() t << substituteHtmlKeywords(g_header,"Search",""); t << "<!-- " << theTranslator->trGeneratedBy() << " Doxygen " - << versionString << " -->" << endl; + << getVersion() << " -->" << endl; t << "<script type=\"text/javascript\">\n"; t << "/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */\n"; t << "var searchBox = new SearchBox(\"searchBox\", \"" @@ -2495,7 +2495,7 @@ void HtmlGenerator::writeExternalSearchPage() t << substituteHtmlKeywords(g_header,"Search",""); t << "<!-- " << theTranslator->trGeneratedBy() << " Doxygen " - << versionString << " -->" << endl; + << getVersion() << " -->" << endl; t << "<script type=\"text/javascript\">\n"; t << "/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */\n"; t << "var searchBox = new SearchBox(\"searchBox\", \"" |