Skip to content

Commit 9a56153

Browse files
committed
Update PCbuild/pcbuild.proj
Fix also dependencies.
1 parent cd00cdb commit 9a56153

4 files changed

Lines changed: 32 additions & 31 deletions

File tree

‎PCbuild/_freeze_module.vcxproj‎

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -466,6 +466,34 @@
466466
<Message Text="Updated files: @(_UpdatedGetPath->'%(Filename)%(Extension)',', ')"
467467
Condition="'@(_UpdatedGetPath)' != ''" Importance="high" />
468468
</Target>
469+
<Target Name="_GetBuildInfoHeader" BeforeTargets="PrepareForBuild"
470+
Inputs="" Outputs="Modules\getbuildinfo.h"
471+
DependsOnTargets="FindPythonForBuild">
472+
<PropertyGroup>
473+
<GIT Condition="$(GIT) == ''">git</GIT>
474+
<_GIT>$(GIT)</_GIT>
475+
<_GIT Condition="$(GIT.Contains(` `))">"$(GIT)"</_GIT>
476+
</PropertyGroup>
477+
<Message Text="Getting build info from $(_GIT)" Importance="high" />
478+
<MakeDir Directories="$(IntDir)" Condition="!Exists($(IntDir))" />
479+
<Exec Command="$(_GIT) name-rev --name-only HEAD &gt; &quot;$(IntDir)gitbranch.txt&quot;" ContinueOnError="true" />
480+
<Exec Command="$(_GIT) rev-parse --short HEAD &gt; &quot;$(IntDir)gitversion.txt&quot;" ContinueOnError="true" />
481+
<Exec Command="$(_GIT) describe --all --always --dirty &gt; &quot;$(IntDir)gittag.txt&quot;" ContinueOnError="true" />
482+
<Exec Command='"$(GetCompilerExe)" &gt; &quot;$(IntDir)compiler.txt&quot;' ContinueOnError="true" />
483+
<PropertyGroup>
484+
<GitBranch Condition="Exists('$(IntDir)gitbranch.txt')">$([System.IO.File]::ReadAllText('$(IntDir)gitbranch.txt').Trim())</GitBranch>
485+
<GitVersion Condition="Exists('$(IntDir)gitversion.txt')">$([System.IO.File]::ReadAllText('$(IntDir)gitversion.txt').Trim())</GitVersion>
486+
<GitTag Condition="Exists('$(IntDir)gittag.txt')">$([System.IO.File]::ReadAllText('$(IntDir)gittag.txt').Trim())</GitTag>
487+
<Compiler Condition="Exists('$(IntDir)compiler.txt')">$([System.IO.File]::ReadAllText('$(IntDir)compiler.txt').Trim())</Compiler>
488+
489+
<GilEnabled Condition="$(DisableGil) == 'true'">0</GilEnabled>
490+
<GilEnabled Condition="$(DisableGil) != 'true'">1</GilEnabled>
491+
</PropertyGroup>
492+
493+
<Message Text="Run generate_getbuildinfo.py" Importance="high" />
494+
<Exec Command='$(PythonForBuild) Tools/build/generate_getbuildinfo.py Modules\getbuildinfo.h win32 $(GitVersion) $(GitTag) $(GitBranch) "$(Compiler)" $(GilEnabled)'
495+
WorkingDirectory="$(PySourcePath)" />
496+
</Target>
469497
<Target Name="_RebuildFrozen" AfterTargets="AfterBuild" Condition="$(Configuration) != 'PGUpdate'">
470498
<Exec Command='"$(TargetPath)" "%(None.ModName)" "%(None.FullPath)" "%(None.IntFile)"' />
471499

‎PCbuild/pcbuild.proj‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@
8787
</Projects>
8888

8989
<!-- _freeze_module -->
90-
<FreezeProjects Include="_freeze_module.vcxproj" />
90+
<FreezeProjects Include="_getcompiler.vcxproj;_freeze_module.vcxproj" />
9191
<!-- python[w].exe -->
9292
<Projects2 Include="python.vcxproj;pythonw.vcxproj" />
9393
<Projects2 Include="python_uwp.vcxproj;pythonw_uwp.vcxproj" Condition="$(IncludeUwp)" />

‎PCbuild/pcbuild.sln‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,9 @@ EndProject
113113
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_testbuffer", "_testbuffer.vcxproj", "{A2697BD3-28C1-4AEC-9106-8B748639FD16}"
114114
EndProject
115115
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_freeze_module", "_freeze_module.vcxproj", "{19C0C13F-47CA-4432-AFF3-799A296A4DDC}"
116+
ProjectSection(ProjectDependencies) = postProject
117+
{E762E8EE-5316-4D66-9529-7074F3B6E74A} = {E762E8EE-5316-4D66-9529-7074F3B6E74A}
118+
EndProjectSection
116119
EndProject
117120
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_overlapped", "_overlapped.vcxproj", "{EB6E69DD-04BF-4543-9B92-49FAABCEAC2E}"
118121
EndProject

‎PCbuild/pythoncore.vcxproj‎

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -731,36 +731,6 @@
731731
</ImportGroup>
732732
<Target Name="_TriggerRegen" BeforeTargets="PrepareForBuild" DependsOnTargets="Regen" />
733733

734-
<Target Name="_GetBuildInfoHeader"
735-
Inputs="" Outputs="Modules\getbuildinfo.h"
736-
DependsOnTargets="FindPythonForBuild"
737-
BeforeTargets="PrepareForBuild">
738-
<PropertyGroup>
739-
<GIT Condition="$(GIT) == ''">git</GIT>
740-
<_GIT>$(GIT)</_GIT>
741-
<_GIT Condition="$(GIT.Contains(` `))">"$(GIT)"</_GIT>
742-
</PropertyGroup>
743-
<Message Text="Getting build info from $(_GIT)" Importance="high" />
744-
<MakeDir Directories="$(IntDir)" Condition="!Exists($(IntDir))" />
745-
<Exec Command="$(_GIT) name-rev --name-only HEAD &gt; &quot;$(IntDir)gitbranch.txt&quot;" ContinueOnError="true" />
746-
<Exec Command="$(_GIT) rev-parse --short HEAD &gt; &quot;$(IntDir)gitversion.txt&quot;" ContinueOnError="true" />
747-
<Exec Command="$(_GIT) describe --all --always --dirty &gt; &quot;$(IntDir)gittag.txt&quot;" ContinueOnError="true" />
748-
<Exec Command='"$(GetCompilerExe)" &gt; &quot;$(IntDir)compiler.txt&quot;' ContinueOnError="true" />
749-
<PropertyGroup>
750-
<GitBranch Condition="Exists('$(IntDir)gitbranch.txt')">$([System.IO.File]::ReadAllText('$(IntDir)gitbranch.txt').Trim())</GitBranch>
751-
<GitVersion Condition="Exists('$(IntDir)gitversion.txt')">$([System.IO.File]::ReadAllText('$(IntDir)gitversion.txt').Trim())</GitVersion>
752-
<GitTag Condition="Exists('$(IntDir)gittag.txt')">$([System.IO.File]::ReadAllText('$(IntDir)gittag.txt').Trim())</GitTag>
753-
<Compiler Condition="Exists('$(IntDir)compiler.txt')">$([System.IO.File]::ReadAllText('$(IntDir)compiler.txt').Trim())</Compiler>
754-
755-
<GilEnabled Condition="$(DisableGil) == 'true'">0</GilEnabled>
756-
<GilEnabled Condition="$(DisableGil) != 'true'">1</GilEnabled>
757-
</PropertyGroup>
758-
759-
<Message Text="Run generate_getbuildinfo.py" Importance="high" />
760-
<Exec Command='$(PythonForBuild) Tools/build/generate_getbuildinfo.py Modules\getbuildinfo.h win32 $(GitVersion) $(GitTag) $(GitBranch) "$(Compiler)" $(GilEnabled)'
761-
WorkingDirectory="$(PySourcePath)" />
762-
</Target>
763-
764734
<Target Name="_WarnAboutToolset" BeforeTargets="PrepareForBuild" Condition="$(PlatformToolset) != 'v143' and $(PlatformToolset) != 'v145'">
765735
<Warning Text="Toolset $(PlatformToolset) is not used for official builds. Your build may have errors or incompatibilities." />
766736
</Target>

0 commit comments

Comments
 (0)