diff options
Diffstat (limited to 'Tools/msi/uploadrelease.proj')
-rw-r--r-- | Tools/msi/uploadrelease.proj | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/Tools/msi/uploadrelease.proj b/Tools/msi/uploadrelease.proj new file mode 100644 index 0000000..a3ebe57 --- /dev/null +++ b/Tools/msi/uploadrelease.proj @@ -0,0 +1,61 @@ +<?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> + <DryRun Condition="'$(DryRun)' == ''">false</DryRun> + </PropertyGroup> + + <Import Project="msi.props" /> + <Import Project="bundle\bundle.targets" /> + + <PropertyGroup> + <EXETarget>$(DownloadUrlBase.TrimEnd(`/`))/$(MajorVersionNumber).$(MinorVersionNumber).$(MicroVersionNumber)</EXETarget> + <MSITarget>$(DownloadUrl.TrimEnd(`/`))</MSITarget> + </PropertyGroup> + + <ItemGroup> + <File Include="$(OutputPath)\*.msi;$(OutputPath)\*.msu"> + <CopyTo>$(MSITarget)</CopyTo> + </File> + <File Include="$(OutputPath)\*.exe"> + <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> + + <Target Name="_Upload" Condition="!$(DryRun)"> + <Exec Command=""$(PLINK)" $(User)@$(Host) mkdir %(File.CopyTo) ^&^& chgrp downloads %(File.CopyTo) ^&^& chmod g-w,o+rx %(File.CopyTo) +"$(PSCP)" @(File,' ') $(User)@$(Host):%(File.CopyTo) +"$(PLINK)" $(User)@$(Host) chgrp downloads %(File.CopyTo)/* ^&^& chmod g-w,o+r %(File.CopyTo)/* +" /> + </Target> + + <Target Name="_PrintNames" Condition="$(DryRun)"> + <Exec Command="echo "$(PLINK)" $(User)@$(Host) mkdir %(File.CopyTo) ^&^& chgrp downloads %(File.CopyTo) ^&^& chmod g-w,o+rx %(File.CopyTo) +echo "$(PSCP)" @(File,' ') $(User)@$(Host):%(File.CopyTo) +echo "$(PLINK)" $(User)@$(Host) chgrp downloads %(File.CopyTo)/* ^&^& chmod g-w,o+r %(File.CopyTo)/* +echo. +echo." /> + </Target> + + <Target Name="Upload" DependsOnTargets="_ValidateProperties;_PrintNames;_Upload" /> + + <Target Name="Build"> + <Error Text="This script should be invoked using uploadrelease.bat." /> + </Target> +</Project> |