Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 43d2b26

Browse files
committed
Merge from 3.5
2 parents 159f97b + fcf622e commit 43d2b26

2 files changed

Lines changed: 25 additions & 8 deletions

File tree

Tools/msi/buildrelease.bat

Lines changed: 24 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ set BUILDX64=
3636
set TARGET=Rebuild
3737
set TESTTARGETDIR=
3838
set 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
5658
if "%1" EQU "-x64" (set BUILDX64=1) && shift && goto CheckOpts
5759
if "%1" EQU "--pgo" (set PGO=%~2) && shift && shift && goto CheckOpts
5860
if "%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

6064
if "%1" NEQ "" echo Invalid option: "%1" && exit /B 1
6165

@@ -184,21 +188,31 @@ if errorlevel 1 exit /B
184188
msbuild "%D%bundle\releaseweb.wixproj" /t:Rebuild %BUILDOPTS% %CERTOPTS% /p:RebuildAll=false
185189
if 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

189201
if 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

197210
exit /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]
202216
echo [-h]
203217
echo.
204218
echo --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)
209223
echo --skip-doc (-D) Do not build documentation
210224
echo --pgo Specify PGO command for x64 installers
211225
echo --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
212229
echo --download Specify the full download URL for MSIs
213230
echo --test Specify the test directory to run the installer tests
214231
echo -h Display this help information

Tools/msi/make_zip.proj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
<TargetPath>$(OutputPath)\en-us\$(TargetName)$(TargetExt)</TargetPath>
1717
<CleanCommand>rmdir /q/s "$(IntermediateOutputPath)\zip_$(ArchName)"</CleanCommand>
1818
<Arguments>"$(PythonExe)" "$(MSBuildThisFileDirectory)\make_zip.py"</Arguments>
19-
<Arguments>$(Arguments) -e -o "$(TargetPath)" -t "$(IntermediateOutputPath)\zip_$(ArchName)" -a "$(ArchName)"</Arguments>
19+
<Arguments>$(Arguments) -e -o "$(TargetPath)" -t "$(IntermediateOutputPath)\zip_$(ArchName)" -b "$(OutDir.TrimEnd('\'))"</Arguments>
2020
<Environment>set DOC_FILENAME=python$(PythonVersion).chm
2121
set VCREDIST_PATH=$(VS140COMNTOOLS)\..\..\VC\redist\$(Platform)\Microsoft.VC140.CRT</Environment>
2222
</PropertyGroup>

0 commit comments

Comments
 (0)