[Python-checkins] bpo-45220: Ensure RT_MANIFEST is defined when compiling Windows resource files (GH-29501)

zooba webhook-mailer at python.org
Tue Nov 9 15:13:02 EST 2021


https://github.com/python/cpython/commit/a56fbad85ea655631bce68d4c0f47f1a8b500abd
commit: a56fbad85ea655631bce68d4c0f47f1a8b500abd
branch: main
author: Steve Dower <steve.dower at python.org>
committer: zooba <steve.dower at microsoft.com>
date: 2021-11-09T20:12:53Z
summary:

bpo-45220: Ensure RT_MANIFEST is defined when compiling Windows resource files (GH-29501)

files:
M PC/pylauncher.rc
M PC/pyshellext.rc
M PC/python_exe.rc
M PC/python_nt.rc
M PC/pythonw_exe.rc
M PC/sqlite3.rc

diff --git a/PC/pylauncher.rc b/PC/pylauncher.rc
index d21f9b6e9d2ab..ff7e71e0fdb4e 100644
--- a/PC/pylauncher.rc
+++ b/PC/pylauncher.rc
@@ -2,6 +2,11 @@
 
 #include "python_ver_rc.h"
 
+#ifndef RT_MANIFEST
+// bpo-45220: Cannot reliably #include RT_MANIFEST from
+// anywhere, so we hardcode it
+#define RT_MANIFEST 24
+#endif
 // Include the manifest file that indicates we support all
 // current versions of Windows.
 1 RT_MANIFEST "python.manifest"
diff --git a/PC/pyshellext.rc b/PC/pyshellext.rc
index fc607e97840fb..af797ce95d507 100644
--- a/PC/pyshellext.rc
+++ b/PC/pyshellext.rc
@@ -2,6 +2,12 @@
 
 #include "python_ver_rc.h"
 
+#ifndef RT_MANIFEST
+// bpo-45220: Cannot reliably #include RT_MANIFEST from
+// anywhere, so we hardcode it
+#define RT_MANIFEST 24
+#endif
+
 // Include the manifest file that indicates we support all
 // current versions of Windows.
 1 RT_MANIFEST "python.manifest"
diff --git a/PC/python_exe.rc b/PC/python_exe.rc
index 5eba89962b475..c3d3bff019895 100644
--- a/PC/python_exe.rc
+++ b/PC/python_exe.rc
@@ -2,6 +2,12 @@
 
 #include "python_ver_rc.h"
 
+#ifndef RT_MANIFEST
+// bpo-45220: Cannot reliably #include RT_MANIFEST from
+// anywhere, so we hardcode it
+#define RT_MANIFEST 24
+#endif
+
 // Include the manifest file that indicates we support all
 // current versions of Windows.
 1 RT_MANIFEST "python.manifest"
diff --git a/PC/python_nt.rc b/PC/python_nt.rc
index 6fd872c1a03cc..ae64fbd217af7 100644
--- a/PC/python_nt.rc
+++ b/PC/python_nt.rc
@@ -2,6 +2,12 @@
 
 #include "python_ver_rc.h"
 
+#ifndef RT_MANIFEST
+// bpo-45220: Cannot reliably #include RT_MANIFEST from
+// anywhere, so we hardcode it
+#define RT_MANIFEST 24
+#endif
+
 // Include the manifest file that indicates we support all
 // current versions of Windows.
 2 RT_MANIFEST "python.manifest"
diff --git a/PC/pythonw_exe.rc b/PC/pythonw_exe.rc
index 562652be18471..38570b74fa3e0 100644
--- a/PC/pythonw_exe.rc
+++ b/PC/pythonw_exe.rc
@@ -2,6 +2,12 @@
 
 #include "python_ver_rc.h"
 
+#ifndef RT_MANIFEST
+// bpo-45220: Cannot reliably #include RT_MANIFEST from
+// anywhere, so we hardcode it
+#define RT_MANIFEST 24
+#endif
+
 // Include the manifest file that indicates we support all
 // current versions of Windows.
 1 RT_MANIFEST "python.manifest"
diff --git a/PC/sqlite3.rc b/PC/sqlite3.rc
index d2c18f8add8b2..9ae2aa0f6f2f2 100644
--- a/PC/sqlite3.rc
+++ b/PC/sqlite3.rc
@@ -2,6 +2,12 @@
 
 #include <winver.h>
 
+#ifndef RT_MANIFEST
+// bpo-45220: Cannot reliably #include RT_MANIFEST from
+// anywhere, so we hardcode it
+#define RT_MANIFEST 24
+#endif
+
 // Include the manifest file that indicates we support all
 // current versions of Windows.
 2 RT_MANIFEST "python.manifest"



More information about the Python-checkins mailing list