Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
2529aa98
Commit
2529aa98
authored
Jan 23, 2008
by
Martin v. Löwis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix product code handling for Win64.
parent
d2f4cb8c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
10 deletions
+15
-10
Tools/msi/msi.py
Tools/msi/msi.py
+15
-10
No files found.
Tools/msi/msi.py
View file @
2529aa98
...
...
@@ -68,6 +68,11 @@ upgrade_code='{65E6DE48-A358-434D-AA4F-4AF72DB4718F}'
# 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 @@ else:
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_code
s
[
-
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 @@ def build_mingw_lib(lib_file, def_file, dll_file, mingw_lib):
# 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 @@ def build_database():
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 @@ def remove_old_versions(db):
# 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 @@ def remove_old_versions(db):
[(
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,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment