Skip to content

Commit f74f791

Browse files
committed
Merged revisions 73391 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k ................ r73391 | martin.v.loewis | 2009-06-12 19:31:41 +0200 (Fr, 12 Jun 2009) | 10 lines Merged revisions 73390 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r73390 | martin.v.loewis | 2009-06-12 19:28:31 +0200 (Fr, 12 Jun 2009) | 3 lines Support AMD64 in msilib. Set Win64 on reglocator. Fixes #6258. ........ ................
1 parent f68bac7 commit f74f791

File tree

3 files changed

+16
-5
lines changed

3 files changed

+16
-5
lines changed

Lib/distutils/command/bdist_msi.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -282,9 +282,14 @@ def add_find_python(self):
282282
PYTHON.USER if defined, else from PYTHON.MACHINE.
283283
PYTHON is PYTHONDIR\python.exe"""
284284
install_path = r"SOFTWARE\Python\PythonCore\%s\InstallPath" % self.target_version
285+
if msilib.Win64:
286+
# type: msidbLocatorTypeRawValue + msidbLocatorType64bit
287+
Type = 2+16
288+
else:
289+
Type = 2
285290
add_data(self.db, "RegLocator",
286-
[("python.machine", 2, install_path, None, 2),
287-
("python.user", 1, install_path, None, 2)])
291+
[("python.machine", 2, install_path, None, Type),
292+
("python.user", 1, install_path, None, Type)])
288293
add_data(self.db, "AppSearch",
289294
[("PYTHON.MACHINE", "python.machine"),
290295
("PYTHON.USER", "python.user")])

Lib/msilib/__init__.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,11 @@
22
# Copyright (C) 2005 Martin v. Löwis
33
# Licensed to PSF under a Contributor Agreement.
44
from _msi import *
5-
import os, string, re
5+
import os, string, re, sys
66

7-
Win64=0
7+
AMD64 = "AMD64" in sys.version
8+
Itanium = "Itanium" in sys.version
9+
Win64 = AMD64 or Itanium
810

911
# Partially taken from Wine
1012
datasizemask= 0x00ff
@@ -145,8 +147,10 @@ def init_database(name, schema,
145147
si.SetProperty(PID_TITLE, "Installation Database")
146148
si.SetProperty(PID_SUBJECT, ProductName)
147149
si.SetProperty(PID_AUTHOR, Manufacturer)
148-
if Win64:
150+
if Itanium:
149151
si.SetProperty(PID_TEMPLATE, "Intel64;1033")
152+
elif AMD64:
153+
si.SetProperty(PID_TEMPLATE, "x64;1033")
150154
else:
151155
si.SetProperty(PID_TEMPLATE, "Intel;1033")
152156
si.SetProperty(PID_REVNUMBER, gen_uuid())

Misc/NEWS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,8 @@ Core and Builtins
7373
Library
7474
-------
7575

76+
- Issue #6258: Support AMD64 in bdist_msi.
77+
7678
- Fix a bug in the trace module where a bytes object from co_lnotab had its
7779
items being passed through ord(). (Fixes Issue #3821)
7880

0 commit comments

Comments
 (0)