comparison 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
comparison
equal deleted inserted replaced
25735:6d2138389667 25736:92a8a352e024
18 #ifndef PYTHON_DLL_NAME 18 #ifndef PYTHON_DLL_NAME
19 #define PYTHON_DLL_NAME "python22.dll" 19 #define PYTHON_DLL_NAME "python22.dll"
20 #endif 20 #endif
21 21
22 /* Nothing below this should need to be changed except for copyright 22 /* Nothing below this should need to be changed except for copyright
23 * notices and company name. 23 * notices, company name, and FIELD3. Unfortunately, all attempts
24 * to get the resource compiler to do arithmetic in macros have
25 * failed miserably -- it gives syntax errors, ignores operators,
26 * or does stuff that's simply bizarre.
24 */ 27 */
28
29
30 /* This is what we'd like FIELD3 to be:
31 *
32 * #define FIELD3 (PY_MICRO_VERSION*1000 + PY_RELEASE_LEVEL*10 + PY_RELEASE_SERIAL)
33 *
34 * but that neither gives an error nor comes anywhere close to working. The
35 * following comment and #define are output from PCbuild\field3.py:
36 *
37 * For 2.2.2b1,
38 * PY_MICRO_VERSION = 2
39 * PY_RELEASE_LEVEL = 'beta' = 0xb
40 * PY_RELEASE_SERIAL = 1
41 *
42 * and 2*1000 + 11*10 + 1 = 2111
43 */
44 #define FIELD3 2111
25 45
26 /* e.g., 2.1a2 46 /* e.g., 2.1a2
27 * PY_VERSION comes from patchevel.h 47 * PY_VERSION comes from patchevel.h
28 */ 48 */
29 #define PYTHON_VERSION PY_VERSION "\0" 49 #define PYTHON_VERSION PY_VERSION "\0"
36 # error "PY_RELEASE_LEVEL > 99" 56 # error "PY_RELEASE_LEVEL > 99"
37 #endif 57 #endif
38 #if PY_RELEASE_SERIAL > 9 58 #if PY_RELEASE_SERIAL > 9
39 # error "PY_RELEASE_SERIAL > 9" 59 # error "PY_RELEASE_SERIAL > 9"
40 #endif 60 #endif
41 #define FIELD3 (PY_MICRO_VERSION*1000 + PY_RELEASE_LEVEL*10 + PY_RELEASE_SERIAL)
42 #define PYVERSION64 PY_MAJOR_VERSION, PY_MINOR_VERSION, FIELD3, PYTHON_API_VERSION 61 #define PYVERSION64 PY_MAJOR_VERSION, PY_MINOR_VERSION, FIELD3, PYTHON_API_VERSION
43 62
44 // String Tables 63 // String Tables
45 STRINGTABLE DISCARDABLE 64 STRINGTABLE DISCARDABLE
46 BEGIN 65 BEGIN