Skip to content

bpo-45220: Ensure RT_MANIFEST is defined when compiling Windows resource files #29501

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 9, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions PC/pylauncher.rc
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

#include "python_ver_rc.h"

#ifndef RT_MANIFEST
// bpo-45220: Cannot reliably #include RT_MANIFEST from
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The issue was with #include <winuser.h>, no?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does it matter? We no longer need to include any C++ headers here (you're not meant to include winuser.h directly anyway).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's just that I don't understand what #include RT_MANIFEST means. I guess that you mean that we cannot add an include to get the RT_MANIFEST constant. It's just a remark about the comment. You can ignore it ;-)

// 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"
Expand Down
6 changes: 6 additions & 0 deletions PC/pyshellext.rc
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
6 changes: 6 additions & 0 deletions PC/python_exe.rc
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
6 changes: 6 additions & 0 deletions PC/python_nt.rc
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
6 changes: 6 additions & 0 deletions PC/pythonw_exe.rc
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
6 changes: 6 additions & 0 deletions PC/sqlite3.rc
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down