Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 83eacca

Browse files
committed
Merged revisions 73390 via svnmerge from
svn+ssh://[email protected]/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 58641de commit 83eacca

3 files changed

Lines changed: 16 additions & 5 deletions

File tree

Lib/distutils/command/bdist_msi.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -341,9 +341,14 @@ def add_find_python(self):
341341
exe_action = "PythonExe" + ver
342342
target_dir_prop = "TARGETDIR" + ver
343343
exe_prop = "PYTHON" + ver
344+
if msilib.Win64:
345+
# type: msidbLocatorTypeRawValue + msidbLocatorType64bit
346+
Type = 2+16
347+
else:
348+
Type = 2
344349
add_data(self.db, "RegLocator",
345-
[(machine_reg, 2, install_path, None, 2),
346-
(user_reg, 1, install_path, None, 2)])
350+
[(machine_reg, 2, install_path, None, Type),
351+
(user_reg, 1, install_path, None, Type)])
347352
add_data(self.db, "AppSearch",
348353
[(machine_prop, machine_reg),
349354
(user_prop, user_reg)])

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
@@ -24,6 +24,8 @@ Core and Builtins
2424
Library
2525
-------
2626

27+
- Issue #6258: Support AMD64 in bdist_msi.
28+
2729
- Issue #6195: fixed doctest to no longer try to read 'source' data from
2830
binary files.
2931

0 commit comments

Comments
 (0)