Skip to content

Commit d29f591

Browse files
bpo-45220: Ensure RT_MANIFEST is defined when compiling Windows resource files (GH-29501)
(cherry picked from commit a56fbad) Co-authored-by: Steve Dower <[email protected]>
1 parent 340ecaf commit d29f591

File tree

6 files changed

+35
-0
lines changed

6 files changed

+35
-0
lines changed

PC/pylauncher.rc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22

33
#include "python_ver_rc.h"
44

5+
#ifndef RT_MANIFEST
6+
// bpo-45220: Cannot reliably #include RT_MANIFEST from
7+
// anywhere, so we hardcode it
8+
#define RT_MANIFEST 24
9+
#endif
510
// Include the manifest file that indicates we support all
611
// current versions of Windows.
712
1 RT_MANIFEST "python.manifest"

PC/pyshellext.rc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22

33
#include "python_ver_rc.h"
44

5+
#ifndef RT_MANIFEST
6+
// bpo-45220: Cannot reliably #include RT_MANIFEST from
7+
// anywhere, so we hardcode it
8+
#define RT_MANIFEST 24
9+
#endif
10+
511
// Include the manifest file that indicates we support all
612
// current versions of Windows.
713
1 RT_MANIFEST "python.manifest"

PC/python_exe.rc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22

33
#include "python_ver_rc.h"
44

5+
#ifndef RT_MANIFEST
6+
// bpo-45220: Cannot reliably #include RT_MANIFEST from
7+
// anywhere, so we hardcode it
8+
#define RT_MANIFEST 24
9+
#endif
10+
511
// Include the manifest file that indicates we support all
612
// current versions of Windows.
713
1 RT_MANIFEST "python.manifest"

PC/python_nt.rc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22

33
#include "python_ver_rc.h"
44

5+
#ifndef RT_MANIFEST
6+
// bpo-45220: Cannot reliably #include RT_MANIFEST from
7+
// anywhere, so we hardcode it
8+
#define RT_MANIFEST 24
9+
#endif
10+
511
// Include the manifest file that indicates we support all
612
// current versions of Windows.
713
2 RT_MANIFEST "python.manifest"

PC/pythonw_exe.rc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22

33
#include "python_ver_rc.h"
44

5+
#ifndef RT_MANIFEST
6+
// bpo-45220: Cannot reliably #include RT_MANIFEST from
7+
// anywhere, so we hardcode it
8+
#define RT_MANIFEST 24
9+
#endif
10+
511
// Include the manifest file that indicates we support all
612
// current versions of Windows.
713
1 RT_MANIFEST "python.manifest"

PC/sqlite3.rc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22

33
#include <winver.h>
44

5+
#ifndef RT_MANIFEST
6+
// bpo-45220: Cannot reliably #include RT_MANIFEST from
7+
// anywhere, so we hardcode it
8+
#define RT_MANIFEST 24
9+
#endif
10+
511
// Include the manifest file that indicates we support all
612
// current versions of Windows.
713
2 RT_MANIFEST "python.manifest"

0 commit comments

Comments
 (0)