15 import shutil |
15 import shutil |
16 import subprocess |
16 import subprocess |
17 |
17 |
18 from Utilities import joinext, relpath, html_encode, getQtBinariesPath, \ |
18 from Utilities import joinext, relpath, html_encode, getQtBinariesPath, \ |
19 generateQtToolName |
19 generateQtToolName |
|
20 from Globals import qVersionTuple |
20 |
21 |
21 HelpCollection = r"""<?xml version="1.0" encoding="utf-8" ?> |
22 HelpCollection = r"""<?xml version="1.0" encoding="utf-8" ?> |
22 <QHelpCollectionProject version="1.0"> |
23 <QHelpCollectionProject version="1.0"> |
23 <docFiles> |
24 <docFiles> |
24 <register> |
25 <register> |
277 os.path.join(getQtBinariesPath(), |
278 os.path.join(getQtBinariesPath(), |
278 generateQtToolName("qhelpgenerator")), |
279 generateQtToolName("qhelpgenerator")), |
279 HelpProjectFile, "-o", os.path.join(self.outputDir, HelpHelpFile)]) |
280 HelpProjectFile, "-o", os.path.join(self.outputDir, HelpHelpFile)]) |
280 os.remove(HelpProjectFile) |
281 os.remove(HelpProjectFile) |
281 |
282 |
282 if self.createCollection: |
283 # TODO: do this with qhelpgenerator >= 5.12.0 |
|
284 if qVersionTuple() < (5, 12, 0) and self.createCollection: |
283 sys.stdout.write("Generating QtHelp collection...\n") |
285 sys.stdout.write("Generating QtHelp collection...\n") |
284 sys.stdout.flush() |
286 sys.stdout.flush() |
285 sys.stderr.flush() |
287 sys.stderr.flush() |
286 os.chdir(self.outputDir) |
288 os.chdir(self.outputDir) |
287 subprocess.call([ |
289 subprocess.call([ |