]> granicus.if.org Git - python/commitdiff
Support AMD64 in msilib. Set Win64 on reglocator.
authorMartin v. Löwis <martin@v.loewis.de>
Fri, 12 Jun 2009 17:28:31 +0000 (17:28 +0000)
committerMartin v. Löwis <martin@v.loewis.de>
Fri, 12 Jun 2009 17:28:31 +0000 (17:28 +0000)
Fixes #6258.

Lib/distutils/command/bdist_msi.py
Lib/msilib/__init__.py
Misc/NEWS

index 52e193eb5104fc208f356b3f15e9ce5f411db86a..d69c4b690c594172071c8f68792c189307197acf 100644 (file)
@@ -342,9 +342,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)])
index b13d0306f12ea995813f16f87ba4b1cea5846dfb..71cced251a357c7389d53cbdf488af471eddaa2d 100644 (file)
@@ -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())
index ffb15b48fd5d08ef8f2613636495b6d56ca98871..fda9fbab60a6654cf6ecc20c0e2df09a642590f7 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -317,6 +317,8 @@ Core and Builtins
 Library
 -------
 
+- Issue #6258: Support AMD64 in bdist_msi.
+
 - Issue #5262: Fixed bug in next rollover time computation in
   TimedRotatingFileHandler.