Skip to content

Commit 2b0cfbf

Browse files
author
martin.v.loewis
committed
Use the CHM file name that Sphinx assigns.
git-svn-id: http://svn.python.org/projects/python/trunk@62949 6015fed2-1504-0410-9fe1-9d1591cc4771
1 parent 822e129 commit 2b0cfbf

1 file changed

Lines changed: 10 additions & 4 deletions

File tree

Tools/msi/msi.py

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,12 @@
111111
"26":"{34ebecac-f046-4e1c-b0e3-9bac3cdaacfa}",
112112
} [major+minor]
113113

114+
# Compute the name that Sphinx gives to the docfile
115+
docfile = ""
116+
if level < 0xf:
117+
docfile = '%x%s' % (level, serial)
118+
docfile = 'python%s%s%s.chm' % (major, minor, docfile)
119+
114120
# Build the mingw import library, libpythonXY.a
115121
# This requires 'nm' and 'dlltool' executables on your PATH
116122
def build_mingw_lib(lib_file, def_file, dll_file, mingw_lib):
@@ -1072,8 +1078,8 @@ def add_files(db):
10721078
# Add documentation
10731079
htmlfiles.set_current()
10741080
lib = PyDirectory(db, cab, root, "Doc", "Doc", "DOC|Doc")
1075-
lib.start_component("documentation", keyfile="Python%s%s.chm" % (major,minor))
1076-
lib.add_file("Python%s%s.chm" % (major, minor), src="build/htmlhelp/pydoc.chm")
1081+
lib.start_component("documentation", keyfile=docfile)
1082+
lib.add_file(docfile, src="build/htmlhelp/"+docfile)
10771083

10781084
cab.commit(db)
10791085

@@ -1181,7 +1187,7 @@ def add_registry(db):
11811187
("PythonPath", -1, prefix+r"\PythonPath", "",
11821188
r"[TARGETDIR]Lib;[TARGETDIR]DLLs;[TARGETDIR]Lib\lib-tk", "REGISTRY"),
11831189
("Documentation", -1, prefix+r"\Help\Main Python Documentation", "",
1184-
r"[TARGETDIR]Doc\Python%s%s.chm" % (major, minor), "REGISTRY.doc"),
1190+
"[TARGETDIR]Doc\\"+docfile , "REGISTRY.doc"),
11851191
("Modules", -1, prefix+r"\Modules", "+", None, "REGISTRY"),
11861192
("AppPaths", -1, r"Software\Microsoft\Windows\CurrentVersion\App Paths\Python.exe",
11871193
"", r"[TARGETDIR]Python.exe", "REGISTRY.def")
@@ -1211,7 +1217,7 @@ def add_registry(db):
12111217
# htmlfiles.id, None, None, None, None, None, None, None),
12121218
## Non-advertised shortcuts: must be associated with a registry component
12131219
("Manual", "MenuDir", "MANUAL|Python Manuals", "REGISTRY.doc",
1214-
"[#Python%s%s.chm]" % (major,minor), None,
1220+
"[#%s]" % docfile, None,
12151221
None, None, None, None, None, None),
12161222
("Uninstall", "MenuDir", "UNINST|Uninstall Python", "REGISTRY",
12171223
SystemFolderName+"msiexec", "/x%s" % product_code,

0 commit comments

Comments
 (0)