Steve Dower | 33f7310 | 2016-06-24 10:32:15 -0700 | [diff] [blame] | 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>{10487945-15D1-4092-A214-338395C4116B}</ProjectGuid> |
| 5 | <OutputName>python</OutputName> |
| 6 | <OutputName Condition="$(Platform) == 'x86'">$(OutputName)x86</OutputName> |
Steve Dower | f085191 | 2017-07-26 09:09:01 -0700 | [diff] [blame] | 7 | <OutputName Condition="$(BuildForDaily) == 'true'">$(OutputName)daily</OutputName> |
Steve Dower | 33f7310 | 2016-06-24 10:32:15 -0700 | [diff] [blame] | 8 | <OutputSuffix></OutputSuffix> |
| 9 | <SupportSigning>false</SupportSigning> |
Steve Dower | e7614dd | 2016-06-25 16:13:30 -0700 | [diff] [blame] | 10 | <BuildForRelease Condition="$(BuildForRelease) == ''">true</BuildForRelease> |
Steve Dower | 33f7310 | 2016-06-24 10:32:15 -0700 | [diff] [blame] | 11 | </PropertyGroup> |
| 12 | |
| 13 | <Import Project="..\msi\msi.props" /> |
| 14 | |
| 15 | <PropertyGroup> |
| 16 | <Nuget Condition="$(Nuget) == ''">$(ExternalsDir)\windows-installer\nuget\nuget.exe</Nuget> |
| 17 | <NuspecVersion>$(MajorVersionNumber).$(MinorVersionNumber).$(MicroVersionNumber)</NuspecVersion> |
Steve Dower | 41fca9d | 2016-09-12 13:29:58 -0700 | [diff] [blame] | 18 | <NuspecVersion Condition="$(ReleaseLevelName) != ''">$(NuspecVersion)-$(ReleaseLevelName)</NuspecVersion> |
Steve Dower | f085191 | 2017-07-26 09:09:01 -0700 | [diff] [blame] | 19 | <NuspecVersion Condition="$(BuildForDaily) == 'true'">$(MajorVersionNumber).$(MinorVersionNumber).$(DailyBuildVersion)</NuspecVersion> |
Steve Dower | 33f7310 | 2016-06-24 10:32:15 -0700 | [diff] [blame] | 20 | <SignOutput>false</SignOutput> |
| 21 | <TargetName>$(OutputName).$(NuspecVersion)</TargetName> |
| 22 | <TargetExt>.nupkg</TargetExt> |
Steve Dower | 0cd6391 | 2018-12-10 18:52:57 -0800 | [diff] [blame] | 23 | <IntermediateOutputPath>$(IntermediateOutputPath)\nuget_$(ArchName)\</IntermediateOutputPath> |
Steve Dower | 33f7310 | 2016-06-24 10:32:15 -0700 | [diff] [blame] | 24 | |
Steve Dower | 0cd6391 | 2018-12-10 18:52:57 -0800 | [diff] [blame] | 25 | <CleanCommand>rmdir /q/s "$(IntermediateOutputPath.TrimEnd(`\`))"</CleanCommand> |
Steve Dower | 33f7310 | 2016-06-24 10:32:15 -0700 | [diff] [blame] | 26 | |
Steve Dower | 0cd6391 | 2018-12-10 18:52:57 -0800 | [diff] [blame] | 27 | <PythonArguments>"$(PythonExe)" "$(PySourcePath)PC\layout"</PythonArguments> |
| 28 | <PythonArguments>$(PythonArguments) -b "$(BuildPath.TrimEnd(`\`))" -s "$(PySourcePath.TrimEnd(`\`))"</PythonArguments> |
| 29 | <PythonArguments>$(PythonArguments) -t "$(IntermediateOutputPath)obj"</PythonArguments> |
| 30 | <PythonArguments>$(PythonArguments) --copy "$(IntermediateOutputPath)pkg"</PythonArguments> |
| 31 | <PythonArguments>$(PythonArguments) --include-dev --include-tools --include-pip --include-stable --include-launcher --include-props</PythonArguments> |
Steve Dower | 33f7310 | 2016-06-24 10:32:15 -0700 | [diff] [blame] | 32 | |
Steve Dower | 0cd6391 | 2018-12-10 18:52:57 -0800 | [diff] [blame] | 33 | <PackageArguments Condition="$(Packages) != ''">"$(IntermediateOutputPath)pkg\pip.exe" -B -m pip install -U $(Packages)</PackageArguments> |
Steve Dower | 3f9fbfc | 2016-06-24 11:37:50 -0700 | [diff] [blame] | 34 | |
Steve Dower | 0cd6391 | 2018-12-10 18:52:57 -0800 | [diff] [blame] | 35 | <NugetPackCommand>"$(Nuget)" pack "$(MSBuildThisFileDirectory)\$(OutputName).nuspec" -BasePath "$(IntermediateOutputPath)pkg"</NugetPackCommand> |
Steve Dower | f1ff2c4 | 2017-08-17 10:24:18 -0700 | [diff] [blame] | 36 | <NugetPackSymbolsCommand Condition="Exists('$(MSBuildThisFileDirectory)\$(OutputName).symbols.nuspec')">"$(Nuget)" pack "$(MSBuildThisFileDirectory)\$(OutputName).symbols.nuspec" -BasePath "$(BuildPath.TrimEnd(`\`))"</NugetPackSymbolsCommand> |
Steve Dower | 33128c8 | 2016-06-27 09:34:18 -0700 | [diff] [blame] | 37 | <NugetArguments>$(NugetArguments) -OutputDirectory "$(OutputPath.Trim(`\`))"</NugetArguments> |
Steve Dower | 33f7310 | 2016-06-24 10:32:15 -0700 | [diff] [blame] | 38 | <NugetArguments>$(NugetArguments) -Version "$(NuspecVersion)"</NugetArguments> |
| 39 | <NugetArguments>$(NugetArguments) -NoPackageAnalysis -NonInteractive</NugetArguments> |
| 40 | |
Steve Dower | f085191 | 2017-07-26 09:09:01 -0700 | [diff] [blame] | 41 | <Environment>$(Environment)%0D%0Aset PYTHONPATH=$(PySourcePath)Lib</Environment> |
Steve Dower | 0cd6391 | 2018-12-10 18:52:57 -0800 | [diff] [blame] | 42 | <Environment>$(Environment)%0D%0Aset PYTHON_NUSPEC_VERSION=$(NuspecVersion)</Environment> |
| 43 | <Environment Condition="$(Platform) != 'x86'">$(Environment)%0D%0Aset PYTHON_PROPS_PLATFORM=$(Platform)</Environment> |
| 44 | <Environment Condition="$(Platform) == 'x86'">$(Environment)%0D%0Aset PYTHON_PROPS_PLATFORM=Win32</Environment> |
Steve Dower | f085191 | 2017-07-26 09:09:01 -0700 | [diff] [blame] | 45 | <Environment>$(Environment)%0D%0Amkdir "$(OutputPath.Trim(`\`))" >nul 2>nul</Environment> |
Steve Dower | 33f7310 | 2016-06-24 10:32:15 -0700 | [diff] [blame] | 46 | </PropertyGroup> |
| 47 | |
| 48 | <Target Name="_NugetMissing" BeforeTargets="_Build" Condition="!Exists($(Nuget))"> |
| 49 | <Error Text="$(Nuget) could not be found. Either avoid specifying the property or update your externals/windows-installer files." /> |
| 50 | </Target> |
| 51 | |
| 52 | <Target Name="_Build"> |
Steve Dower | 3f9fbfc | 2016-06-24 11:37:50 -0700 | [diff] [blame] | 53 | <Exec Command="$(CleanCommand)" /> |
Steve Dower | 0cd6391 | 2018-12-10 18:52:57 -0800 | [diff] [blame] | 54 | <Exec Command="setlocal%0D%0A$(Environment)%0D%0A$(PythonArguments)%0D%0A$(PackageArguments)" /> |
Steve Dower | 1f06a68 | 2017-09-06 19:29:10 -0700 | [diff] [blame] | 55 | |
Steve Dower | f1ff2c4 | 2017-08-17 10:24:18 -0700 | [diff] [blame] | 56 | <Exec Command="$(NugetPackCommand) $(NugetArguments)" /> |
| 57 | <Exec Command="$(NugetPackSymbolsCommand) $(NugetArguments)" Condition="$(NugetPackSymbolsCommand) != ''" /> |
Steve Dower | 33f7310 | 2016-06-24 10:32:15 -0700 | [diff] [blame] | 58 | </Target> |
| 59 | |
| 60 | <Target Name="AfterBuild" /> |
| 61 | <Target Name="Build" DependsOnTargets="_Build;AfterBuild" /> |
| 62 | </Project> |