12 import sys |
12 import sys |
13 import os |
13 import os |
14 import shutil |
14 import shutil |
15 import subprocess |
15 import subprocess |
16 |
16 |
17 from Utilities import joinext, relpath, html_encode, getQtBinariesPath, \ |
17 from Utilities import ( |
18 generateQtToolName, isExecutable |
18 joinext, relpath, html_encode, getQtBinariesPath, generateQtToolName, |
|
19 isExecutable |
|
20 ) |
19 |
21 |
20 HelpCollection = r"""<?xml version="1.0" encoding="utf-8" ?> |
22 HelpCollection = r"""<?xml version="1.0" encoding="utf-8" ?> |
21 <QHelpCollectionProject version="1.0"> |
23 <QHelpCollectionProject version="1.0"> |
22 <docFiles> |
24 <docFiles> |
23 <register> |
25 <register> |
80 self.htmlDir = htmlDir |
82 self.htmlDir = htmlDir |
81 self.outputDir = outputDir |
83 self.outputDir = outputDir |
82 self.namespace = namespace |
84 self.namespace = namespace |
83 self.virtualFolder = virtualFolder |
85 self.virtualFolder = virtualFolder |
84 self.filterName = filterName |
86 self.filterName = filterName |
85 self.filterAttributes = \ |
87 self.filterAttributes = ( |
86 filterAttributes and filterAttributes.split(':') or [] |
88 filterAttributes and filterAttributes.split(':') or [] |
|
89 ) |
87 self.relPath = relpath(self.htmlDir, self.outputDir) |
90 self.relPath = relpath(self.htmlDir, self.outputDir) |
88 self.title = title |
91 self.title = title |
89 self.createCollection = createCollection |
92 self.createCollection = createCollection |
90 |
93 |
91 self.packages = { |
94 self.packages = { |
246 f = open(os.path.join(self.outputDir, HelpProjectFile), "w", |
249 f = open(os.path.join(self.outputDir, HelpProjectFile), "w", |
247 encoding="utf-8", newline=newline) |
250 encoding="utf-8", newline=newline) |
248 f.write(txt) |
251 f.write(txt) |
249 f.close() |
252 f.close() |
250 |
253 |
251 if self.createCollection and \ |
254 if ( |
252 not os.path.exists( |
255 self.createCollection and |
253 os.path.join(self.outputDir, HelpCollectionProjectFile)): |
256 not os.path.exists(os.path.join( |
|
257 self.outputDir, HelpCollectionProjectFile)) |
|
258 ): |
254 collectionAttribs = { |
259 collectionAttribs = { |
255 "helpfile": HelpHelpFile, |
260 "helpfile": HelpHelpFile, |
256 } |
261 } |
257 |
262 |
258 txt = self.__convertEol( |
263 txt = self.__convertEol( |