diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/CMakeLists.txt | 9 | ||||
-rw-r--r-- | src/configimpl.l | 9 | ||||
-rw-r--r-- | src/context.cpp | 2 | ||||
-rw-r--r-- | src/doxygen.cpp | 27 | ||||
-rw-r--r-- | src/htmlgen.cpp | 18 | ||||
-rw-r--r-- | src/latexgen.cpp | 8 | ||||
-rw-r--r-- | src/layout.cpp | 2 | ||||
-rw-r--r-- | src/resourcemgr.cpp | 2 | ||||
-rw-r--r-- | src/rtfgen.cpp | 4 | ||||
-rw-r--r-- | src/searchindex.cpp | 2 | ||||
-rw-r--r-- | src/sqlite3gen.cpp | 2 | ||||
-rw-r--r-- | src/util.cpp | 2 | ||||
-rw-r--r-- | src/version.h | 23 | ||||
-rw-r--r-- | src/xmlgen.cpp | 4 |
14 files changed, 56 insertions, 58 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 9721bf0..06e0e44 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -5,6 +5,7 @@ include_directories( ${CMAKE_SOURCE_DIR}/libmd5 ${CMAKE_SOURCE_DIR}/liblodepng ${CMAKE_SOURCE_DIR}/libmscgen + ${CMAKE_SOURCE_DIR}/libversion ${CMAKE_SOURCE_DIR}/vhdlparser ${CMAKE_SOURCE_DIR}/src ${CLANG_INCLUDEDIR} @@ -32,12 +33,6 @@ CONTENT "#ifndef SETTINGS_H set_source_files_properties(${GENERATED_SRC}/settings.h PROPERTIES GENERATED 1) -# generate version.cpp -file(GENERATE OUTPUT ${GENERATED_SRC}/version.cpp - CONTENT "char versionString[]=\"${VERSION}\";" -) -set_source_files_properties(${GENERATED_SRC}/version.cpp PROPERTIES GENERATED 1) - # configvalues.h add_custom_command( COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/src/configgen.py -maph ${CMAKE_SOURCE_DIR}/src/config.xml > ${GENERATED_SRC}/configvalues.h @@ -142,7 +137,6 @@ add_library(_doxygen STATIC ${GENERATED_SRC}/lang_cfg.h ${GENERATED_SRC}/settings.h ${GENERATED_SRC}/layout_default.xml.h - ${GENERATED_SRC}/version.cpp ${GENERATED_SRC}/ce_parse.h ${GENERATED_SRC}/configvalues.h ${GENERATED_SRC}/resources.cpp @@ -286,6 +280,7 @@ target_link_libraries(doxygen md5 lodepng mscgen + version vhdlparser ${SQLITE3_LIBRARIES} ${ICONV_LIBRARIES} diff --git a/src/configimpl.l b/src/configimpl.l index bc08cbf..72c826d 100644 --- a/src/configimpl.l +++ b/src/configimpl.l @@ -943,7 +943,7 @@ void ConfigImpl::writeTemplate(FTextStream &t,bool sl,bool upd) { t << takeStartComment() << endl; } - t << "# Doxyfile " << versionString << endl << endl; + t << "# Doxyfile " << getVersion() << endl << endl; if (!sl) { t << convertToComment(m_header,""); @@ -964,7 +964,12 @@ void ConfigImpl::writeTemplate(FTextStream &t,bool sl,bool upd) void ConfigImpl::compareDoxyfile(FTextStream &t) { - t << "# Difference with default Doxyfile " << versionString << endl; + t << "# Difference with default Doxyfile " << getVersion(); + if (strlen(getGitVersion())) + { + t << " (" << getGitVersion() << ")"; + } + t << endl; QListIterator<ConfigOption> it = iterator(); ConfigOption *option; for (;(option=it.current());++it) diff --git a/src/context.cpp b/src/context.cpp index 66206b1..49c9afa 100644 --- a/src/context.cpp +++ b/src/context.cpp @@ -380,7 +380,7 @@ class DoxygenContext::Private public: TemplateVariant version() const { - return versionString; + return getVersion(); } TemplateVariant date() const { diff --git a/src/doxygen.cpp b/src/doxygen.cpp index 0d05f13..92e5292 100644 --- a/src/doxygen.cpp +++ b/src/doxygen.cpp @@ -10129,7 +10129,14 @@ static void devUsage() static void usage(const char *name) { - msg("Doxygen version %s\nCopyright Dimitri van Heesch 1997-2015\n\n",versionString); + if (strlen(getGitVersion())) + { + msg("Doxygen version %s (%s)\nCopyright Dimitri van Heesch 1997-2015\n\n",getVersion(),getGitVersion()); + } + else + { + msg("Doxygen version %s\nCopyright Dimitri van Heesch 1997-2015\n\n",getVersion()); + } msg("You can use doxygen in a number of ways:\n\n"); msg("1) Use doxygen to generate a template configuration file:\n"); msg(" %s [-s] -g [configName]\n\n",name); @@ -10589,7 +10596,14 @@ void readConfiguration(int argc, char **argv) g_dumpSymbolMap = TRUE; break; case 'v': - msg("%s\n",versionString); + if (strlen(getGitVersion())) + { + msg("%s (%s)\n",getVersion(),getGitVersion()); + } + else + { + msg("%s\n",getVersion()); + } cleanUpDoxygen(); exit(0); break; @@ -10601,7 +10615,14 @@ void readConfiguration(int argc, char **argv) } else if (qstrcmp(&argv[optind][2],"version")==0) { - msg("%s\n",versionString); + if (strlen(getGitVersion())) + { + msg("%s (%s)\n",getVersion(),getGitVersion()); + } + else + { + msg("%s\n",getVersion()); + } cleanUpDoxygen(); exit(0); } diff --git a/src/htmlgen.cpp b/src/htmlgen.cpp index b3abd09..402b4e4 100644 --- a/src/htmlgen.cpp +++ b/src/htmlgen.cpp @@ -878,7 +878,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"); } @@ -887,20 +887,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"); } @@ -925,7 +925,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*/) @@ -990,7 +990,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; } @@ -1043,7 +1043,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"); } @@ -2461,7 +2461,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\", \"" @@ -2515,7 +2515,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\", \"" diff --git a/src/latexgen.cpp b/src/latexgen.cpp index f88f79b..e6c6861 100644 --- a/src/latexgen.cpp +++ b/src/latexgen.cpp @@ -776,7 +776,7 @@ static void writeDefaultHeaderPart3(FTextStream &t) { // part 3 // Finalize project number - t << " Doxygen " << versionString << "}\\\\\n"; + t << " Doxygen " << getVersion() << "}\\\\\n"; if (Config_getBool(LATEX_TIMESTAMP)) t << "\\vspace*{0.5cm}\n" "{\\small " << dateToString(TRUE) << "}\\\\\n"; @@ -845,7 +845,7 @@ static void writeDefaultFooter(FTextStream &t) void LatexGenerator::writeHeaderFile(QFile &f) { FTextStream t(&f); - t << "% Latex header for doxygen " << versionString << endl; + t << "% Latex header for doxygen " << getVersion() << endl; writeDefaultHeaderPart1(t); t << "Your title here"; writeDefaultHeaderPart2(t); @@ -856,14 +856,14 @@ void LatexGenerator::writeHeaderFile(QFile &f) void LatexGenerator::writeFooterFile(QFile &f) { FTextStream t(&f); - t << "% Latex footer for doxygen " << versionString << endl; + t << "% Latex footer for doxygen " << getVersion() << endl; writeDefaultFooter(t); } void LatexGenerator::writeStyleSheetFile(QFile &f) { FTextStream t(&f); - t << "% stylesheet for doxygen " << versionString << endl; + t << "% stylesheet for doxygen " << getVersion() << endl; writeDefaultStyleSheet(t); } diff --git a/src/layout.cpp b/src/layout.cpp index 4ffdfb8..30c41f9 100644 --- a/src/layout.cpp +++ b/src/layout.cpp @@ -1561,7 +1561,7 @@ void writeDefaultLayoutFile(const char *fileName) return; } QTextStream t(&f); - t << substitute(layout_default,"$doxygenversion",versionString); + t << substitute(layout_default,"$doxygenversion",getVersion()); } //---------------------------------------------------------------------------------- diff --git a/src/resourcemgr.cpp b/src/resourcemgr.cpp index ab7422a..8cb831e 100644 --- a/src/resourcemgr.cpp +++ b/src/resourcemgr.cpp @@ -144,7 +144,7 @@ bool ResourceMgr::copyResourceAs(const char *name,const char *targetDir,const ch } else { - t << substitute(buf,"$doxygenversion",versionString); + t << substitute(buf,"$doxygenversion",getVersion()); } return TRUE; } diff --git a/src/rtfgen.cpp b/src/rtfgen.cpp index 2f24ca7..948d4cf 100644 --- a/src/rtfgen.cpp +++ b/src/rtfgen.cpp @@ -102,7 +102,7 @@ RTFGenerator::~RTFGenerator() void RTFGenerator::writeStyleSheetFile(QFile &file) { FTextStream t(&file); - t << "# Generated by doxygen " << versionString << "\n\n"; + t << "# Generated by doxygen " << getVersion() << "\n\n"; t << "# This file describes styles used for generating RTF output.\n"; t << "# All text after a hash (#) is considered a comment and will be ignored.\n"; t << "# Remove a hash to activate a line.\n\n"; @@ -119,7 +119,7 @@ void RTFGenerator::writeStyleSheetFile(QFile &file) void RTFGenerator::writeExtensionsFile(QFile &file) { FTextStream t(&file); - t << "# Generated by doxygen " << versionString << "\n\n"; + t << "# Generated by doxygen " << getVersion() << "\n\n"; t << "# This file describes extensions used for generating RTF output.\n"; t << "# All text after a hash (#) is considered a comment and will be ignored.\n"; t << "# Remove a hash to activate a line.\n\n"; diff --git a/src/searchindex.cpp b/src/searchindex.cpp index e5f9ac8..b21d587 100644 --- a/src/searchindex.cpp +++ b/src/searchindex.cpp @@ -984,7 +984,7 @@ void writeJavascriptSearchIndex() " \"https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">" << endl; t << "<html><head><title></title>" << endl; t << "<meta http-equiv=\"Content-Type\" content=\"text/xhtml;charset=UTF-8\"/>" << endl; - t << "<meta name=\"generator\" content=\"Doxygen " << versionString << "\"/>" << endl; + t << "<meta name=\"generator\" content=\"Doxygen " << getVersion() << "\"/>" << endl; t << "<link rel=\"stylesheet\" type=\"text/css\" href=\"search.css\"/>" << endl; t << "<script type=\"text/javascript\" src=\"" << baseName << ".js\"></script>" << endl; t << "<script type=\"text/javascript\" src=\"search.js\"></script>" << endl; diff --git a/src/sqlite3gen.cpp b/src/sqlite3gen.cpp index 5a8e81d..012a0c0 100644 --- a/src/sqlite3gen.cpp +++ b/src/sqlite3gen.cpp @@ -924,7 +924,7 @@ static int insertPath(QCString name, bool local=TRUE, bool found=TRUE, int type= static void recordMetadata() { - bindTextParameter(meta_insert,":doxygen_version",versionString); + bindTextParameter(meta_insert,":doxygen_version",getVersion()); bindTextParameter(meta_insert,":schema_version","0.2.0"); //TODO: this should be a constant somewhere; not sure where bindTextParameter(meta_insert,":generated_at",dateToString(TRUE), FALSE); bindTextParameter(meta_insert,":generated_on",dateToString(FALSE), FALSE); diff --git a/src/util.cpp b/src/util.cpp index 70c0fce..695a52c 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -5337,7 +5337,7 @@ QCString substituteKeywords(const QCString &s,const char *title, result = substitute(result,"$datetime",dateToString(TRUE)); result = substitute(result,"$date",dateToString(FALSE)); result = substitute(result,"$year",yearToString()); - result = substitute(result,"$doxygenversion",versionString); + result = substitute(result,"$doxygenversion",getVersion()); result = substitute(result,"$projectname",projName); result = substitute(result,"$projectnumber",projNum); result = substitute(result,"$projectbrief",projBrief); diff --git a/src/version.h b/src/version.h deleted file mode 100644 index 16bf9df..0000000 --- a/src/version.h +++ /dev/null @@ -1,23 +0,0 @@ -/****************************************************************************** - * - * - * - * Copyright (C) 1997-2015 by Dimitri van Heesch. - * - * Permission to use, copy, modify, and distribute this software and its - * documentation under the terms of the GNU General Public License is hereby - * granted. No representations are made about the suitability of this software - * for any purpose. It is provided "as is" without express or implied warranty. - * See the GNU General Public License for more details. - * - * Documents produced by Doxygen are derivative works derived from the - * input used in their production; they are not affected by this license. - * - */ - -#ifndef VERSION_H -#define VERSION_H - -extern char versionString[]; - -#endif diff --git a/src/xmlgen.cpp b/src/xmlgen.cpp index b992b81..16abbf2 100644 --- a/src/xmlgen.cpp +++ b/src/xmlgen.cpp @@ -154,7 +154,7 @@ static void writeXMLHeader(FTextStream &t) t << "<?xml version='1.0' encoding='UTF-8' standalone='no'?>" << endl;; t << "<doxygen xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" "; t << "xsi:noNamespaceSchemaLocation=\"compound.xsd\" "; - t << "version=\"" << versionString << "\">" << endl; + t << "version=\"" << getVersion() << "\">" << endl; } static void writeCombineScript() @@ -1981,7 +1981,7 @@ void generateXML() t << "<?xml version='1.0' encoding='UTF-8' standalone='no'?>" << endl;; t << "<doxygenindex xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" "; t << "xsi:noNamespaceSchemaLocation=\"index.xsd\" "; - t << "version=\"" << versionString << "\">" << endl; + t << "version=\"" << getVersion() << "\">" << endl; { ClassSDict::Iterator cli(*Doxygen::classSDict); |