]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Backport from the trunk.
authorThomas Heller <theller@ctypes.org>
Wed, 22 Oct 2003 19:38:10 +0000 (19:38 +0000)
committerThomas Heller <theller@ctypes.org>
Wed, 22 Oct 2003 19:38:10 +0000 (19:38 +0000)
To build on windows, the manual editing of the python_nt.rc file to
change the version number is no longer required.

Instead, a make_versioninfo.exe is compiled, which spits out an
include file for python_nt.rc.

PC/python_nt.rc
PCbuild/pcbuild.dsw

index 52d5924e3dcbd6c38e1c1f7b216b3dce59acc14e..3cdc93c0193be2940423642d50d2b46021918022 100644 (file)
@@ -6,42 +6,12 @@
 #define MS_WINDOWS
 #include "modsupport.h"
 #include "patchlevel.h"
-
-/* Across releases, change:
- *    MS_DLL_ID if the minor version number changes.
- *    PYTHON_DLL_NAME ditto.
- * MS_DLL_ID must match PY_VERSION in the Windows install script.
- */
-#define MS_DLL_ID "2.3"
-
-#ifndef PYTHON_DLL_NAME
-#define PYTHON_DLL_NAME "python23.dll"
+#ifdef _DEBUG
+#   include "pythonnt_rc_d.h"
+#else
+#   include "pythonnt_rc.h"
 #endif
 
-/* Nothing below this should need to be changed except for copyright
- * notices, company name, and FIELD3.  Unfortunately, all attempts
- * to get the resource compiler to do arithmetic in macros have
- * failed miserably -- it gives syntax errors, ignores operators,
- * or does stuff that's simply bizarre.
- */
-
-
-/* This is what we'd like FIELD3 to be:
- *
- * #define FIELD3 (PY_MICRO_VERSION*1000 + PY_RELEASE_LEVEL*10 + PY_RELEASE_SERIAL)
- *
- * but that neither gives an error nor comes anywhere close to working.  The
- * following comment and #define are output from PCbuild\field3.py:
- *
- * For 2.3.2,
- * PY_MICRO_VERSION = 2
- * PY_RELEASE_LEVEL = 'final' = 0xf
- * PY_RELEASE_SERIAL = 0
- *
- * and 2*1000 + 15*10 + 0 = 2150
- */
-#define FIELD3 2150
-
 /* e.g., 2.1a2
  * PY_VERSION comes from patchevel.h
  */
index 55e3a23113cc16e16cb2a16c4867e4ba93686519..c9944df2017714e2be6879ba392ae4b6c15d554c 100644 (file)
@@ -159,6 +159,18 @@ Package=<4>
 \r
 ###############################################################################\r
 \r
+Project: "make_versioninfo"=.\make_versioninfo.dsp - Package Owner=<4>\r
+\r
+Package=<5>\r
+{{{\r
+}}}\r
+\r
+Package=<4>\r
+{{{\r
+}}}\r
+\r
+###############################################################################\r
+\r
 Project: "mmap"=.\mmap.dsp - Package Owner=<4>\r
 \r
 Package=<5>\r
@@ -227,6 +239,9 @@ Package=<5>
 \r
 Package=<4>\r
 {{{\r
+    Begin Project Dependency\r
+    Project_Dep_Name make_versioninfo\r
+    End Project Dependency\r
 }}}\r
 \r
 ###############################################################################\r