[Python-checkins] r60222 - python/branches/release25-maint/Tools/msi/msi.py

martin.v.loewis python-checkins at python.org
Wed Jan 23 18:54:14 CET 2008


Author: martin.v.loewis
Date: Wed Jan 23 18:54:14 2008
New Revision: 60222
Modified:
 python/branches/release25-maint/Tools/msi/msi.py
Log:
Fix product code handling for Win64.
Modified: python/branches/release25-maint/Tools/msi/msi.py
==============================================================================
--- python/branches/release25-maint/Tools/msi/msi.py	(original)
+++ python/branches/release25-maint/Tools/msi/msi.py	Wed Jan 23 18:54:14 2008
@@ -68,6 +68,11 @@
 # both 32-bit and 64-bit versions of Python on a single system.
 upgrade_code_64='{6A965A0C-6EE6-4E3A-9983-3263F56311EC}'
 
+# Determine the target architechture
+dll_file = "python%s%s.dll" % (major, minor)
+dll_path = os.path.join(srcdir, "PCBuild", dll_file)
+msilib.set_arch_from_file(dll_path)
+
 if snapshot:
 current_version = "%s.%s.%s" % (major, minor, int(time.time()/3600/24))
 product_code = msilib.gen_uuid()
@@ -76,7 +81,7 @@
 if msilib.Win64:
 # Bump the last digit of the code by one, so that 32-bit and 64-bit
 # releases get separate product codes
- digit = hex((int(product_codes[-2],16)+1)%16)[-1]
+ digit = hex((int(product_code[-2],16)+1)%16)[-1]
 product_code = product_code[:-2] + digit + '}'
 
 if full_current_version is None:
@@ -155,14 +160,10 @@
 # Target files (.def and .a) go in PCBuild directory
 lib_file = os.path.join(srcdir, "PCBuild", "python%s%s.lib" % (major, minor))
 def_file = os.path.join(srcdir, "PCBuild", "python%s%s.def" % (major, minor))
-dll_file = "python%s%s.dll" % (major, minor)
 mingw_lib = os.path.join(srcdir, "PCBuild", "libpython%s%s.a" % (major, minor))
 
 have_mingw = build_mingw_lib(lib_file, def_file, dll_file, mingw_lib)
 
-# Determine the target architechture
-dll_path = os.path.join(srcdir, "PCBuild", dll_file)
-msilib.set_arch_from_file(dll_path)
 if msilib.pe_type(dll_path) != msilib.pe_type("msisupport.dll"):
 raise SystemError, "msisupport.dll for incorrect architecture"
 
@@ -196,11 +197,15 @@
 uc = upgrade_code_64
 else:
 uc = upgrade_code
+ if msilib.Win64:
+ productsuffix = " (64 bit)"
+ else:
+ productsuffix = ""
 # schema represents the installer 2.0 database schema.
 # sequence is the set of standard sequences
 # (ui/execute, admin/advt/install)
 db = msilib.init_database("python-%s%s.msi" % (full_current_version, msilib.arch_ext),
- schema, ProductName="Python "+full_current_version,
+ schema, ProductName="Python "+full_current_version+productsuffix,
 ProductCode=product_code,
 ProductVersion=current_version,
 Manufacturer=u"Python Software Foundation")
@@ -249,9 +254,9 @@
 # For 2.5, also upgrade installation with upgrade_code
 # of 2.5.0 and 2.5.1, since they used the same code for
 # 64-bit versions
- assert major==2 and minor==5
- extra = (upgrade_code, start, "2.5.2",
- None, migrate_features, None, "REMOVEOLDVERSION")
+ assert major=='2' and minor=='5'
+ extra = [(upgrade_code, start, "2.5.2000",
+ None, migrate_features, None, "REMOVEOLDVERSION")]
 else:
 uc = upgrade_code
 extra = []
@@ -259,7 +264,7 @@
 [(uc, start, current_version,
 None, migrate_features, None, "REMOVEOLDVERSION"),
 (upgrade_code_snapshot, start, "%s.%d.0" % (major, int(minor)+1),
- None, migrate_features, None, "REMOVEOLDSNAPSHOT")+extra])
+ None, migrate_features, None, "REMOVEOLDSNAPSHOT")]+extra)
 props = "REMOVEOLDSNAPSHOT;REMOVEOLDVERSION"
 # Installer collects the product codes of the earlier releases in
 # these properties. In order to allow modification of the properties,


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /