Permalink
Browse files

Introduced template directory for template and resource files and res…

…ource compiler & manager
  • Loading branch information...
Dimitri van Heesch
Dimitri van Heesch committed Aug 7, 2014
1 parent 475b0c5 commit 0fea3d4ca57187f271d7580ff16f32b7ab4657df
Showing with 8,760 additions and 3,082 deletions.
  1. +3 −0 .gitignore
  2. +1 −1 Makefile.in
  3. +6 −19 jquery/Makefile
  4. +1 −4 jquery/README
  5. +0 −25 jquery/split_jquery.pl
  6. +4 −4 qtools/qcstring.h
  7. +4 −27 src/cite.cpp
  8. +11 −2 src/context.cpp
  9. +5 −1 src/doxygen.cpp
  10. +13 −565 src/ftvhelp.cpp
  11. +93 −902 src/htmlgen.cpp
  12. +0 −1 src/jquery_fx.js
  13. +0 −18 src/jquery_p1.js
  14. +0 −10 src/jquery_p2.js
  15. +0 −3 src/jquery_p3.js
  16. +0 −8 src/jquery_pt.js
  17. +0 −40 src/jquery_ui.js
  18. 0 src/lang_cfg.py
  19. +2 −25 src/latexgen.cpp
  20. +0 −194 src/layout_default.h
  21. +4 −1 src/libdoxygen.pro.in
  22. +5 −87 src/libdoxygen.t.in
  23. +102 −0 src/res2cc_cmd.py
  24. +0 −93 src/resize_js.h
  25. +183 −0 src/resourcemgr.cpp
  26. +63 −0 src/resourcemgr.h
  27. +25 −10 src/searchindex.cpp
  28. +145 −47 src/template.cpp
  29. +7 −79 src/xmlgen.cpp
  30. +49 −0 templates/html/arrowdown.luma
  31. +49 −0 templates/html/arrowright.luma
  32. +66 −0 templates/html/bc_s.luma
  33. +21 −0 templates/html/bdwn.luma
  34. 0 {src → templates/html}/bib2xhtml.pl
  35. BIN templates/html/close.png
  36. +23 −0 templates/html/closed.luma
  37. +50 −0 templates/html/doc.luma
  38. 0 {src → templates/html}/doxygen.bst
  39. +3 −3 {src → templates/html}/doxygen.css
  40. +68 −0 templates/html/doxygen.luma
  41. 0 {src → templates/html}/dynsections.js
  42. +1 −1 {src → templates/html}/extsearch.js
  43. +49 −0 templates/html/folderclosed.luma
  44. +49 −0 templates/html/folderopen.luma
  45. 0 {src → templates/html}/footer.html
  46. 0 {src → templates/html}/header.html
  47. +22 −0 templates/html/htmlallmembers.tpl
  48. +15 −0 templates/html/htmlannotated.tpl
  49. +216 −0 templates/html/htmlbase.tpl
  50. +452 −0 templates/html/htmlclass.tpl
  51. +21 −0 templates/html/htmlclasses.tpl
  52. +20 −0 templates/html/htmlclmembers.tpl
  53. +26 −0 templates/html/htmlclmembersindex.tpl
  54. +32 −0 templates/html/htmldeclcomp.tpl
  55. +78 −0 templates/html/htmldir.tpl
  56. +46 −0 templates/html/htmldirtree.tpl
  57. +7 −0 templates/html/htmldyncontents.tpl
  58. +7 −0 templates/html/htmldynheader.tpl
  59. +256 −0 templates/html/htmlfile.tpl
  60. +15 −0 templates/html/htmlfiles.tpl
  61. +20 −0 templates/html/htmlflmembers.tpl
  62. +27 −0 templates/html/htmlinclude.tpl
  63. +19 −0 templates/html/htmlindexpages.tpl
  64. +7 −0 templates/html/htmljsnavindex.tpl
  65. +20 −0 templates/html/htmljsnavtree.tpl
  66. +232 −0 templates/html/htmllayout.tpl
  67. +37 −0 templates/html/htmlmemberindex.tpl
  68. +81 −0 templates/html/htmlmembersindex.tpl
  69. +48 −0 templates/html/htmlmembertabs.tpl
  70. +214 −0 templates/html/htmlmemdecl.tpl
  71. +38 −0 templates/html/htmlmemdecls.tpl
  72. +284 −0 templates/html/htmlmemdef.tpl
  73. +20 −0 templates/html/htmlmeminherit.tpl
  74. +15 −0 templates/html/htmlmemlist.tpl
  75. +7 −0 templates/html/htmlmemsummary.tpl
  76. +310 −0 templates/html/htmlmodule.tpl
  77. +15 −0 templates/html/htmlmodules.tpl
  78. +206 −0 templates/html/htmlnamespace.tpl
  79. +15 −0 templates/html/htmlnamespaces.tpl
  80. +14 −0 templates/html/htmlnavpath.tpl
  81. +22 −0 templates/html/htmlnavtree.tpl
  82. +20 −0 templates/html/htmlnsmembers.tpl
  83. +26 −0 templates/html/htmlnsmembersindex.tpl
  84. +6 −0 templates/html/htmlobjlink.tpl
  85. +14 −0 templates/html/htmlpage.tpl
  86. +15 −0 templates/html/htmlpages.tpl
  87. +37 −0 templates/html/htmlsource.tpl
  88. +92 −0 templates/html/htmltabs.tpl
  89. +13 −0 templates/html/htmltypeconstraints.tpl
  90. +68 −0 templates/html/jquery.js
  91. BIN templates/html/mag.png
  92. BIN templates/html/mag_sel.png
  93. +11 −0 templates/html/nav_f.lum
  94. BIN templates/html/nav_g.png
  95. +6 −0 templates/html/nav_h.lum
  96. +1 −1 {src → templates/html}/navtree.css
  97. +6 −10 {src → templates/html}/navtree.js
  98. +23 −0 templates/html/open.luma
  99. 0 {src → templates/html}/resize.js
  100. 0 {src → templates/html}/search.css
  101. +40 −25 {src → templates/html}/search.js
  102. +1 −1 {src → templates/html}/search_functions.php
  103. BIN templates/html/search_l.png
  104. BIN templates/html/search_m.png
  105. +271 −0 templates/html/search_noidx.css
  106. +3 −3 {src → templates/html}/search_opensearch.php
  107. BIN templates/html/search_r.png
  108. +1,028 −0 templates/html/splitbar.lum
  109. 0 {src → templates/html}/svgpan.js
  110. +54 −0 templates/html/sync_off.luma
  111. +54 −0 templates/html/sync_on.luma
  112. +8 −0 templates/html/tab_a.lum
  113. +8 −0 templates/html/tab_b.lum
  114. +8 −0 templates/html/tab_h.lum
  115. +8 −0 templates/html/tab_s.lum
  116. +60 −0 templates/html/tabs.css
  117. 0 {src → templates/latex}/doxygen.sty
  118. 0 {src → templates/xml}/compound.xsd
  119. 0 {src → templates/xml}/index.xsd
  120. +2,891 −872 winbuild/Doxygen.vcproj
  121. +19 −0 winbuild/GenResources.rules
@@ -70,3 +70,6 @@
/man
/docbook
/perlmod
!/templates/html
!/templates/latex
@@ -102,7 +102,7 @@ pdf: docs
DISTFILES = Doxyfile vhdlparser libmd5 addon tmake doc examples bin lib objects testing \
qtools src configure configure.bin Makefile.in Makefile.win_nmake.in \
Makefile.win_make.in INSTALL LANGUAGE.HOWTO LICENSE PLATFORMS \
VERSION README.md packages winbuild jquery
VERSION README.md packages winbuild jquery templates
archive: clean
tar zcvf dx`date +%y%m%d`.tgz $(DISTFILES)
@@ -3,6 +3,7 @@ JQUERY_UI_VERSION = 1.8.18
HASHCHANGE_VERSION = 1.3
SCROLL_VERSION = 1.4.2
POWERTIP_VERSION = 1.2.0
MINIFIER ?= /usr/local/bin/yuicompressor-2.4.7
SCRIPTS = jquery-$(JQUERY_VERSION).js \
jquery.ui-$(JQUERY_UI_VERSION).core.js \
@@ -12,37 +13,23 @@ SCRIPTS = jquery-$(JQUERY_VERSION).js \
jquery.ba-$(HASHCHANGE_VERSION)-hashchange.js \
jquery.scrollTo-$(SCROLL_VERSION).js \
jquery.powertip-$(POWERTIP_VERSION).js
RESULTS = jquery_p1.js jquery_p2.js jquery_p3.js \
jquery_ui.js jquery_fx.js jquery_pt.js
RESULTS = jquery.js
SCRIPTS_MIN = $(SCRIPTS:%.js=%-min.js)
all: $(RESULTS)
install: $(RESULTS)
cp $(RESULTS) ../src/
jquery_ui.js: scripts
cat jquery.ui-$(JQUERY_UI_VERSION).core-min.js \
jquery.ui-$(JQUERY_UI_VERSION).widget-min.js \
jquery.ui-$(JQUERY_UI_VERSION).mouse-min.js \
jquery.ui-$(JQUERY_UI_VERSION).resizable-min.js \
jquery.ba-$(HASHCHANGE_VERSION)-hashchange-min.js > jquery_ui.js
jquery_pt.js: scripts
cat jquery.powertip-$(POWERTIP_VERSION)-min.js > jquery_pt.js
jquery_fx.js: scripts
cat jquery.scrollTo-$(SCROLL_VERSION)-min.js > jquery_fx.js
cp $(RESULTS) ../templates/html/
jquery_p1.js jquery_p2.js jquery_p3.js: scripts
perl split_jquery.pl jquery-$(JQUERY_VERSION)-min.js $@
jquery.js: scripts
cat $(SCRIPTS_MIN) > jquery.js
scripts: $(SCRIPTS_MIN)
clean:
rm -f $(SCRIPTS_MIN) $(RESULTS)
%-min.js: %.js
java -jar $(MINIFIER).jar --line-break 13000 $^ > $@
java -jar $(MINIFIER).jar $^ > $@
@@ -11,7 +11,4 @@ packages:
- jquery.scrollTo: 1.4.2: https://github.com/flesler/jquery.scrollTo
- jquery.powertip: 1.2.0: http://stevenbenner.github.io/jquery-powertip/
The Makefile will built the jquery_*.js files used by doxygen.
Some files are split into smaller parts to make sure Visual Studio can compile them
as strings.
The Makefile will built the jquery.js files used by doxygen.

This file was deleted.

Oops, something went wrong.
@@ -297,7 +297,7 @@ class QCString
{
if (!str) return *this;
int len1 = length();
int len2 = strlen(str);
int len2 = (int)strlen(str);
resize(len1+len2+1);
memcpy(data()+len1,str,len2);
return *this;
@@ -467,7 +467,7 @@ class QCString
{
if (str)
{
int len = strlen(str);
int len = (int)strlen(str);
u.s.isShort = len<SHORT_STR_CAPACITY;
if (len<SHORT_STR_CAPACITY)
{
@@ -489,7 +489,7 @@ class QCString
{
if (str && maxlen>0)
{
uint len=strlen(str);
uint len=(uint)strlen(str);
if (len>maxlen) len=maxlen;
u.s.isShort = len<=SHORT_STR_MAX_LEN;
if (u.s.isShort)
@@ -543,7 +543,7 @@ class QCString
}
if (str)
{
int len = strlen(str);
int len = (int)strlen(str);
u.s.isShort = len<SHORT_STR_CAPACITY;
if (len<SHORT_STR_CAPACITY)
{
@@ -21,20 +21,11 @@
#include "util.h"
#include "language.h"
#include "ftextstream.h"
#include "resourcemgr.h"
#include <qdir.h>
//--------------------------------------------------------------------------
static const char *doxygen_bst =
#include "doxygen.bst.h"
;
static const char *bib2xhtml_pl =
#include "bib2xhtml.pl.h"
;
//--------------------------------------------------------------------------
const QCString CiteConsts::fileName("citelist");
const QCString CiteConsts::anchorPrefix("CITEREF_");
const QCString bibTmpFile("bibTmpFile_");
@@ -153,26 +144,12 @@ void CiteDict::generatePage() const
f.close();
// 2. generate bib2xhtml
QCString bib2xhtmlFile = outputDir+"/bib2xhtml.pl";
f.setName(bib2xhtmlFile);
QCString bib2xhtml = bib2xhtml_pl;
if (!f.open(IO_WriteOnly))
{
err("could not open file %s for writing\n",bib2xhtmlFile.data());
}
f.writeBlock(bib2xhtml, bib2xhtml.length());
f.close();
QCString bib2xhtmlFile = outputDir+"/bib2xhtml.pl";
ResourceMgr::instance().copyResource("bib2xhtml.pl",outputDir);
// 3. generate doxygen.bst
QCString doxygenBstFile = outputDir+"/doxygen.bst";
QCString bstData = doxygen_bst;
f.setName(doxygenBstFile);
if (!f.open(IO_WriteOnly))
{
err("could not open file %s for writing\n",doxygenBstFile.data());
}
f.writeBlock(bstData, bstData.length());
f.close();
ResourceMgr::instance().copyResource("doxygen.bst",outputDir);
// 4. for all formats we just copy the bib files to as special output directory
// so bibtex can find them without path (bibtex doesn't support paths or
@@ -13,6 +13,7 @@
*
*/
#include <assert.h>
#include <qdir.h>
#include "context.h"
@@ -1108,6 +1109,7 @@ class DefinitionContext : public PropertyMapper
public:
DefinitionContext(Definition *d) : m_def(d)
{
assert(d!=0);
//%% string name: the name of the symbol
addProperty("name",this,&DefinitionContext::name);
//%% string bareName: the bare name of the symbol with scope info
@@ -8147,7 +8149,6 @@ void generateOutputViaTemplate()
SharedPtr<ExampleListContext> exampleList (ExampleListContext::alloc());
SharedPtr<ModuleTreeContext> moduleTree (ModuleTreeContext::alloc());
SharedPtr<ModuleListContext> moduleList (ModuleListContext::alloc());
SharedPtr<PageContext> mainPage (PageContext::alloc(Doxygen::mainPage,TRUE));
SharedPtr<GlobalsIndexContext> globalsIndex (GlobalsIndexContext::alloc());
SharedPtr<ClassMembersIndexContext> classMembersIndex (ClassMembersIndexContext::alloc());
SharedPtr<NamespaceMembersIndexContext> namespaceMembersIndex(NamespaceMembersIndexContext::alloc());
@@ -8187,7 +8188,15 @@ void generateOutputViaTemplate()
//%% DirList dirList
ctx->set("dirList",dirList.get());
//%% Page mainPage
ctx->set("mainPage",mainPage.get());
if (Doxygen::mainPage)
{
SharedPtr<PageContext> mainPage(PageContext::alloc(Doxygen::mainPage,TRUE));
ctx->set("mainPage",mainPage.get());
}
else
{
ctx->set("mainPage",FALSE);
}
//%% GlobalsIndex globalsIndex:
ctx->set("globalsIndex",globalsIndex.get());
//%% ClassMembersIndex classMembersIndex:
@@ -100,6 +100,9 @@
#include "context.h"
#include "fileparser.h"
// provided by the generated file resources.cpp
extern void initResources();
#define RECURSE_ENTRYTREE(func,var) \
do { if (var->children()) { \
EntryNavListIterator eli(*var->children()); \
@@ -9915,6 +9918,7 @@ static const char *getArg(int argc,char **argv,int &optind)
void initDoxygen()
{
initResources();
const char *lang = portable_getenv("LC_ALL");
if (lang) portable_setenv("LANG",lang);
setlocale(LC_ALL,"");
@@ -10884,7 +10888,7 @@ void parseInput()
QCString htmlOutput;
bool &generateHtml = Config_getBool("GENERATE_HTML");
if (generateHtml)
if (generateHtml || g_useOutputTemplate /* TODO: temp hack */)
htmlOutput = createOutputDirectory(outputDirectory,"HTML_OUTPUT","/html");
QCString docbookOutput;
Oops, something went wrong.

0 comments on commit 0fea3d4

Please sign in to comment.