summaryrefslogtreecommitdiffstats
path: root/PCbuild
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2020-06-23 19:27:30 (GMT)
committerGitHub <noreply@github.com>2020-06-23 19:27:30 (GMT)
commitcebd43fbfd25a80404728f73edc301f9558d9410 (patch)
treede4b8d7f977bfcd30ef97682d7a60c0f1c204ffc /PCbuild
parent92f8b480bab408be09bc1631cf2e0e5a4641b731 (diff)
downloadcpython-cebd43fbfd25a80404728f73edc301f9558d9410.zip
cpython-cebd43fbfd25a80404728f73edc301f9558d9410.tar.gz
cpython-cebd43fbfd25a80404728f73edc301f9558d9410.tar.bz2
bpo-41054: Simplify resource compilation on Windows (GH-21004)
Remove auto-generated resource header. Pass definitions required by resource files (ORIGINAL_FILENAME and FIELD3) directly to resource compiler. Remove unused MS_DLL_ID resource string and related dead code. (cherry picked from commit 4efc3360c9a83d5891f27ed67b4f0ab7275d2ab4) Co-authored-by: Nikita Nemkin <nikita@nemkin.ru>
Diffstat (limited to 'PCbuild')
-rw-r--r--PCbuild/pyproject.props17
1 files changed, 1 insertions, 16 deletions
diff --git a/PCbuild/pyproject.props b/PCbuild/pyproject.props
index bb918b2..94a01ff 100644
--- a/PCbuild/pyproject.props
+++ b/PCbuild/pyproject.props
@@ -80,7 +80,7 @@
</Lib>
<ResourceCompile>
<AdditionalIncludeDirectories>$(PySourcePath)PC;$(PySourcePath)Include;$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>$(_DebugPreprocessorDefinition)%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>ORIGINAL_FILENAME=\"$(TargetName)$(TargetExt)\";FIELD3=$(Field3Value);$(_DebugPreprocessorDefinition)%(PreprocessorDefinitions)</PreprocessorDefinitions>
<Culture>0x0409</Culture>
</ResourceCompile>
<Midl>
@@ -95,21 +95,6 @@
</Midl>
</ItemDefinitionGroup>
- <Target Name="GeneratePythonNtRcH"
- BeforeTargets="ClCompile"
- Inputs="$(PySourcePath)Include\patchlevel.h"
- Outputs="$(IntDir)pythonnt_rc.h">
- <WriteLinesToFile File="$(IntDir)pythonnt_rc.h" Overwrite="true" Encoding="ascii"
- Lines='/* This file created by pyproject.props /t:GeneratePythonNtRcH */
-#define FIELD3 $(Field3Value)
-#define MS_DLL_ID "$(SysWinVer)"
-#define PYTHON_DLL_NAME "$(TargetName)$(TargetExt)"
-' />
- <ItemGroup>
- <FileWrites Include="$(IntDir)pythonnt_rc.h" />
- </ItemGroup>
- </Target>
-
<UsingTask TaskName="KillPython" TaskFactory="CodeTaskFactory" AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.v4.0.dll">
<ParameterGroup>
<FileName Required="true" />