mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 10:22:45 -04:00
Fix makechm for new manual stuff
This commit is contained in:
parent
aed8f189ae
commit
df296cb85a
@ -167,7 +167,7 @@ def makeCHM(outputfile, dirname, title, special = None):
|
|||||||
hhc.write(" <param name=\"Name\" value=\"Main Page\">\n")
|
hhc.write(" <param name=\"Name\" value=\"Main Page\">\n")
|
||||||
hhc.write(" <param name=\"Local\" value=\"%s\">\n" % urldecode(os.path.join(dirname, "index.html")))
|
hhc.write(" <param name=\"Local\" value=\"%s\">\n" % urldecode(os.path.join(dirname, "index.html")))
|
||||||
hhc.write(" </object>\n")
|
hhc.write(" </object>\n")
|
||||||
for item in parseManualTOC("manual/index.html"):
|
for item in parseManualTOC(dirname + "/index.html"):
|
||||||
hhc.write(treeToHTML(item, dirname, " "))
|
hhc.write(treeToHTML(item, dirname, " "))
|
||||||
for i in os.listdir(dirname):
|
for i in os.listdir(dirname):
|
||||||
hhp.write(os.path.join(dirname, i) + "\n")
|
hhp.write(os.path.join(dirname, i) + "\n")
|
||||||
@ -211,8 +211,10 @@ def makeCHM(outputfile, dirname, title, special = None):
|
|||||||
hhc.close()
|
hhc.close()
|
||||||
hhp.close()
|
hhp.close()
|
||||||
# Now, execute the command to compile the files.
|
# Now, execute the command to compile the files.
|
||||||
if os.path.isdir("C:\Program Files\HTML Help Workshop"):
|
if "PROGRAMFILES" in os.environ and os.path.isdir("%s\\HTML Help Workshop" % os.environ["PROGRAMFILES"]):
|
||||||
cmd = "\"C:\Program Files\HTML Help Workshop\hhc.exe\" %s.hhp" % base
|
cmd = "\"%s\\HTML Help Workshop\\hhc.exe\" %s.hhp" % (os.environ["PROGRAMFILES"], base)
|
||||||
|
elif os.path.isdir("C:\Program Files\HTML Help Workshop"):
|
||||||
|
cmd = "\"C:\\Program Files\\HTML Help Workshop\\hhc.exe\" %s.hhp" % base
|
||||||
else:
|
else:
|
||||||
cmd = "hhc \"%s.hhp\"" % base
|
cmd = "hhc \"%s.hhp\"" % base
|
||||||
print cmd
|
print cmd
|
||||||
@ -256,23 +258,24 @@ if __name__ == "__main__":
|
|||||||
pass
|
pass
|
||||||
|
|
||||||
# Now, make CHM's for both the manual and reference, if we have them.
|
# Now, make CHM's for both the manual and reference, if we have them.
|
||||||
if not os.path.isdir("manual"):
|
for lang in ["python", "cxx"]:
|
||||||
print "No directory named 'manual' found"
|
if not os.path.isdir("manual-" + lang):
|
||||||
|
print "No directory named 'manual-%s' found" % lang
|
||||||
else:
|
else:
|
||||||
print "Making CHM file for manual..."
|
print "Making CHM file for manual-%s..." % lang
|
||||||
if VERSION == None:
|
if VERSION == None:
|
||||||
makeManualCHM("manual.chm", "manual", "Panda3D Manual")
|
makeManualCHM("manual-%s.chm" % lang, "manual-" + lang, "Panda3D Manual")
|
||||||
else:
|
else:
|
||||||
makeManualCHM("manual-%s.chm" % VERSION, "manual", "Panda3D %s Manual" % VERSION)
|
makeManualCHM("manual-%s-%s.chm" % (VERSION, lang), "manual-" + lang, "Panda3D %s Manual" % VERSION)
|
||||||
|
|
||||||
if not os.path.isdir("reference"):
|
if not os.path.isdir("reference-" + lang):
|
||||||
print "No directory named 'reference' found"
|
print "No directory named 'reference-%s' found" % lang
|
||||||
else:
|
else:
|
||||||
print "Making CHM file for API reference..."
|
print "Making CHM file for reference-%s..." % lang
|
||||||
if VERSION == None:
|
if VERSION == None:
|
||||||
makeReferenceCHM("reference.chm", "reference", "Panda3D Reference")
|
makeReferenceCHM("reference-%s.chm" % lang, "reference-" + lang, "Panda3D Reference")
|
||||||
else:
|
else:
|
||||||
makeReferenceCHM("reference-%s.chm" % VERSION, "reference", "Panda3D %s Reference" % VERSION)
|
makeReferenceCHM("reference-%s-%s.chm" % (VERSION, lang), "reference-" + lang, "Panda3D %s Reference" % VERSION)
|
||||||
|
|
||||||
print "Done!"
|
print "Done!"
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user