Merge from 3.5

This commit is contained in:
Steve Dower 2015-10-14 10:41:52 -07:00
commit b8c1309cba
6 changed files with 81 additions and 28 deletions

View file

@ -481,6 +481,9 @@ Build
Windows Windows
------- -------
- Issue #25164: Changes default all-users install directory to match per-user
directory.
- Issue #25143: Improves installer error messages for unsupported platforms. - Issue #25143: Improves installer error messages for unsupported platforms.
- Issue #25163: Display correct directory in installer when using non-default - Issue #25163: Display correct directory in installer when using non-default

View file

@ -34,6 +34,7 @@ set BUILDX86=
set BUILDX64= set BUILDX64=
set TARGET=Rebuild set TARGET=Rebuild
set TESTTARGETDIR= set TESTTARGETDIR=
set PGO=
:CheckOpts :CheckOpts
@ -52,6 +53,9 @@ if "%1" EQU "-b" (set TARGET=Build) && shift && goto CheckOpts
if "%1" EQU "--build" (set TARGET=Build) && shift && goto CheckOpts if "%1" EQU "--build" (set TARGET=Build) && shift && goto CheckOpts
if "%1" EQU "-x86" (set BUILDX86=1) && shift && goto CheckOpts if "%1" EQU "-x86" (set BUILDX86=1) && shift && goto CheckOpts
if "%1" EQU "-x64" (set BUILDX64=1) && shift && goto CheckOpts if "%1" EQU "-x64" (set BUILDX64=1) && shift && goto CheckOpts
if "%1" EQU "--pgo" (set PGO=%~2) && shift && shift && goto CheckOpts
if "%1" NEQ "" echo Invalid option: "%1" && exit /B 1
if not defined BUILDX86 if not defined BUILDX64 (set BUILDX86=1) && (set BUILDX64=1) if not defined BUILDX86 if not defined BUILDX64 (set BUILDX86=1) && (set BUILDX64=1)
@ -81,7 +85,7 @@ if defined BUILDX86 (
) )
if defined BUILDX64 ( if defined BUILDX64 (
call :build x64 call :build x64 "%PGO%"
if errorlevel 1 exit /B if errorlevel 1 exit /B
) )
@ -101,8 +105,15 @@ if "%1" EQU "x86" (
set BUILD_PLAT=Win32 set BUILD_PLAT=Win32
set OUTDIR_PLAT=win32 set OUTDIR_PLAT=win32
set OBJDIR_PLAT=x86 set OBJDIR_PLAT=x86
) ELSE ( ) else if "%~2" NEQ "" (
call "%PCBUILD%env.bat" x86_amd64 call "%PCBUILD%env.bat" amd64
set PGO=%~2
set BUILD=%PCBUILD%amd64-pgo\
set BUILD_PLAT=x64
set OUTDIR_PLAT=amd64
set OBJDIR_PLAT=x64
) else (
call "%PCBUILD%env.bat" amd64
set BUILD=%PCBUILD%amd64\ set BUILD=%PCBUILD%amd64\
set BUILD_PLAT=x64 set BUILD_PLAT=x64
set OUTDIR_PLAT=amd64 set OUTDIR_PLAT=amd64
@ -128,17 +139,41 @@ if not "%CERTNAME%" EQU "" (
) )
if not "%SKIPBUILD%" EQU "1" ( if not "%SKIPBUILD%" EQU "1" (
call "%PCBUILD%build.bat" -e -p %BUILD_PLAT% -d -t %TARGET% %CERTOPTS% @call "%PCBUILD%build.bat" -e -p %BUILD_PLAT% -d -t %TARGET% %CERTOPTS%
if errorlevel 1 exit /B @if errorlevel 1 exit /B
call "%PCBUILD%build.bat" -e -p %BUILD_PLAT% -t %TARGET% %CERTOPTS%
if errorlevel 1 exit /B
@rem build.bat turns echo back on, so we disable it again @rem build.bat turns echo back on, so we disable it again
@echo off @echo off
if "%PGO%" EQU "" (
@call "%PCBUILD%build.bat" -e -p %BUILD_PLAT% -t %TARGET% %CERTOPTS%
) else (
@call "%PCBUILD%build.bat" -e -p %BUILD_PLAT% -c PGInstrument -t %TARGET% %CERTOPTS%
@if errorlevel 1 exit /B
@del "%BUILD%*.pgc"
if "%PGO%" EQU "default" (
"%BUILD%python.exe" -m test -q --pgo
) else if "%PGO%" EQU "default2" (
"%BUILD%python.exe" -m test -r -q --pgo
"%BUILD%python.exe" -m test -r -q --pgo
) else if "%PGO%" EQU "default10" (
for /L %%i in (0, 1, 9) do "%BUILD%python.exe" -m test -q -r --pgo
) else if "%PGO%" EQU "pybench" (
"%BUILD%python.exe" "%PCBUILD%..\Tools\pybench\pybench.py"
) else (
"%BUILD%python.exe" %PGO%
)
@call "%PCBUILD%build.bat" -e -p %BUILD_PLAT% -c PGUpdate -t %TARGET% %CERTOPTS%
)
@if errorlevel 1 exit /B
@echo off
) )
"%BUILD%python.exe" "%D%get_wix.py" "%BUILD%python.exe" "%D%get_wix.py"
set BUILDOPTS=/p:Platform=%1 /p:BuildForRelease=true /p:DownloadUrl=%DOWNLOAD_URL% /p:DownloadUrlBase=%DOWNLOAD_URL_BASE% /p:ReleaseUri=%RELEASE_URI% set BUILDOPTS=/p:Platform=%1 /p:BuildForRelease=true /p:DownloadUrl=%DOWNLOAD_URL% /p:DownloadUrlBase=%DOWNLOAD_URL_BASE% /p:ReleaseUri=%RELEASE_URI%
if "%PGO%" NEQ "" set BUILDOPTS=%BUILDOPTS% /p:PGOBuildPath=%BUILD%
msbuild "%D%bundle\releaselocal.wixproj" /t:Rebuild %BUILDOPTS% %CERTOPTS% /p:RebuildAll=true msbuild "%D%bundle\releaselocal.wixproj" /t:Rebuild %BUILDOPTS% %CERTOPTS% /p:RebuildAll=true
if errorlevel 1 exit /B if errorlevel 1 exit /B
msbuild "%D%bundle\releaseweb.wixproj" /t:Rebuild %BUILDOPTS% %CERTOPTS% /p:RebuildAll=false msbuild "%D%bundle\releaseweb.wixproj" /t:Rebuild %BUILDOPTS% %CERTOPTS% /p:RebuildAll=false
@ -158,7 +193,8 @@ exit /B 0
:Help :Help
echo buildrelease.bat [--out DIR] [-x86] [-x64] [--certificate CERTNAME] [--build] [--skip-build] echo buildrelease.bat [--out DIR] [-x86] [-x64] [--certificate CERTNAME] [--build] [--skip-build]
echo [--skip-doc] [--download DOWNLOAD URL] [--test TARGETDIR] [-h] echo [--pgo COMMAND] [--skip-doc] [--download DOWNLOAD URL] [--test TARGETDIR]
echo [-h]
echo. echo.
echo --out (-o) Specify an additional output directory for installers echo --out (-o) Specify an additional output directory for installers
echo -x86 Build x86 installers echo -x86 Build x86 installers
@ -166,6 +202,7 @@ echo -x64 Build x64 installers
echo --build (-b) Incrementally build Python rather than rebuilding echo --build (-b) Incrementally build Python rather than rebuilding
echo --skip-build (-B) Do not build Python (just do the installers) echo --skip-build (-B) Do not build Python (just do the installers)
echo --skip-doc (-D) Do not build documentation echo --skip-doc (-D) Do not build documentation
echo --pgo Build x64 installers using PGO
echo --download Specify the full download URL for MSIs echo --download Specify the full download URL for MSIs
echo --test Specify the test directory to run the installer tests echo --test Specify the test directory to run the installer tests
echo -h Display this help information echo -h Display this help information
@ -173,6 +210,14 @@ echo.
echo If no architecture is specified, all architectures will be built. echo If no architecture is specified, all architectures will be built.
echo If --test is not specified, the installer tests are not run. echo If --test is not specified, the installer tests are not run.
echo. echo.
echo For the --pgo option, any Python command line can be used as well as the
echo following shortcuts:
echo Shortcut Description
echo default Test suite with --pgo
echo default2 2x test suite with --pgo and randomized test order
echo default10 10x test suite with --pgo and randomized test order
echo pybench pybench script
echo.
echo The following substitutions will be applied to the download URL: echo The following substitutions will be applied to the download URL:
echo Variable Description Example echo Variable Description Example
echo {version} version number 3.5.0 echo {version} version number 3.5.0

View file

@ -22,20 +22,22 @@
<Variable Name="ShortVersion" Value="$(var.MajorVersionNumber).$(var.MinorVersionNumber)" /> <Variable Name="ShortVersion" Value="$(var.MajorVersionNumber).$(var.MinorVersionNumber)" />
<Variable Name="ShortVersionNoDot" Value="$(var.MajorVersionNumber)$(var.MinorVersionNumber)" /> <Variable Name="ShortVersionNoDot" Value="$(var.MajorVersionNumber)$(var.MinorVersionNumber)" />
<Variable Name="WinVer" Value="$(var.MajorVersionNumber).$(var.MinorVersionNumber)$(var.Suffix32)" />
<Variable Name="WinVerNoDot" Value="$(var.MajorVersionNumber)$(var.MinorVersionNumber)$(var.Suffix32)" />
<Variable Name="InstallAllUsers" Value="0" bal:Overridable="yes" /> <Variable Name="InstallAllUsers" Value="0" bal:Overridable="yes" />
<Variable Name="InstallLauncherAllUsers" Value="1" bal:Overridable="yes" /> <Variable Name="InstallLauncherAllUsers" Value="1" bal:Overridable="yes" />
<Variable Name="TargetDir" Value="" bal:Overridable="yes" /> <Variable Name="TargetDir" Value="" bal:Overridable="yes" />
<?if $(var.Platform)~="x64" ?> <?if $(var.Platform)~="x64" ?>
<Variable Name="DefaultAllUsersTargetDir" Value="[ProgramFiles64Folder]$(var.TestPrefix)Python [ShortVersion]" bal:Overridable="yes" /> <Variable Name="DefaultAllUsersTargetDir" Value="[ProgramFiles64Folder]$(var.TestPrefix)Python[WinVerNoDot]" bal:Overridable="yes" />
<Variable Name="TargetPlatform" Value="x64" /> <Variable Name="TargetPlatform" Value="x64" />
<?else ?> <?else ?>
<Variable Name="DefaultAllUsersTargetDir" Value="[ProgramFilesFolder]$(var.TestPrefix)Python [ShortVersion]" bal:Overridable="yes" /> <Variable Name="DefaultAllUsersTargetDir" Value="[ProgramFilesFolder]$(var.TestPrefix)Python[WinVerNoDot]" bal:Overridable="yes" />
<Variable Name="TargetPlatform" Value="x86" /> <Variable Name="TargetPlatform" Value="x86" />
<?endif ?> <?endif ?>
<Variable Name="DefaultJustForMeTargetDir" Value="[LocalAppDataFolder]Programs\$(var.TestPrefix)Python\Python[ShortVersionNoDot]$(var.Suffix32)" bal:Overridable="yes" /> <Variable Name="DefaultJustForMeTargetDir" Value="[LocalAppDataFolder]Programs\$(var.TestPrefix)Python\Python[WinVerNoDot]" bal:Overridable="yes" />
<Variable Name="OptionalFeaturesRegistryKey" Value="Software\$(var.TestPrefix)Python\PythonCore\[ShortVersion]$(var.Suffix32)\InstalledFeatures" /> <Variable Name="OptionalFeaturesRegistryKey" Value="Software\$(var.TestPrefix)Python\PythonCore\[WinVer]\InstalledFeatures" />
<Variable Name="TargetDirRegistryKey" Value="Software\$(var.TestPrefix)Python\PythonCore\[ShortVersion]$(var.Suffix32)\InstallPath" /> <Variable Name="TargetDirRegistryKey" Value="Software\$(var.TestPrefix)Python\PythonCore\[WinVer]\InstallPath" />
<!-- <!--
An empty string will use the other defaults based on InstallAllUsers An empty string will use the other defaults based on InstallAllUsers

View file

@ -12,8 +12,8 @@
SourceFile="py.exe" SourceFile="py.exe"
Compressed="yes" Compressed="yes"
DisplayName="!(loc.CompileAllDescription)" DisplayName="!(loc.CompileAllDescription)"
InstallCommand='-$(var.ShortVersion)$(var.Suffix32) -m pip install requests-2.7.0-py2.py3-none-any.whl' InstallCommand='-[WinVer] -m pip install requests-2.7.0-py2.py3-none-any.whl'
UninstallCommand='-$(var.ShortVersion)$(var.Suffix32) -m pip uninstall -y requests' UninstallCommand='-[WinVer] -m pip uninstall -y requests'
Vital="no" Vital="no"
InstallCondition="Include_pip and not LauncherOnly"> InstallCondition="Include_pip and not LauncherOnly">
<Payload SourceFile="requests-2.7.0-py2.py3-none-any.whl" <Payload SourceFile="requests-2.7.0-py2.py3-none-any.whl"

View file

@ -26,8 +26,8 @@
SourceFile="py.exe" SourceFile="py.exe"
Compressed="yes" Compressed="yes"
DisplayName="!(loc.CompileAllDescription)" DisplayName="!(loc.CompileAllDescription)"
InstallCommand='-$(var.ShortVersion)$(var.Suffix32) $(var.CompileAllCommand)' InstallCommand='-[WinVer] $(var.CompileAllCommand)'
RepairCommand='-$(var.ShortVersion)$(var.Suffix32) $(var.CompileAllCommand)' RepairCommand='-[WinVer] $(var.CompileAllCommand)'
Permanent="yes" Permanent="yes"
PerMachine="yes" PerMachine="yes"
Vital="no" Vital="no"
@ -36,8 +36,8 @@
SourceFile="py.exe" SourceFile="py.exe"
Compressed="yes" Compressed="yes"
DisplayName="!(loc.CompileAllODescription)" DisplayName="!(loc.CompileAllODescription)"
InstallCommand='-$(var.ShortVersion)$(var.Suffix32) -O $(var.CompileAllCommand)' InstallCommand='-[WinVer] -O $(var.CompileAllCommand)'
RepairCommand='-$(var.ShortVersion)$(var.Suffix32) -O $(var.CompileAllCommand)' RepairCommand='-[WinVer] -O $(var.CompileAllCommand)'
Permanent="yes" Permanent="yes"
PerMachine="yes" PerMachine="yes"
Vital="no" Vital="no"
@ -46,8 +46,8 @@
SourceFile="py.exe" SourceFile="py.exe"
Compressed="yes" Compressed="yes"
DisplayName="!(loc.CompileAllOODescription)" DisplayName="!(loc.CompileAllOODescription)"
InstallCommand='-$(var.ShortVersion)$(var.Suffix32) -OO $(var.CompileAllCommand)' InstallCommand='-[WinVer] -OO $(var.CompileAllCommand)'
RepairCommand='-$(var.ShortVersion)$(var.Suffix32) -OO $(var.CompileAllCommand)' RepairCommand='-[WinVer] -OO $(var.CompileAllCommand)'
Permanent="yes" Permanent="yes"
PerMachine="yes" PerMachine="yes"
Vital="no" Vital="no"
@ -57,8 +57,8 @@
SourceFile="py.exe" SourceFile="py.exe"
Compressed="yes" Compressed="yes"
DisplayName="!(loc.CompileAllDescription)" DisplayName="!(loc.CompileAllDescription)"
InstallCommand='-$(var.ShortVersion)$(var.Suffix32) $(var.CompileAllCommand)' InstallCommand='-[WinVer] $(var.CompileAllCommand)'
RepairCommand='-$(var.ShortVersion)$(var.Suffix32) $(var.CompileAllCommand)' RepairCommand='-[WinVer] $(var.CompileAllCommand)'
Permanent="yes" Permanent="yes"
PerMachine="no" PerMachine="no"
Vital="no" Vital="no"
@ -67,8 +67,8 @@
SourceFile="py.exe" SourceFile="py.exe"
Compressed="yes" Compressed="yes"
DisplayName="!(loc.CompileAllODescription)" DisplayName="!(loc.CompileAllODescription)"
InstallCommand='-$(var.ShortVersion)$(var.Suffix32) -O $(var.CompileAllCommand)' InstallCommand='-[WinVer] -O $(var.CompileAllCommand)'
RepairCommand='-$(var.ShortVersion)$(var.Suffix32) -O $(var.CompileAllCommand)' RepairCommand='-[WinVer] -O $(var.CompileAllCommand)'
Permanent="yes" Permanent="yes"
PerMachine="no" PerMachine="no"
Vital="no" Vital="no"
@ -77,8 +77,8 @@
SourceFile="py.exe" SourceFile="py.exe"
Compressed="yes" Compressed="yes"
DisplayName="!(loc.CompileAllOODescription)" DisplayName="!(loc.CompileAllOODescription)"
InstallCommand='-$(var.ShortVersion)$(var.Suffix32) -OO $(var.CompileAllCommand)' InstallCommand='-[WinVer] -OO $(var.CompileAllCommand)'
RepairCommand='-$(var.ShortVersion)$(var.Suffix32) -OO $(var.CompileAllCommand)' RepairCommand='-[WinVer] -OO $(var.CompileAllCommand)'
Permanent="yes" Permanent="yes"
PerMachine="no" PerMachine="no"
Vital="no" Vital="no"

View file

@ -110,7 +110,10 @@
</LinkerBindInputPaths> </LinkerBindInputPaths>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemGroup> <ItemGroup>
<LinkerBindInputPaths Include="$(BuildPath);$(PySourcePath)Doc\build\htmlhelp"> <LinkerBindInputPaths Include="$(PGOBuildPath);$(BuildPath)">
<BindName></BindName>
</LinkerBindInputPaths>
<LinkerBindInputPaths Include="$(PySourcePath)Doc\build\htmlhelp">
<BindName></BindName> <BindName></BindName>
</LinkerBindInputPaths> </LinkerBindInputPaths>
<LinkerBindInputPaths Include="$(PySourcePath)"> <LinkerBindInputPaths Include="$(PySourcePath)">