@@ -36,6 +36,8 @@ set BUILDX64=
3636set TARGET = Rebuild
3737set TESTTARGETDIR =
3838set PGO =
39+ set BUILDNUGET = 1
40+ set BUILDZIP = 1
3941
4042
4143:CheckOpts
@@ -55,6 +57,8 @@ if "%1" EQU "--build" (set TARGET=Build) && shift && goto CheckOpts
5557if " %1 " EQU " -x86" (set BUILDX86=1) && shift && goto CheckOpts
5658if " %1 " EQU " -x64" (set BUILDX64=1) && shift && goto CheckOpts
5759if " %1 " EQU " --pgo" (set PGO=%~2 ) && shift && shift && goto CheckOpts
60+ if " %1 " EQU " --skip-nuget" (set BUILDNUGET=) && shift && goto CheckOpts
61+ if " %1 " EQU " --skip-zip" (set BUILDZIP=) && shift && goto CheckOpts
5862
5963if " %1 " NEQ " " echo Invalid option: " %1 " && exit /B 1
6064
@@ -182,21 +186,31 @@ if errorlevel 1 exit /B
182186msbuild " %D% bundle\releaseweb.wixproj" /t:Rebuild /p:Platform=%1 %BUILDOPTS% %CERTOPTS% /p:RebuildAll=false
183187if errorlevel 1 exit /B
184188
185- msbuild " %D% make_zip.proj" /t:Build %BUILDOPTS% %CERTOPTS%
189+ if defined BUILDZIP (
190+ msbuild " %D% make_zip.proj" /t:Build %BUILDOPTS% %CERTOPTS%
191+ if errorlevel 1 exit /B
192+ )
193+
194+ if defined BUILDNUGET (
195+ msbuild " %D% ..\nuget\make_pkg.proj" /t:Build /p:Configuration=Release /p:Platform=%1 /p:OutputPath=" %BUILD% en-us"
196+ if errorlevel 1 exit /B
197+ )
186198
187199if not " %OUTDIR% " EQU " " (
188200 mkdir " %OUTDIR% \%OUTDIR_PLAT% "
189- copy /Y " %BUILD% en-us\*.cab" " %OUTDIR% \%OUTDIR_PLAT% "
190- copy /Y " %BUILD% en-us\*.exe" " %OUTDIR% \%OUTDIR_PLAT% "
191- copy /Y " %BUILD% en-us\*.msi" " %OUTDIR% \%OUTDIR_PLAT% "
192- copy /Y " %BUILD% en-us\*.msu" " %OUTDIR% \%OUTDIR_PLAT% "
201+ mkdir " %OUTDIR% \%OUTDIR_PLAT% \binaries"
202+ mkdir " %OUTDIR% \%OUTDIR_PLAT% \symbols"
203+ robocopy " %BUILD% en-us" " %OUTDIR% \%OUTDIR_PLAT% " /XF " *.wixpdb"
204+ robocopy " %BUILD% \" " %OUTDIR% \%OUTDIR_PLAT% \binaries" *.exe *.dll *.pyd /XF " _test*" /XF " *_d.*" /XF " _freeze*" /XF " tcl*" /XF " tk*" /XF " *_test.*"
205+ robocopy " %BUILD% \" " %OUTDIR% \%OUTDIR_PLAT% \symbols" *.pdb /XF " _test*" /XF " *_d.*" /XF " _freeze*" /XF " tcl*" /XF " tk*" /XF " *_test.*"
193206)
194207
195208exit /B 0
196209
197210:Help
198- echo buildrelease.bat [--out DIR] [-x86] [-x64] [--certificate CERTNAME] [--build] [--skip-build]
199- echo [--pgo COMMAND] [--skip-doc] [--download DOWNLOAD URL] [--test TARGETDIR]
211+ echo buildrelease.bat [--out DIR] [-x86] [-x64] [--certificate CERTNAME] [--build] [--pgo COMMAND]
212+ echo [--skip-build] [--skip-doc] [--skip-nuget] [--skip-zip]
213+ echo [--download DOWNLOAD URL] [--test TARGETDIR]
200214echo [-h]
201215echo .
202216echo --out (-o) Specify an additional output directory for installers
@@ -205,6 +219,8 @@ echo -x64 Build x64 installers
205219echo --build (-b) Incrementally build Python rather than rebuilding
206220echo --skip-build (-B) Do not build Python (just do the installers)
207221echo --skip-doc (-D) Do not build documentation
222+ echo --skip-nuget Do not build Nuget packages
223+ echo --skip-zip Do not build embeddable package
208224echo --pgo Build x64 installers using PGO
209225echo --download Specify the full download URL for MSIs
210226echo --test Specify the test directory to run the installer tests
0 commit comments