• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<?xml version="1.0" encoding="utf-8"?>
2<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" TreatAsLocalProperty="DownloadUrl">
3    <PropertyGroup>
4        <SchemaVersion>2.0</SchemaVersion>
5        <OutputType>Bundle</OutputType>
6
7        <BootstrapConfiguration Condition="'$(BootstrapConfiguration)' == ''">Release</BootstrapConfiguration>
8        <LinkerSuppressSpecificWarnings>1132;1135;1140</LinkerSuppressSpecificWarnings>
9        <OutputName Condition="$(BuildForRelease)">$(OutputName)-$(PythonVersion)</OutputName>
10        <OutputName Condition="!$(BuildForRelease)">$(OutputName)-$(MajorVersionNumber).$(MinorVersionNumber).$(MicroVersionNumber).$(RevisionNumber)</OutputName>
11        <OutputName Condition="$(Platform) == 'x64'">$(OutputName)-amd64</OutputName>
12        <OutputName Condition="'$(OutputSuffix)' != ''">$(OutputName)-$(OutputSuffix)</OutputName>
13        <OutputName Condition="'$(Configuration)' == 'Debug'">$(OutputName)-d</OutputName>
14        <TargetName>$(OutputName)</TargetName>
15
16        <OutputPath>$(OutputPath)en-us\</OutputPath>
17        <OutDir>$(OutputPath)</OutDir>
18
19        <!-- See Tools/msi/buildrelease.bat for help on configuring the download URL -->
20        <DownloadUrl Condition="'$(DownloadUrl)' == '' and '$(DownloadUrlBase)' != ''">$(DownloadUrlBase.TrimEnd(`/`))/{version}/{arch}{releasename}/{msi}</DownloadUrl>
21        <DefineConstants Condition="'$(DownloadUrl)' != ''">$(DefineConstants);DownloadUrl=$(DownloadUrl.Replace(`{version}`, `$(MajorVersionNumber).$(MinorVersionNumber).$(MicroVersionNumber)`).Replace(`{arch}`, `$(ArchName)`).Replace(`{releasename}`, `$(ReleaseLevelName)`).Replace(`{msi}`, `{2}`))</DefineConstants>
22        <DefineConstants Condition="'$(DownloadUrl)' == ''">$(DefineConstants);DownloadUrl={2}</DefineConstants>
23    </PropertyGroup>
24
25    <ItemGroup>
26        <WixExtension Include="WixUtilExtension">
27            <HintPath>WixUtilExtension</HintPath>
28            <Name>WixUtilExtension</Name>
29        </WixExtension>
30        <WixExtension Include="WixDependencyExtension">
31            <HintPath>WixDependencyExtension</HintPath>
32            <Name>WixDependencyExtension</Name>
33        </WixExtension>
34        <WixExtension Include="WixBalExtension">
35            <HintPath>WixBalExtension</HintPath>
36            <Name>WixBalExtension</Name>
37        </WixExtension>
38    </ItemGroup>
39    <ItemGroup>
40        <Compile Include="bundle.wxs" />
41        <Compile Include="packagegroups\*.wxs" />
42    </ItemGroup>
43    <ItemGroup>
44        <Content Include="Default.thm" />
45        <Content Include="Default.wxl" />
46        <Content Include="SideBar.png" />
47    </ItemGroup>
48    <ItemGroup>
49        <EmbeddedResource Include="bundle.wxl" />
50        <WxlTemplate Include="*_en-US.wxl_template" />
51    </ItemGroup>
52    <ItemGroup>
53        <LinkerBindInputPaths Include="$(OutputPath)">
54            <BindName></BindName>
55        </LinkerBindInputPaths>
56    </ItemGroup>
57
58    <ItemDefinitionGroup>
59        <Package>
60            <Properties>BuildForRelease=$(BuildForRelease)</Properties>
61        </Package>
62    </ItemDefinitionGroup>
63    <ItemGroup>
64        <Package Include="..\core\core*.wixproj" />
65        <Package Include="..\dev\dev*.wixproj" />
66        <Package Include="..\doc\doc*.wixproj" />
67        <Package Include="..\exe\exe*.wixproj" />
68        <Package Include="..\lib\lib*.wixproj" />
69        <Package Include="..\path\path*.wixproj" />
70        <Package Include="..\pip\pip*.wixproj" />
71        <Package Include="..\tcltk\tcltk*.wixproj" />
72        <Package Include="..\test\test*.wixproj" />
73        <Package Include="..\tools\tools*.wixproj" />
74        <Package Include="..\ucrt\ucrt*.wixproj" />
75    </ItemGroup>
76
77    <PropertyGroup>
78        <BuildPackagesTargets>Build</BuildPackagesTargets>
79    </PropertyGroup>
80
81    <Target Name="_SetRebuildTarget" BeforeTargets="BeforeRebuild">
82        <PropertyGroup>
83            <BuildPackagesTargets>Rebuild</BuildPackagesTargets>
84        </PropertyGroup>
85    </Target>
86
87    <Target Name="BuildPackages" BeforeTargets="BeforeBuild" Condition="'$(RebuildAll)' != 'false'">
88        <MSBuild Projects="@(Package)" Targets="$(BuildPackagesTargets)" BuildInParallel="true" />
89    </Target>
90
91    <Target Name="BuildBootstrapApplication" BeforeTargets="BeforeBuild">
92        <Message Text="Building bootstrap app" Importance="high" />
93
94        <MSBuild Projects="bootstrap\pythonba.vcxproj"
95                 Targets="Build;GetNativeTargetPath"
96                 UseResultsCache="true"
97                 Properties="Configuration=$(BootstrapConfiguration);Platform=Win32">
98            <Output TaskParameter="TargetOutputs" PropertyName="BootstrapAppPath" />
99        </MSBuild>
100
101        <PropertyGroup>
102            <DefineConstants>$(DefineConstants);BootstrapApp=$(BootstrapAppPath)</DefineConstants>
103        </PropertyGroup>
104    </Target>
105
106    <Import Project="..\msi.targets" />
107</Project>