@@ -36,6 +36,8 @@ set BUILDX64=
3636set TARGET = Rebuild
3737set TESTTARGETDIR =
3838set PGO = default
39+ set BUILDNUGET = 1
40+ set BUILDZIP = 1
3941
4042
4143:CheckOpts
@@ -56,6 +58,8 @@ if "%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
5860if " %1 " EQU " --skip-pgo" (set PGO=) && shift && goto CheckOpts
61+ if " %1 " EQU " --skip-nuget" (set BUILDNUGET=) && shift && goto CheckOpts
62+ if " %1 " EQU " --skip-zip" (set BUILDZIP=) && shift && goto CheckOpts
5963
6064if " %1 " NEQ " " echo Invalid option: " %1 " && exit /B 1
6165
@@ -184,21 +188,31 @@ if errorlevel 1 exit /B
184188msbuild " %D% bundle\releaseweb.wixproj" /t:Rebuild %BUILDOPTS% %CERTOPTS% /p:RebuildAll=false
185189if errorlevel 1 exit /B
186190
187- msbuild " %D% make_zip.proj" /t:Build %BUILDOPTS% %CERTOPTS%
191+ if defined BUILDZIP (
192+ msbuild " %D% make_zip.proj" /t:Build %BUILDOPTS% %CERTOPTS%
193+ if errorlevel 1 exit /B
194+ )
195+
196+ if defined BUILDNUGET (
197+ msbuild " %D% ..\nuget\make_pkg.proj" /t:Build /p:Configuration=Release /p:Platform=%1 /p:OutputPath=" %BUILD% en-us"
198+ if errorlevel 1 exit /B
199+ )
188200
189201if not " %OUTDIR% " EQU " " (
190202 mkdir " %OUTDIR% \%OUTDIR_PLAT% "
191- copy /Y " %BUILD% en-us\*.cab" " %OUTDIR% \%OUTDIR_PLAT% "
192- copy /Y " %BUILD% en-us\*.exe" " %OUTDIR% \%OUTDIR_PLAT% "
193- copy /Y " %BUILD% en-us\*.msi" " %OUTDIR% \%OUTDIR_PLAT% "
194- copy /Y " %BUILD% en-us\*.msu" " %OUTDIR% \%OUTDIR_PLAT% "
203+ mkdir " %OUTDIR% \%OUTDIR_PLAT% \binaries"
204+ mkdir " %OUTDIR% \%OUTDIR_PLAT% \symbols"
205+ robocopy " %BUILD% en-us" " %OUTDIR% \%OUTDIR_PLAT% " /XF " *.wixpdb"
206+ robocopy " %BUILD% \" " %OUTDIR% \%OUTDIR_PLAT% \binaries" *.exe *.dll *.pyd /XF " _test*" /XF " *_d.*" /XF " _freeze*" /XF " tcl*" /XF " tk*" /XF " *_test.*"
207+ robocopy " %BUILD% \" " %OUTDIR% \%OUTDIR_PLAT% \symbols" *.pdb /XF " _test*" /XF " *_d.*" /XF " _freeze*" /XF " tcl*" /XF " tk*" /XF " *_test.*"
195208)
196209
197210exit /B 0
198211
199212:Help
200- echo buildrelease.bat [--out DIR] [-x86] [-x64] [--certificate CERTNAME] [--build] [--skip-build]
201- echo [--pgo COMMAND] [--skip-pgo] [--skip-doc] [--download DOWNLOAD URL] [--test TARGETDIR]
213+ echo buildrelease.bat [--out DIR] [-x86] [-x64] [--certificate CERTNAME] [--build] [--pgo COMMAND]
214+ echo [--skip-build] [--skip-doc] [--skip-nuget] [--skip-zip] [--skip-pgo]
215+ echo [--download DOWNLOAD URL] [--test TARGETDIR]
202216echo [-h]
203217echo .
204218echo --out (-o) Specify an additional output directory for installers
@@ -209,6 +223,9 @@ echo --skip-build (-B) Do not build Python (just do the installers)
209223echo --skip-doc (-D) Do not build documentation
210224echo --pgo Specify PGO command for x64 installers
211225echo --skip-pgo Build x64 installers using PGO
226+ echo --skip-nuget Do not build Nuget packages
227+ echo --skip-zip Do not build embeddable package
228+ echo --pgo Build x64 installers using PGO
212229echo --download Specify the full download URL for MSIs
213230echo --test Specify the test directory to run the installer tests
214231echo -h Display this help information
0 commit comments