diff options
author | Martin v. Löwis <martin@v.loewis.de> | 2007-11-22 06:47:17 +0000 |
---|---|---|
committer | Martin v. Löwis <martin@v.loewis.de> | 2007-11-22 06:47:17 +0000 |
commit | 641a08e97b7f8c80be528b22839f7097abf3c069 (patch) | |
tree | da7186137cfe5cb1ff291114a83b5b0b9b56797e /Tools | |
parent | a0d825b41386d3aec333f2858e38d169b5d5d046 (diff) | |
download | cpython-641a08e97b7f8c80be528b22839f7097abf3c069.tar.gz |
Allow simultaneous installation of 32-bit and 64-bit versions
on 64-bit Windows systems.
Diffstat (limited to 'Tools')
-rw-r--r-- | Tools/msi/msi.py | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/Tools/msi/msi.py b/Tools/msi/msi.py index 1c8ca6dcf2..650728ee93 100644 --- a/Tools/msi/msi.py +++ b/Tools/msi/msi.py @@ -64,12 +64,20 @@ current_version = "%s.%d" % (short_version, FIELD3) # package replace this one. See "UpgradeCode Property". upgrade_code_snapshot='{92A24481-3ECB-40FC-8836-04B7966EC0D5}' upgrade_code='{65E6DE48-A358-434D-AA4F-4AF72DB4718F}' +# This was added in 2.5.2, to support parallel installation of +# both 32-bit and 64-bit versions of Python on a single system. +upgrade_code_64='{6A965A0C-6EE6-4E3A-9983-3263F56311EC}' if snapshot: current_version = "%s.%s.%s" % (major, minor, int(time.time()/3600/24)) product_code = msilib.gen_uuid() else: product_code = product_codes[current_version] + 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] + product_code = product_code[:-2] + digit + '}' if full_current_version is None: full_current_version = current_version @@ -184,6 +192,8 @@ def build_database(): Summary information stream.""" if snapshot: uc = upgrade_code_snapshot + elif msilib.Win64: + uc = upgrade_code_64 else: uc = upgrade_code # schema represents the installer 2.0 database schema. @@ -234,11 +244,22 @@ def remove_old_versions(db): "REMOVEOLDSNAPSHOT")]) props = "REMOVEOLDSNAPSHOT" else: + if msilib.Win64: + uc = upgrade_code_64 + # 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") + else: + uc = upgrade_code + extra = [] add_data(db, "Upgrade", - [(upgrade_code, start, current_version, + [(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")]) + 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, |