summaryrefslogtreecommitdiffstats
path: root/Tools/msi/dev/dev.wixproj
blob: bc3a19ce33ca38c875ac2ef4228fd985ab060323 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
    <PropertyGroup>
        <ProjectGuid>{5F23F608-D74B-4259-A0CE-8DC65CC7FE53}</ProjectGuid>
        <SchemaVersion>2.0</SchemaVersion>
        <OutputName Condition="'$(OutputName)' == ''">dev</OutputName>
        <OutputType>Package</OutputType>
    </PropertyGroup>
    <Import Project="..\msi.props" />
    <PropertyGroup>
        <DefineConstants Condition="$(BuildForRelease)">
            $(DefineConstants);
            IncludeMinGWLib=1;
        </DefineConstants>
    </PropertyGroup>
    <ItemGroup>
        <Compile Include="dev.wxs" />
        <Compile Include="dev_files.wxs" />
    </ItemGroup>
    <ItemGroup>
        <EmbeddedResource Include="*.wxl" />
    </ItemGroup>
    <ItemGroup>
        <InstallFiles Include="$(PySourcePath)include\**\*.h">
            <SourceBase>$(PySourcePath)</SourceBase>
            <Source>!(bindpath.src)</Source>
            <TargetBase>$(PySourcePath)</TargetBase>
            <Target_></Target_>
            <Group>dev_include</Group>
        </InstallFiles>
    </ItemGroup>

    <Target Name="BuildMinGWLib"
            Inputs="$(BuildPath)$(PyDllName).dll"
            Outputs="$(BuildPath)lib$(PyDllName).a"
            AfterTargets="PrepareForBuild"
            Condition="$(BuildForRelease)">
        <!-- Build libpython##.a as part of this project. This requires gendef and dlltool on the path. -->
        <PropertyGroup>
            <_DllToolOpts>-m i386 --as-flags=--32</_DllToolOpts>
            <_DllToolOpts Condition="$(Platform) == 'x64'">-m i386:x86-64</_DllToolOpts>
        </PropertyGroup>

        <Exec Command='gendef - "$(BuildPath)$(PyDllName).dll" &gt; "$(IntermediateOutputPath)mingwlib.def"' ContinueOnError="false" />
        <Exec Command='dlltool --dllname $(PyDllName).dll --def "$(IntermediateOutputPath)mingwlib.def" --output-lib "$(BuildPath)lib$(PyDllName).a" $(_DllToolOpts)' />
    </Target>

    <Import Project="..\msi.targets" />
</Project>