summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/CMakeLists.txt9
-rw-r--r--src/layout.cpp7
-rwxr-xr-xsrc/to_c_cmd.py8
-rw-r--r--templates/general/layout_default.xml (renamed from src/layout_default.xml)0
4 files changed, 3 insertions, 21 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 912c67e..5004a95 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -100,14 +100,6 @@ add_custom_command(
)
set_source_files_properties(${GENERATED_SRC}/resources.cpp PROPERTIES GENERATED 1)
-# layout_default.xml
-add_custom_command(
- COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_LIST_DIR}/to_c_cmd.py < ${CMAKE_CURRENT_LIST_DIR}/layout_default.xml > ${GENERATED_SRC}/layout_default.xml.h
- DEPENDS ${CMAKE_CURRENT_LIST_DIR}/layout_default.xml ${CMAKE_CURRENT_LIST_DIR}/to_c_cmd.py
- OUTPUT ${GENERATED_SRC}/layout_default.xml.h
-)
-set_source_files_properties(${GENERATED_SRC}/layout_default.xml.h PROPERTIES GENERATED 1)
-
set(LEX_FILES scanner
code
pyscanner
@@ -220,7 +212,6 @@ add_library(doxymain STATIC
${GENERATED_SRC}/ce_parse.cpp
# custom generated files
${GENERATED_SRC}/lang_cfg.h
- ${GENERATED_SRC}/layout_default.xml.h
${GENERATED_SRC}/ce_parse.h
${GENERATED_SRC}/resources.cpp
#
diff --git a/src/layout.cpp b/src/layout.cpp
index a1a054e..f241bd8 100644
--- a/src/layout.cpp
+++ b/src/layout.cpp
@@ -29,10 +29,7 @@
#include "version.h"
#include "config.h"
#include "xml.h"
-
-static const char layout_default[] =
-#include "layout_default.xml.h"
-;
+#include "resourcemgr.h"
inline QCString compileOptions(const QCString &def)
{
@@ -1510,6 +1507,7 @@ void LayoutDocManager::init()
handlers.error = [&layoutParser](const std::string &fileName,int lineNr,const std::string &msg) { layoutParser.error(fileName,lineNr,msg); };
XMLParser parser(handlers);
layoutParser.setDocumentLocator(&parser);
+ QCString layout_default = ResourceMgr::instance().getAsString("layout_default.xml");
parser.parse("layout_default.xml",layout_default);
}
@@ -1568,6 +1566,7 @@ void writeDefaultLayoutFile(const char *fileName)
return;
}
FTextStream t(&f);
+ QCString layout_default = ResourceMgr::instance().getAsString("layout_default.xml");
t << substitute(layout_default,"$doxygenversion",getDoxygenVersion());
}
diff --git a/src/to_c_cmd.py b/src/to_c_cmd.py
deleted file mode 100755
index 9510fd7..0000000
--- a/src/to_c_cmd.py
+++ /dev/null
@@ -1,8 +0,0 @@
-# place " at begin of each line
-# escape existing '\' and '"'
-# remove \n at the end of the line (sometimes the last line does not have a \n
-# so we cannot do a replacement with some other text)
-# place an escaped \n and " at the end of each line
-import sys
-for line in sys.stdin:
- sys.stdout.write('"' + line.replace('\\','\\\\').replace('"','\\"').replace('\n','').replace('\r','') + '\\n"\n')
diff --git a/src/layout_default.xml b/templates/general/layout_default.xml
index 373bb20..373bb20 100644
--- a/src/layout_default.xml
+++ b/templates/general/layout_default.xml