X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=doc%2Fchm-builder.py;fp=doc%2Fchm-builder.py;h=0a297c7f9474c8ca3fca00d8f87364b44154bc03;hb=cad89d93709f2dd4dc0296d87c07735717839790;hp=8ac5b2518957d2eaf3e37d04f31586bd433b76f4;hpb=943539779aa9509626c0c7a825c600d9a949839f;p=bertos.git diff --git a/doc/chm-builder.py b/doc/chm-builder.py index 8ac5b251..0a297c7f 100644 --- a/doc/chm-builder.py +++ b/doc/chm-builder.py @@ -15,14 +15,16 @@ if sys.platform != 'win32': print "This program can be run only on a Windows machine" sys.exit(-1) -if len(sys.argv) < 1: +if len(sys.argv) < 2: print "Usage: " + sys.argv[0] + " [custom_doxyfile]" sys.exit(-1) +DOC_PATH = 'doc\\offline-reference\\html\\' toc_modifier = r"doc\chm-toc-modifier.py" -toc_file = r"doc\reference\html\index.hhc" +toc_file = DOC_PATH + r"index.hhc" bertos_toc = r"bertos-toc.hhc" + if os.system("doxygen " + sys.argv[1]): print "doxygen error" if os.system(toc_modifier + " " + toc_file + " " + bertos_toc): @@ -30,9 +32,9 @@ if os.system(toc_modifier + " " + toc_file + " " + bertos_toc): move(bertos_toc, toc_file) # compile CHM -os.system(r"hhc doc\reference\html\index.hhp") +os.system(r"hhc " + DOC_PATH + "index.hhp") chm_target = r"doc\bertos-doc.chm" -move(r"doc\reference\html\bertos-doc.chm", chm_target) +move(DOC_PATH + r"bertos-doc.chm", chm_target)