]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Adds batch file to build nuget packages.
authorSteve Dower <steve.dower@microsoft.com>
Mon, 27 Jun 2016 16:43:17 +0000 (09:43 -0700)
committerSteve Dower <steve.dower@microsoft.com>
Mon, 27 Jun 2016 16:43:17 +0000 (09:43 -0700)
Tools/nuget/build.bat [new file with mode: 0644]

diff --git a/Tools/nuget/build.bat b/Tools/nuget/build.bat
new file mode 100644 (file)
index 0000000..120b38c
--- /dev/null
@@ -0,0 +1,55 @@
+@echo off\r
+setlocal\r
+set D=%~dp0\r
+set PCBUILD=%D%..\..\PCBuild\\r
+\r
+set BUILDX86=\r
+set BUILDX64=\r
+set REBUILD=\r
+set OUTPUT=\r
+set PACKAGES=\r
+\r
+:CheckOpts\r
+if "%~1" EQU "-h" goto Help\r
+if "%~1" EQU "-x86" (set BUILDX86=1) && shift && goto CheckOpts\r
+if "%~1" EQU "-x64" (set BUILDX64=1) && shift && goto CheckOpts\r
+if "%~1" EQU "-r" (set REBUILD=-r) && shift && goto CheckOpts\r
+if "%~1" EQU "-o" (set OUTPUT="/p:OutputPath=%~2") && shift && shift && goto CheckOpts\r
+if "%~1" EQU "--out" (set OUTPUT="/p:OutputPath=%~2") && shift && shift && goto CheckOpts\r
+if "%~1" EQU "-p" (set PACKAGES=%PACKAGES% %~2) && shift && shift && goto CheckOpts\r
+\r
+if not defined BUILDX86 if not defined BUILDX64 (set BUILDX86=1) && (set BUILDX64=1)\r
+\r
+call "%D%..\msi\get_externals.bat"\r
+call "%PCBUILD%env.bat" x86\r
+\r
+if defined PACKAGES set PACKAGES="/p:Packages=%PACKAGES%"\r
+\r
+if defined BUILDX86 (\r
+    if defined REBUILD ( call "%PCBUILD%build.bat" -e -r\r
+    ) else if not exist "%PCBUILD%win32\python.exe" call "%PCBUILD%build.bat" -e\r
+    if errorlevel 1 goto :eof\r
+\r
+    msbuild "%D%make_pkg.proj" /p:Configuration=Release /p:Platform=x86 %OUTPUT% %PACKAGES%\r
+    if errorlevel 1 goto :eof\r
+)\r
+\r
+if defined BUILDX64 (\r
+    if defined REBUILD ( call "%PCBUILD%build.bat" -p x64 -e -r\r
+    ) else if not exist "%PCBUILD%amd64\python.exe" call "%PCBUILD%build.bat" -p x64 -e\r
+    if errorlevel 1 goto :eof\r
+\r
+    msbuild "%D%make_pkg.proj" /p:Configuration=Release /p:Platform=x64 %OUTPUT% %PACKAGES%\r
+    if errorlevel 1 goto :eof\r
+)\r
+\r
+exit /B 0\r
+\r
+:Help\r
+echo build.bat [-x86] [-x64] [--out DIR] [-r] [-h]\r
+echo.\r
+echo    -x86                Build x86 installers\r
+echo    -x64                Build x64 installers\r
+echo    -r                  Rebuild rather than incremental build\r
+echo    --out [DIR]         Override output directory\r
+echo    -h                  Show usage\r