DocumentationTools/QtHelpGenerator.py

changeset 5614
8a3d75ba46dc
parent 5587
ea526b78ee6c
child 6048
82ad8ec9548c
equal deleted inserted replaced
5613:f9dc65b75525 5614:8a3d75ba46dc
13 import sys 13 import sys
14 import os 14 import os
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 20
20 HelpCollection = r"""<?xml version="1.0" encoding="utf-8" ?> 21 HelpCollection = r"""<?xml version="1.0" encoding="utf-8" ?>
21 <QHelpCollectionProject version="1.0"> 22 <QHelpCollectionProject version="1.0">
22 <docFiles> 23 <docFiles>
23 <register> 24 <register>
271 # generate the compressed files 272 # generate the compressed files
272 shutil.copy( 273 shutil.copy(
273 os.path.join(self.outputDir, HelpProjectFile), self.htmlDir) 274 os.path.join(self.outputDir, HelpProjectFile), self.htmlDir)
274 os.chdir(self.htmlDir) 275 os.chdir(self.htmlDir)
275 subprocess.call([ 276 subprocess.call([
276 os.path.join(getQtBinariesPath(), "qhelpgenerator"), 277 os.path.join(getQtBinariesPath(),
278 generateQtToolName("qhelpgenerator")),
277 HelpProjectFile, "-o", os.path.join(self.outputDir, HelpHelpFile)]) 279 HelpProjectFile, "-o", os.path.join(self.outputDir, HelpHelpFile)])
278 os.remove(HelpProjectFile) 280 os.remove(HelpProjectFile)
279 281
280 if self.createCollection: 282 if self.createCollection:
281 sys.stdout.write("Generating QtHelp collection...\n") 283 sys.stdout.write("Generating QtHelp collection...\n")
282 sys.stdout.flush() 284 sys.stdout.flush()
283 sys.stderr.flush() 285 sys.stderr.flush()
284 os.chdir(self.outputDir) 286 os.chdir(self.outputDir)
285 subprocess.call([ 287 subprocess.call([
286 os.path.join(getQtBinariesPath(), "qcollectiongenerator"), 288 os.path.join(getQtBinariesPath(),
289 generateQtToolName("qcollectiongenerator")),
287 HelpCollectionProjectFile, "-o", HelpCollectionFile]) 290 HelpCollectionProjectFile, "-o", HelpCollectionFile])
288 291
289 os.chdir(cwd) 292 os.chdir(cwd)

eric ide

mercurial