2015-03-05 00:27:03 -04:00
|
|
|
<?xml version="1.0" encoding="utf-8"?>
|
|
|
|
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
|
|
<PropertyGroup>
|
|
|
|
<ProjectGuid>{2D69F2AB-D5D0-4344-84B5-EF6DB34A9BC9}</ProjectGuid>
|
|
|
|
<OutputName>python</OutputName>
|
|
|
|
<OutputSuffix></OutputSuffix>
|
|
|
|
|
|
|
|
<DownloadUrlBase Condition="'$(DownloadUrlBase)' == ''">$(TARGET)</DownloadUrlBase>
|
|
|
|
<DownloadUrlBase Condition="'$(DownloadUrlBase)' == ''">/srv/www.python.org/ftp/python</DownloadUrlBase>
|
|
|
|
<IncludeDoc Condition="'$(IncludeDoc)' == ''">true</IncludeDoc>
|
2017-03-05 23:58:06 -04:00
|
|
|
<BuildForRelease Condition="'$(BuildForRelease)' == ''">true</BuildForRelease>
|
2015-03-05 00:27:03 -04:00
|
|
|
<DryRun Condition="'$(DryRun)' == ''">false</DryRun>
|
|
|
|
</PropertyGroup>
|
|
|
|
|
|
|
|
<Import Project="msi.props" />
|
|
|
|
<Import Project="bundle\bundle.targets" />
|
|
|
|
|
|
|
|
<PropertyGroup>
|
|
|
|
<EXETarget>$(DownloadUrlBase.TrimEnd(`/`))/$(MajorVersionNumber).$(MinorVersionNumber).$(MicroVersionNumber)</EXETarget>
|
2015-11-22 22:20:11 -04:00
|
|
|
<MSITarget>$(DownloadUrl.Replace(`{version}`, `$(MajorVersionNumber).$(MinorVersionNumber).$(MicroVersionNumber)`).Replace(`{arch}`, `$(ArchName)`).Replace(`{releasename}`, `$(ReleaseLevelName)`).Replace(`{msi}`, ``).TrimEnd(`/`))</MSITarget>
|
2015-03-05 00:27:03 -04:00
|
|
|
</PropertyGroup>
|
|
|
|
|
|
|
|
<ItemGroup>
|
|
|
|
<File Include="$(OutputPath)\*.msi;$(OutputPath)\*.msu">
|
|
|
|
<CopyTo>$(MSITarget)</CopyTo>
|
|
|
|
</File>
|
2015-05-03 01:38:26 -03:00
|
|
|
<File Include="$(OutputPath)\*.exe;$(OutputPath)\*.zip">
|
2015-03-05 00:27:03 -04:00
|
|
|
<CopyTo>$(EXETarget)</CopyTo>
|
|
|
|
</File>
|
|
|
|
<File Include="$(PySourcePath)Doc\build\htmlhelp\python$(MajorVersionNumber)$(MinorVersionNumber)$(MicroVersionNumber)$(ReleaseLevelName).chm" Condition="$(IncludeDoc)">
|
|
|
|
<CopyTo>$(EXETarget)</CopyTo>
|
|
|
|
</File>
|
|
|
|
</ItemGroup>
|
|
|
|
|
|
|
|
<Target Name="_ValidateProperties">
|
|
|
|
<Error Text="No value for Host provided" Condition="'$(Host)' == ''" />
|
|
|
|
<Error Text="No value for User provided" Condition="'$(User)' == ''" />
|
|
|
|
<Error Text="No path for PSCP provided" Condition="'$(PSCP)' == ''" />
|
|
|
|
<Error Text="No path for PLINK provided" Condition="'$(PLINK)' == ''" />
|
|
|
|
</Target>
|
|
|
|
|
2015-04-05 22:42:37 -03:00
|
|
|
<Target Name="_RunGpg" Condition="'$(GPG)' != ''" Inputs="@(File)" Outputs="$(IntermediateOutputPath)\gpg\%(FileName)%(Extension).asc">
|
|
|
|
<MakeDir Directories="$(IntermediateOutputPath)gpg" />
|
|
|
|
<Delete Files="$(IntermediateOutputPath)\gpg\%(File.FileName)%(File.Extension).asc" Condition="Exists('$(IntermediateOutputPath)\gpg\%(File.FileName)%(File.Extension).asc')" />
|
2017-10-05 18:09:30 -03:00
|
|
|
<Exec Command=""$(GPG)" -ba -o "$(IntermediateOutputPath)\gpg\%(File.FileName)%(File.Extension).asc" "%(File.FullPath)""
|
|
|
|
IgnoreExitCode="false" />
|
2015-04-05 22:42:37 -03:00
|
|
|
<ItemGroup>
|
|
|
|
<File Include="$(IntermediateOutputPath)\gpg\%(File.FileName)%(File.Extension).asc">
|
|
|
|
<CopyTo>%(File.CopyTo)</CopyTo>
|
|
|
|
</File>
|
|
|
|
</ItemGroup>
|
|
|
|
</Target>
|
|
|
|
|
2015-03-05 00:27:03 -04:00
|
|
|
<Target Name="_Upload" Condition="!$(DryRun)">
|
2017-10-05 18:09:30 -03:00
|
|
|
<Exec Command=""$(PLINK)" $(User)@$(Host) mkdir %(File.CopyTo) ^&^& chgrp downloads %(File.CopyTo) ^&^& chmod g-w,o+rx %(File.CopyTo)" />
|
|
|
|
<Exec Command=""$(PSCP)" @(File,' ') $(User)@$(Host):%(File.CopyTo)" />
|
|
|
|
<Exec Command=""$(PLINK)" $(User)@$(Host) chgrp downloads %(File.CopyTo)/*; chmod g-w,o+r %(File.CopyTo)/*" />
|
2015-03-05 00:27:03 -04:00
|
|
|
</Target>
|
|
|
|
|
|
|
|
<Target Name="_PrintNames" Condition="$(DryRun)">
|
2017-10-05 18:09:30 -03:00
|
|
|
<Exec Command="echo "$(PLINK)" $(User)@$(Host) mkdir %(File.CopyTo) ^&^& chgrp downloads %(File.CopyTo) ^&^& chmod g-w,o+rx %(File.CopyTo)" />
|
|
|
|
<Exec Command="echo "$(PSCP)" @(File,' ') $(User)@$(Host):%(File.CopyTo)" />
|
|
|
|
<Exec Command="echo "$(PLINK)" $(User)@$(Host) chgrp downloads %(File.CopyTo)/*; chmod g-w,o+r %(File.CopyTo)/*" />
|
2017-02-23 19:03:20 -04:00
|
|
|
</Target>
|
|
|
|
|
|
|
|
<Target Name="_TestLayout">
|
|
|
|
<ItemGroup>
|
|
|
|
<WebInstaller Include="$(OutputPath)\*-webinstall.exe" />
|
|
|
|
<WebInstaller>
|
|
|
|
<SourceDir>$(TEMP)\%(Filename)_source</SourceDir>
|
|
|
|
<SourceExe>$(TEMP)\%(Filename)_source\%(Filename)%(Extension)</SourceExe>
|
|
|
|
<LayoutDir>$(TEMP)\%(Filename)_layout</LayoutDir>
|
|
|
|
<LogDir>$(OutputPath)\%(Filename)_layoutlog</LogDir>
|
|
|
|
<LogFile>$(OutputPath)\%(Filename)_layoutlog\%(Filename).log</LogFile>
|
|
|
|
</WebInstaller>
|
|
|
|
</ItemGroup>
|
2017-10-05 18:09:30 -03:00
|
|
|
<Error Text="Could not find installer" Condition="@(WebInstaller) == ''" />
|
2017-02-23 19:03:20 -04:00
|
|
|
<RemoveDir Directories="%(WebInstaller.SourceDir)" Condition="Exists('%(WebInstaller.SourceDir)')" />
|
|
|
|
<RemoveDir Directories="%(WebInstaller.LayoutDir)" Condition="Exists('%(WebInstaller.LayoutDir)')" />
|
|
|
|
<RemoveDir Directories="%(WebInstaller.LogDir)" Condition="Exists('%(WebInstaller.LogDir)')" />
|
|
|
|
<MakeDir Directories="%(WebInstaller.SourceDir)" />
|
|
|
|
<Copy SourceFiles="@(WebInstaller)" DestinationFiles="%(WebInstaller.SourceExe)" />
|
|
|
|
<Exec Command="start "Install test" /wait "%(WebInstaller.SourceExe)" /layout "%(WebInstaller.LayoutDir)" /passive /log "%(WebInstaller.LogFile)""
|
|
|
|
IgnoreExitCode="false" />
|
|
|
|
<RemoveDir Directories="%(WebInstaller.LayoutDir)" />
|
|
|
|
<RemoveDir Directories="%(WebInstaller.SourceDir)" />
|
|
|
|
<RemoveDir Directories="%(WebInstaller.LogDir)" />
|
2017-03-05 23:58:06 -04:00
|
|
|
<Message Text="Successfully downloaded %(WebInstaller.Filename)%(WebInstaller.Extension) layout" Importance="high" />
|
2017-02-23 19:03:20 -04:00
|
|
|
</Target>
|
|
|
|
|
2017-10-05 18:09:30 -03:00
|
|
|
<Target Name="Upload" DependsOnTargets="_ValidateProperties;_RunGpg;_PrintNames;_Upload" />
|
2017-02-23 19:03:20 -04:00
|
|
|
<Target Name="Test" DependsOnTargets="_TestLayout" />
|
2015-04-05 22:42:37 -03:00
|
|
|
|
2017-10-05 18:09:30 -03:00
|
|
|
<Target Name="Purge">
|
|
|
|
<Error Condition="!Exists('$(PythonExe)')" Text="No Python executable available at $(PythonExe)" />
|
|
|
|
<Exec Command="echo "$(PythonExe)" purge.py $(PythonVersion)" Condition="$(DryRun)" />
|
|
|
|
<Exec Command=""$(PythonExe)" purge.py $(PythonVersion)" Condition="!$(DryRun)" />
|
|
|
|
<Message Text="Purged uploaded files" Importance="high" />
|
|
|
|
</Target>
|
|
|
|
|
2015-04-05 22:42:37 -03:00
|
|
|
<Target Name="ShowHashes">
|
|
|
|
<ItemGroup>
|
|
|
|
<UserFiles Include="@(File)" Condition="'%(File.CopyTo)' == '$(EXETarget)'" />
|
|
|
|
</ItemGroup>
|
|
|
|
|
2017-10-05 18:09:30 -03:00
|
|
|
<Error Text="No files generated" Condition="@(UserFiles) == ''" />
|
2015-04-05 22:42:37 -03:00
|
|
|
<Exec Command=""$(PythonExe)" generate_md5.py @(UserFiles->'"%(FullPath)"',' ')" />
|
|
|
|
</Target>
|
2015-03-05 00:27:03 -04:00
|
|
|
|
|
|
|
<Target Name="Build">
|
|
|
|
<Error Text="This script should be invoked using uploadrelease.bat." />
|
|
|
|
</Target>
|
|
|
|
</Project>
|