You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

141 lines
5.9 KiB

  1. <?xml version="1.0" encoding="utf-8"?>
  2. <Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  3. <ItemGroup Label="ProjectConfigurations">
  4. <ProjectConfiguration Include="Debug|Win32">
  5. <Configuration>Debug</Configuration>
  6. <Platform>Win32</Platform>
  7. </ProjectConfiguration>
  8. <ProjectConfiguration Include="Debug|x64">
  9. <Configuration>Debug</Configuration>
  10. <Platform>x64</Platform>
  11. </ProjectConfiguration>
  12. <ProjectConfiguration Include="PGInstrument|Win32">
  13. <Configuration>PGInstrument</Configuration>
  14. <Platform>Win32</Platform>
  15. </ProjectConfiguration>
  16. <ProjectConfiguration Include="PGInstrument|x64">
  17. <Configuration>PGInstrument</Configuration>
  18. <Platform>x64</Platform>
  19. </ProjectConfiguration>
  20. <ProjectConfiguration Include="PGUpdate|Win32">
  21. <Configuration>PGUpdate</Configuration>
  22. <Platform>Win32</Platform>
  23. </ProjectConfiguration>
  24. <ProjectConfiguration Include="PGUpdate|x64">
  25. <Configuration>PGUpdate</Configuration>
  26. <Platform>x64</Platform>
  27. </ProjectConfiguration>
  28. <ProjectConfiguration Include="Release|Win32">
  29. <Configuration>Release</Configuration>
  30. <Platform>Win32</Platform>
  31. </ProjectConfiguration>
  32. <ProjectConfiguration Include="Release|x64">
  33. <Configuration>Release</Configuration>
  34. <Platform>x64</Platform>
  35. </ProjectConfiguration>
  36. </ItemGroup>
  37. <PropertyGroup Label="Globals">
  38. <ProjectGuid>{885D4898-D08D-4091-9C40-C700CFE3FC5A}</ProjectGuid>
  39. <RootNamespace>python3dll</RootNamespace>
  40. <Keyword>Win32Proj</Keyword>
  41. <TargetName>python3</TargetName>
  42. <MakeVersionInfoBeforeTarget>ClCompile</MakeVersionInfoBeforeTarget>
  43. <SupportPGO>false</SupportPGO>
  44. </PropertyGroup>
  45. <Import Project="python.props" />
  46. <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
  47. <PropertyGroup Label="Configuration">
  48. <ConfigurationType>DynamicLibrary</ConfigurationType>
  49. </PropertyGroup>
  50. <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
  51. <ImportGroup Label="ExtensionSettings">
  52. </ImportGroup>
  53. <ImportGroup Label="PropertySheets">
  54. <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
  55. <Import Project="pyproject.props" />
  56. </ImportGroup>
  57. <PropertyGroup Label="UserMacros" />
  58. <PropertyGroup>
  59. <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
  60. <_Machine>X86</_Machine>
  61. <_Machine Condition="$(Platform) == 'x64'">X64</_Machine>
  62. </PropertyGroup>
  63. <ItemDefinitionGroup>
  64. <ClCompile>
  65. <BufferSecurityCheck>false</BufferSecurityCheck>
  66. </ClCompile>
  67. <Link>
  68. <AdditionalDependencies>$(OutDir)$(TargetName)stub.lib</AdditionalDependencies>
  69. <ModuleDefinitionFile Condition="$(Configuration) != 'Debug'">$(PySourcePath)PC\python3.def</ModuleDefinitionFile>
  70. <ModuleDefinitionFile Condition="$(Configuration) == 'Debug'">$(IntDir)python3_d.def</ModuleDefinitionFile>
  71. <EntryPointSymbol>DllMain</EntryPointSymbol>
  72. </Link>
  73. <PreLinkEvent>
  74. <Command>lib /nologo /def:"$(IntDir)python3stub.def" /out:"$(OutDir)$(TargetName)stub.lib" /MACHINE:$(_Machine)</Command>
  75. <Message>Rebuilding $(TargetName)stub.lib</Message>
  76. <Outputs>$(OutDir)$(TargetName)stub.lib</Outputs>
  77. </PreLinkEvent>
  78. </ItemDefinitionGroup>
  79. <ItemGroup>
  80. <None Include="..\PC\python3.def" />
  81. </ItemGroup>
  82. <ItemGroup>
  83. <ClCompile Include="..\PC\python3dll.c" />
  84. </ItemGroup>
  85. <ItemGroup>
  86. <ResourceCompile Include="..\PC\python_nt.rc" />
  87. </ItemGroup>
  88. <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
  89. <ImportGroup Label="ExtensionTargets">
  90. </ImportGroup>
  91. <Target Name="BuildPython3_dDef" BeforeTargets="BuildStubDef" Inputs="..\PC\python3.def" Outputs="$(IntDir)python3_d.def" Condition="$(Configuration) == 'Debug'">
  92. <ItemGroup>
  93. <_DefLines Remove="@(_DefLines)" />
  94. <_Lines Remove="@(_Lines)" />
  95. </ItemGroup>
  96. <ReadLinesFromFile File="..\PC\python3.def">
  97. <Output TaskParameter="Lines" ItemName="_DefLines" />
  98. </ReadLinesFromFile>
  99. <PropertyGroup>
  100. <_Pattern1>(=python$(MajorVersionNumber)$(MinorVersionNumber))\.</_Pattern1>
  101. <_Sub1>$1_d.</_Sub1>
  102. <_Pattern2>"python3"</_Pattern2>
  103. <_Sub2>"python3_d"</_Sub2>
  104. </PropertyGroup>
  105. <ItemGroup>
  106. <_Lines Include="@(_DefLines)">
  107. <New>$([System.Text.RegularExpressions.Regex]::Replace($([System.Text.RegularExpressions.Regex]::Replace(`%(Identity)`, `$(_Pattern1)`, `$(_Sub1)`)), `$(_Pattern2)`, `$(_Sub2)`))</New>
  108. </_Lines>
  109. </ItemGroup>
  110. <MakeDir Directories="$(IntDir)" />
  111. <WriteLinesToFile File="$(IntDir)python3_d.def" Lines="@(_Lines->'%(New)')" />
  112. </Target>
  113. <Target Name="BuildStubDef" BeforeTargets="PreLinkEvent" Inputs="..\PC\python3.def" Outputs="$(IntDir)python3stub.def">
  114. <ItemGroup>
  115. <_DefLines Remove="@(_DefLines)" />
  116. <_Lines Remove="@(_Lines)" />
  117. </ItemGroup>
  118. <ReadLinesFromFile File="..\PC\python3.def">
  119. <Output TaskParameter="Lines" ItemName="_DefLines" />
  120. </ReadLinesFromFile>
  121. <PropertyGroup>
  122. <_Pattern>^[\w.]+=.+?\.([^ ]+).*$</_Pattern>
  123. <_Sub>$1</_Sub>
  124. </PropertyGroup>
  125. <ItemGroup>
  126. <_Lines Include="EXPORTS" />
  127. <_Symbols Include="@(_DefLines)" Condition="$([System.Text.RegularExpressions.Regex]::IsMatch(`%(Identity)`, `$(_Pattern)`))">
  128. <Symbol>$([System.Text.RegularExpressions.Regex]::Replace(`%(Identity)`, `$(_Pattern)`, `$(_Sub)`))</Symbol>
  129. </_Symbols>
  130. <_Lines Include="@(_Symbols->'%(Symbol)')" />
  131. </ItemGroup>
  132. <MakeDir Directories="$(IntDir)" />
  133. <WriteLinesToFile File="$(IntDir)python3stub.def" Lines="@(_Lines)" />
  134. </Target>
  135. <Target Name="_CleanStubDef" BeforeTargets="CoreClean">
  136. <ItemGroup>
  137. <Clean Include="$(IntDir)python3stub.def" />
  138. </ItemGroup>
  139. </Target>
  140. </Project>