Guido van Rossum | cbc6676 | 1996-08-23 15:48:14 +0000 | [diff] [blame] | 1 | // Resource script for Python core DLL. |
| 2 | // Currently only holds version information. |
| 3 | // |
Guido van Rossum | cbc6676 | 1996-08-23 15:48:14 +0000 | [diff] [blame] | 4 | #include "winver.h" |
| 5 | |
| 6 | #define MS_WINDOWS |
| 7 | #include "modsupport.h" |
| 8 | #include "patchlevel.h" |
| 9 | |
Tim Peters | 909bc1c | 2001-02-09 07:02:22 +0000 | [diff] [blame] | 10 | /* Across releases, change: |
| 11 | * MS_DLL_ID if the minor version number changes. |
| 12 | * PYTHON_DLL_NAME ditto. |
Tim Peters | b2a22f4 | 2001-03-11 04:30:35 +0000 | [diff] [blame] | 13 | * MS_DLL_ID must match PY_VERSION in the Windows install script. |
Tim Peters | 909bc1c | 2001-02-09 07:02:22 +0000 | [diff] [blame] | 14 | */ |
Tim Peters | 83a3f0c | 2001-12-21 22:06:12 +0000 | [diff] [blame] | 15 | #define MS_DLL_ID "2.3" |
Guido van Rossum | cbc6676 | 1996-08-23 15:48:14 +0000 | [diff] [blame] | 16 | |
Guido van Rossum | 3db4103 | 1996-08-23 18:42:39 +0000 | [diff] [blame] | 17 | #ifndef PYTHON_DLL_NAME |
Tim Peters | ce2f663 | 2002-10-11 17:51:44 +0000 | [diff] [blame] | 18 | #define PYTHON_DLL_NAME "python23.dll" |
Guido van Rossum | 3db4103 | 1996-08-23 18:42:39 +0000 | [diff] [blame] | 19 | #endif |
| 20 | |
Tim Peters | 909bc1c | 2001-02-09 07:02:22 +0000 | [diff] [blame] | 21 | /* Nothing below this should need to be changed except for copyright |
Tim Peters | c78462f | 2002-10-11 18:25:52 +0000 | [diff] [blame] | 22 | * notices, company name, and FIELD3. Unfortunately, all attempts |
| 23 | * to get the resource compiler to do arithmetic in macros have |
| 24 | * failed miserably -- it gives syntax errors, ignores operators, |
| 25 | * or does stuff that's simply bizarre. |
Tim Peters | 909bc1c | 2001-02-09 07:02:22 +0000 | [diff] [blame] | 26 | */ |
| 27 | |
Tim Peters | c78462f | 2002-10-11 18:25:52 +0000 | [diff] [blame] | 28 | |
| 29 | /* This is what we'd like FIELD3 to be: |
| 30 | * |
| 31 | * #define FIELD3 (PY_MICRO_VERSION*1000 + PY_RELEASE_LEVEL*10 + PY_RELEASE_SERIAL) |
| 32 | * |
| 33 | * but that neither gives an error nor comes anywhere close to working. The |
| 34 | * following comment and #define are output from PCbuild\field3.py: |
| 35 | * |
Tim Peters | 1441cf9 | 2003-02-18 21:58:53 +0000 | [diff] [blame] | 36 | * For 2.3a2, |
Tim Peters | c78462f | 2002-10-11 18:25:52 +0000 | [diff] [blame] | 37 | * PY_MICRO_VERSION = 0 |
| 38 | * PY_RELEASE_LEVEL = 'alpha' = 0xa |
Tim Peters | 1441cf9 | 2003-02-18 21:58:53 +0000 | [diff] [blame] | 39 | * PY_RELEASE_SERIAL = 2 |
Tim Peters | c78462f | 2002-10-11 18:25:52 +0000 | [diff] [blame] | 40 | * |
Tim Peters | 1441cf9 | 2003-02-18 21:58:53 +0000 | [diff] [blame] | 41 | * and 0*1000 + 10*10 + 2 = 102 |
Tim Peters | c78462f | 2002-10-11 18:25:52 +0000 | [diff] [blame] | 42 | */ |
Tim Peters | 1441cf9 | 2003-02-18 21:58:53 +0000 | [diff] [blame] | 43 | #define FIELD3 102 |
Tim Peters | c78462f | 2002-10-11 18:25:52 +0000 | [diff] [blame] | 44 | |
Tim Peters | 909bc1c | 2001-02-09 07:02:22 +0000 | [diff] [blame] | 45 | /* e.g., 2.1a2 |
| 46 | * PY_VERSION comes from patchevel.h |
| 47 | */ |
| 48 | #define PYTHON_VERSION PY_VERSION "\0" |
| 49 | |
| 50 | /* 64-bit version number as comma-separated list of 4 16-bit ints */ |
| 51 | #if PY_MICRO_VERSION > 64 |
| 52 | # error "PY_MICRO_VERSION > 64" |
| 53 | #endif |
| 54 | #if PY_RELEASE_LEVEL > 99 |
| 55 | # error "PY_RELEASE_LEVEL > 99" |
| 56 | #endif |
| 57 | #if PY_RELEASE_SERIAL > 9 |
| 58 | # error "PY_RELEASE_SERIAL > 9" |
| 59 | #endif |
Tim Peters | 909bc1c | 2001-02-09 07:02:22 +0000 | [diff] [blame] | 60 | #define PYVERSION64 PY_MAJOR_VERSION, PY_MINOR_VERSION, FIELD3, PYTHON_API_VERSION |
| 61 | |
Guido van Rossum | ff8c9da | 1997-09-29 23:36:17 +0000 | [diff] [blame] | 62 | // String Tables |
| 63 | STRINGTABLE DISCARDABLE |
| 64 | BEGIN |
Tim Peters | 909bc1c | 2001-02-09 07:02:22 +0000 | [diff] [blame] | 65 | 1000, MS_DLL_ID |
Guido van Rossum | ff8c9da | 1997-09-29 23:36:17 +0000 | [diff] [blame] | 66 | END |
| 67 | |
Guido van Rossum | cbc6676 | 1996-08-23 15:48:14 +0000 | [diff] [blame] | 68 | ///////////////////////////////////////////////////////////////////////////// |
| 69 | // |
| 70 | // Version |
| 71 | // |
| 72 | |
| 73 | VS_VERSION_INFO VERSIONINFO |
Tim Peters | 909bc1c | 2001-02-09 07:02:22 +0000 | [diff] [blame] | 74 | FILEVERSION PYVERSION64 |
| 75 | PRODUCTVERSION PYVERSION64 |
Guido van Rossum | cbc6676 | 1996-08-23 15:48:14 +0000 | [diff] [blame] | 76 | FILEFLAGSMASK 0x3fL |
| 77 | #ifdef _DEBUG |
| 78 | FILEFLAGS 0x1L |
| 79 | #else |
| 80 | FILEFLAGS 0x0L |
| 81 | #endif |
| 82 | FILEOS 0x40004L |
| 83 | FILETYPE 0x1L |
| 84 | FILESUBTYPE 0x0L |
| 85 | BEGIN |
| 86 | BLOCK "StringFileInfo" |
| 87 | BEGIN |
| 88 | BLOCK "000004b0" |
| 89 | BEGIN |
Tim Peters | a6b9e3c | 2001-08-19 00:56:28 +0000 | [diff] [blame] | 90 | VALUE "CompanyName", "PythonLabs at Zope Corporation\0" |
Guido van Rossum | cbc6676 | 1996-08-23 15:48:14 +0000 | [diff] [blame] | 91 | VALUE "FileDescription", "Python Core\0" |
| 92 | VALUE "FileVersion", PYTHON_VERSION |
| 93 | VALUE "InternalName", "Python DLL\0" |
Tim Peters | 9c2fbb5 | 2003-01-02 17:09:19 +0000 | [diff] [blame] | 94 | VALUE "LegalCopyright", "Copyright © 2001-2003 Python Software Foundation. Copyright © 2000 BeOpen.com. Copyright © 1995-2001 CNRI. Copyright © 1991-1995 SMC.\0" |
Guido van Rossum | cbc6676 | 1996-08-23 15:48:14 +0000 | [diff] [blame] | 95 | VALUE "OriginalFilename", PYTHON_DLL_NAME "\0" |
Guido van Rossum | cbc6676 | 1996-08-23 15:48:14 +0000 | [diff] [blame] | 96 | VALUE "ProductName", "Python\0" |
| 97 | VALUE "ProductVersion", PYTHON_VERSION |
| 98 | END |
| 99 | END |
| 100 | BLOCK "VarFileInfo" |
| 101 | BEGIN |
| 102 | VALUE "Translation", 0x0, 1200 |
| 103 | END |
| 104 | END |