Skip to content

Commit

Permalink
freeze: fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
zeha committed Feb 16, 2024
1 parent 3e1f0b5 commit 158bbf0
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions MagPython/FreezeMagPython.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<Import Project="common.props" />
<PropertyGroup>
<TopDir>$(MSBuildProjectDirectory)\..\</TopDir>
<IntDir>$(MSBuildProjectDirectory)\$(Configuration)-Int\</IntDir>
<IntDir>$(MSBuildProjectDirectory)\$(Configuration)-Int-freeze\</IntDir>
<OutDir>$(MSBuildProjectDirectory)\$(Configuration)\</OutDir>
<PythonSourceDir>$(TopDir)\Python\</PythonSourceDir>
</PropertyGroup>
Expand Down Expand Up @@ -75,6 +75,18 @@
<SuppressStartupBanner>false</SuppressStartupBanner>
</Lib>
</ItemDefinitionGroup>
<Target Name="FindPythonForBuild" Condition="$(PythonForBuild) == ''">
<Exec Command="&quot;$(PySourcePath)\PCbuild\find_python.bat&quot; -q"
EchoOff="true"
ConsoleToMsBuild="true">
<Output TaskParameter="ConsoleOutput" ItemName="_CmdExeLines" />
</Exec>
<PropertyGroup>
<PythonForBuild>@(_CmdExeLines)</PythonForBuild>
</PropertyGroup>
<Error Text="Failed to locate suitable Python runtime for building from source." Condition="$(PythonForBuild)==''" />
<Message Text="Using PythonForBuild=$(PythonForBuild)" Importance="high" />
</Target>
<ItemGroup>
<ClCompile Include="$(PythonSourceDir)\Programs\_freeze_module.c" />
<ClCompile Include="$(PythonSourceDir)\PC\config_minimal.c" />
Expand Down Expand Up @@ -167,7 +179,6 @@
<ClCompile Include="$(PythonSourceDir)\Python\context.c" />
<ClCompile Include="$(PythonSourceDir)\Python\dtoa.c" />
<ClCompile Include="$(PythonSourceDir)\Python\dynamic_annotations.c" />
<ClCompile Include="$(PythonSourceDir)\Python\dynload_win.c" />
<ClCompile Include="$(PythonSourceDir)\Python\errors.c" />
<ClCompile Include="$(PythonSourceDir)\Python\fileutils.c" />
<ClCompile Include="$(PythonSourceDir)\Python\flowgraph.c" />
Expand Down

0 comments on commit 158bbf0

Please sign in to comment.