doc: Change offline documentation path
[bertos.git] / doc / chm-builder.py
index 8ac5b2518957d2eaf3e37d04f31586bd433b76f4..0a297c7f9474c8ca3fca00d8f87364b44154bc03 100644 (file)
@@ -15,14 +15,16 @@ if sys.platform != 'win32':
     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
@@ -30,9 +32,9 @@ if os.system(toc_modifier + " " + toc_file + " " + bertos_toc):
 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