Mercurial > cpython-lru_cache-weakref
annotate PC/python_nt.rc @ 25736:92a8a352e024 2.2
SF bug 621507: python22.dll incorrect "File version".
The MS resource compiler can't do arithmetic. Fixed it by hand. Note
that the new PCbuild\field3.py was added to help with this, and injects
another manual step into the Python Windows release process.
| author | Tim Peters <tim.peters@gmail.com> |
|---|---|
| date | Fri, 11 Oct 2002 18:38:20 +0000 |
| parents | 6072fa410dcc |
| children | 7a57ddf72794 |
| rev | line source |
|---|---|
|
4123
71b43d4b7cd0
Added dllbase_nt.txt and python_nt.rc;
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
1 // Resource script for Python core DLL. |
|
71b43d4b7cd0
Added dllbase_nt.txt and python_nt.rc;
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
2 // Currently only holds version information. |
|
71b43d4b7cd0
Added dllbase_nt.txt and python_nt.rc;
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
3 // |
|
71b43d4b7cd0
Added dllbase_nt.txt and python_nt.rc;
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
4 #include "ver.h" |
|
71b43d4b7cd0
Added dllbase_nt.txt and python_nt.rc;
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
5 #include "winver.h" |
|
71b43d4b7cd0
Added dllbase_nt.txt and python_nt.rc;
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
6 |
|
71b43d4b7cd0
Added dllbase_nt.txt and python_nt.rc;
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
7 #define MS_WINDOWS |
|
71b43d4b7cd0
Added dllbase_nt.txt and python_nt.rc;
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
8 #include "modsupport.h" |
|
71b43d4b7cd0
Added dllbase_nt.txt and python_nt.rc;
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
9 #include "patchlevel.h" |
|
71b43d4b7cd0
Added dllbase_nt.txt and python_nt.rc;
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
10 |
|
16487
771dbb155575
SF bug #131225: sys.winver is still '2.0' in python 2.1a2.
Tim Peters <tim.peters@gmail.com>
parents:
15971
diff
changeset
|
11 /* Across releases, change: |
|
771dbb155575
SF bug #131225: sys.winver is still '2.0' in python 2.1a2.
Tim Peters <tim.peters@gmail.com>
parents:
15971
diff
changeset
|
12 * MS_DLL_ID if the minor version number changes. |
|
771dbb155575
SF bug #131225: sys.winver is still '2.0' in python 2.1a2.
Tim Peters <tim.peters@gmail.com>
parents:
15971
diff
changeset
|
13 * PYTHON_DLL_NAME ditto. |
|
17026
f4146ca0f292
Magic strings in both Python and the Wise installer define the registry key
Tim Peters <tim.peters@gmail.com>
parents:
16487
diff
changeset
|
14 * MS_DLL_ID must match PY_VERSION in the Windows install script. |
|
16487
771dbb155575
SF bug #131225: sys.winver is still '2.0' in python 2.1a2.
Tim Peters <tim.peters@gmail.com>
parents:
15971
diff
changeset
|
15 */ |
|
17588
5a5805a45dbf
Move Windows stuff to 2.2, so CVS builds won't interfere with 2.1
Tim Peters <tim.peters@gmail.com>
parents:
17026
diff
changeset
|
16 #define MS_DLL_ID "2.2" |
|
4123
71b43d4b7cd0
Added dllbase_nt.txt and python_nt.rc;
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
17 |
|
4127
a7a9d83505c4
Use MS_DLL_ID and similar changes
Guido van Rossum <guido@python.org>
parents:
4123
diff
changeset
|
18 #ifndef PYTHON_DLL_NAME |
|
17588
5a5805a45dbf
Move Windows stuff to 2.2, so CVS builds won't interfere with 2.1
Tim Peters <tim.peters@gmail.com>
parents:
17026
diff
changeset
|
19 #define PYTHON_DLL_NAME "python22.dll" |
|
4127
a7a9d83505c4
Use MS_DLL_ID and similar changes
Guido van Rossum <guido@python.org>
parents:
4123
diff
changeset
|
20 #endif |
|
a7a9d83505c4
Use MS_DLL_ID and similar changes
Guido van Rossum <guido@python.org>
parents:
4123
diff
changeset
|
21 |
|
16487
771dbb155575
SF bug #131225: sys.winver is still '2.0' in python 2.1a2.
Tim Peters <tim.peters@gmail.com>
parents:
15971
diff
changeset
|
22 /* Nothing below this should need to be changed except for copyright |
|
25736
92a8a352e024
SF bug 621507: python22.dll incorrect "File version".
Tim Peters <tim.peters@gmail.com>
parents:
22081
diff
changeset
|
23 * notices, company name, and FIELD3. Unfortunately, all attempts |
|
92a8a352e024
SF bug 621507: python22.dll incorrect "File version".
Tim Peters <tim.peters@gmail.com>
parents:
22081
diff
changeset
|
24 * to get the resource compiler to do arithmetic in macros have |
|
92a8a352e024
SF bug 621507: python22.dll incorrect "File version".
Tim Peters <tim.peters@gmail.com>
parents:
22081
diff
changeset
|
25 * failed miserably -- it gives syntax errors, ignores operators, |
|
92a8a352e024
SF bug 621507: python22.dll incorrect "File version".
Tim Peters <tim.peters@gmail.com>
parents:
22081
diff
changeset
|
26 * or does stuff that's simply bizarre. |
|
16487
771dbb155575
SF bug #131225: sys.winver is still '2.0' in python 2.1a2.
Tim Peters <tim.peters@gmail.com>
parents:
15971
diff
changeset
|
27 */ |
|
771dbb155575
SF bug #131225: sys.winver is still '2.0' in python 2.1a2.
Tim Peters <tim.peters@gmail.com>
parents:
15971
diff
changeset
|
28 |
|
25736
92a8a352e024
SF bug 621507: python22.dll incorrect "File version".
Tim Peters <tim.peters@gmail.com>
parents:
22081
diff
changeset
|
29 |
|
92a8a352e024
SF bug 621507: python22.dll incorrect "File version".
Tim Peters <tim.peters@gmail.com>
parents:
22081
diff
changeset
|
30 /* This is what we'd like FIELD3 to be: |
|
92a8a352e024
SF bug 621507: python22.dll incorrect "File version".
Tim Peters <tim.peters@gmail.com>
parents:
22081
diff
changeset
|
31 * |
|
92a8a352e024
SF bug 621507: python22.dll incorrect "File version".
Tim Peters <tim.peters@gmail.com>
parents:
22081
diff
changeset
|
32 * #define FIELD3 (PY_MICRO_VERSION*1000 + PY_RELEASE_LEVEL*10 + PY_RELEASE_SERIAL) |
|
92a8a352e024
SF bug 621507: python22.dll incorrect "File version".
Tim Peters <tim.peters@gmail.com>
parents:
22081
diff
changeset
|
33 * |
|
92a8a352e024
SF bug 621507: python22.dll incorrect "File version".
Tim Peters <tim.peters@gmail.com>
parents:
22081
diff
changeset
|
34 * but that neither gives an error nor comes anywhere close to working. The |
|
92a8a352e024
SF bug 621507: python22.dll incorrect "File version".
Tim Peters <tim.peters@gmail.com>
parents:
22081
diff
changeset
|
35 * following comment and #define are output from PCbuild\field3.py: |
|
92a8a352e024
SF bug 621507: python22.dll incorrect "File version".
Tim Peters <tim.peters@gmail.com>
parents:
22081
diff
changeset
|
36 * |
|
92a8a352e024
SF bug 621507: python22.dll incorrect "File version".
Tim Peters <tim.peters@gmail.com>
parents:
22081
diff
changeset
|
37 * For 2.2.2b1, |
|
92a8a352e024
SF bug 621507: python22.dll incorrect "File version".
Tim Peters <tim.peters@gmail.com>
parents:
22081
diff
changeset
|
38 * PY_MICRO_VERSION = 2 |
|
92a8a352e024
SF bug 621507: python22.dll incorrect "File version".
Tim Peters <tim.peters@gmail.com>
parents:
22081
diff
changeset
|
39 * PY_RELEASE_LEVEL = 'beta' = 0xb |
|
92a8a352e024
SF bug 621507: python22.dll incorrect "File version".
Tim Peters <tim.peters@gmail.com>
parents:
22081
diff
changeset
|
40 * PY_RELEASE_SERIAL = 1 |
|
92a8a352e024
SF bug 621507: python22.dll incorrect "File version".
Tim Peters <tim.peters@gmail.com>
parents:
22081
diff
changeset
|
41 * |
|
92a8a352e024
SF bug 621507: python22.dll incorrect "File version".
Tim Peters <tim.peters@gmail.com>
parents:
22081
diff
changeset
|
42 * and 2*1000 + 11*10 + 1 = 2111 |
|
92a8a352e024
SF bug 621507: python22.dll incorrect "File version".
Tim Peters <tim.peters@gmail.com>
parents:
22081
diff
changeset
|
43 */ |
|
92a8a352e024
SF bug 621507: python22.dll incorrect "File version".
Tim Peters <tim.peters@gmail.com>
parents:
22081
diff
changeset
|
44 #define FIELD3 2111 |
|
92a8a352e024
SF bug 621507: python22.dll incorrect "File version".
Tim Peters <tim.peters@gmail.com>
parents:
22081
diff
changeset
|
45 |
|
16487
771dbb155575
SF bug #131225: sys.winver is still '2.0' in python 2.1a2.
Tim Peters <tim.peters@gmail.com>
parents:
15971
diff
changeset
|
46 /* e.g., 2.1a2 |
|
771dbb155575
SF bug #131225: sys.winver is still '2.0' in python 2.1a2.
Tim Peters <tim.peters@gmail.com>
parents:
15971
diff
changeset
|
47 * PY_VERSION comes from patchevel.h |
|
771dbb155575
SF bug #131225: sys.winver is still '2.0' in python 2.1a2.
Tim Peters <tim.peters@gmail.com>
parents:
15971
diff
changeset
|
48 */ |
|
771dbb155575
SF bug #131225: sys.winver is still '2.0' in python 2.1a2.
Tim Peters <tim.peters@gmail.com>
parents:
15971
diff
changeset
|
49 #define PYTHON_VERSION PY_VERSION "\0" |
|
771dbb155575
SF bug #131225: sys.winver is still '2.0' in python 2.1a2.
Tim Peters <tim.peters@gmail.com>
parents:
15971
diff
changeset
|
50 |
|
771dbb155575
SF bug #131225: sys.winver is still '2.0' in python 2.1a2.
Tim Peters <tim.peters@gmail.com>
parents:
15971
diff
changeset
|
51 /* 64-bit version number as comma-separated list of 4 16-bit ints */ |
|
771dbb155575
SF bug #131225: sys.winver is still '2.0' in python 2.1a2.
Tim Peters <tim.peters@gmail.com>
parents:
15971
diff
changeset
|
52 #if PY_MICRO_VERSION > 64 |
|
771dbb155575
SF bug #131225: sys.winver is still '2.0' in python 2.1a2.
Tim Peters <tim.peters@gmail.com>
parents:
15971
diff
changeset
|
53 # error "PY_MICRO_VERSION > 64" |
|
771dbb155575
SF bug #131225: sys.winver is still '2.0' in python 2.1a2.
Tim Peters <tim.peters@gmail.com>
parents:
15971
diff
changeset
|
54 #endif |
|
771dbb155575
SF bug #131225: sys.winver is still '2.0' in python 2.1a2.
Tim Peters <tim.peters@gmail.com>
parents:
15971
diff
changeset
|
55 #if PY_RELEASE_LEVEL > 99 |
|
771dbb155575
SF bug #131225: sys.winver is still '2.0' in python 2.1a2.
Tim Peters <tim.peters@gmail.com>
parents:
15971
diff
changeset
|
56 # error "PY_RELEASE_LEVEL > 99" |
|
771dbb155575
SF bug #131225: sys.winver is still '2.0' in python 2.1a2.
Tim Peters <tim.peters@gmail.com>
parents:
15971
diff
changeset
|
57 #endif |
|
771dbb155575
SF bug #131225: sys.winver is still '2.0' in python 2.1a2.
Tim Peters <tim.peters@gmail.com>
parents:
15971
diff
changeset
|
58 #if PY_RELEASE_SERIAL > 9 |
|
771dbb155575
SF bug #131225: sys.winver is still '2.0' in python 2.1a2.
Tim Peters <tim.peters@gmail.com>
parents:
15971
diff
changeset
|
59 # error "PY_RELEASE_SERIAL > 9" |
|
771dbb155575
SF bug #131225: sys.winver is still '2.0' in python 2.1a2.
Tim Peters <tim.peters@gmail.com>
parents:
15971
diff
changeset
|
60 #endif |
|
771dbb155575
SF bug #131225: sys.winver is still '2.0' in python 2.1a2.
Tim Peters <tim.peters@gmail.com>
parents:
15971
diff
changeset
|
61 #define PYVERSION64 PY_MAJOR_VERSION, PY_MINOR_VERSION, FIELD3, PYTHON_API_VERSION |
|
771dbb155575
SF bug #131225: sys.winver is still '2.0' in python 2.1a2.
Tim Peters <tim.peters@gmail.com>
parents:
15971
diff
changeset
|
62 |
|
6353
666accd66878
Bump version and store DLL version in a string variable (for branding).
Guido van Rossum <guido@python.org>
parents:
4127
diff
changeset
|
63 // String Tables |
|
666accd66878
Bump version and store DLL version in a string variable (for branding).
Guido van Rossum <guido@python.org>
parents:
4127
diff
changeset
|
64 STRINGTABLE DISCARDABLE |
|
666accd66878
Bump version and store DLL version in a string variable (for branding).
Guido van Rossum <guido@python.org>
parents:
4127
diff
changeset
|
65 BEGIN |
|
16487
771dbb155575
SF bug #131225: sys.winver is still '2.0' in python 2.1a2.
Tim Peters <tim.peters@gmail.com>
parents:
15971
diff
changeset
|
66 1000, MS_DLL_ID |
|
6353
666accd66878
Bump version and store DLL version in a string variable (for branding).
Guido van Rossum <guido@python.org>
parents:
4127
diff
changeset
|
67 END |
|
666accd66878
Bump version and store DLL version in a string variable (for branding).
Guido van Rossum <guido@python.org>
parents:
4127
diff
changeset
|
68 |
|
4123
71b43d4b7cd0
Added dllbase_nt.txt and python_nt.rc;
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
69 ///////////////////////////////////////////////////////////////////////////// |
|
71b43d4b7cd0
Added dllbase_nt.txt and python_nt.rc;
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
70 // |
|
71b43d4b7cd0
Added dllbase_nt.txt and python_nt.rc;
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
71 // Version |
|
71b43d4b7cd0
Added dllbase_nt.txt and python_nt.rc;
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
72 // |
|
71b43d4b7cd0
Added dllbase_nt.txt and python_nt.rc;
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
73 |
|
71b43d4b7cd0
Added dllbase_nt.txt and python_nt.rc;
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
74 VS_VERSION_INFO VERSIONINFO |
|
16487
771dbb155575
SF bug #131225: sys.winver is still '2.0' in python 2.1a2.
Tim Peters <tim.peters@gmail.com>
parents:
15971
diff
changeset
|
75 FILEVERSION PYVERSION64 |
|
771dbb155575
SF bug #131225: sys.winver is still '2.0' in python 2.1a2.
Tim Peters <tim.peters@gmail.com>
parents:
15971
diff
changeset
|
76 PRODUCTVERSION PYVERSION64 |
|
4123
71b43d4b7cd0
Added dllbase_nt.txt and python_nt.rc;
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
77 FILEFLAGSMASK 0x3fL |
|
71b43d4b7cd0
Added dllbase_nt.txt and python_nt.rc;
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
78 #ifdef _DEBUG |
|
71b43d4b7cd0
Added dllbase_nt.txt and python_nt.rc;
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
79 FILEFLAGS 0x1L |
|
71b43d4b7cd0
Added dllbase_nt.txt and python_nt.rc;
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
80 #else |
|
71b43d4b7cd0
Added dllbase_nt.txt and python_nt.rc;
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
81 FILEFLAGS 0x0L |
|
71b43d4b7cd0
Added dllbase_nt.txt and python_nt.rc;
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
82 #endif |
|
71b43d4b7cd0
Added dllbase_nt.txt and python_nt.rc;
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
83 FILEOS 0x40004L |
|
71b43d4b7cd0
Added dllbase_nt.txt and python_nt.rc;
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
84 FILETYPE 0x1L |
|
71b43d4b7cd0
Added dllbase_nt.txt and python_nt.rc;
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
85 FILESUBTYPE 0x0L |
|
71b43d4b7cd0
Added dllbase_nt.txt and python_nt.rc;
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
86 BEGIN |
|
71b43d4b7cd0
Added dllbase_nt.txt and python_nt.rc;
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
87 BLOCK "StringFileInfo" |
|
71b43d4b7cd0
Added dllbase_nt.txt and python_nt.rc;
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
88 BEGIN |
|
71b43d4b7cd0
Added dllbase_nt.txt and python_nt.rc;
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
89 BLOCK "000004b0" |
|
71b43d4b7cd0
Added dllbase_nt.txt and python_nt.rc;
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
90 BEGIN |
|
19375
fd119899045c
Windows fiddling for 2.2a2: bump build number; update copyright and
Tim Peters <tim.peters@gmail.com>
parents:
17588
diff
changeset
|
91 VALUE "CompanyName", "PythonLabs at Zope Corporation\0" |
|
4123
71b43d4b7cd0
Added dllbase_nt.txt and python_nt.rc;
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
92 VALUE "FileDescription", "Python Core\0" |
|
71b43d4b7cd0
Added dllbase_nt.txt and python_nt.rc;
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
93 VALUE "FileVersion", PYTHON_VERSION |
|
71b43d4b7cd0
Added dllbase_nt.txt and python_nt.rc;
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
94 VALUE "InternalName", "Python DLL\0" |
|
22081
6072fa410dcc
Assorted Windows buildno, copyright and version number changes for 2.2.1a1.
Tim Peters <tim.peters@gmail.com>
parents:
19375
diff
changeset
|
95 VALUE "LegalCopyright", "Copyright © 2001-2002 Python Software Foundation. Copyright © 2000 BeOpen.com. Copyright © 1995-2001 CNRI. Copyright © 1991-1995 SMC.\0" |
|
4123
71b43d4b7cd0
Added dllbase_nt.txt and python_nt.rc;
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
96 VALUE "OriginalFilename", PYTHON_DLL_NAME "\0" |
|
71b43d4b7cd0
Added dllbase_nt.txt and python_nt.rc;
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
97 VALUE "ProductName", "Python\0" |
|
71b43d4b7cd0
Added dllbase_nt.txt and python_nt.rc;
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
98 VALUE "ProductVersion", PYTHON_VERSION |
|
71b43d4b7cd0
Added dllbase_nt.txt and python_nt.rc;
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
99 END |
|
71b43d4b7cd0
Added dllbase_nt.txt and python_nt.rc;
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
100 END |
|
71b43d4b7cd0
Added dllbase_nt.txt and python_nt.rc;
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
101 BLOCK "VarFileInfo" |
|
71b43d4b7cd0
Added dllbase_nt.txt and python_nt.rc;
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
102 BEGIN |
|
71b43d4b7cd0
Added dllbase_nt.txt and python_nt.rc;
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
103 VALUE "Translation", 0x0, 1200 |
|
71b43d4b7cd0
Added dllbase_nt.txt and python_nt.rc;
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
104 END |
|
71b43d4b7cd0
Added dllbase_nt.txt and python_nt.rc;
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
105 END |
