1<?xml version="1.0" encoding="utf-8"?> 2<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> 3 <PropertyGroup> 4 <ProjectGuid>{5F23F608-D74B-4259-A0CE-8DC65CC7FE53}</ProjectGuid> 5 <SchemaVersion>2.0</SchemaVersion> 6 <OutputName Condition="'$(OutputName)' == ''">dev</OutputName> 7 <OutputType>Package</OutputType> 8 </PropertyGroup> 9 <Import Project="..\msi.props" /> 10 <PropertyGroup> 11 <DefineConstants Condition="$(BuildForRelease)"> 12 $(DefineConstants); 13 IncludeMinGWLib=1; 14 </DefineConstants> 15 </PropertyGroup> 16 <ItemGroup> 17 <Compile Include="dev.wxs" /> 18 <Compile Include="dev_files.wxs" /> 19 </ItemGroup> 20 <ItemGroup> 21 <EmbeddedResource Include="*.wxl" /> 22 </ItemGroup> 23 <ItemGroup> 24 <InstallFiles Include="$(PySourcePath)include\**\*.h" 25 Exclude="$(PySourcePath)include\pyconfig.h"> 26 <SourceBase>$(PySourcePath)</SourceBase> 27 <Source>!(bindpath.src)</Source> 28 <TargetBase>$(PySourcePath)</TargetBase> 29 <Target_></Target_> 30 <Group>dev_include</Group> 31 </InstallFiles> 32 </ItemGroup> 33 34 <Target Name="BuildMinGWLib" 35 Inputs="$(BuildPath)$(PyDllName).dll" 36 Outputs="$(BuildPath)lib$(PyDllName).a" 37 AfterTargets="PrepareForBuild" 38 Condition="$(BuildForRelease)"> 39 <!-- Build libpython##.a as part of this project. This requires gendef and dlltool on the path. --> 40 <PropertyGroup> 41 <_DllToolOpts>-m i386 --as-flags=--32</_DllToolOpts> 42 <_DllToolOpts Condition="$(Platform) == 'x64'">-m i386:x86-64</_DllToolOpts> 43 </PropertyGroup> 44 45 <Exec Command='gendef - "$(BuildPath)$(PyDllName).dll" > "$(IntermediateOutputPath)mingwlib.def"' ContinueOnError="false" /> 46 <Exec Command='dlltool --dllname $(PyDllName).dll --def "$(IntermediateOutputPath)mingwlib.def" --output-lib "$(BuildPath)lib$(PyDllName).a" $(_DllToolOpts)' /> 47 </Target> 48 49 <Import Project="..\msi.targets" /> 50</Project> 51