From 2856332f5efa28c2abf9805cfdfdbf10b733b231 Mon Sep 17 00:00:00 2001 From: Steve Dower Date: Wed, 4 Mar 2015 20:27:03 -0800 Subject: [PATCH] Add scripts for uploading Windows builds to a Linux server using pscp --- Tools/msi/buildrelease.bat | 1 + Tools/msi/uploadrelease.bat | 46 +++++++++++++++++++++++++++ Tools/msi/uploadrelease.proj | 61 ++++++++++++++++++++++++++++++++++++ 3 files changed, 108 insertions(+) create mode 100644 Tools/msi/uploadrelease.bat create mode 100644 Tools/msi/uploadrelease.proj diff --git a/Tools/msi/buildrelease.bat b/Tools/msi/buildrelease.bat index 3f2a94ad74d..09c63a68306 100644 --- a/Tools/msi/buildrelease.bat +++ b/Tools/msi/buildrelease.bat @@ -140,6 +140,7 @@ if not "%OUTDIR%" EQU "" ( copy /Y "%BUILD%en-us\*.cab" "%OUTDIR%\%OUTDIR_PLAT%" copy /Y "%BUILD%en-us\*.exe" "%OUTDIR%\%OUTDIR_PLAT%" copy /Y "%BUILD%en-us\*.msi" "%OUTDIR%\%OUTDIR_PLAT%" + copy /Y "%BUILD%en-us\*.msu" "%OUTDIR%\%OUTDIR_PLAT%" ) exit /B 0 diff --git a/Tools/msi/uploadrelease.bat b/Tools/msi/uploadrelease.bat new file mode 100644 index 00000000000..2064a67a4a6 --- /dev/null +++ b/Tools/msi/uploadrelease.bat @@ -0,0 +1,46 @@ +@setlocal +@echo off + +set D=%~dp0 +set PCBUILD=%D%..\..\PCBuild\ + +set HOST= +set USER= +set TARGET= +set DRYRUN=false + +:CheckOpts +if "%1" EQU "-h" goto Help +if "%1" EQU "-o" (set HOST=%~2) && shift && shift && goto CheckOpts +if "%1" EQU "--host" (set HOST=%~2) && shift && shift && goto CheckOpts +if "%1" EQU "-u" (set USER=%~2) && shift && shift && goto CheckOpts +if "%1" EQU "--user" (set USER=%~2) && shift && shift && goto CheckOpts +if "%1" EQU "-t" (set TARGET=%~2) && shift && shift && goto CheckOpts +if "%1" EQU "--target" (set TARGET=%~2) && shift && shift && goto CheckOpts +if "%1" EQU "--dry-run" (set DRYRUN=true) && shift && goto CheckOpts + +if not defined PLINK where plink > "%TEMP%\plink.loc" 2> nul && set /P PLINK= < "%TEMP%\plink.loc" & del "%TEMP%\plink.loc" +if not defined PLINK where /R "%ProgramFiles(x86)%" plink > "%TEMP%\plink.loc" 2> nul && set /P PLINK= < "%TEMP%\plink.loc" & del "%TEMP%\plink.loc" +if not defined PLINK echo Cannot locate plink.exe & exit /B 1 +echo Found plink.exe at %PLINK% + +if not defined PSCP where pscp > "%TEMP%\pscp.loc" 2> nul && set /P pscp= < "%TEMP%\pscp.loc" & del "%TEMP%\pscp.loc" +if not defined PSCP where /R "%ProgramFiles(x86)%" pscp > "%TEMP%\pscp.loc" 2> nul && set /P pscp= < "%TEMP%\pscp.loc" & del "%TEMP%\pscp.loc" +if not defined PSCP echo Cannot locate pscp.exe & exit /B 1 +echo Found pscp.exe at %PSCP% + +call "%PCBUILD%env.bat" > nul 2> nul +msbuild /v:m /nologo uploadrelease.proj /t:Upload /p:Platform=x86 +msbuild /v:m /nologo uploadrelease.proj /t:Upload /p:Platform=x64 /p:IncludeDoc=false + +exit /B 0 + +:Help +echo uploadrelease.bat --host HOST --user USERNAME [--target TARGET] [--dry-run] [-h] +echo. +echo --host (-o) Specify the upload host (required) +echo --user (-u) Specify the user on the host (required) +echo --target (-t) Specify the target directory on the host +echo --dry-run Display commands and filenames without executing them +echo -h Display this help information +echo. diff --git a/Tools/msi/uploadrelease.proj b/Tools/msi/uploadrelease.proj new file mode 100644 index 00000000000..a3ebe573b2c --- /dev/null +++ b/Tools/msi/uploadrelease.proj @@ -0,0 +1,61 @@ + + + + {2D69F2AB-D5D0-4344-84B5-EF6DB34A9BC9} + python + + + $(TARGET) + /srv/www.python.org/ftp/python + true + false + + + + + + + $(DownloadUrlBase.TrimEnd(`/`))/$(MajorVersionNumber).$(MinorVersionNumber).$(MicroVersionNumber) + $(DownloadUrl.TrimEnd(`/`)) + + + + + $(MSITarget) + + + $(EXETarget) + + + $(EXETarget) + + + + + + + + + + + + + + + + + + + + + + + +