print "This program can be run only on a Windows machine"\r
sys.exit(-1)\r
\r
-if len(sys.argv) < 1:\r
+if len(sys.argv) < 2:\r
print "Usage: " + sys.argv[0] + " [custom_doxyfile]"\r
sys.exit(-1)\r
\r
+DOC_PATH = 'doc\\offline-reference\\html\\'\r
toc_modifier = r"doc\chm-toc-modifier.py"\r
-toc_file = r"doc\reference\html\index.hhc"\r
+toc_file = DOC_PATH + r"index.hhc"\r
bertos_toc = r"bertos-toc.hhc"\r
\r
+\r
if os.system("doxygen " + sys.argv[1]):\r
print "doxygen error"\r
if os.system(toc_modifier + " " + toc_file + " " + bertos_toc):\r
move(bertos_toc, toc_file)\r
\r
# compile CHM\r
-os.system(r"hhc doc\reference\html\index.hhp")\r
+os.system(r"hhc " + DOC_PATH + "index.hhp")\r
\r
chm_target = r"doc\bertos-doc.chm"\r
-move(r"doc\reference\html\bertos-doc.chm", chm_target)\r
+move(DOC_PATH + r"bertos-doc.chm", chm_target)\r
\r
\r