From 83eacca7a601df925a36455119633167a9093cdb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20v=2E=20L=C3=B6wis?= Date: Fri, 12 Jun 2009 17:31:41 +0000 Subject: [PATCH] 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. ........ --- Lib/distutils/command/bdist_msi.py | 9 +++++++-- Lib/msilib/__init__.py | 10 +++++++--- Misc/NEWS | 2 ++ 3 files changed, 16 insertions(+), 5 deletions(-) diff --git a/Lib/distutils/command/bdist_msi.py b/Lib/distutils/command/bdist_msi.py index bca98cc23ea..2e5685f5c43 100644 --- a/Lib/distutils/command/bdist_msi.py +++ b/Lib/distutils/command/bdist_msi.py @@ -341,9 +341,14 @@ class bdist_msi(Command): exe_action = "PythonExe" + ver target_dir_prop = "TARGETDIR" + ver exe_prop = "PYTHON" + ver + if msilib.Win64: + # type: msidbLocatorTypeRawValue + msidbLocatorType64bit + Type = 2+16 + else: + Type = 2 add_data(self.db, "RegLocator", - [(machine_reg, 2, install_path, None, 2), - (user_reg, 1, install_path, None, 2)]) + [(machine_reg, 2, install_path, None, Type), + (user_reg, 1, install_path, None, Type)]) add_data(self.db, "AppSearch", [(machine_prop, machine_reg), (user_prop, user_reg)]) diff --git a/Lib/msilib/__init__.py b/Lib/msilib/__init__.py index ae3823a61ad..114a1c788cb 100644 --- a/Lib/msilib/__init__.py +++ b/Lib/msilib/__init__.py @@ -2,9 +2,11 @@ # Copyright (C) 2005 Martin v. Löwis # Licensed to PSF under a Contributor Agreement. from _msi import * -import os, string, re +import os, string, re, sys -Win64=0 +AMD64 = "AMD64" in sys.version +Itanium = "Itanium" in sys.version +Win64 = AMD64 or Itanium # Partially taken from Wine datasizemask= 0x00ff @@ -145,8 +147,10 @@ def init_database(name, schema, si.SetProperty(PID_TITLE, "Installation Database") si.SetProperty(PID_SUBJECT, ProductName) si.SetProperty(PID_AUTHOR, Manufacturer) - if Win64: + if Itanium: si.SetProperty(PID_TEMPLATE, "Intel64;1033") + elif AMD64: + si.SetProperty(PID_TEMPLATE, "x64;1033") else: si.SetProperty(PID_TEMPLATE, "Intel;1033") si.SetProperty(PID_REVNUMBER, gen_uuid()) diff --git a/Misc/NEWS b/Misc/NEWS index 7cac68bff50..f12c6d105b8 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -24,6 +24,8 @@ Core and Builtins Library ------- +- Issue #6258: Support AMD64 in bdist_msi. + - Issue #6195: fixed doctest to no longer try to read 'source' data from binary files.