mirror of https://github.com/python/cpython
bpo-27425: Be more explicit in .gitattributes (GH-840)
Updates checked-in line endings on several files.
This commit is contained in:
parent
29fda8db16
commit
6b6e687766
|
@ -1,8 +1,41 @@
|
||||||
|
# Binary data types
|
||||||
|
*.aif binary
|
||||||
|
*.aifc binary
|
||||||
|
*.aiff binary
|
||||||
|
*.au binary
|
||||||
|
*.bmp binary
|
||||||
|
*.exe binary
|
||||||
|
*.icns binary
|
||||||
|
*.gif binary
|
||||||
|
*.ico binary
|
||||||
|
*.jpg binary
|
||||||
*.pck binary
|
*.pck binary
|
||||||
Lib/test/cjkencodings/* binary
|
*.png binary
|
||||||
Lib/test/decimaltestdata/*.decTest binary
|
*.psd binary
|
||||||
|
*.tar binary
|
||||||
|
*.wav binary
|
||||||
|
*.whl binary
|
||||||
|
*.zip binary
|
||||||
|
|
||||||
|
# Specific binary files
|
||||||
Lib/test/sndhdrdata/sndhdr.* binary
|
Lib/test/sndhdrdata/sndhdr.* binary
|
||||||
Lib/test/test_email/data/msg_26.txt binary
|
|
||||||
Lib/test/xmltestdata/* binary
|
# Text files that should not be subject to eol conversion
|
||||||
Lib/venv/scripts/nt/* binary
|
Lib/test/cjkencodings/* -text
|
||||||
Lib/test/coding20731.py binary
|
Lib/test/decimaltestdata/*.decTest -text
|
||||||
|
Lib/test/test_email/data/*.txt -text
|
||||||
|
Lib/test/xmltestdata/* -text
|
||||||
|
Lib/test/coding20731.py -text
|
||||||
|
|
||||||
|
# Special files in third party code
|
||||||
|
Modules/zlib/zlib.map -text
|
||||||
|
|
||||||
|
# CRLF files
|
||||||
|
*.bat text eol=crlf
|
||||||
|
*.ps1 text eol=crlf
|
||||||
|
*.sln text eol=crlf
|
||||||
|
*.vcxproj* text eol=crlf
|
||||||
|
*.props text eol=crlf
|
||||||
|
*.proj text eol=crlf
|
||||||
|
PCbuild/readme.txt text eol=crlf
|
||||||
|
PC/readme.txt text eol=crlf
|
||||||
|
|
|
@ -1,51 +1,51 @@
|
||||||
function global:deactivate ([switch]$NonDestructive) {
|
function global:deactivate ([switch]$NonDestructive) {
|
||||||
# Revert to original values
|
# Revert to original values
|
||||||
if (Test-Path function:_OLD_VIRTUAL_PROMPT) {
|
if (Test-Path function:_OLD_VIRTUAL_PROMPT) {
|
||||||
copy-item function:_OLD_VIRTUAL_PROMPT function:prompt
|
copy-item function:_OLD_VIRTUAL_PROMPT function:prompt
|
||||||
remove-item function:_OLD_VIRTUAL_PROMPT
|
remove-item function:_OLD_VIRTUAL_PROMPT
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Test-Path env:_OLD_VIRTUAL_PYTHONHOME) {
|
if (Test-Path env:_OLD_VIRTUAL_PYTHONHOME) {
|
||||||
copy-item env:_OLD_VIRTUAL_PYTHONHOME env:PYTHONHOME
|
copy-item env:_OLD_VIRTUAL_PYTHONHOME env:PYTHONHOME
|
||||||
remove-item env:_OLD_VIRTUAL_PYTHONHOME
|
remove-item env:_OLD_VIRTUAL_PYTHONHOME
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Test-Path env:_OLD_VIRTUAL_PATH) {
|
if (Test-Path env:_OLD_VIRTUAL_PATH) {
|
||||||
copy-item env:_OLD_VIRTUAL_PATH env:PATH
|
copy-item env:_OLD_VIRTUAL_PATH env:PATH
|
||||||
remove-item env:_OLD_VIRTUAL_PATH
|
remove-item env:_OLD_VIRTUAL_PATH
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Test-Path env:VIRTUAL_ENV) {
|
if (Test-Path env:VIRTUAL_ENV) {
|
||||||
remove-item env:VIRTUAL_ENV
|
remove-item env:VIRTUAL_ENV
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$NonDestructive) {
|
if (!$NonDestructive) {
|
||||||
# Self destruct!
|
# Self destruct!
|
||||||
remove-item function:deactivate
|
remove-item function:deactivate
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
deactivate -nondestructive
|
deactivate -nondestructive
|
||||||
|
|
||||||
$env:VIRTUAL_ENV="__VENV_DIR__"
|
$env:VIRTUAL_ENV="__VENV_DIR__"
|
||||||
|
|
||||||
if (! $env:VIRTUAL_ENV_DISABLE_PROMPT) {
|
if (! $env:VIRTUAL_ENV_DISABLE_PROMPT) {
|
||||||
# Set the prompt to include the env name
|
# Set the prompt to include the env name
|
||||||
# Make sure _OLD_VIRTUAL_PROMPT is global
|
# Make sure _OLD_VIRTUAL_PROMPT is global
|
||||||
function global:_OLD_VIRTUAL_PROMPT {""}
|
function global:_OLD_VIRTUAL_PROMPT {""}
|
||||||
copy-item function:prompt function:_OLD_VIRTUAL_PROMPT
|
copy-item function:prompt function:_OLD_VIRTUAL_PROMPT
|
||||||
function global:prompt {
|
function global:prompt {
|
||||||
Write-Host -NoNewline -ForegroundColor Green '__VENV_PROMPT__'
|
Write-Host -NoNewline -ForegroundColor Green '__VENV_PROMPT__'
|
||||||
_OLD_VIRTUAL_PROMPT
|
_OLD_VIRTUAL_PROMPT
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# Clear PYTHONHOME
|
# Clear PYTHONHOME
|
||||||
if (Test-Path env:PYTHONHOME) {
|
if (Test-Path env:PYTHONHOME) {
|
||||||
copy-item env:PYTHONHOME env:_OLD_VIRTUAL_PYTHONHOME
|
copy-item env:PYTHONHOME env:_OLD_VIRTUAL_PYTHONHOME
|
||||||
remove-item env:PYTHONHOME
|
remove-item env:PYTHONHOME
|
||||||
}
|
}
|
||||||
|
|
||||||
# Add the venv to the PATH
|
# Add the venv to the PATH
|
||||||
copy-item env:PATH env:_OLD_VIRTUAL_PATH
|
copy-item env:PATH env:_OLD_VIRTUAL_PATH
|
||||||
$env:PATH = "$env:VIRTUAL_ENV\__VENV_BIN_NAME__;$env:PATH"
|
$env:PATH = "$env:VIRTUAL_ENV\__VENV_BIN_NAME__;$env:PATH"
|
||||||
|
|
|
@ -1,32 +1,32 @@
|
||||||
@echo off
|
@echo off
|
||||||
set "VIRTUAL_ENV=__VENV_DIR__"
|
set "VIRTUAL_ENV=__VENV_DIR__"
|
||||||
|
|
||||||
if not defined PROMPT (
|
if not defined PROMPT (
|
||||||
set "PROMPT=$P$G"
|
set "PROMPT=$P$G"
|
||||||
)
|
)
|
||||||
|
|
||||||
if defined _OLD_VIRTUAL_PROMPT (
|
if defined _OLD_VIRTUAL_PROMPT (
|
||||||
set "PROMPT=%_OLD_VIRTUAL_PROMPT%"
|
set "PROMPT=%_OLD_VIRTUAL_PROMPT%"
|
||||||
)
|
)
|
||||||
|
|
||||||
if defined _OLD_VIRTUAL_PYTHONHOME (
|
if defined _OLD_VIRTUAL_PYTHONHOME (
|
||||||
set "PYTHONHOME=%_OLD_VIRTUAL_PYTHONHOME%"
|
set "PYTHONHOME=%_OLD_VIRTUAL_PYTHONHOME%"
|
||||||
)
|
)
|
||||||
|
|
||||||
set "_OLD_VIRTUAL_PROMPT=%PROMPT%"
|
set "_OLD_VIRTUAL_PROMPT=%PROMPT%"
|
||||||
set "PROMPT=__VENV_PROMPT__%PROMPT%"
|
set "PROMPT=__VENV_PROMPT__%PROMPT%"
|
||||||
|
|
||||||
if defined PYTHONHOME (
|
if defined PYTHONHOME (
|
||||||
set "_OLD_VIRTUAL_PYTHONHOME=%PYTHONHOME%"
|
set "_OLD_VIRTUAL_PYTHONHOME=%PYTHONHOME%"
|
||||||
set PYTHONHOME=
|
set PYTHONHOME=
|
||||||
)
|
)
|
||||||
|
|
||||||
if defined _OLD_VIRTUAL_PATH (
|
if defined _OLD_VIRTUAL_PATH (
|
||||||
set "PATH=%_OLD_VIRTUAL_PATH%"
|
set "PATH=%_OLD_VIRTUAL_PATH%"
|
||||||
) else (
|
) else (
|
||||||
set "_OLD_VIRTUAL_PATH=%PATH%"
|
set "_OLD_VIRTUAL_PATH=%PATH%"
|
||||||
)
|
)
|
||||||
|
|
||||||
set "PATH=%VIRTUAL_ENV%\__VENV_BIN_NAME__;%PATH%"
|
set "PATH=%VIRTUAL_ENV%\__VENV_BIN_NAME__;%PATH%"
|
||||||
|
|
||||||
:END
|
:END
|
||||||
|
|
|
@ -1,21 +1,21 @@
|
||||||
@echo off
|
@echo off
|
||||||
|
|
||||||
if defined _OLD_VIRTUAL_PROMPT (
|
if defined _OLD_VIRTUAL_PROMPT (
|
||||||
set "PROMPT=%_OLD_VIRTUAL_PROMPT%"
|
set "PROMPT=%_OLD_VIRTUAL_PROMPT%"
|
||||||
)
|
)
|
||||||
set _OLD_VIRTUAL_PROMPT=
|
set _OLD_VIRTUAL_PROMPT=
|
||||||
|
|
||||||
if defined _OLD_VIRTUAL_PYTHONHOME (
|
if defined _OLD_VIRTUAL_PYTHONHOME (
|
||||||
set "PYTHONHOME=%_OLD_VIRTUAL_PYTHONHOME%"
|
set "PYTHONHOME=%_OLD_VIRTUAL_PYTHONHOME%"
|
||||||
set _OLD_VIRTUAL_PYTHONHOME=
|
set _OLD_VIRTUAL_PYTHONHOME=
|
||||||
)
|
)
|
||||||
|
|
||||||
if defined _OLD_VIRTUAL_PATH (
|
if defined _OLD_VIRTUAL_PATH (
|
||||||
set "PATH=%_OLD_VIRTUAL_PATH%"
|
set "PATH=%_OLD_VIRTUAL_PATH%"
|
||||||
)
|
)
|
||||||
|
|
||||||
set _OLD_VIRTUAL_PATH=
|
set _OLD_VIRTUAL_PATH=
|
||||||
|
|
||||||
set VIRTUAL_ENV=
|
set VIRTUAL_ENV=
|
||||||
|
|
||||||
:END
|
:END
|
||||||
|
|
|
@ -1,111 +1,111 @@
|
||||||
@ECHO OFF
|
@ECHO OFF
|
||||||
|
|
||||||
rem Test all machine configurations, pydebug, refleaks, release build.
|
rem Test all machine configurations, pydebug, refleaks, release build.
|
||||||
|
|
||||||
cd ..\..\..\
|
cd ..\..\..\
|
||||||
|
|
||||||
|
|
||||||
echo.
|
echo.
|
||||||
echo # ======================================================================
|
echo # ======================================================================
|
||||||
echo # Building Python
|
echo # Building Python
|
||||||
echo # ======================================================================
|
echo # ======================================================================
|
||||||
echo.
|
echo.
|
||||||
|
|
||||||
call "%VS100COMNTOOLS%\..\..\VC\vcvarsall.bat" x64
|
call "%VS100COMNTOOLS%\..\..\VC\vcvarsall.bat" x64
|
||||||
msbuild /noconsolelogger /target:clean PCbuild\pcbuild.sln /p:Configuration=Release /p:PlatformTarget=x64
|
msbuild /noconsolelogger /target:clean PCbuild\pcbuild.sln /p:Configuration=Release /p:PlatformTarget=x64
|
||||||
msbuild /noconsolelogger /target:clean PCbuild\pcbuild.sln /p:Configuration=Debug /p:PlatformTarget=x64
|
msbuild /noconsolelogger /target:clean PCbuild\pcbuild.sln /p:Configuration=Debug /p:PlatformTarget=x64
|
||||||
msbuild /noconsolelogger PCbuild\pcbuild.sln /p:Configuration=Release /p:Platform=x64
|
msbuild /noconsolelogger PCbuild\pcbuild.sln /p:Configuration=Release /p:Platform=x64
|
||||||
msbuild /noconsolelogger PCbuild\pcbuild.sln /p:Configuration=Debug /p:Platform=x64
|
msbuild /noconsolelogger PCbuild\pcbuild.sln /p:Configuration=Debug /p:Platform=x64
|
||||||
|
|
||||||
call "%VS100COMNTOOLS%\..\..\VC\vcvarsall.bat" x86
|
call "%VS100COMNTOOLS%\..\..\VC\vcvarsall.bat" x86
|
||||||
msbuild /noconsolelogger PCbuild\pcbuild.sln /p:Configuration=Release /p:Platform=Win32
|
msbuild /noconsolelogger PCbuild\pcbuild.sln /p:Configuration=Release /p:Platform=Win32
|
||||||
msbuild /noconsolelogger PCbuild\pcbuild.sln /p:Configuration=Debug /p:Platform=Win32
|
msbuild /noconsolelogger PCbuild\pcbuild.sln /p:Configuration=Debug /p:Platform=Win32
|
||||||
echo.
|
echo.
|
||||||
echo.
|
echo.
|
||||||
|
|
||||||
echo.
|
echo.
|
||||||
echo # ======================================================================
|
echo # ======================================================================
|
||||||
echo # test_decimal: platform=x64
|
echo # test_decimal: platform=x64
|
||||||
echo # ======================================================================
|
echo # ======================================================================
|
||||||
echo.
|
echo.
|
||||||
|
|
||||||
cd PCbuild\amd64
|
cd PCbuild\amd64
|
||||||
|
|
||||||
echo # ==================== refleak tests =======================
|
echo # ==================== refleak tests =======================
|
||||||
echo.
|
echo.
|
||||||
python_d.exe -m test -uall -R 2:2 test_decimal
|
python_d.exe -m test -uall -R 2:2 test_decimal
|
||||||
echo.
|
echo.
|
||||||
echo.
|
echo.
|
||||||
|
|
||||||
echo # ==================== regular tests =======================
|
echo # ==================== regular tests =======================
|
||||||
echo.
|
echo.
|
||||||
python.exe -m test -uall test_decimal
|
python.exe -m test -uall test_decimal
|
||||||
echo.
|
echo.
|
||||||
echo.
|
echo.
|
||||||
|
|
||||||
cd ..
|
cd ..
|
||||||
|
|
||||||
echo.
|
echo.
|
||||||
echo # ======================================================================
|
echo # ======================================================================
|
||||||
echo # test_decimal: platform=x86
|
echo # test_decimal: platform=x86
|
||||||
echo # ======================================================================
|
echo # ======================================================================
|
||||||
echo.
|
echo.
|
||||||
|
|
||||||
echo # ==================== refleak tests =======================
|
echo # ==================== refleak tests =======================
|
||||||
echo.
|
echo.
|
||||||
python_d.exe -m test -uall -R 2:2 test_decimal
|
python_d.exe -m test -uall -R 2:2 test_decimal
|
||||||
echo.
|
echo.
|
||||||
echo.
|
echo.
|
||||||
|
|
||||||
echo # ==================== regular tests =======================
|
echo # ==================== regular tests =======================
|
||||||
echo.
|
echo.
|
||||||
python.exe -m test -uall test_decimal
|
python.exe -m test -uall test_decimal
|
||||||
echo.
|
echo.
|
||||||
echo.
|
echo.
|
||||||
|
|
||||||
cd amd64
|
cd amd64
|
||||||
|
|
||||||
echo.
|
echo.
|
||||||
echo # ======================================================================
|
echo # ======================================================================
|
||||||
echo # deccheck: platform=x64
|
echo # deccheck: platform=x64
|
||||||
echo # ======================================================================
|
echo # ======================================================================
|
||||||
echo.
|
echo.
|
||||||
|
|
||||||
echo # ==================== debug build =======================
|
echo # ==================== debug build =======================
|
||||||
echo.
|
echo.
|
||||||
python_d.exe ..\..\Modules\_decimal\tests\deccheck.py
|
python_d.exe ..\..\Modules\_decimal\tests\deccheck.py
|
||||||
echo.
|
echo.
|
||||||
echo.
|
echo.
|
||||||
|
|
||||||
echo # =================== release build ======================
|
echo # =================== release build ======================
|
||||||
echo.
|
echo.
|
||||||
python.exe ..\..\Modules\_decimal\tests\deccheck.py
|
python.exe ..\..\Modules\_decimal\tests\deccheck.py
|
||||||
echo.
|
echo.
|
||||||
echo.
|
echo.
|
||||||
|
|
||||||
cd ..
|
cd ..
|
||||||
|
|
||||||
echo.
|
echo.
|
||||||
echo # ======================================================================
|
echo # ======================================================================
|
||||||
echo # deccheck: platform=x86
|
echo # deccheck: platform=x86
|
||||||
echo # ======================================================================
|
echo # ======================================================================
|
||||||
echo.
|
echo.
|
||||||
echo.
|
echo.
|
||||||
|
|
||||||
echo # ==================== debug build =======================
|
echo # ==================== debug build =======================
|
||||||
echo.
|
echo.
|
||||||
python_d.exe ..\Modules\_decimal\tests\deccheck.py
|
python_d.exe ..\Modules\_decimal\tests\deccheck.py
|
||||||
echo.
|
echo.
|
||||||
echo.
|
echo.
|
||||||
|
|
||||||
echo # =================== release build ======================
|
echo # =================== release build ======================
|
||||||
echo.
|
echo.
|
||||||
python.exe ..\Modules\_decimal\tests\deccheck.py
|
python.exe ..\Modules\_decimal\tests\deccheck.py
|
||||||
echo.
|
echo.
|
||||||
echo.
|
echo.
|
||||||
|
|
||||||
|
|
||||||
cd ..\Modules\_decimal\tests
|
cd ..\Modules\_decimal\tests
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,22 +1,22 @@
|
||||||
@echo off
|
@echo off
|
||||||
setlocal
|
setlocal
|
||||||
|
|
||||||
set D=%~dp0
|
set D=%~dp0
|
||||||
set PCBUILD=%~dp0..\..\PCBuild\
|
set PCBUILD=%~dp0..\..\PCBuild\
|
||||||
|
|
||||||
|
|
||||||
echo Building Lib\distutils\command\wininst-xx.0.exe
|
echo Building Lib\distutils\command\wininst-xx.0.exe
|
||||||
|
|
||||||
call "%PCBUILD%env.bat" x86
|
call "%PCBUILD%env.bat" x86
|
||||||
if errorlevel 1 goto :eof
|
if errorlevel 1 goto :eof
|
||||||
|
|
||||||
msbuild "%D%bdist_wininst.vcxproj" "/p:SolutionDir=%PCBUILD%\" /p:Configuration=Release /p:Platform=Win32
|
msbuild "%D%bdist_wininst.vcxproj" "/p:SolutionDir=%PCBUILD%\" /p:Configuration=Release /p:Platform=Win32
|
||||||
if errorlevel 1 goto :eof
|
if errorlevel 1 goto :eof
|
||||||
|
|
||||||
|
|
||||||
echo Building Lib\distutils\command\wininst-xx.0-amd64.exe
|
echo Building Lib\distutils\command\wininst-xx.0-amd64.exe
|
||||||
|
|
||||||
call "%PCBUILD%env.bat" x86_amd64
|
call "%PCBUILD%env.bat" x86_amd64
|
||||||
if errorlevel 1 goto :eof
|
if errorlevel 1 goto :eof
|
||||||
|
|
||||||
msbuild "%D%bdist_wininst.vcxproj" "/p:SolutionDir=%PCBUILD%\" /p:Configuration=Release /p:Platform=x64
|
msbuild "%D%bdist_wininst.vcxproj" "/p:SolutionDir=%PCBUILD%\" /p:Configuration=Release /p:Platform=x64
|
||||||
|
|
|
@ -1,161 +1,161 @@
|
||||||
@echo off
|
@echo off
|
||||||
goto Run
|
goto Run
|
||||||
:Usage
|
:Usage
|
||||||
echo.%~nx0 [flags and arguments] [quoted MSBuild options]
|
echo.%~nx0 [flags and arguments] [quoted MSBuild options]
|
||||||
echo.
|
echo.
|
||||||
echo.Build CPython from the command line. Requires the appropriate
|
echo.Build CPython from the command line. Requires the appropriate
|
||||||
echo.version(s) of Microsoft Visual Studio to be installed (see readme.txt).
|
echo.version(s) of Microsoft Visual Studio to be installed (see readme.txt).
|
||||||
echo.Also requires Subversion (svn.exe) to be on PATH if the '-e' flag is
|
echo.Also requires Subversion (svn.exe) to be on PATH if the '-e' flag is
|
||||||
echo.given.
|
echo.given.
|
||||||
echo.
|
echo.
|
||||||
echo.After the flags recognized by this script, up to 9 arguments to be passed
|
echo.After the flags recognized by this script, up to 9 arguments to be passed
|
||||||
echo.directly to MSBuild may be passed. If the argument contains an '=', the
|
echo.directly to MSBuild may be passed. If the argument contains an '=', the
|
||||||
echo.entire argument must be quoted (e.g. `%~nx0 "/p:PlatformToolset=v100"`).
|
echo.entire argument must be quoted (e.g. `%~nx0 "/p:PlatformToolset=v100"`).
|
||||||
echo.Alternatively you can put extra flags for MSBuild in a file named
|
echo.Alternatively you can put extra flags for MSBuild in a file named
|
||||||
echo.`msbuild.rsp` in the `PCbuild` directory, one flag per line. This file
|
echo.`msbuild.rsp` in the `PCbuild` directory, one flag per line. This file
|
||||||
echo.will be picked automatically by MSBuild. Flags put in this file does not
|
echo.will be picked automatically by MSBuild. Flags put in this file does not
|
||||||
echo.need to be quoted. You can still use environment variables inside the
|
echo.need to be quoted. You can still use environment variables inside the
|
||||||
echo.response file.
|
echo.response file.
|
||||||
echo.
|
echo.
|
||||||
echo.Available flags:
|
echo.Available flags:
|
||||||
echo. -h Display this help message
|
echo. -h Display this help message
|
||||||
echo. -V Display version information for the current build
|
echo. -V Display version information for the current build
|
||||||
echo. -r Target Rebuild instead of Build
|
echo. -r Target Rebuild instead of Build
|
||||||
echo. -d Set the configuration to Debug
|
echo. -d Set the configuration to Debug
|
||||||
echo. -e Build external libraries fetched by get_externals.bat
|
echo. -e Build external libraries fetched by get_externals.bat
|
||||||
echo. Extension modules that depend on external libraries will not attempt
|
echo. Extension modules that depend on external libraries will not attempt
|
||||||
echo. to build if this flag is not present
|
echo. to build if this flag is not present
|
||||||
echo. -m Enable parallel build (enabled by default)
|
echo. -m Enable parallel build (enabled by default)
|
||||||
echo. -M Disable parallel build
|
echo. -M Disable parallel build
|
||||||
echo. -v Increased output messages
|
echo. -v Increased output messages
|
||||||
echo. -k Attempt to kill any running Pythons before building (usually done
|
echo. -k Attempt to kill any running Pythons before building (usually done
|
||||||
echo. automatically by the pythoncore project)
|
echo. automatically by the pythoncore project)
|
||||||
echo. --pgo Build with Profile-Guided Optimization. This flag
|
echo. --pgo Build with Profile-Guided Optimization. This flag
|
||||||
echo. overrides -c and -d
|
echo. overrides -c and -d
|
||||||
echo. --test-marker Enable the test marker within the build.
|
echo. --test-marker Enable the test marker within the build.
|
||||||
echo.
|
echo.
|
||||||
echo.Available flags to avoid building certain modules.
|
echo.Available flags to avoid building certain modules.
|
||||||
echo.These flags have no effect if '-e' is not given:
|
echo.These flags have no effect if '-e' is not given:
|
||||||
echo. --no-ssl Do not attempt to build _ssl
|
echo. --no-ssl Do not attempt to build _ssl
|
||||||
echo. --no-tkinter Do not attempt to build Tkinter
|
echo. --no-tkinter Do not attempt to build Tkinter
|
||||||
echo.
|
echo.
|
||||||
echo.Available arguments:
|
echo.Available arguments:
|
||||||
echo. -c Release ^| Debug ^| PGInstrument ^| PGUpdate
|
echo. -c Release ^| Debug ^| PGInstrument ^| PGUpdate
|
||||||
echo. Set the configuration (default: Release)
|
echo. Set the configuration (default: Release)
|
||||||
echo. -p x64 ^| Win32
|
echo. -p x64 ^| Win32
|
||||||
echo. Set the platform (default: Win32)
|
echo. Set the platform (default: Win32)
|
||||||
echo. -t Build ^| Rebuild ^| Clean ^| CleanAll
|
echo. -t Build ^| Rebuild ^| Clean ^| CleanAll
|
||||||
echo. Set the target manually
|
echo. Set the target manually
|
||||||
echo. --pgo-job The job to use for PGO training; implies --pgo
|
echo. --pgo-job The job to use for PGO training; implies --pgo
|
||||||
echo. (default: "-m test --pgo")
|
echo. (default: "-m test --pgo")
|
||||||
exit /b 127
|
exit /b 127
|
||||||
|
|
||||||
:Run
|
:Run
|
||||||
setlocal
|
setlocal
|
||||||
set platf=Win32
|
set platf=Win32
|
||||||
set vs_platf=x86
|
set vs_platf=x86
|
||||||
set conf=Release
|
set conf=Release
|
||||||
set target=Build
|
set target=Build
|
||||||
set dir=%~dp0
|
set dir=%~dp0
|
||||||
set parallel=/m
|
set parallel=/m
|
||||||
set verbose=/nologo /v:m
|
set verbose=/nologo /v:m
|
||||||
set kill=
|
set kill=
|
||||||
set do_pgo=
|
set do_pgo=
|
||||||
set pgo_job=-m test --pgo
|
set pgo_job=-m test --pgo
|
||||||
set on_64_bit=true
|
set on_64_bit=true
|
||||||
|
|
||||||
rem This may not be 100% accurate, but close enough.
|
rem This may not be 100% accurate, but close enough.
|
||||||
if "%ProgramFiles(x86)%"=="" (set on_64_bit=false)
|
if "%ProgramFiles(x86)%"=="" (set on_64_bit=false)
|
||||||
|
|
||||||
:CheckOpts
|
:CheckOpts
|
||||||
if "%~1"=="-h" goto Usage
|
if "%~1"=="-h" goto Usage
|
||||||
if "%~1"=="-c" (set conf=%2) & shift & shift & goto CheckOpts
|
if "%~1"=="-c" (set conf=%2) & shift & shift & goto CheckOpts
|
||||||
if "%~1"=="-p" (set platf=%2) & shift & shift & goto CheckOpts
|
if "%~1"=="-p" (set platf=%2) & shift & shift & goto CheckOpts
|
||||||
if "%~1"=="-r" (set target=Rebuild) & shift & goto CheckOpts
|
if "%~1"=="-r" (set target=Rebuild) & shift & goto CheckOpts
|
||||||
if "%~1"=="-t" (set target=%2) & shift & shift & goto CheckOpts
|
if "%~1"=="-t" (set target=%2) & shift & shift & goto CheckOpts
|
||||||
if "%~1"=="-d" (set conf=Debug) & shift & goto CheckOpts
|
if "%~1"=="-d" (set conf=Debug) & shift & goto CheckOpts
|
||||||
if "%~1"=="-m" (set parallel=/m) & shift & goto CheckOpts
|
if "%~1"=="-m" (set parallel=/m) & shift & goto CheckOpts
|
||||||
if "%~1"=="-M" (set parallel=) & shift & goto CheckOpts
|
if "%~1"=="-M" (set parallel=) & shift & goto CheckOpts
|
||||||
if "%~1"=="-v" (set verbose=/v:n) & shift & goto CheckOpts
|
if "%~1"=="-v" (set verbose=/v:n) & shift & goto CheckOpts
|
||||||
if "%~1"=="-k" (set kill=true) & shift & goto CheckOpts
|
if "%~1"=="-k" (set kill=true) & shift & goto CheckOpts
|
||||||
if "%~1"=="--pgo" (set do_pgo=true) & shift & goto CheckOpts
|
if "%~1"=="--pgo" (set do_pgo=true) & shift & goto CheckOpts
|
||||||
if "%~1"=="--pgo-job" (set do_pgo=true) & (set pgo_job=%~2) & shift & shift & goto CheckOpts
|
if "%~1"=="--pgo-job" (set do_pgo=true) & (set pgo_job=%~2) & shift & shift & goto CheckOpts
|
||||||
if "%~1"=="--test-marker" (set UseTestMarker=true) & shift & goto CheckOpts
|
if "%~1"=="--test-marker" (set UseTestMarker=true) & shift & goto CheckOpts
|
||||||
if "%~1"=="-V" shift & goto Version
|
if "%~1"=="-V" shift & goto Version
|
||||||
rem These use the actual property names used by MSBuild. We could just let
|
rem These use the actual property names used by MSBuild. We could just let
|
||||||
rem them in through the environment, but we specify them on the command line
|
rem them in through the environment, but we specify them on the command line
|
||||||
rem anyway for visibility so set defaults after this
|
rem anyway for visibility so set defaults after this
|
||||||
if "%~1"=="-e" (set IncludeExternals=true) & shift & goto CheckOpts
|
if "%~1"=="-e" (set IncludeExternals=true) & shift & goto CheckOpts
|
||||||
if "%~1"=="--no-ssl" (set IncludeSSL=false) & shift & goto CheckOpts
|
if "%~1"=="--no-ssl" (set IncludeSSL=false) & shift & goto CheckOpts
|
||||||
if "%~1"=="--no-tkinter" (set IncludeTkinter=false) & shift & goto CheckOpts
|
if "%~1"=="--no-tkinter" (set IncludeTkinter=false) & shift & goto CheckOpts
|
||||||
|
|
||||||
if "%IncludeExternals%"=="" set IncludeExternals=false
|
if "%IncludeExternals%"=="" set IncludeExternals=false
|
||||||
if "%IncludeSSL%"=="" set IncludeSSL=true
|
if "%IncludeSSL%"=="" set IncludeSSL=true
|
||||||
if "%IncludeTkinter%"=="" set IncludeTkinter=true
|
if "%IncludeTkinter%"=="" set IncludeTkinter=true
|
||||||
|
|
||||||
if "%IncludeExternals%"=="true" call "%dir%get_externals.bat"
|
if "%IncludeExternals%"=="true" call "%dir%get_externals.bat"
|
||||||
|
|
||||||
if "%platf%"=="x64" (
|
if "%platf%"=="x64" (
|
||||||
if "%on_64_bit%"=="true" (
|
if "%on_64_bit%"=="true" (
|
||||||
rem This ought to always be correct these days...
|
rem This ought to always be correct these days...
|
||||||
set vs_platf=amd64
|
set vs_platf=amd64
|
||||||
) else (
|
) else (
|
||||||
if "%do_pgo%"=="true" (
|
if "%do_pgo%"=="true" (
|
||||||
echo.ERROR: Cannot cross-compile with PGO
|
echo.ERROR: Cannot cross-compile with PGO
|
||||||
echo. 32bit operating system detected, if this is incorrect,
|
echo. 32bit operating system detected, if this is incorrect,
|
||||||
echo. make sure the ProgramFiles(x86^) environment variable is set
|
echo. make sure the ProgramFiles(x86^) environment variable is set
|
||||||
exit /b 1
|
exit /b 1
|
||||||
)
|
)
|
||||||
set vs_platf=x86_amd64
|
set vs_platf=x86_amd64
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
if not exist "%GIT%" where git > "%TEMP%\git.loc" 2> nul && set /P GIT= < "%TEMP%\git.loc" & del "%TEMP%\git.loc"
|
if not exist "%GIT%" where git > "%TEMP%\git.loc" 2> nul && set /P GIT= < "%TEMP%\git.loc" & del "%TEMP%\git.loc"
|
||||||
if exist "%GIT%" set GITProperty=/p:GIT="%GIT%"
|
if exist "%GIT%" set GITProperty=/p:GIT="%GIT%"
|
||||||
if not exist "%GIT%" echo Cannot find Git on PATH & set GITProperty=
|
if not exist "%GIT%" echo Cannot find Git on PATH & set GITProperty=
|
||||||
|
|
||||||
rem Setup the environment
|
rem Setup the environment
|
||||||
call "%dir%env.bat" %vs_platf% >nul
|
call "%dir%env.bat" %vs_platf% >nul
|
||||||
|
|
||||||
if "%kill%"=="true" call :Kill
|
if "%kill%"=="true" call :Kill
|
||||||
|
|
||||||
if "%do_pgo%"=="true" (
|
if "%do_pgo%"=="true" (
|
||||||
set conf=PGInstrument
|
set conf=PGInstrument
|
||||||
call :Build %1 %2 %3 %4 %5 %6 %7 %8 %9
|
call :Build %1 %2 %3 %4 %5 %6 %7 %8 %9
|
||||||
del /s "%dir%\*.pgc"
|
del /s "%dir%\*.pgc"
|
||||||
del /s "%dir%\..\Lib\*.pyc"
|
del /s "%dir%\..\Lib\*.pyc"
|
||||||
echo on
|
echo on
|
||||||
call "%dir%\..\python.bat" %pgo_job%
|
call "%dir%\..\python.bat" %pgo_job%
|
||||||
@echo off
|
@echo off
|
||||||
call :Kill
|
call :Kill
|
||||||
set conf=PGUpdate
|
set conf=PGUpdate
|
||||||
set target=Build
|
set target=Build
|
||||||
)
|
)
|
||||||
goto Build
|
goto Build
|
||||||
:Kill
|
:Kill
|
||||||
echo on
|
echo on
|
||||||
msbuild "%dir%\pythoncore.vcxproj" /t:KillPython %verbose%^
|
msbuild "%dir%\pythoncore.vcxproj" /t:KillPython %verbose%^
|
||||||
/p:Configuration=%conf% /p:Platform=%platf%^
|
/p:Configuration=%conf% /p:Platform=%platf%^
|
||||||
/p:KillPython=true
|
/p:KillPython=true
|
||||||
|
|
||||||
@echo off
|
@echo off
|
||||||
goto :eof
|
goto :eof
|
||||||
|
|
||||||
:Build
|
:Build
|
||||||
rem Call on MSBuild to do the work, echo the command.
|
rem Call on MSBuild to do the work, echo the command.
|
||||||
rem Passing %1-9 is not the preferred option, but argument parsing in
|
rem Passing %1-9 is not the preferred option, but argument parsing in
|
||||||
rem batch is, shall we say, "lackluster"
|
rem batch is, shall we say, "lackluster"
|
||||||
echo on
|
echo on
|
||||||
msbuild "%dir%pcbuild.proj" /t:%target% %parallel% %verbose%^
|
msbuild "%dir%pcbuild.proj" /t:%target% %parallel% %verbose%^
|
||||||
/p:Configuration=%conf% /p:Platform=%platf%^
|
/p:Configuration=%conf% /p:Platform=%platf%^
|
||||||
/p:IncludeExternals=%IncludeExternals%^
|
/p:IncludeExternals=%IncludeExternals%^
|
||||||
/p:IncludeSSL=%IncludeSSL% /p:IncludeTkinter=%IncludeTkinter%^
|
/p:IncludeSSL=%IncludeSSL% /p:IncludeTkinter=%IncludeTkinter%^
|
||||||
/p:UseTestMarker=%UseTestMarker% %GITProperty%^
|
/p:UseTestMarker=%UseTestMarker% %GITProperty%^
|
||||||
%1 %2 %3 %4 %5 %6 %7 %8 %9
|
%1 %2 %3 %4 %5 %6 %7 %8 %9
|
||||||
|
|
||||||
@echo off
|
@echo off
|
||||||
goto :eof
|
goto :eof
|
||||||
|
|
||||||
:Version
|
:Version
|
||||||
rem Display the current build version information
|
rem Display the current build version information
|
||||||
msbuild "%dir%python.props" /t:ShowVersionInfo /v:m /nologo %1 %2 %3 %4 %5 %6 %7 %8 %9
|
msbuild "%dir%python.props" /t:ShowVersionInfo /v:m /nologo %1 %2 %3 %4 %5 %6 %7 %8 %9
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
@%comspec% /k env.bat %*
|
@%comspec% /k env.bat %*
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
@echo off
|
@echo off
|
||||||
rem A batch program to clean a particular configuration,
|
rem A batch program to clean a particular configuration,
|
||||||
rem just for convenience.
|
rem just for convenience.
|
||||||
|
|
||||||
call %~dp0build.bat -t Clean %*
|
call %~dp0build.bat -t Clean %*
|
||||||
|
|
|
@ -1,16 +1,16 @@
|
||||||
@echo off
|
@echo off
|
||||||
rem This script adds the latest available tools to the path for the current
|
rem This script adds the latest available tools to the path for the current
|
||||||
rem command window. However, most builds of Python will ignore the version
|
rem command window. However, most builds of Python will ignore the version
|
||||||
rem of the tools on PATH and use PlatformToolset instead. Ideally, both sets of
|
rem of the tools on PATH and use PlatformToolset instead. Ideally, both sets of
|
||||||
rem tools should be the same version to avoid potential conflicts.
|
rem tools should be the same version to avoid potential conflicts.
|
||||||
rem
|
rem
|
||||||
rem To build Python with an earlier toolset, pass "/p:PlatformToolset=v100" (or
|
rem To build Python with an earlier toolset, pass "/p:PlatformToolset=v100" (or
|
||||||
rem 'v110', 'v120' or 'v140') to the build script.
|
rem 'v110', 'v120' or 'v140') to the build script.
|
||||||
|
|
||||||
echo Build environments: x86, amd64, x86_amd64
|
echo Build environments: x86, amd64, x86_amd64
|
||||||
echo.
|
echo.
|
||||||
set VSTOOLS=%VS140COMNTOOLS%
|
set VSTOOLS=%VS140COMNTOOLS%
|
||||||
if "%VSTOOLS%"=="" set VSTOOLS=%VS120COMNTOOLS%
|
if "%VSTOOLS%"=="" set VSTOOLS=%VS120COMNTOOLS%
|
||||||
if "%VSTOOLS%"=="" set VSTOOLS=%VS110COMNTOOLS%
|
if "%VSTOOLS%"=="" set VSTOOLS=%VS110COMNTOOLS%
|
||||||
if "%VSTOOLS%"=="" set VSTOOLS=%VS100COMNTOOLS%
|
if "%VSTOOLS%"=="" set VSTOOLS=%VS100COMNTOOLS%
|
||||||
call "%VSTOOLS%..\..\VC\vcvarsall.bat" %*
|
call "%VSTOOLS%..\..\VC\vcvarsall.bat" %*
|
||||||
|
|
|
@ -1,104 +1,104 @@
|
||||||
@echo off
|
@echo off
|
||||||
setlocal
|
setlocal
|
||||||
rem Simple script to fetch source for external libraries
|
rem Simple script to fetch source for external libraries
|
||||||
|
|
||||||
if not exist "%~dp0..\externals" mkdir "%~dp0..\externals"
|
if not exist "%~dp0..\externals" mkdir "%~dp0..\externals"
|
||||||
pushd "%~dp0..\externals"
|
pushd "%~dp0..\externals"
|
||||||
|
|
||||||
if "%SVNROOT%"=="" set SVNROOT=http://svn.python.org/projects/external/
|
if "%SVNROOT%"=="" set SVNROOT=http://svn.python.org/projects/external/
|
||||||
|
|
||||||
rem Optionally clean up first. Be warned that this can be very destructive!
|
rem Optionally clean up first. Be warned that this can be very destructive!
|
||||||
if not "%1"=="" (
|
if not "%1"=="" (
|
||||||
for %%c in (-c --clean --clean-only) do (
|
for %%c in (-c --clean --clean-only) do (
|
||||||
if "%1"=="%%c" goto clean
|
if "%1"=="%%c" goto clean
|
||||||
)
|
)
|
||||||
goto usage
|
goto usage
|
||||||
)
|
)
|
||||||
goto fetch
|
goto fetch
|
||||||
|
|
||||||
:clean
|
:clean
|
||||||
echo.Cleaning up external libraries.
|
echo.Cleaning up external libraries.
|
||||||
for /D %%d in (
|
for /D %%d in (
|
||||||
bzip2-*
|
bzip2-*
|
||||||
db-*
|
db-*
|
||||||
nasm-*
|
nasm-*
|
||||||
openssl-*
|
openssl-*
|
||||||
tcl-*
|
tcl-*
|
||||||
tcltk*
|
tcltk*
|
||||||
tk-*
|
tk-*
|
||||||
tix-*
|
tix-*
|
||||||
sqlite-*
|
sqlite-*
|
||||||
xz-*
|
xz-*
|
||||||
) do (
|
) do (
|
||||||
echo.Removing %%d
|
echo.Removing %%d
|
||||||
rmdir /s /q %%d
|
rmdir /s /q %%d
|
||||||
)
|
)
|
||||||
if "%1"=="--clean-only" (
|
if "%1"=="--clean-only" (
|
||||||
goto end
|
goto end
|
||||||
)
|
)
|
||||||
|
|
||||||
:fetch
|
:fetch
|
||||||
rem Fetch current versions
|
rem Fetch current versions
|
||||||
|
|
||||||
svn --version > nul 2>&1
|
svn --version > nul 2>&1
|
||||||
if ERRORLEVEL 9009 (
|
if ERRORLEVEL 9009 (
|
||||||
echo.svn.exe must be on your PATH.
|
echo.svn.exe must be on your PATH.
|
||||||
echo.Try TortoiseSVN (http://tortoisesvn.net/^) and be sure to check the
|
echo.Try TortoiseSVN (http://tortoisesvn.net/^) and be sure to check the
|
||||||
echo.command line tools option.
|
echo.command line tools option.
|
||||||
popd
|
popd
|
||||||
exit /b 1
|
exit /b 1
|
||||||
)
|
)
|
||||||
|
|
||||||
echo.Fetching external libraries...
|
echo.Fetching external libraries...
|
||||||
|
|
||||||
set libraries=
|
set libraries=
|
||||||
set libraries=%libraries% bzip2-1.0.6
|
set libraries=%libraries% bzip2-1.0.6
|
||||||
if NOT "%IncludeSSL%"=="false" set libraries=%libraries% nasm-2.11.06
|
if NOT "%IncludeSSL%"=="false" set libraries=%libraries% nasm-2.11.06
|
||||||
if NOT "%IncludeSSL%"=="false" set libraries=%libraries% openssl-1.0.2k
|
if NOT "%IncludeSSL%"=="false" set libraries=%libraries% openssl-1.0.2k
|
||||||
set libraries=%libraries% sqlite-3.14.2.0
|
set libraries=%libraries% sqlite-3.14.2.0
|
||||||
if NOT "%IncludeTkinter%"=="false" set libraries=%libraries% tcl-core-8.6.6.0
|
if NOT "%IncludeTkinter%"=="false" set libraries=%libraries% tcl-core-8.6.6.0
|
||||||
if NOT "%IncludeTkinter%"=="false" set libraries=%libraries% tk-8.6.6.0
|
if NOT "%IncludeTkinter%"=="false" set libraries=%libraries% tk-8.6.6.0
|
||||||
if NOT "%IncludeTkinter%"=="false" set libraries=%libraries% tix-8.4.3.6
|
if NOT "%IncludeTkinter%"=="false" set libraries=%libraries% tix-8.4.3.6
|
||||||
set libraries=%libraries% xz-5.2.2
|
set libraries=%libraries% xz-5.2.2
|
||||||
|
|
||||||
for %%e in (%libraries%) do (
|
for %%e in (%libraries%) do (
|
||||||
if exist %%e (
|
if exist %%e (
|
||||||
echo.%%e already exists, skipping.
|
echo.%%e already exists, skipping.
|
||||||
) else (
|
) else (
|
||||||
echo.Fetching %%e...
|
echo.Fetching %%e...
|
||||||
svn export -q %SVNROOT%%%e
|
svn export -q %SVNROOT%%%e
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
goto end
|
goto end
|
||||||
|
|
||||||
:usage
|
:usage
|
||||||
echo.invalid argument: %1
|
echo.invalid argument: %1
|
||||||
echo.usage: %~n0 [[ -c ^| --clean ] ^| --clean-only ]
|
echo.usage: %~n0 [[ -c ^| --clean ] ^| --clean-only ]
|
||||||
echo.
|
echo.
|
||||||
echo.Pull all sources necessary for compiling optional extension modules
|
echo.Pull all sources necessary for compiling optional extension modules
|
||||||
echo.that rely on external libraries. Requires svn.exe to be on your PATH
|
echo.that rely on external libraries. Requires svn.exe to be on your PATH
|
||||||
echo.and pulls sources from %SVNROOT%.
|
echo.and pulls sources from %SVNROOT%.
|
||||||
echo.
|
echo.
|
||||||
echo.Use the -c or --clean option to clean up all external library sources
|
echo.Use the -c or --clean option to clean up all external library sources
|
||||||
echo.before pulling in the current versions.
|
echo.before pulling in the current versions.
|
||||||
echo.
|
echo.
|
||||||
echo.Use the --clean-only option to do the same cleaning, without pulling in
|
echo.Use the --clean-only option to do the same cleaning, without pulling in
|
||||||
echo.anything new.
|
echo.anything new.
|
||||||
echo.
|
echo.
|
||||||
echo.Only the first argument is checked, all others are ignored.
|
echo.Only the first argument is checked, all others are ignored.
|
||||||
echo.
|
echo.
|
||||||
echo.**WARNING**: the cleaning options unconditionally remove any directory
|
echo.**WARNING**: the cleaning options unconditionally remove any directory
|
||||||
echo.that is a child of
|
echo.that is a child of
|
||||||
echo. %CD%
|
echo. %CD%
|
||||||
echo.and matches wildcard patterns beginning with bzip2-, db-, nasm-, openssl-,
|
echo.and matches wildcard patterns beginning with bzip2-, db-, nasm-, openssl-,
|
||||||
echo.tcl-, tcltk, tk-, tix-, sqlite-, or xz-, and as such has the potential
|
echo.tcl-, tcltk, tk-, tix-, sqlite-, or xz-, and as such has the potential
|
||||||
echo.to be very destructive if you are not aware of what it is doing. Use with
|
echo.to be very destructive if you are not aware of what it is doing. Use with
|
||||||
echo.caution!
|
echo.caution!
|
||||||
popd
|
popd
|
||||||
exit /b -1
|
exit /b -1
|
||||||
|
|
||||||
|
|
||||||
:end
|
:end
|
||||||
echo Finished.
|
echo Finished.
|
||||||
popd
|
popd
|
||||||
|
|
|
@ -1,15 +1,15 @@
|
||||||
@echo off
|
@echo off
|
||||||
rem start idle
|
rem start idle
|
||||||
rem Usage: idle [-d]
|
rem Usage: idle [-d]
|
||||||
rem -d Run Debug build (python_d.exe). Else release build.
|
rem -d Run Debug build (python_d.exe). Else release build.
|
||||||
|
|
||||||
setlocal
|
setlocal
|
||||||
set exe=win32\python
|
set exe=win32\python
|
||||||
PATH %PATH%;..\externals\tcltk\bin
|
PATH %PATH%;..\externals\tcltk\bin
|
||||||
|
|
||||||
if "%1"=="-d" (set exe=%exe%_d) & shift
|
if "%1"=="-d" (set exe=%exe%_d) & shift
|
||||||
|
|
||||||
set cmd=%exe% ../Lib/idlelib/idle.py %1 %2 %3 %4 %5 %6 %7 %8 %9
|
set cmd=%exe% ../Lib/idlelib/idle.py %1 %2 %3 %4 %5 %6 %7 %8 %9
|
||||||
|
|
||||||
echo on
|
echo on
|
||||||
%cmd%
|
%cmd%
|
||||||
|
|
1538
PCbuild/pcbuild.sln
1538
PCbuild/pcbuild.sln
File diff suppressed because it is too large
Load Diff
|
@ -1,12 +1,12 @@
|
||||||
@echo off
|
@echo off
|
||||||
if not defined HOST_PYTHON (
|
if not defined HOST_PYTHON (
|
||||||
if "%1" EQU "Debug" (
|
if "%1" EQU "Debug" (
|
||||||
shift
|
shift
|
||||||
set HOST_PYTHON=python_d.exe
|
set HOST_PYTHON=python_d.exe
|
||||||
if not exist python37_d.dll exit 1
|
if not exist python37_d.dll exit 1
|
||||||
) ELSE (
|
) ELSE (
|
||||||
set HOST_PYTHON=python.exe
|
set HOST_PYTHON=python.exe
|
||||||
if not exist python37.dll exit 1
|
if not exist python37.dll exit 1
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
%HOST_PYTHON% "%~dp0prepare_ssl.py" %1
|
%HOST_PYTHON% "%~dp0prepare_ssl.py" %1
|
||||||
|
|
|
@ -1,300 +1,300 @@
|
||||||
Quick Start Guide
|
Quick Start Guide
|
||||||
-----------------
|
-----------------
|
||||||
|
|
||||||
1. Install Microsoft Visual Studio 2015, any edition.
|
1. Install Microsoft Visual Studio 2015, any edition.
|
||||||
2. Install Subversion, and make sure 'svn.exe' is on your PATH.
|
2. Install Subversion, and make sure 'svn.exe' is on your PATH.
|
||||||
3. Run "build.bat -e" to build Python in 32-bit Release configuration.
|
3. Run "build.bat -e" to build Python in 32-bit Release configuration.
|
||||||
4. (Optional, but recommended) Run the test suite with "rt.bat -q".
|
4. (Optional, but recommended) Run the test suite with "rt.bat -q".
|
||||||
|
|
||||||
|
|
||||||
Building Python using Microsoft Visual C++
|
Building Python using Microsoft Visual C++
|
||||||
------------------------------------------
|
------------------------------------------
|
||||||
|
|
||||||
This directory is used to build CPython for Microsoft Windows NT version
|
This directory is used to build CPython for Microsoft Windows NT version
|
||||||
6.0 or higher (Windows Vista, Windows Server 2008, or later) on 32 and 64
|
6.0 or higher (Windows Vista, Windows Server 2008, or later) on 32 and 64
|
||||||
bit platforms. Using this directory requires an installation of
|
bit platforms. Using this directory requires an installation of
|
||||||
Microsoft Visual C++ 2015 (MSVC 14.0) of any edition. The specific
|
Microsoft Visual C++ 2015 (MSVC 14.0) of any edition. The specific
|
||||||
requirements are as follows:
|
requirements are as follows:
|
||||||
|
|
||||||
Visual Studio Express 2015 for Desktop
|
Visual Studio Express 2015 for Desktop
|
||||||
Visual Studio Professional 2015
|
Visual Studio Professional 2015
|
||||||
Either edition is sufficient for building all configurations except
|
Either edition is sufficient for building all configurations except
|
||||||
for Profile Guided Optimization.
|
for Profile Guided Optimization.
|
||||||
The Python build solution pcbuild.sln makes use of Solution Folders,
|
The Python build solution pcbuild.sln makes use of Solution Folders,
|
||||||
which this edition does not support. Any time pcbuild.sln is opened
|
which this edition does not support. Any time pcbuild.sln is opened
|
||||||
or reloaded by Visual Studio, a warning about Solution Folders will
|
or reloaded by Visual Studio, a warning about Solution Folders will
|
||||||
be displayed, which can be safely dismissed with no impact on your
|
be displayed, which can be safely dismissed with no impact on your
|
||||||
ability to build Python.
|
ability to build Python.
|
||||||
Required for building 64-bit Debug and Release configuration builds
|
Required for building 64-bit Debug and Release configuration builds
|
||||||
Visual Studio Premium 2015
|
Visual Studio Premium 2015
|
||||||
Required for building Release configuration builds that make use of
|
Required for building Release configuration builds that make use of
|
||||||
Profile Guided Optimization (PGO), on either platform.
|
Profile Guided Optimization (PGO), on either platform.
|
||||||
|
|
||||||
All you need to do to build is open the solution "pcbuild.sln" in Visual
|
All you need to do to build is open the solution "pcbuild.sln" in Visual
|
||||||
Studio, select the desired combination of configuration and platform,
|
Studio, select the desired combination of configuration and platform,
|
||||||
then build with "Build Solution". You can also build from the command
|
then build with "Build Solution". You can also build from the command
|
||||||
line using the "build.bat" script in this directory; see below for
|
line using the "build.bat" script in this directory; see below for
|
||||||
details. The solution is configured to build the projects in the correct
|
details. The solution is configured to build the projects in the correct
|
||||||
order.
|
order.
|
||||||
|
|
||||||
The solution currently supports two platforms. The Win32 platform is
|
The solution currently supports two platforms. The Win32 platform is
|
||||||
used to build standard x86-compatible 32-bit binaries, output into the
|
used to build standard x86-compatible 32-bit binaries, output into the
|
||||||
win32 sub-directory. The x64 platform is used for building 64-bit AMD64
|
win32 sub-directory. The x64 platform is used for building 64-bit AMD64
|
||||||
(aka x86_64 or EM64T) binaries, output into the amd64 sub-directory.
|
(aka x86_64 or EM64T) binaries, output into the amd64 sub-directory.
|
||||||
The Itanium (IA-64) platform is no longer supported.
|
The Itanium (IA-64) platform is no longer supported.
|
||||||
|
|
||||||
Four configuration options are supported by the solution:
|
Four configuration options are supported by the solution:
|
||||||
Debug
|
Debug
|
||||||
Used to build Python with extra debugging capabilities, equivalent
|
Used to build Python with extra debugging capabilities, equivalent
|
||||||
to using ./configure --with-pydebug on UNIX. All binaries built
|
to using ./configure --with-pydebug on UNIX. All binaries built
|
||||||
using this configuration have "_d" added to their name:
|
using this configuration have "_d" added to their name:
|
||||||
python37_d.dll, python_d.exe, parser_d.pyd, and so on. Both the
|
python37_d.dll, python_d.exe, parser_d.pyd, and so on. Both the
|
||||||
build and rt (run test) batch files in this directory accept a -d
|
build and rt (run test) batch files in this directory accept a -d
|
||||||
option for debug builds. If you are building Python to help with
|
option for debug builds. If you are building Python to help with
|
||||||
development of CPython, you will most likely use this configuration.
|
development of CPython, you will most likely use this configuration.
|
||||||
PGInstrument, PGUpdate
|
PGInstrument, PGUpdate
|
||||||
Used to build Python in Release configuration using PGO, which
|
Used to build Python in Release configuration using PGO, which
|
||||||
requires Premium Edition of Visual Studio. See the "Profile
|
requires Premium Edition of Visual Studio. See the "Profile
|
||||||
Guided Optimization" section below for more information. Build
|
Guided Optimization" section below for more information. Build
|
||||||
output from each of these configurations lands in its own
|
output from each of these configurations lands in its own
|
||||||
sub-directory of this directory. The official Python releases may
|
sub-directory of this directory. The official Python releases may
|
||||||
be built using these configurations.
|
be built using these configurations.
|
||||||
Release
|
Release
|
||||||
Used to build Python as it is meant to be used in production
|
Used to build Python as it is meant to be used in production
|
||||||
settings, though without PGO.
|
settings, though without PGO.
|
||||||
|
|
||||||
|
|
||||||
Building Python using the build.bat script
|
Building Python using the build.bat script
|
||||||
----------------------------------------------
|
----------------------------------------------
|
||||||
|
|
||||||
In this directory you can find build.bat, a script designed to make
|
In this directory you can find build.bat, a script designed to make
|
||||||
building Python on Windows simpler. This script will use the env.bat
|
building Python on Windows simpler. This script will use the env.bat
|
||||||
script to detect one of Visual Studio 2015, 2013, 2012, or 2010, any of
|
script to detect one of Visual Studio 2015, 2013, 2012, or 2010, any of
|
||||||
which may be used to build Python, though only Visual Studio 2015 is
|
which may be used to build Python, though only Visual Studio 2015 is
|
||||||
officially supported.
|
officially supported.
|
||||||
|
|
||||||
By default, build.bat will build Python in Release configuration for
|
By default, build.bat will build Python in Release configuration for
|
||||||
the 32-bit Win32 platform. It accepts several arguments to change
|
the 32-bit Win32 platform. It accepts several arguments to change
|
||||||
this behavior, try `build.bat -h` to learn more.
|
this behavior, try `build.bat -h` to learn more.
|
||||||
|
|
||||||
|
|
||||||
C Runtime
|
C Runtime
|
||||||
---------
|
---------
|
||||||
|
|
||||||
Visual Studio 2015 uses version 14 of the C runtime (MSVCRT14). The
|
Visual Studio 2015 uses version 14 of the C runtime (MSVCRT14). The
|
||||||
executables no longer use the "Side by Side" assemblies used in previous
|
executables no longer use the "Side by Side" assemblies used in previous
|
||||||
versions of the compiler. This simplifies distribution of applications.
|
versions of the compiler. This simplifies distribution of applications.
|
||||||
|
|
||||||
The run time libraries are available under the VC/Redist folder of your
|
The run time libraries are available under the VC/Redist folder of your
|
||||||
Visual Studio distribution. For more info, see the Readme in the
|
Visual Studio distribution. For more info, see the Readme in the
|
||||||
VC/Redist folder.
|
VC/Redist folder.
|
||||||
|
|
||||||
|
|
||||||
Sub-Projects
|
Sub-Projects
|
||||||
------------
|
------------
|
||||||
|
|
||||||
The CPython project is split up into several smaller sub-projects which
|
The CPython project is split up into several smaller sub-projects which
|
||||||
are managed by the pcbuild.sln solution file. Each sub-project is
|
are managed by the pcbuild.sln solution file. Each sub-project is
|
||||||
represented by a .vcxproj and a .vcxproj.filters file starting with the
|
represented by a .vcxproj and a .vcxproj.filters file starting with the
|
||||||
name of the sub-project. These sub-projects fall into a few general
|
name of the sub-project. These sub-projects fall into a few general
|
||||||
categories:
|
categories:
|
||||||
|
|
||||||
The following sub-projects represent the bare minimum required to build
|
The following sub-projects represent the bare minimum required to build
|
||||||
a functioning CPython interpreter. If nothing else builds but these,
|
a functioning CPython interpreter. If nothing else builds but these,
|
||||||
you'll have a very limited but usable python.exe:
|
you'll have a very limited but usable python.exe:
|
||||||
pythoncore
|
pythoncore
|
||||||
.dll and .lib
|
.dll and .lib
|
||||||
python
|
python
|
||||||
.exe
|
.exe
|
||||||
|
|
||||||
These sub-projects provide extra executables that are useful for running
|
These sub-projects provide extra executables that are useful for running
|
||||||
CPython in different ways:
|
CPython in different ways:
|
||||||
pythonw
|
pythonw
|
||||||
pythonw.exe, a variant of python.exe that doesn't open a Command
|
pythonw.exe, a variant of python.exe that doesn't open a Command
|
||||||
Prompt window
|
Prompt window
|
||||||
pylauncher
|
pylauncher
|
||||||
py.exe, the Python Launcher for Windows, see
|
py.exe, the Python Launcher for Windows, see
|
||||||
http://docs.python.org/3/using/windows.html#launcher
|
http://docs.python.org/3/using/windows.html#launcher
|
||||||
pywlauncher
|
pywlauncher
|
||||||
pyw.exe, a variant of py.exe that doesn't open a Command Prompt
|
pyw.exe, a variant of py.exe that doesn't open a Command Prompt
|
||||||
window
|
window
|
||||||
_testembed
|
_testembed
|
||||||
_testembed.exe, a small program that embeds Python for testing
|
_testembed.exe, a small program that embeds Python for testing
|
||||||
purposes, used by test_capi.py
|
purposes, used by test_capi.py
|
||||||
|
|
||||||
These are miscellaneous sub-projects that don't really fit the other
|
These are miscellaneous sub-projects that don't really fit the other
|
||||||
categories:
|
categories:
|
||||||
_freeze_importlib
|
_freeze_importlib
|
||||||
_freeze_importlib.exe, used to regenerate Python\importlib.h after
|
_freeze_importlib.exe, used to regenerate Python\importlib.h after
|
||||||
changes have been made to Lib\importlib\_bootstrap.py
|
changes have been made to Lib\importlib\_bootstrap.py
|
||||||
python3dll
|
python3dll
|
||||||
python3.dll, the PEP 384 Stable ABI dll
|
python3.dll, the PEP 384 Stable ABI dll
|
||||||
xxlimited
|
xxlimited
|
||||||
builds an example module that makes use of the PEP 384 Stable ABI,
|
builds an example module that makes use of the PEP 384 Stable ABI,
|
||||||
see Modules\xxlimited.c
|
see Modules\xxlimited.c
|
||||||
|
|
||||||
The following sub-projects are for individual modules of the standard
|
The following sub-projects are for individual modules of the standard
|
||||||
library which are implemented in C; each one builds a DLL (renamed to
|
library which are implemented in C; each one builds a DLL (renamed to
|
||||||
.pyd) of the same name as the project:
|
.pyd) of the same name as the project:
|
||||||
_ctypes
|
_ctypes
|
||||||
_ctypes_test
|
_ctypes_test
|
||||||
_decimal
|
_decimal
|
||||||
_elementtree
|
_elementtree
|
||||||
_hashlib
|
_hashlib
|
||||||
_msi
|
_msi
|
||||||
_multiprocessing
|
_multiprocessing
|
||||||
_overlapped
|
_overlapped
|
||||||
_socket
|
_socket
|
||||||
_testcapi
|
_testcapi
|
||||||
_testbuffer
|
_testbuffer
|
||||||
_testimportmultiple
|
_testimportmultiple
|
||||||
pyexpat
|
pyexpat
|
||||||
select
|
select
|
||||||
unicodedata
|
unicodedata
|
||||||
winsound
|
winsound
|
||||||
|
|
||||||
The following Python-controlled sub-projects wrap external projects.
|
The following Python-controlled sub-projects wrap external projects.
|
||||||
Note that these external libraries are not necessary for a working
|
Note that these external libraries are not necessary for a working
|
||||||
interpreter, but they do implement several major features. See the
|
interpreter, but they do implement several major features. See the
|
||||||
"Getting External Sources" section below for additional information
|
"Getting External Sources" section below for additional information
|
||||||
about getting the source for building these libraries. The sub-projects
|
about getting the source for building these libraries. The sub-projects
|
||||||
are:
|
are:
|
||||||
_bz2
|
_bz2
|
||||||
Python wrapper for version 1.0.6 of the libbzip2 compression library
|
Python wrapper for version 1.0.6 of the libbzip2 compression library
|
||||||
Homepage:
|
Homepage:
|
||||||
http://www.bzip.org/
|
http://www.bzip.org/
|
||||||
_lzma
|
_lzma
|
||||||
Python wrapper for the liblzma compression library, using pre-built
|
Python wrapper for the liblzma compression library, using pre-built
|
||||||
binaries of XZ Utils version 5.0.5
|
binaries of XZ Utils version 5.0.5
|
||||||
Homepage:
|
Homepage:
|
||||||
http://tukaani.org/xz/
|
http://tukaani.org/xz/
|
||||||
_ssl
|
_ssl
|
||||||
Python wrapper for version 1.0.2k of the OpenSSL secure sockets
|
Python wrapper for version 1.0.2k of the OpenSSL secure sockets
|
||||||
library, which is built by ssl.vcxproj
|
library, which is built by ssl.vcxproj
|
||||||
Homepage:
|
Homepage:
|
||||||
http://www.openssl.org/
|
http://www.openssl.org/
|
||||||
|
|
||||||
Building OpenSSL requires nasm.exe (the Netwide Assembler), version
|
Building OpenSSL requires nasm.exe (the Netwide Assembler), version
|
||||||
2.10 or newer from
|
2.10 or newer from
|
||||||
http://www.nasm.us/
|
http://www.nasm.us/
|
||||||
to be somewhere on your PATH. More recent versions of OpenSSL may
|
to be somewhere on your PATH. More recent versions of OpenSSL may
|
||||||
need a later version of NASM. If OpenSSL's self tests don't pass,
|
need a later version of NASM. If OpenSSL's self tests don't pass,
|
||||||
you should first try to update NASM and do a full rebuild of
|
you should first try to update NASM and do a full rebuild of
|
||||||
OpenSSL. If you use the PCbuild\get_externals.bat method
|
OpenSSL. If you use the PCbuild\get_externals.bat method
|
||||||
for getting sources, it also downloads a version of NASM which the
|
for getting sources, it also downloads a version of NASM which the
|
||||||
libeay/ssleay sub-projects use.
|
libeay/ssleay sub-projects use.
|
||||||
|
|
||||||
The libeay/ssleay sub-projects expect your OpenSSL sources to have
|
The libeay/ssleay sub-projects expect your OpenSSL sources to have
|
||||||
already been configured and be ready to build. If you get your sources
|
already been configured and be ready to build. If you get your sources
|
||||||
from svn.python.org as suggested in the "Getting External Sources"
|
from svn.python.org as suggested in the "Getting External Sources"
|
||||||
section below, the OpenSSL source will already be ready to go. If
|
section below, the OpenSSL source will already be ready to go. If
|
||||||
you want to build a different version, you will need to run
|
you want to build a different version, you will need to run
|
||||||
|
|
||||||
PCbuild\prepare_ssl.py path\to\openssl-source-dir
|
PCbuild\prepare_ssl.py path\to\openssl-source-dir
|
||||||
|
|
||||||
That script will prepare your OpenSSL sources in the same way that
|
That script will prepare your OpenSSL sources in the same way that
|
||||||
those available on svn.python.org have been prepared. Note that
|
those available on svn.python.org have been prepared. Note that
|
||||||
Perl must be installed and available on your PATH to configure
|
Perl must be installed and available on your PATH to configure
|
||||||
OpenSSL. ActivePerl is recommended and is available from
|
OpenSSL. ActivePerl is recommended and is available from
|
||||||
http://www.activestate.com/activeperl/
|
http://www.activestate.com/activeperl/
|
||||||
|
|
||||||
The libeay and ssleay sub-projects will build the modules of OpenSSL
|
The libeay and ssleay sub-projects will build the modules of OpenSSL
|
||||||
required by _ssl and _hashlib and may need to be manually updated when
|
required by _ssl and _hashlib and may need to be manually updated when
|
||||||
upgrading to a newer version of OpenSSL or when adding new
|
upgrading to a newer version of OpenSSL or when adding new
|
||||||
functionality to _ssl or _hashlib. They will not clean up their output
|
functionality to _ssl or _hashlib. They will not clean up their output
|
||||||
with the normal Clean target; CleanAll should be used instead.
|
with the normal Clean target; CleanAll should be used instead.
|
||||||
_sqlite3
|
_sqlite3
|
||||||
Wraps SQLite 3.14.2.0, which is itself built by sqlite3.vcxproj
|
Wraps SQLite 3.14.2.0, which is itself built by sqlite3.vcxproj
|
||||||
Homepage:
|
Homepage:
|
||||||
http://www.sqlite.org/
|
http://www.sqlite.org/
|
||||||
_tkinter
|
_tkinter
|
||||||
Wraps version 8.6.6 of the Tk windowing system.
|
Wraps version 8.6.6 of the Tk windowing system.
|
||||||
Homepage:
|
Homepage:
|
||||||
http://www.tcl.tk/
|
http://www.tcl.tk/
|
||||||
|
|
||||||
Tkinter's dependencies are built by the tcl.vcxproj and tk.vcxproj
|
Tkinter's dependencies are built by the tcl.vcxproj and tk.vcxproj
|
||||||
projects. The tix.vcxproj project also builds the Tix extended
|
projects. The tix.vcxproj project also builds the Tix extended
|
||||||
widget set for use with Tkinter.
|
widget set for use with Tkinter.
|
||||||
|
|
||||||
Those three projects install their respective components in a
|
Those three projects install their respective components in a
|
||||||
directory alongside the source directories called "tcltk" on
|
directory alongside the source directories called "tcltk" on
|
||||||
Win32 and "tcltk64" on x64. They also copy the Tcl and Tk DLLs
|
Win32 and "tcltk64" on x64. They also copy the Tcl and Tk DLLs
|
||||||
into the current output directory, which should ensure that Tkinter
|
into the current output directory, which should ensure that Tkinter
|
||||||
is able to load Tcl/Tk without having to change your PATH.
|
is able to load Tcl/Tk without having to change your PATH.
|
||||||
|
|
||||||
The tcl, tk, and tix sub-projects do not clean their builds with
|
The tcl, tk, and tix sub-projects do not clean their builds with
|
||||||
the normal Clean target; if you need to rebuild, you should use the
|
the normal Clean target; if you need to rebuild, you should use the
|
||||||
CleanAll target or manually delete their builds.
|
CleanAll target or manually delete their builds.
|
||||||
|
|
||||||
|
|
||||||
Getting External Sources
|
Getting External Sources
|
||||||
------------------------
|
------------------------
|
||||||
|
|
||||||
The last category of sub-projects listed above wrap external projects
|
The last category of sub-projects listed above wrap external projects
|
||||||
Python doesn't control, and as such a little more work is required in
|
Python doesn't control, and as such a little more work is required in
|
||||||
order to download the relevant source files for each project before they
|
order to download the relevant source files for each project before they
|
||||||
can be built. However, a simple script is provided to make this as
|
can be built. However, a simple script is provided to make this as
|
||||||
painless as possible, called "get_externals.bat" and located in this
|
painless as possible, called "get_externals.bat" and located in this
|
||||||
directory. This script extracts all the external sub-projects from
|
directory. This script extracts all the external sub-projects from
|
||||||
http://svn.python.org/projects/external
|
http://svn.python.org/projects/external
|
||||||
via Subversion (so you'll need svn.exe on your PATH) and places them
|
via Subversion (so you'll need svn.exe on your PATH) and places them
|
||||||
in ..\externals (relative to this directory).
|
in ..\externals (relative to this directory).
|
||||||
|
|
||||||
It is also possible to download sources from each project's homepage,
|
It is also possible to download sources from each project's homepage,
|
||||||
though you may have to change folder names or pass the names to MSBuild
|
though you may have to change folder names or pass the names to MSBuild
|
||||||
as the values of certain properties in order for the build solution to
|
as the values of certain properties in order for the build solution to
|
||||||
find them. This is an advanced topic and not necessarily fully
|
find them. This is an advanced topic and not necessarily fully
|
||||||
supported.
|
supported.
|
||||||
|
|
||||||
The get_externals.bat script is called automatically by build.bat when
|
The get_externals.bat script is called automatically by build.bat when
|
||||||
you pass the '-e' option to it.
|
you pass the '-e' option to it.
|
||||||
|
|
||||||
|
|
||||||
Profile Guided Optimization
|
Profile Guided Optimization
|
||||||
---------------------------
|
---------------------------
|
||||||
|
|
||||||
The solution has two configurations for PGO. The PGInstrument
|
The solution has two configurations for PGO. The PGInstrument
|
||||||
configuration must be built first. The PGInstrument binaries are linked
|
configuration must be built first. The PGInstrument binaries are linked
|
||||||
against a profiling library and contain extra debug information. The
|
against a profiling library and contain extra debug information. The
|
||||||
PGUpdate configuration takes the profiling data and generates optimized
|
PGUpdate configuration takes the profiling data and generates optimized
|
||||||
binaries.
|
binaries.
|
||||||
|
|
||||||
The build_pgo.bat script automates the creation of optimized binaries.
|
The build_pgo.bat script automates the creation of optimized binaries.
|
||||||
It creates the PGI files, runs the unit test suite or PyBench with the
|
It creates the PGI files, runs the unit test suite or PyBench with the
|
||||||
PGI python, and finally creates the optimized files.
|
PGI python, and finally creates the optimized files.
|
||||||
|
|
||||||
See
|
See
|
||||||
http://msdn.microsoft.com/en-us/library/e7k32f4k(VS.140).aspx
|
http://msdn.microsoft.com/en-us/library/e7k32f4k(VS.140).aspx
|
||||||
for more on this topic.
|
for more on this topic.
|
||||||
|
|
||||||
|
|
||||||
Static library
|
Static library
|
||||||
--------------
|
--------------
|
||||||
|
|
||||||
The solution has no configuration for static libraries. However it is
|
The solution has no configuration for static libraries. However it is
|
||||||
easy to build a static library instead of a DLL. You simply have to set
|
easy to build a static library instead of a DLL. You simply have to set
|
||||||
the "Configuration Type" to "Static Library (.lib)" and alter the
|
the "Configuration Type" to "Static Library (.lib)" and alter the
|
||||||
preprocessor macro "Py_ENABLE_SHARED" to "Py_NO_ENABLE_SHARED". You may
|
preprocessor macro "Py_ENABLE_SHARED" to "Py_NO_ENABLE_SHARED". You may
|
||||||
also have to change the "Runtime Library" from "Multi-threaded DLL
|
also have to change the "Runtime Library" from "Multi-threaded DLL
|
||||||
(/MD)" to "Multi-threaded (/MT)".
|
(/MD)" to "Multi-threaded (/MT)".
|
||||||
|
|
||||||
|
|
||||||
Visual Studio properties
|
Visual Studio properties
|
||||||
------------------------
|
------------------------
|
||||||
|
|
||||||
The PCbuild solution makes use of Visual Studio property files (*.props)
|
The PCbuild solution makes use of Visual Studio property files (*.props)
|
||||||
to simplify each project. The properties can be viewed in the Property
|
to simplify each project. The properties can be viewed in the Property
|
||||||
Manager (View -> Other Windows -> Property Manager) but should be
|
Manager (View -> Other Windows -> Property Manager) but should be
|
||||||
carefully modified by hand.
|
carefully modified by hand.
|
||||||
|
|
||||||
The property files used are:
|
The property files used are:
|
||||||
* python (versions, directories and build names)
|
* python (versions, directories and build names)
|
||||||
* pyproject (base settings for all projects)
|
* pyproject (base settings for all projects)
|
||||||
* openssl (used by libeay and ssleay projects)
|
* openssl (used by libeay and ssleay projects)
|
||||||
* tcltk (used by _tkinter, tcl, tk and tix projects)
|
* tcltk (used by _tkinter, tcl, tk and tix projects)
|
||||||
|
|
||||||
The pyproject property file defines all of the build settings for each
|
The pyproject property file defines all of the build settings for each
|
||||||
project, with some projects overriding certain specific values. The GUI
|
project, with some projects overriding certain specific values. The GUI
|
||||||
doesn't always reflect the correct settings and may confuse the user
|
doesn't always reflect the correct settings and may confuse the user
|
||||||
with false information, especially for settings that automatically adapt
|
with false information, especially for settings that automatically adapt
|
||||||
for diffirent configurations.
|
for diffirent configurations.
|
||||||
|
|
126
PCbuild/rt.bat
126
PCbuild/rt.bat
|
@ -1,63 +1,63 @@
|
||||||
@echo off
|
@echo off
|
||||||
rem Run Tests. Run the regression test suite.
|
rem Run Tests. Run the regression test suite.
|
||||||
rem Usage: rt [-d] [-O] [-q] [-x64] regrtest_args
|
rem Usage: rt [-d] [-O] [-q] [-x64] regrtest_args
|
||||||
rem -d Run Debug build (python_d.exe). Else release build.
|
rem -d Run Debug build (python_d.exe). Else release build.
|
||||||
rem -O Run python.exe or python_d.exe (see -d) with -O.
|
rem -O Run python.exe or python_d.exe (see -d) with -O.
|
||||||
rem -q "quick" -- normally the tests are run twice, the first time
|
rem -q "quick" -- normally the tests are run twice, the first time
|
||||||
rem after deleting all the .pyc files reachable from Lib/.
|
rem after deleting all the .pyc files reachable from Lib/.
|
||||||
rem -q runs the tests just once, and without deleting .pyc files.
|
rem -q runs the tests just once, and without deleting .pyc files.
|
||||||
rem -x64 Run the 64-bit build of python (or python_d if -d was specified)
|
rem -x64 Run the 64-bit build of python (or python_d if -d was specified)
|
||||||
rem from the 'amd64' dir instead of the 32-bit build in this dir.
|
rem from the 'amd64' dir instead of the 32-bit build in this dir.
|
||||||
rem All leading instances of these switches are shifted off, and
|
rem All leading instances of these switches are shifted off, and
|
||||||
rem whatever remains (up to 9 arguments) is passed to regrtest.py.
|
rem whatever remains (up to 9 arguments) is passed to regrtest.py.
|
||||||
rem For example,
|
rem For example,
|
||||||
rem rt -O -d -x test_thread
|
rem rt -O -d -x test_thread
|
||||||
rem runs
|
rem runs
|
||||||
rem python_d -O ../lib/test/regrtest.py -x test_thread
|
rem python_d -O ../lib/test/regrtest.py -x test_thread
|
||||||
rem twice, and
|
rem twice, and
|
||||||
rem rt -q -g test_binascii
|
rem rt -q -g test_binascii
|
||||||
rem runs
|
rem runs
|
||||||
rem python_d ../lib/test/regrtest.py -g test_binascii
|
rem python_d ../lib/test/regrtest.py -g test_binascii
|
||||||
rem to generate the expected-output file for binascii quickly.
|
rem to generate the expected-output file for binascii quickly.
|
||||||
rem
|
rem
|
||||||
rem Confusing: if you want to pass a comma-separated list, like
|
rem Confusing: if you want to pass a comma-separated list, like
|
||||||
rem -u network,largefile
|
rem -u network,largefile
|
||||||
rem then you have to quote it on the rt line, like
|
rem then you have to quote it on the rt line, like
|
||||||
rem rt -u "network,largefile"
|
rem rt -u "network,largefile"
|
||||||
|
|
||||||
setlocal
|
setlocal
|
||||||
|
|
||||||
set pcbuild=%~dp0
|
set pcbuild=%~dp0
|
||||||
set prefix=%pcbuild%win32\
|
set prefix=%pcbuild%win32\
|
||||||
set suffix=
|
set suffix=
|
||||||
set qmode=
|
set qmode=
|
||||||
set dashO=
|
set dashO=
|
||||||
set regrtestargs=
|
set regrtestargs=
|
||||||
|
|
||||||
:CheckOpts
|
:CheckOpts
|
||||||
if "%1"=="-O" (set dashO=-O) & shift & goto CheckOpts
|
if "%1"=="-O" (set dashO=-O) & shift & goto CheckOpts
|
||||||
if "%1"=="-q" (set qmode=yes) & shift & goto CheckOpts
|
if "%1"=="-q" (set qmode=yes) & shift & goto CheckOpts
|
||||||
if "%1"=="-d" (set suffix=_d) & shift & goto CheckOpts
|
if "%1"=="-d" (set suffix=_d) & shift & goto CheckOpts
|
||||||
if "%1"=="-x64" (set prefix=%pcbuild%amd64\) & shift & goto CheckOpts
|
if "%1"=="-x64" (set prefix=%pcbuild%amd64\) & shift & goto CheckOpts
|
||||||
if NOT "%1"=="" (set regrtestargs=%regrtestargs% %1) & shift & goto CheckOpts
|
if NOT "%1"=="" (set regrtestargs=%regrtestargs% %1) & shift & goto CheckOpts
|
||||||
|
|
||||||
set exe=%prefix%python%suffix%.exe
|
set exe=%prefix%python%suffix%.exe
|
||||||
set cmd="%exe%" %dashO% -u -Wd -E -bb -m test %regrtestargs%
|
set cmd="%exe%" %dashO% -u -Wd -E -bb -m test %regrtestargs%
|
||||||
if defined qmode goto Qmode
|
if defined qmode goto Qmode
|
||||||
|
|
||||||
echo Deleting .pyc files ...
|
echo Deleting .pyc files ...
|
||||||
"%exe%" "%pcbuild%rmpyc.py"
|
"%exe%" "%pcbuild%rmpyc.py"
|
||||||
|
|
||||||
echo Cleaning _pth files ...
|
echo Cleaning _pth files ...
|
||||||
if exist %prefix%*._pth del %prefix%*._pth
|
if exist %prefix%*._pth del %prefix%*._pth
|
||||||
|
|
||||||
echo on
|
echo on
|
||||||
%cmd%
|
%cmd%
|
||||||
@echo off
|
@echo off
|
||||||
|
|
||||||
echo About to run again without deleting .pyc first:
|
echo About to run again without deleting .pyc first:
|
||||||
pause
|
pause
|
||||||
|
|
||||||
:Qmode
|
:Qmode
|
||||||
echo on
|
echo on
|
||||||
%cmd%
|
%cmd%
|
||||||
|
|
|
@ -1,17 +1,17 @@
|
||||||
@rem Used by the buildbot "compile" step.
|
@rem Used by the buildbot "compile" step.
|
||||||
|
|
||||||
@rem Clean up
|
@rem Clean up
|
||||||
call "%~dp0clean.bat" %*
|
call "%~dp0clean.bat" %*
|
||||||
|
|
||||||
@rem If you need the buildbots to start fresh (such as when upgrading to
|
@rem If you need the buildbots to start fresh (such as when upgrading to
|
||||||
@rem a new version of an external library, especially Tcl/Tk):
|
@rem a new version of an external library, especially Tcl/Tk):
|
||||||
@rem 1) uncomment the following line:
|
@rem 1) uncomment the following line:
|
||||||
|
|
||||||
@rem call "%~dp0..\..\PCbuild\get_externals.bat" --clean-only
|
@rem call "%~dp0..\..\PCbuild\get_externals.bat" --clean-only
|
||||||
|
|
||||||
@rem 2) commit and push
|
@rem 2) commit and push
|
||||||
@rem 3) wait for all Windows bots to start a build with that changeset
|
@rem 3) wait for all Windows bots to start a build with that changeset
|
||||||
@rem 4) re-comment, commit and push again
|
@rem 4) re-comment, commit and push again
|
||||||
|
|
||||||
@rem Do the build
|
@rem Do the build
|
||||||
call "%~dp0..\..\PCbuild\build.bat" -e -d -k -v %*
|
call "%~dp0..\..\PCbuild\build.bat" -e -d -k -v %*
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
@rem Used by the buildbot "buildmsi" step.
|
@rem Used by the buildbot "buildmsi" step.
|
||||||
setlocal
|
setlocal
|
||||||
|
|
||||||
pushd
|
pushd
|
||||||
|
|
||||||
@rem build both snapshot MSIs
|
@rem build both snapshot MSIs
|
||||||
call "%~dp0..\msi\build.bat" -x86 -x64
|
call "%~dp0..\msi\build.bat" -x86 -x64
|
||||||
|
|
||||||
popd
|
popd
|
|
@ -1,17 +1,17 @@
|
||||||
@echo off
|
@echo off
|
||||||
rem Used by the buildbot "clean" step.
|
rem Used by the buildbot "clean" step.
|
||||||
|
|
||||||
setlocal
|
setlocal
|
||||||
set root=%~dp0..\..
|
set root=%~dp0..\..
|
||||||
set pcbuild=%root%\PCbuild
|
set pcbuild=%root%\PCbuild
|
||||||
|
|
||||||
echo Deleting build
|
echo Deleting build
|
||||||
call "%pcbuild%\build.bat" -t Clean -k %*
|
call "%pcbuild%\build.bat" -t Clean -k %*
|
||||||
call "%pcbuild%\build.bat" -t Clean -k -d %*
|
call "%pcbuild%\build.bat" -t Clean -k -d %*
|
||||||
|
|
||||||
echo Deleting .pyc/.pyo files ...
|
echo Deleting .pyc/.pyo files ...
|
||||||
del /s "%root%\Lib\*.pyc" "%root%\Lib\*.pyo"
|
del /s "%root%\Lib\*.pyc" "%root%\Lib\*.pyo"
|
||||||
|
|
||||||
echo Deleting test leftovers ...
|
echo Deleting test leftovers ...
|
||||||
rmdir /s /q "%root%\build"
|
rmdir /s /q "%root%\build"
|
||||||
del /s "%pcbuild%\python*.zip"
|
del /s "%pcbuild%\python*.zip"
|
||||||
|
|
|
@ -1,19 +1,19 @@
|
||||||
@echo off
|
@echo off
|
||||||
rem Used by the buildbot "test" step.
|
rem Used by the buildbot "test" step.
|
||||||
setlocal
|
setlocal
|
||||||
|
|
||||||
set here=%~dp0
|
set here=%~dp0
|
||||||
set rt_opts=-q -d
|
set rt_opts=-q -d
|
||||||
set regrtest_args=-j1
|
set regrtest_args=-j1
|
||||||
|
|
||||||
:CheckOpts
|
:CheckOpts
|
||||||
if "%1"=="-x64" (set rt_opts=%rt_opts% %1) & shift & goto CheckOpts
|
if "%1"=="-x64" (set rt_opts=%rt_opts% %1) & shift & goto CheckOpts
|
||||||
if "%1"=="-d" (set rt_opts=%rt_opts% %1) & shift & goto CheckOpts
|
if "%1"=="-d" (set rt_opts=%rt_opts% %1) & shift & goto CheckOpts
|
||||||
if "%1"=="-O" (set rt_opts=%rt_opts% %1) & shift & goto CheckOpts
|
if "%1"=="-O" (set rt_opts=%rt_opts% %1) & shift & goto CheckOpts
|
||||||
if "%1"=="-q" (set rt_opts=%rt_opts% %1) & shift & goto CheckOpts
|
if "%1"=="-q" (set rt_opts=%rt_opts% %1) & shift & goto CheckOpts
|
||||||
if "%1"=="+d" (set rt_opts=%rt_opts:-d=%) & shift & goto CheckOpts
|
if "%1"=="+d" (set rt_opts=%rt_opts:-d=%) & shift & goto CheckOpts
|
||||||
if "%1"=="+q" (set rt_opts=%rt_opts:-q=%) & shift & goto CheckOpts
|
if "%1"=="+q" (set rt_opts=%rt_opts:-q=%) & shift & goto CheckOpts
|
||||||
if NOT "%1"=="" (set regrtest_args=%regrtest_args% %1) & shift & goto CheckOpts
|
if NOT "%1"=="" (set regrtest_args=%regrtest_args% %1) & shift & goto CheckOpts
|
||||||
|
|
||||||
echo on
|
echo on
|
||||||
call "%here%..\..\PCbuild\rt.bat" %rt_opts% -uall -rwW --slowest --timeout=1200 %regrtest_args%
|
call "%here%..\..\PCbuild\rt.bat" %rt_opts% -uall -rwW --slowest --timeout=1200 %regrtest_args%
|
||||||
|
|
|
@ -1,79 +1,79 @@
|
||||||
@echo off
|
@echo off
|
||||||
setlocal
|
setlocal
|
||||||
set D=%~dp0
|
set D=%~dp0
|
||||||
set PCBUILD=%D%..\..\PCBuild\
|
set PCBUILD=%D%..\..\PCBuild\
|
||||||
|
|
||||||
set BUILDX86=
|
set BUILDX86=
|
||||||
set BUILDX64=
|
set BUILDX64=
|
||||||
set BUILDDOC=
|
set BUILDDOC=
|
||||||
set BUILDTEST=--test-marker
|
set BUILDTEST=--test-marker
|
||||||
set BUILDPACK=
|
set BUILDPACK=
|
||||||
set REBUILD=
|
set REBUILD=
|
||||||
|
|
||||||
:CheckOpts
|
:CheckOpts
|
||||||
if "%~1" EQU "-h" goto Help
|
if "%~1" EQU "-h" goto Help
|
||||||
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 "--doc" (set BUILDDOC=1) && shift && goto CheckOpts
|
if "%~1" EQU "--doc" (set BUILDDOC=1) && shift && goto CheckOpts
|
||||||
if "%~1" EQU "--no-test-marker" (set BUILDTEST=) && shift && goto CheckOpts
|
if "%~1" EQU "--no-test-marker" (set BUILDTEST=) && shift && goto CheckOpts
|
||||||
if "%~1" EQU "--pack" (set BUILDPACK=1) && shift && goto CheckOpts
|
if "%~1" EQU "--pack" (set BUILDPACK=1) && shift && goto CheckOpts
|
||||||
if "%~1" EQU "-r" (set REBUILD=-r) && shift && goto CheckOpts
|
if "%~1" EQU "-r" (set REBUILD=-r) && shift && goto CheckOpts
|
||||||
|
|
||||||
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)
|
||||||
|
|
||||||
call "%D%get_externals.bat"
|
call "%D%get_externals.bat"
|
||||||
|
|
||||||
call "%PCBUILD%env.bat" x86
|
call "%PCBUILD%env.bat" x86
|
||||||
|
|
||||||
if defined BUILDX86 (
|
if defined BUILDX86 (
|
||||||
call "%PCBUILD%build.bat" -d -e %REBUILD% %BUILDTEST%
|
call "%PCBUILD%build.bat" -d -e %REBUILD% %BUILDTEST%
|
||||||
if errorlevel 1 goto :eof
|
if errorlevel 1 goto :eof
|
||||||
call "%PCBUILD%build.bat" -e %REBUILD% %BUILDTEST%
|
call "%PCBUILD%build.bat" -e %REBUILD% %BUILDTEST%
|
||||||
if errorlevel 1 goto :eof
|
if errorlevel 1 goto :eof
|
||||||
)
|
)
|
||||||
if defined BUILDX64 (
|
if defined BUILDX64 (
|
||||||
call "%PCBUILD%build.bat" -p x64 -d -e %REBUILD% %BUILDTEST%
|
call "%PCBUILD%build.bat" -p x64 -d -e %REBUILD% %BUILDTEST%
|
||||||
if errorlevel 1 goto :eof
|
if errorlevel 1 goto :eof
|
||||||
call "%PCBUILD%build.bat" -p x64 -e %REBUILD% %BUILDTEST%
|
call "%PCBUILD%build.bat" -p x64 -e %REBUILD% %BUILDTEST%
|
||||||
if errorlevel 1 goto :eof
|
if errorlevel 1 goto :eof
|
||||||
)
|
)
|
||||||
|
|
||||||
if defined BUILDDOC (
|
if defined BUILDDOC (
|
||||||
call "%PCBUILD%..\Doc\make.bat" htmlhelp
|
call "%PCBUILD%..\Doc\make.bat" htmlhelp
|
||||||
if errorlevel 1 goto :eof
|
if errorlevel 1 goto :eof
|
||||||
)
|
)
|
||||||
|
|
||||||
rem Build the launcher MSI separately
|
rem Build the launcher MSI separately
|
||||||
msbuild "%D%launcher\launcher.wixproj" /p:Platform=x86
|
msbuild "%D%launcher\launcher.wixproj" /p:Platform=x86
|
||||||
|
|
||||||
set BUILD_CMD="%D%bundle\snapshot.wixproj"
|
set BUILD_CMD="%D%bundle\snapshot.wixproj"
|
||||||
if defined BUILDTEST (
|
if defined BUILDTEST (
|
||||||
set BUILD_CMD=%BUILD_CMD% /p:UseTestMarker=true
|
set BUILD_CMD=%BUILD_CMD% /p:UseTestMarker=true
|
||||||
)
|
)
|
||||||
if defined BUILDPACK (
|
if defined BUILDPACK (
|
||||||
set BUILD_CMD=%BUILD_CMD% /p:Pack=true
|
set BUILD_CMD=%BUILD_CMD% /p:Pack=true
|
||||||
)
|
)
|
||||||
if defined REBUILD (
|
if defined REBUILD (
|
||||||
set BUILD_CMD=%BUILD_CMD% /t:Rebuild
|
set BUILD_CMD=%BUILD_CMD% /t:Rebuild
|
||||||
)
|
)
|
||||||
|
|
||||||
if defined BUILDX86 (
|
if defined BUILDX86 (
|
||||||
msbuild %BUILD_CMD%
|
msbuild %BUILD_CMD%
|
||||||
if errorlevel 1 goto :eof
|
if errorlevel 1 goto :eof
|
||||||
)
|
)
|
||||||
if defined BUILDX64 (
|
if defined BUILDX64 (
|
||||||
msbuild /p:Platform=x64 %BUILD_CMD%
|
msbuild /p:Platform=x64 %BUILD_CMD%
|
||||||
if errorlevel 1 goto :eof
|
if errorlevel 1 goto :eof
|
||||||
)
|
)
|
||||||
|
|
||||||
exit /B 0
|
exit /B 0
|
||||||
|
|
||||||
:Help
|
:Help
|
||||||
echo build.bat [-x86] [-x64] [--doc] [-h] [--no-test-marker] [--pack] [-r]
|
echo build.bat [-x86] [-x64] [--doc] [-h] [--no-test-marker] [--pack] [-r]
|
||||||
echo.
|
echo.
|
||||||
echo -x86 Build x86 installers
|
echo -x86 Build x86 installers
|
||||||
echo -x64 Build x64 installers
|
echo -x64 Build x64 installers
|
||||||
echo --doc Build CHM documentation
|
echo --doc Build CHM documentation
|
||||||
echo --no-test-marker Build without test markers
|
echo --no-test-marker Build without test markers
|
||||||
echo --pack Embed core MSIs into installer
|
echo --pack Embed core MSIs into installer
|
||||||
echo -r Rebuild rather than incremental build
|
echo -r Rebuild rather than incremental build
|
||||||
|
|
|
@ -1,235 +1,235 @@
|
||||||
@setlocal
|
@setlocal
|
||||||
@echo off
|
@echo off
|
||||||
|
|
||||||
rem This script is intended for building official releases of Python.
|
rem This script is intended for building official releases of Python.
|
||||||
rem To use it to build alternative releases, you should clone this file
|
rem To use it to build alternative releases, you should clone this file
|
||||||
rem and modify the following three URIs.
|
rem and modify the following three URIs.
|
||||||
|
|
||||||
rem These two will ensure that your release can be installed
|
rem These two will ensure that your release can be installed
|
||||||
rem alongside an official Python release, by modifying the GUIDs used
|
rem alongside an official Python release, by modifying the GUIDs used
|
||||||
rem for all components.
|
rem for all components.
|
||||||
rem
|
rem
|
||||||
rem The following substitutions will be applied to the release URI:
|
rem The following substitutions will be applied to the release URI:
|
||||||
rem Variable Description Example
|
rem Variable Description Example
|
||||||
rem {arch} architecture amd64, win32
|
rem {arch} architecture amd64, win32
|
||||||
set RELEASE_URI=http://www.python.org/{arch}
|
set RELEASE_URI=http://www.python.org/{arch}
|
||||||
|
|
||||||
rem This is the URL that will be used to download installation files.
|
rem This is the URL that will be used to download installation files.
|
||||||
rem The files available from the default URL *will* conflict with your
|
rem The files available from the default URL *will* conflict with your
|
||||||
rem installer. Trust me, you don't want them, even if it seems like a
|
rem installer. Trust me, you don't want them, even if it seems like a
|
||||||
rem good idea.
|
rem good idea.
|
||||||
rem
|
rem
|
||||||
rem The following substitutions will be applied to the download URL:
|
rem The following substitutions will be applied to the download URL:
|
||||||
rem Variable Description Example
|
rem Variable Description Example
|
||||||
rem {version} version number 3.5.0
|
rem {version} version number 3.5.0
|
||||||
rem {arch} architecture amd64, win32
|
rem {arch} architecture amd64, win32
|
||||||
rem {releasename} release name a1, b2, rc3 (or blank for final)
|
rem {releasename} release name a1, b2, rc3 (or blank for final)
|
||||||
rem {msi} MSI filename core.msi
|
rem {msi} MSI filename core.msi
|
||||||
set DOWNLOAD_URL=https://www.python.org/ftp/python/{version}/{arch}{releasename}/{msi}
|
set DOWNLOAD_URL=https://www.python.org/ftp/python/{version}/{arch}{releasename}/{msi}
|
||||||
|
|
||||||
set D=%~dp0
|
set D=%~dp0
|
||||||
set PCBUILD=%D%..\..\PCBuild\
|
set PCBUILD=%D%..\..\PCBuild\
|
||||||
set EXTERNALS=%D%..\..\externals\windows-installer\
|
set EXTERNALS=%D%..\..\externals\windows-installer\
|
||||||
|
|
||||||
set BUILDX86=
|
set BUILDX86=
|
||||||
set BUILDX64=
|
set BUILDX64=
|
||||||
set TARGET=Rebuild
|
set TARGET=Rebuild
|
||||||
set TESTTARGETDIR=
|
set TESTTARGETDIR=
|
||||||
set PGO=-m test -q --pgo
|
set PGO=-m test -q --pgo
|
||||||
set BUILDNUGET=1
|
set BUILDNUGET=1
|
||||||
set BUILDZIP=1
|
set BUILDZIP=1
|
||||||
|
|
||||||
|
|
||||||
:CheckOpts
|
:CheckOpts
|
||||||
if "%1" EQU "-h" goto Help
|
if "%1" EQU "-h" goto Help
|
||||||
if "%1" EQU "-c" (set CERTNAME=%~2) && shift && shift && goto CheckOpts
|
if "%1" EQU "-c" (set CERTNAME=%~2) && shift && shift && goto CheckOpts
|
||||||
if "%1" EQU "--certificate" (set CERTNAME=%~2) && shift && shift && goto CheckOpts
|
if "%1" EQU "--certificate" (set CERTNAME=%~2) && shift && shift && goto CheckOpts
|
||||||
if "%1" EQU "-o" (set OUTDIR=%~2) && shift && shift && goto CheckOpts
|
if "%1" EQU "-o" (set OUTDIR=%~2) && shift && shift && goto CheckOpts
|
||||||
if "%1" EQU "--out" (set OUTDIR=%~2) && shift && shift && goto CheckOpts
|
if "%1" EQU "--out" (set OUTDIR=%~2) && shift && shift && goto CheckOpts
|
||||||
if "%1" EQU "-D" (set SKIPDOC=1) && shift && goto CheckOpts
|
if "%1" EQU "-D" (set SKIPDOC=1) && shift && goto CheckOpts
|
||||||
if "%1" EQU "--skip-doc" (set SKIPDOC=1) && shift && goto CheckOpts
|
if "%1" EQU "--skip-doc" (set SKIPDOC=1) && shift && goto CheckOpts
|
||||||
if "%1" EQU "-B" (set SKIPBUILD=1) && shift && goto CheckOpts
|
if "%1" EQU "-B" (set SKIPBUILD=1) && shift && goto CheckOpts
|
||||||
if "%1" EQU "--skip-build" (set SKIPBUILD=1) && shift && goto CheckOpts
|
if "%1" EQU "--skip-build" (set SKIPBUILD=1) && shift && goto CheckOpts
|
||||||
if "%1" EQU "--download" (set DOWNLOAD_URL=%~2) && shift && shift && goto CheckOpts
|
if "%1" EQU "--download" (set DOWNLOAD_URL=%~2) && shift && shift && goto CheckOpts
|
||||||
if "%1" EQU "--test" (set TESTTARGETDIR=%~2) && shift && shift && goto CheckOpts
|
if "%1" EQU "--test" (set TESTTARGETDIR=%~2) && shift && shift && goto CheckOpts
|
||||||
if "%1" EQU "-b" (set TARGET=Build) && shift && goto CheckOpts
|
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" EQU "--pgo" (set PGO=%~2) && shift && shift && goto CheckOpts
|
||||||
if "%1" EQU "--skip-pgo" (set PGO=) && shift && goto CheckOpts
|
if "%1" EQU "--skip-pgo" (set PGO=) && shift && goto CheckOpts
|
||||||
if "%1" EQU "--skip-nuget" (set BUILDNUGET=) && shift && goto CheckOpts
|
if "%1" EQU "--skip-nuget" (set BUILDNUGET=) && shift && goto CheckOpts
|
||||||
if "%1" EQU "--skip-zip" (set BUILDZIP=) && shift && goto CheckOpts
|
if "%1" EQU "--skip-zip" (set BUILDZIP=) && shift && goto CheckOpts
|
||||||
|
|
||||||
if "%1" NEQ "" echo Invalid option: "%1" && exit /B 1
|
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)
|
||||||
|
|
||||||
if not exist "%GIT%" where git > "%TEMP%\git.loc" 2> nul && set /P GIT= < "%TEMP%\git.loc" & del "%TEMP%\git.loc"
|
if not exist "%GIT%" where git > "%TEMP%\git.loc" 2> nul && set /P GIT= < "%TEMP%\git.loc" & del "%TEMP%\git.loc"
|
||||||
if not exist "%GIT%" echo Cannot find Git on PATH && exit /B 1
|
if not exist "%GIT%" echo Cannot find Git on PATH && exit /B 1
|
||||||
|
|
||||||
call "%D%get_externals.bat"
|
call "%D%get_externals.bat"
|
||||||
|
|
||||||
:builddoc
|
:builddoc
|
||||||
if "%SKIPBUILD%" EQU "1" goto skipdoc
|
if "%SKIPBUILD%" EQU "1" goto skipdoc
|
||||||
if "%SKIPDOC%" EQU "1" goto skipdoc
|
if "%SKIPDOC%" EQU "1" goto skipdoc
|
||||||
|
|
||||||
if not defined PYTHON where py -q || echo Cannot find py on path and PYTHON is not set. && exit /B 1
|
if not defined PYTHON where py -q || echo Cannot find py on path and PYTHON is not set. && exit /B 1
|
||||||
if not defined SPHINXBUILD where sphinx-build -q || echo Cannot find sphinx-build on path and SPHINXBUILD is not set. && exit /B 1
|
if not defined SPHINXBUILD where sphinx-build -q || echo Cannot find sphinx-build on path and SPHINXBUILD is not set. && exit /B 1
|
||||||
|
|
||||||
call "%D%..\..\doc\make.bat" htmlhelp
|
call "%D%..\..\doc\make.bat" htmlhelp
|
||||||
if errorlevel 1 goto :eof
|
if errorlevel 1 goto :eof
|
||||||
:skipdoc
|
:skipdoc
|
||||||
|
|
||||||
where dlltool /q && goto skipdlltoolsearch
|
where dlltool /q && goto skipdlltoolsearch
|
||||||
set _DLLTOOL_PATH=
|
set _DLLTOOL_PATH=
|
||||||
where /R "%EXTERNALS%\" dlltool > "%TEMP%\dlltool.loc" 2> nul && set /P _DLLTOOL_PATH= < "%TEMP%\dlltool.loc" & del "%TEMP%\dlltool.loc"
|
where /R "%EXTERNALS%\" dlltool > "%TEMP%\dlltool.loc" 2> nul && set /P _DLLTOOL_PATH= < "%TEMP%\dlltool.loc" & del "%TEMP%\dlltool.loc"
|
||||||
if not exist "%_DLLTOOL_PATH%" echo Cannot find binutils on PATH or in external && exit /B 1
|
if not exist "%_DLLTOOL_PATH%" echo Cannot find binutils on PATH or in external && exit /B 1
|
||||||
for %%f in (%_DLLTOOL_PATH%) do set PATH=%PATH%;%%~dpf
|
for %%f in (%_DLLTOOL_PATH%) do set PATH=%PATH%;%%~dpf
|
||||||
set _DLLTOOL_PATH=
|
set _DLLTOOL_PATH=
|
||||||
:skipdlltoolsearch
|
:skipdlltoolsearch
|
||||||
|
|
||||||
if defined BUILDX86 (
|
if defined BUILDX86 (
|
||||||
call :build x86
|
call :build x86
|
||||||
if errorlevel 1 exit /B
|
if errorlevel 1 exit /B
|
||||||
)
|
)
|
||||||
|
|
||||||
if defined BUILDX64 (
|
if defined BUILDX64 (
|
||||||
call :build x64 "%PGO%"
|
call :build x64 "%PGO%"
|
||||||
if errorlevel 1 exit /B
|
if errorlevel 1 exit /B
|
||||||
)
|
)
|
||||||
|
|
||||||
if defined TESTTARGETDIR (
|
if defined TESTTARGETDIR (
|
||||||
call "%D%testrelease.bat" -t "%TESTTARGETDIR%"
|
call "%D%testrelease.bat" -t "%TESTTARGETDIR%"
|
||||||
)
|
)
|
||||||
|
|
||||||
exit /B 0
|
exit /B 0
|
||||||
|
|
||||||
:build
|
:build
|
||||||
@setlocal
|
@setlocal
|
||||||
@echo off
|
@echo off
|
||||||
|
|
||||||
if "%1" EQU "x86" (
|
if "%1" EQU "x86" (
|
||||||
set PGO=
|
set PGO=
|
||||||
set BUILD=%PCBUILD%win32\
|
set BUILD=%PCBUILD%win32\
|
||||||
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 (
|
||||||
set BUILD=%PCBUILD%amd64\
|
set BUILD=%PCBUILD%amd64\
|
||||||
set PGO=%~2
|
set PGO=%~2
|
||||||
set BUILD_PLAT=x64
|
set BUILD_PLAT=x64
|
||||||
set OUTDIR_PLAT=amd64
|
set OUTDIR_PLAT=amd64
|
||||||
set OBJDIR_PLAT=x64
|
set OBJDIR_PLAT=x64
|
||||||
)
|
)
|
||||||
|
|
||||||
if exist "%BUILD%en-us" (
|
if exist "%BUILD%en-us" (
|
||||||
echo Deleting %BUILD%en-us
|
echo Deleting %BUILD%en-us
|
||||||
rmdir /q/s "%BUILD%en-us"
|
rmdir /q/s "%BUILD%en-us"
|
||||||
if errorlevel 1 exit /B
|
if errorlevel 1 exit /B
|
||||||
)
|
)
|
||||||
|
|
||||||
if exist "%D%obj\Debug_%OBJDIR_PLAT%" (
|
if exist "%D%obj\Debug_%OBJDIR_PLAT%" (
|
||||||
echo Deleting "%D%obj\Debug_%OBJDIR_PLAT%"
|
echo Deleting "%D%obj\Debug_%OBJDIR_PLAT%"
|
||||||
rmdir /q/s "%D%obj\Debug_%OBJDIR_PLAT%"
|
rmdir /q/s "%D%obj\Debug_%OBJDIR_PLAT%"
|
||||||
if errorlevel 1 exit /B
|
if errorlevel 1 exit /B
|
||||||
)
|
)
|
||||||
|
|
||||||
if exist "%D%obj\Release_%OBJDIR_PLAT%" (
|
if exist "%D%obj\Release_%OBJDIR_PLAT%" (
|
||||||
echo Deleting "%D%obj\Release_%OBJDIR_PLAT%"
|
echo Deleting "%D%obj\Release_%OBJDIR_PLAT%"
|
||||||
rmdir /q/s "%D%obj\Release_%OBJDIR_PLAT%"
|
rmdir /q/s "%D%obj\Release_%OBJDIR_PLAT%"
|
||||||
if errorlevel 1 exit /B
|
if errorlevel 1 exit /B
|
||||||
)
|
)
|
||||||
|
|
||||||
if not "%CERTNAME%" EQU "" (
|
if not "%CERTNAME%" EQU "" (
|
||||||
set CERTOPTS="/p:SigningCertificate=%CERTNAME%"
|
set CERTOPTS="/p:SigningCertificate=%CERTNAME%"
|
||||||
) else (
|
) else (
|
||||||
set CERTOPTS=
|
set CERTOPTS=
|
||||||
)
|
)
|
||||||
if not "%PGO%" EQU "" (
|
if not "%PGO%" EQU "" (
|
||||||
set PGOOPTS=--pgo-job "%PGO%"
|
set PGOOPTS=--pgo-job "%PGO%"
|
||||||
) else (
|
) else (
|
||||||
set PGOOPTS=
|
set PGOOPTS=
|
||||||
)
|
)
|
||||||
if not "%SKIPBUILD%" EQU "1" (
|
if not "%SKIPBUILD%" EQU "1" (
|
||||||
@echo call "%PCBUILD%build.bat" -e -p %BUILD_PLAT% -t %TARGET% %PGOOPTS% %CERTOPTS%
|
@echo call "%PCBUILD%build.bat" -e -p %BUILD_PLAT% -t %TARGET% %PGOOPTS% %CERTOPTS%
|
||||||
@call "%PCBUILD%build.bat" -e -p %BUILD_PLAT% -t %TARGET% %PGOOPTS% %CERTOPTS%
|
@call "%PCBUILD%build.bat" -e -p %BUILD_PLAT% -t %TARGET% %PGOOPTS% %CERTOPTS%
|
||||||
@if errorlevel 1 exit /B
|
@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
|
||||||
|
|
||||||
@echo call "%PCBUILD%build.bat" -d -e -p %BUILD_PLAT% -t %TARGET%
|
@echo call "%PCBUILD%build.bat" -d -e -p %BUILD_PLAT% -t %TARGET%
|
||||||
@call "%PCBUILD%build.bat" -d -e -p %BUILD_PLAT% -t %TARGET%
|
@call "%PCBUILD%build.bat" -d -e -p %BUILD_PLAT% -t %TARGET%
|
||||||
@if errorlevel 1 exit /B
|
@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
|
||||||
)
|
)
|
||||||
|
|
||||||
call "%PCBUILD%env.bat"
|
call "%PCBUILD%env.bat"
|
||||||
if "%OUTDIR_PLAT%" EQU "win32" (
|
if "%OUTDIR_PLAT%" EQU "win32" (
|
||||||
msbuild "%D%launcher\launcher.wixproj" /p:Platform=x86 %CERTOPTS% /p:ReleaseUri=%RELEASE_URI%
|
msbuild "%D%launcher\launcher.wixproj" /p:Platform=x86 %CERTOPTS% /p:ReleaseUri=%RELEASE_URI%
|
||||||
if errorlevel 1 exit /B
|
if errorlevel 1 exit /B
|
||||||
) else if not exist "%PCBUILD%win32\en-us\launcher.msi" (
|
) else if not exist "%PCBUILD%win32\en-us\launcher.msi" (
|
||||||
msbuild "%D%launcher\launcher.wixproj" /p:Platform=x86 %CERTOPTS% /p:ReleaseUri=%RELEASE_URI%
|
msbuild "%D%launcher\launcher.wixproj" /p:Platform=x86 %CERTOPTS% /p:ReleaseUri=%RELEASE_URI%
|
||||||
if errorlevel 1 exit /B
|
if errorlevel 1 exit /B
|
||||||
)
|
)
|
||||||
|
|
||||||
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%
|
||||||
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
|
||||||
if errorlevel 1 exit /B
|
if errorlevel 1 exit /B
|
||||||
|
|
||||||
if defined BUILDZIP (
|
if defined BUILDZIP (
|
||||||
msbuild "%D%make_zip.proj" /t:Build %BUILDOPTS% %CERTOPTS% /p:OutputPath="%BUILD%en-us"
|
msbuild "%D%make_zip.proj" /t:Build %BUILDOPTS% %CERTOPTS% /p:OutputPath="%BUILD%en-us"
|
||||||
if errorlevel 1 exit /B
|
if errorlevel 1 exit /B
|
||||||
)
|
)
|
||||||
|
|
||||||
if defined BUILDNUGET (
|
if defined BUILDNUGET (
|
||||||
msbuild "%D%..\nuget\make_pkg.proj" /t:Build /p:Configuration=Release /p:Platform=%1 /p:OutputPath="%BUILD%en-us"
|
msbuild "%D%..\nuget\make_pkg.proj" /t:Build /p:Configuration=Release /p:Platform=%1 /p:OutputPath="%BUILD%en-us"
|
||||||
if errorlevel 1 exit /B
|
if errorlevel 1 exit /B
|
||||||
)
|
)
|
||||||
|
|
||||||
if not "%OUTDIR%" EQU "" (
|
if not "%OUTDIR%" EQU "" (
|
||||||
mkdir "%OUTDIR%\%OUTDIR_PLAT%"
|
mkdir "%OUTDIR%\%OUTDIR_PLAT%"
|
||||||
mkdir "%OUTDIR%\%OUTDIR_PLAT%\binaries"
|
mkdir "%OUTDIR%\%OUTDIR_PLAT%\binaries"
|
||||||
mkdir "%OUTDIR%\%OUTDIR_PLAT%\symbols"
|
mkdir "%OUTDIR%\%OUTDIR_PLAT%\symbols"
|
||||||
robocopy "%BUILD%en-us" "%OUTDIR%\%OUTDIR_PLAT%" /XF "*.wixpdb"
|
robocopy "%BUILD%en-us" "%OUTDIR%\%OUTDIR_PLAT%" /XF "*.wixpdb"
|
||||||
robocopy "%BUILD%\" "%OUTDIR%\%OUTDIR_PLAT%\binaries" *.exe *.dll *.pyd /XF "_test*" /XF "*_d.*" /XF "_freeze*" /XF "tcl*" /XF "tk*" /XF "*_test.*"
|
robocopy "%BUILD%\" "%OUTDIR%\%OUTDIR_PLAT%\binaries" *.exe *.dll *.pyd /XF "_test*" /XF "*_d.*" /XF "_freeze*" /XF "tcl*" /XF "tk*" /XF "*_test.*"
|
||||||
robocopy "%BUILD%\" "%OUTDIR%\%OUTDIR_PLAT%\symbols" *.pdb /XF "_test*" /XF "*_d.*" /XF "_freeze*" /XF "tcl*" /XF "tk*" /XF "*_test.*"
|
robocopy "%BUILD%\" "%OUTDIR%\%OUTDIR_PLAT%\symbols" *.pdb /XF "_test*" /XF "*_d.*" /XF "_freeze*" /XF "tcl*" /XF "tk*" /XF "*_test.*"
|
||||||
)
|
)
|
||||||
|
|
||||||
exit /B 0
|
exit /B 0
|
||||||
|
|
||||||
:Help
|
:Help
|
||||||
echo buildrelease.bat [--out DIR] [-x86] [-x64] [--certificate CERTNAME] [--build] [--pgo COMMAND]
|
echo buildrelease.bat [--out DIR] [-x86] [-x64] [--certificate CERTNAME] [--build] [--pgo COMMAND]
|
||||||
echo [--skip-build] [--skip-doc] [--skip-nuget] [--skip-zip] [--skip-pgo]
|
echo [--skip-build] [--skip-doc] [--skip-nuget] [--skip-zip] [--skip-pgo]
|
||||||
echo [--download DOWNLOAD URL] [--test TARGETDIR]
|
echo [--download DOWNLOAD URL] [--test TARGETDIR]
|
||||||
echo [-h]
|
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
|
||||||
echo -x64 Build x64 installers
|
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 Specify PGO command for x64 installers
|
echo --pgo Specify PGO command for x64 installers
|
||||||
echo --skip-pgo Build x64 installers without using PGO
|
echo --skip-pgo Build x64 installers without using PGO
|
||||||
echo --skip-nuget Do not build Nuget packages
|
echo --skip-nuget Do not build Nuget packages
|
||||||
echo --skip-zip Do not build embeddable package
|
echo --skip-zip Do not build embeddable package
|
||||||
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
|
||||||
echo.
|
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, or 'default' to
|
echo For the --pgo option, any Python command line can be used, or 'default' to
|
||||||
echo use the default task (-m test --pgo).
|
echo use the default task (-m test --pgo).
|
||||||
echo.
|
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
|
||||||
echo {arch} architecture amd64, win32
|
echo {arch} architecture amd64, win32
|
||||||
echo {releasename} release name a1, b2, rc3 (or blank for final)
|
echo {releasename} release name a1, b2, rc3 (or blank for final)
|
||||||
echo {msi} MSI filename core.msi
|
echo {msi} MSI filename core.msi
|
||||||
|
|
|
@ -1,27 +1,27 @@
|
||||||
@echo off
|
@echo off
|
||||||
setlocal
|
setlocal
|
||||||
rem Simple script to fetch source for external tools
|
rem Simple script to fetch source for external tools
|
||||||
|
|
||||||
where /Q svn
|
where /Q svn
|
||||||
if ERRORLEVEL 1 (
|
if ERRORLEVEL 1 (
|
||||||
echo.svn.exe must be on your PATH to get external tools.
|
echo.svn.exe must be on your PATH to get external tools.
|
||||||
echo.Try TortoiseSVN (http://tortoisesvn.net/^) and be sure to check the
|
echo.Try TortoiseSVN (http://tortoisesvn.net/^) and be sure to check the
|
||||||
echo.command line tools option.
|
echo.command line tools option.
|
||||||
popd
|
popd
|
||||||
exit /b 1
|
exit /b 1
|
||||||
)
|
)
|
||||||
|
|
||||||
if not exist "%~dp0..\..\externals" mkdir "%~dp0..\..\externals"
|
if not exist "%~dp0..\..\externals" mkdir "%~dp0..\..\externals"
|
||||||
pushd "%~dp0..\..\externals"
|
pushd "%~dp0..\..\externals"
|
||||||
|
|
||||||
if "%SVNROOT%"=="" set SVNROOT=http://svn.python.org/projects/external/
|
if "%SVNROOT%"=="" set SVNROOT=http://svn.python.org/projects/external/
|
||||||
|
|
||||||
if not exist "windows-installer\.svn" (
|
if not exist "windows-installer\.svn" (
|
||||||
echo.Checking out installer dependencies to %CD%\windows-installer
|
echo.Checking out installer dependencies to %CD%\windows-installer
|
||||||
svn co %SVNROOT%windows-installer
|
svn co %SVNROOT%windows-installer
|
||||||
) else (
|
) else (
|
||||||
echo.Updating installer dependencies in %CD%\windows-installer
|
echo.Updating installer dependencies in %CD%\windows-installer
|
||||||
svn up windows-installer
|
svn up windows-installer
|
||||||
)
|
)
|
||||||
|
|
||||||
popd
|
popd
|
||||||
|
|
|
@ -1,117 +1,117 @@
|
||||||
@setlocal enableextensions
|
@setlocal enableextensions
|
||||||
@echo off
|
@echo off
|
||||||
|
|
||||||
set D=%~dp0
|
set D=%~dp0
|
||||||
set PCBUILD=%D%..\..\PCBuild\
|
set PCBUILD=%D%..\..\PCBuild\
|
||||||
|
|
||||||
set TARGETDIR=%TEMP%
|
set TARGETDIR=%TEMP%
|
||||||
set TESTX86=
|
set TESTX86=
|
||||||
set TESTX64=
|
set TESTX64=
|
||||||
set TESTALLUSER=
|
set TESTALLUSER=
|
||||||
set TESTPERUSER=
|
set TESTPERUSER=
|
||||||
|
|
||||||
:CheckOpts
|
:CheckOpts
|
||||||
if "%1" EQU "-h" goto Help
|
if "%1" EQU "-h" goto Help
|
||||||
if "%1" EQU "-x86" (set TESTX86=1) && shift && goto CheckOpts
|
if "%1" EQU "-x86" (set TESTX86=1) && shift && goto CheckOpts
|
||||||
if "%1" EQU "-x64" (set TESTX64=1) && shift && goto CheckOpts
|
if "%1" EQU "-x64" (set TESTX64=1) && shift && goto CheckOpts
|
||||||
if "%1" EQU "-t" (set TARGETDIR=%~2) && shift && shift && goto CheckOpts
|
if "%1" EQU "-t" (set TARGETDIR=%~2) && shift && shift && goto CheckOpts
|
||||||
if "%1" EQU "--target" (set TARGETDIR=%~2) && shift && shift && goto CheckOpts
|
if "%1" EQU "--target" (set TARGETDIR=%~2) && shift && shift && goto CheckOpts
|
||||||
if "%1" EQU "-a" (set TESTALLUSER=1) && shift && goto CheckOpts
|
if "%1" EQU "-a" (set TESTALLUSER=1) && shift && goto CheckOpts
|
||||||
if "%1" EQU "--alluser" (set TESTALLUSER=1) && shift && goto CheckOpts
|
if "%1" EQU "--alluser" (set TESTALLUSER=1) && shift && goto CheckOpts
|
||||||
if "%1" EQU "-p" (set TESTPERUSER=1) && shift && goto CheckOpts
|
if "%1" EQU "-p" (set TESTPERUSER=1) && shift && goto CheckOpts
|
||||||
if "%1" EQU "--peruser" (set TESTPERUSER=1) && shift && goto CheckOpts
|
if "%1" EQU "--peruser" (set TESTPERUSER=1) && shift && goto CheckOpts
|
||||||
|
|
||||||
if not defined TESTX86 if not defined TESTX64 (set TESTX86=1) && (set TESTX64=1)
|
if not defined TESTX86 if not defined TESTX64 (set TESTX86=1) && (set TESTX64=1)
|
||||||
if not defined TESTALLUSER if not defined TESTPERUSER (set TESTALLUSER=1) && (set TESTPERUSER=1)
|
if not defined TESTALLUSER if not defined TESTPERUSER (set TESTALLUSER=1) && (set TESTPERUSER=1)
|
||||||
|
|
||||||
|
|
||||||
if defined TESTX86 (
|
if defined TESTX86 (
|
||||||
for %%f in ("%PCBUILD%win32\en-us\*.exe") do (
|
for %%f in ("%PCBUILD%win32\en-us\*.exe") do (
|
||||||
if defined TESTALLUSER call :test "%%~ff" "%TARGETDIR%\%%~nf-alluser" "InstallAllUsers=1 CompileAll=1"
|
if defined TESTALLUSER call :test "%%~ff" "%TARGETDIR%\%%~nf-alluser" "InstallAllUsers=1 CompileAll=1"
|
||||||
if errorlevel 1 exit /B
|
if errorlevel 1 exit /B
|
||||||
if defined TESTPERUSER call :test "%%~ff" "%TARGETDIR%\%%~nf-peruser" "InstallAllUsers=0 CompileAll=0"
|
if defined TESTPERUSER call :test "%%~ff" "%TARGETDIR%\%%~nf-peruser" "InstallAllUsers=0 CompileAll=0"
|
||||||
if errorlevel 1 exit /B
|
if errorlevel 1 exit /B
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
if defined TESTX64 (
|
if defined TESTX64 (
|
||||||
for %%f in ("%PCBUILD%amd64\en-us\*.exe") do (
|
for %%f in ("%PCBUILD%amd64\en-us\*.exe") do (
|
||||||
if defined TESTALLUSER call :test "%%~ff" "%TARGETDIR%\%%~nf-alluser" "InstallAllUsers=1 CompileAll=1"
|
if defined TESTALLUSER call :test "%%~ff" "%TARGETDIR%\%%~nf-alluser" "InstallAllUsers=1 CompileAll=1"
|
||||||
if errorlevel 1 exit /B
|
if errorlevel 1 exit /B
|
||||||
if defined TESTPERUSER call :test "%%~ff" "%TARGETDIR%\%%~nf-peruser" "InstallAllUsers=0 CompileAll=0"
|
if defined TESTPERUSER call :test "%%~ff" "%TARGETDIR%\%%~nf-peruser" "InstallAllUsers=0 CompileAll=0"
|
||||||
if errorlevel 1 exit /B
|
if errorlevel 1 exit /B
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
exit /B 0
|
exit /B 0
|
||||||
|
|
||||||
:test
|
:test
|
||||||
@setlocal
|
@setlocal
|
||||||
@echo on
|
@echo on
|
||||||
|
|
||||||
@if not exist "%~1" exit /B 1
|
@if not exist "%~1" exit /B 1
|
||||||
|
|
||||||
@set EXE=%~1
|
@set EXE=%~1
|
||||||
@if not "%EXE:embed=%"=="%EXE%" exit /B 0
|
@if not "%EXE:embed=%"=="%EXE%" exit /B 0
|
||||||
|
|
||||||
@set EXITCODE=0
|
@set EXITCODE=0
|
||||||
@echo Installing %1 into %2
|
@echo Installing %1 into %2
|
||||||
"%~1" /passive /log "%~2\install\log.txt" TargetDir="%~2\Python" Include_debug=1 Include_symbols=1 %~3
|
"%~1" /passive /log "%~2\install\log.txt" TargetDir="%~2\Python" Include_debug=1 Include_symbols=1 %~3
|
||||||
|
|
||||||
@if not errorlevel 1 (
|
@if not errorlevel 1 (
|
||||||
@echo Printing version
|
@echo Printing version
|
||||||
"%~2\Python\python.exe" -c "import sys; print(sys.version)" > "%~2\version.txt" 2>&1
|
"%~2\Python\python.exe" -c "import sys; print(sys.version)" > "%~2\version.txt" 2>&1
|
||||||
)
|
)
|
||||||
|
|
||||||
@if not errorlevel 1 (
|
@if not errorlevel 1 (
|
||||||
@echo Capturing Start Menu
|
@echo Capturing Start Menu
|
||||||
@dir /s/b "%PROGRAMDATA%\Microsoft\Windows\Start Menu\Programs" | findstr /ic:"python" > "%~2\startmenu.txt" 2>&1
|
@dir /s/b "%PROGRAMDATA%\Microsoft\Windows\Start Menu\Programs" | findstr /ic:"python" > "%~2\startmenu.txt" 2>&1
|
||||||
@dir /s/b "%APPDATA%\Microsoft\Windows\Start Menu\Programs" | findstr /ic:"python" >> "%~2\startmenu.txt" 2>&1
|
@dir /s/b "%APPDATA%\Microsoft\Windows\Start Menu\Programs" | findstr /ic:"python" >> "%~2\startmenu.txt" 2>&1
|
||||||
|
|
||||||
@echo Capturing registry
|
@echo Capturing registry
|
||||||
@for /F "usebackq" %%f in (`reg query HKCR /s /f python /k`) do @(
|
@for /F "usebackq" %%f in (`reg query HKCR /s /f python /k`) do @(
|
||||||
echo %%f >> "%~2\hkcr.txt"
|
echo %%f >> "%~2\hkcr.txt"
|
||||||
reg query "%%f" /s >> "%~2\hkcr.txt" 2>&1
|
reg query "%%f" /s >> "%~2\hkcr.txt" 2>&1
|
||||||
)
|
)
|
||||||
@reg query HKCU\Software\Python /s > "%~2\hkcu.txt" 2>&1
|
@reg query HKCU\Software\Python /s > "%~2\hkcu.txt" 2>&1
|
||||||
@reg query HKLM\Software\Python /reg:32 /s > "%~2\hklm.txt" 2>&1
|
@reg query HKLM\Software\Python /reg:32 /s > "%~2\hklm.txt" 2>&1
|
||||||
@reg query HKLM\Software\Python /reg:64 /s >> "%~2\hklm.txt" 2>&1
|
@reg query HKLM\Software\Python /reg:64 /s >> "%~2\hklm.txt" 2>&1
|
||||||
cmd /k exit 0
|
cmd /k exit 0
|
||||||
)
|
)
|
||||||
|
|
||||||
@if not errorlevel 1 (
|
@if not errorlevel 1 (
|
||||||
@echo Installing package
|
@echo Installing package
|
||||||
"%~2\Python\python.exe" -m pip install "azure<0.10" > "%~2\pip.txt" 2>&1
|
"%~2\Python\python.exe" -m pip install "azure<0.10" > "%~2\pip.txt" 2>&1
|
||||||
@if not errorlevel 1 (
|
@if not errorlevel 1 (
|
||||||
"%~2\Python\python.exe" -m pip uninstall -y azure python-dateutil six >> "%~2\pip.txt" 2>&1
|
"%~2\Python\python.exe" -m pip uninstall -y azure python-dateutil six >> "%~2\pip.txt" 2>&1
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
@if not errorlevel 1 (
|
@if not errorlevel 1 (
|
||||||
@echo Testing Tcl/tk
|
@echo Testing Tcl/tk
|
||||||
@set TCL_LIBRARY=%~2\Python\tcl\tcl8.6
|
@set TCL_LIBRARY=%~2\Python\tcl\tcl8.6
|
||||||
"%~2\Python\python.exe" -m test -uall -v test_ttk_guionly test_tk test_idle > "%~2\tcltk.txt" 2>&1
|
"%~2\Python\python.exe" -m test -uall -v test_ttk_guionly test_tk test_idle > "%~2\tcltk.txt" 2>&1
|
||||||
@set TCL_LIBRARY=
|
@set TCL_LIBRARY=
|
||||||
)
|
)
|
||||||
|
|
||||||
@set EXITCODE=%ERRORLEVEL%
|
@set EXITCODE=%ERRORLEVEL%
|
||||||
|
|
||||||
@echo Result was %EXITCODE%
|
@echo Result was %EXITCODE%
|
||||||
@echo Removing %1
|
@echo Removing %1
|
||||||
"%~1" /passive /uninstall /log "%~2\uninstall\log.txt"
|
"%~1" /passive /uninstall /log "%~2\uninstall\log.txt"
|
||||||
|
|
||||||
@echo off
|
@echo off
|
||||||
exit /B %EXITCODE%
|
exit /B %EXITCODE%
|
||||||
|
|
||||||
:Help
|
:Help
|
||||||
echo testrelease.bat [--target TARGET] [-x86] [-x64] [--alluser] [--peruser] [-h]
|
echo testrelease.bat [--target TARGET] [-x86] [-x64] [--alluser] [--peruser] [-h]
|
||||||
echo.
|
echo.
|
||||||
echo --target (-t) Specify the target directory for installs and logs
|
echo --target (-t) Specify the target directory for installs and logs
|
||||||
echo -x86 Run tests for x86 installers
|
echo -x86 Run tests for x86 installers
|
||||||
echo -x64 Run tests for x64 installers
|
echo -x64 Run tests for x64 installers
|
||||||
echo --alluser (-a) Run tests for all-user installs (requires Administrator)
|
echo --alluser (-a) Run tests for all-user installs (requires Administrator)
|
||||||
echo --peruser (-p) Run tests for per-user installs
|
echo --peruser (-p) Run tests for per-user installs
|
||||||
echo -h Display this help information
|
echo -h Display this help information
|
||||||
echo.
|
echo.
|
||||||
echo If no test architecture is specified, all architectures will be tested.
|
echo If no test architecture is specified, all architectures will be tested.
|
||||||
echo If no install type is selected, all install types will be tested.
|
echo If no install type is selected, all install types will be tested.
|
||||||
echo.
|
echo.
|
||||||
|
|
|
@ -1,76 +1,76 @@
|
||||||
@setlocal
|
@setlocal
|
||||||
@echo off
|
@echo off
|
||||||
|
|
||||||
set D=%~dp0
|
set D=%~dp0
|
||||||
set PCBUILD=%D%..\..\PCBuild\
|
set PCBUILD=%D%..\..\PCBuild\
|
||||||
|
|
||||||
set HOST=
|
set HOST=
|
||||||
set USER=
|
set USER=
|
||||||
set TARGET=
|
set TARGET=
|
||||||
set DRYRUN=false
|
set DRYRUN=false
|
||||||
set NOGPG=
|
set NOGPG=
|
||||||
set PURGE_OPTION=/p:Purge=true
|
set PURGE_OPTION=/p:Purge=true
|
||||||
set NOTEST=
|
set NOTEST=
|
||||||
|
|
||||||
:CheckOpts
|
:CheckOpts
|
||||||
if "%1" EQU "-h" goto Help
|
if "%1" EQU "-h" goto Help
|
||||||
if "%1" EQU "-o" (set HOST=%~2) && shift && shift && goto CheckOpts
|
if "%1" EQU "-o" (set HOST=%~2) && shift && shift && goto CheckOpts
|
||||||
if "%1" EQU "--host" (set HOST=%~2) && shift && shift && goto CheckOpts
|
if "%1" EQU "--host" (set HOST=%~2) && shift && shift && goto CheckOpts
|
||||||
if "%1" EQU "-u" (set USER=%~2) && shift && shift && goto CheckOpts
|
if "%1" EQU "-u" (set USER=%~2) && shift && shift && goto CheckOpts
|
||||||
if "%1" EQU "--user" (set USER=%~2) && shift && shift && goto CheckOpts
|
if "%1" EQU "--user" (set USER=%~2) && shift && shift && goto CheckOpts
|
||||||
if "%1" EQU "-t" (set TARGET=%~2) && shift && shift && goto CheckOpts
|
if "%1" EQU "-t" (set TARGET=%~2) && shift && shift && goto CheckOpts
|
||||||
if "%1" EQU "--target" (set TARGET=%~2) && shift && shift && goto CheckOpts
|
if "%1" EQU "--target" (set TARGET=%~2) && shift && shift && goto CheckOpts
|
||||||
if "%1" EQU "--dry-run" (set DRYRUN=true) && shift && goto CheckOpts
|
if "%1" EQU "--dry-run" (set DRYRUN=true) && shift && goto CheckOpts
|
||||||
if "%1" EQU "--skip-gpg" (set NOGPG=true) && shift && goto CheckOpts
|
if "%1" EQU "--skip-gpg" (set NOGPG=true) && shift && goto CheckOpts
|
||||||
if "%1" EQU "--skip-purge" (set PURGE_OPTION=) && shift && godo CheckOpts
|
if "%1" EQU "--skip-purge" (set PURGE_OPTION=) && shift && godo CheckOpts
|
||||||
if "%1" EQU "--skip-test" (set NOTEST=true) && shift && godo CheckOpts
|
if "%1" EQU "--skip-test" (set NOTEST=true) && shift && godo CheckOpts
|
||||||
if "%1" EQU "-T" (set NOTEST=true) && shift && godo CheckOpts
|
if "%1" EQU "-T" (set NOTEST=true) && shift && godo CheckOpts
|
||||||
if "%1" NEQ "" echo Unexpected argument "%1" & exit /B 1
|
if "%1" NEQ "" echo Unexpected argument "%1" & exit /B 1
|
||||||
|
|
||||||
if not defined PLINK where plink > "%TEMP%\plink.loc" 2> nul && set /P PLINK= < "%TEMP%\plink.loc" & del "%TEMP%\plink.loc"
|
if not defined PLINK where plink > "%TEMP%\plink.loc" 2> nul && set /P PLINK= < "%TEMP%\plink.loc" & del "%TEMP%\plink.loc"
|
||||||
if not defined PLINK where /R "%ProgramFiles(x86)%\PuTTY" plink > "%TEMP%\plink.loc" 2> nul && set /P PLINK= < "%TEMP%\plink.loc" & del "%TEMP%\plink.loc"
|
if not defined PLINK where /R "%ProgramFiles(x86)%\PuTTY" plink > "%TEMP%\plink.loc" 2> nul && set /P PLINK= < "%TEMP%\plink.loc" & del "%TEMP%\plink.loc"
|
||||||
if not defined PLINK where /R "%ProgramFiles(x86)%" plink > "%TEMP%\plink.loc" 2> nul && set /P PLINK= < "%TEMP%\plink.loc" & del "%TEMP%\plink.loc"
|
if not defined PLINK where /R "%ProgramFiles(x86)%" plink > "%TEMP%\plink.loc" 2> nul && set /P PLINK= < "%TEMP%\plink.loc" & del "%TEMP%\plink.loc"
|
||||||
if not defined PLINK echo Cannot locate plink.exe & exit /B 1
|
if not defined PLINK echo Cannot locate plink.exe & exit /B 1
|
||||||
echo Found plink.exe at %PLINK%
|
echo Found plink.exe at %PLINK%
|
||||||
|
|
||||||
if not defined PSCP where pscp > "%TEMP%\pscp.loc" 2> nul && set /P pscp= < "%TEMP%\pscp.loc" & del "%TEMP%\pscp.loc"
|
if not defined PSCP where pscp > "%TEMP%\pscp.loc" 2> nul && set /P pscp= < "%TEMP%\pscp.loc" & del "%TEMP%\pscp.loc"
|
||||||
if not defined PSCP where /R "%ProgramFiles(x86)%\PuTTY" pscp > "%TEMP%\pscp.loc" 2> nul && set /P pscp= < "%TEMP%\pscp.loc" & del "%TEMP%\pscp.loc"
|
if not defined PSCP where /R "%ProgramFiles(x86)%\PuTTY" pscp > "%TEMP%\pscp.loc" 2> nul && set /P pscp= < "%TEMP%\pscp.loc" & del "%TEMP%\pscp.loc"
|
||||||
if not defined PSCP where /R "%ProgramFiles(x86)%" pscp > "%TEMP%\pscp.loc" 2> nul && set /P pscp= < "%TEMP%\pscp.loc" & del "%TEMP%\pscp.loc"
|
if not defined PSCP where /R "%ProgramFiles(x86)%" pscp > "%TEMP%\pscp.loc" 2> nul && set /P pscp= < "%TEMP%\pscp.loc" & del "%TEMP%\pscp.loc"
|
||||||
if not defined PSCP echo Cannot locate pscp.exe & exit /B 1
|
if not defined PSCP echo Cannot locate pscp.exe & exit /B 1
|
||||||
echo Found pscp.exe at %PSCP%
|
echo Found pscp.exe at %PSCP%
|
||||||
|
|
||||||
if defined NOGPG (
|
if defined NOGPG (
|
||||||
set GPG=
|
set GPG=
|
||||||
echo Skipping GPG signature generation because of --skip-gpg
|
echo Skipping GPG signature generation because of --skip-gpg
|
||||||
) else (
|
) else (
|
||||||
if not defined GPG where gpg2 > "%TEMP%\gpg.loc" 2> nul && set /P GPG= < "%TEMP%\gpg.loc" & del "%TEMP%\gpg.loc"
|
if not defined GPG where gpg2 > "%TEMP%\gpg.loc" 2> nul && set /P GPG= < "%TEMP%\gpg.loc" & del "%TEMP%\gpg.loc"
|
||||||
if not defined GPG where /R "%PCBUILD%..\externals\windows-installer" gpg2 > "%TEMP%\gpg.loc" 2> nul && set /P GPG= < "%TEMP%\gpg.loc" & del "%TEMP%\gpg.loc"
|
if not defined GPG where /R "%PCBUILD%..\externals\windows-installer" gpg2 > "%TEMP%\gpg.loc" 2> nul && set /P GPG= < "%TEMP%\gpg.loc" & del "%TEMP%\gpg.loc"
|
||||||
if not defined GPG echo Cannot locate gpg2.exe. Signatures will not be uploaded & pause
|
if not defined GPG echo Cannot locate gpg2.exe. Signatures will not be uploaded & pause
|
||||||
echo Found gpg2.exe at %GPG%
|
echo Found gpg2.exe at %GPG%
|
||||||
)
|
)
|
||||||
|
|
||||||
call "%PCBUILD%env.bat" > nul 2> nul
|
call "%PCBUILD%env.bat" > nul 2> nul
|
||||||
pushd "%D%"
|
pushd "%D%"
|
||||||
msbuild /v:m /nologo uploadrelease.proj /t:Upload /p:Platform=x86 %PURGE_OPTION%
|
msbuild /v:m /nologo uploadrelease.proj /t:Upload /p:Platform=x86 %PURGE_OPTION%
|
||||||
msbuild /v:m /nologo uploadrelease.proj /t:Upload /p:Platform=x64 /p:IncludeDoc=false %PURGE_OPTION%
|
msbuild /v:m /nologo uploadrelease.proj /t:Upload /p:Platform=x64 /p:IncludeDoc=false %PURGE_OPTION%
|
||||||
if not defined NOTEST (
|
if not defined NOTEST (
|
||||||
msbuild /v:m /nologo uploadrelease.proj /t:Test /p:Platform=x86
|
msbuild /v:m /nologo uploadrelease.proj /t:Test /p:Platform=x86
|
||||||
msbuild /v:m /nologo uploadrelease.proj /t:Test /p:Platform=x64
|
msbuild /v:m /nologo uploadrelease.proj /t:Test /p:Platform=x64
|
||||||
)
|
)
|
||||||
msbuild /v:m /nologo uploadrelease.proj /t:ShowHashes /p:Platform=x86
|
msbuild /v:m /nologo uploadrelease.proj /t:ShowHashes /p:Platform=x86
|
||||||
msbuild /v:m /nologo uploadrelease.proj /t:ShowHashes /p:Platform=x64 /p:IncludeDoc=false
|
msbuild /v:m /nologo uploadrelease.proj /t:ShowHashes /p:Platform=x64 /p:IncludeDoc=false
|
||||||
popd
|
popd
|
||||||
exit /B 0
|
exit /B 0
|
||||||
|
|
||||||
:Help
|
:Help
|
||||||
echo uploadrelease.bat --host HOST --user USERNAME [--target TARGET] [--dry-run] [-h]
|
echo uploadrelease.bat --host HOST --user USERNAME [--target TARGET] [--dry-run] [-h]
|
||||||
echo.
|
echo.
|
||||||
echo --host (-o) Specify the upload host (required)
|
echo --host (-o) Specify the upload host (required)
|
||||||
echo --user (-u) Specify the user on the host (required)
|
echo --user (-u) Specify the user on the host (required)
|
||||||
echo --target (-t) Specify the target directory on the host
|
echo --target (-t) Specify the target directory on the host
|
||||||
echo --dry-run Display commands and filenames without executing them
|
echo --dry-run Display commands and filenames without executing them
|
||||||
echo --skip-gpg Does not generate GPG signatures before uploading
|
echo --skip-gpg Does not generate GPG signatures before uploading
|
||||||
echo --skip-purge Does not perform CDN purge after uploading
|
echo --skip-purge Does not perform CDN purge after uploading
|
||||||
echo --skip-test (-T) Does not perform post-upload tests
|
echo --skip-test (-T) Does not perform post-upload tests
|
||||||
echo -h Display this help information
|
echo -h Display this help information
|
||||||
echo.
|
echo.
|
||||||
|
|
|
@ -1,55 +1,55 @@
|
||||||
@echo off
|
@echo off
|
||||||
setlocal
|
setlocal
|
||||||
set D=%~dp0
|
set D=%~dp0
|
||||||
set PCBUILD=%D%..\..\PCBuild\
|
set PCBUILD=%D%..\..\PCBuild\
|
||||||
|
|
||||||
set BUILDX86=
|
set BUILDX86=
|
||||||
set BUILDX64=
|
set BUILDX64=
|
||||||
set REBUILD=
|
set REBUILD=
|
||||||
set OUTPUT=
|
set OUTPUT=
|
||||||
set PACKAGES=
|
set PACKAGES=
|
||||||
|
|
||||||
:CheckOpts
|
:CheckOpts
|
||||||
if "%~1" EQU "-h" goto Help
|
if "%~1" EQU "-h" goto Help
|
||||||
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 "-r" (set REBUILD=-r) && shift && goto CheckOpts
|
if "%~1" EQU "-r" (set REBUILD=-r) && shift && goto CheckOpts
|
||||||
if "%~1" EQU "-o" (set OUTPUT="/p:OutputPath=%~2") && shift && shift && goto CheckOpts
|
if "%~1" EQU "-o" (set OUTPUT="/p:OutputPath=%~2") && shift && shift && goto CheckOpts
|
||||||
if "%~1" EQU "--out" (set OUTPUT="/p:OutputPath=%~2") && shift && shift && goto CheckOpts
|
if "%~1" EQU "--out" (set OUTPUT="/p:OutputPath=%~2") && shift && shift && goto CheckOpts
|
||||||
if "%~1" EQU "-p" (set PACKAGES=%PACKAGES% %~2) && shift && shift && goto CheckOpts
|
if "%~1" EQU "-p" (set PACKAGES=%PACKAGES% %~2) && shift && shift && goto CheckOpts
|
||||||
|
|
||||||
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)
|
||||||
|
|
||||||
call "%D%..\msi\get_externals.bat"
|
call "%D%..\msi\get_externals.bat"
|
||||||
call "%PCBUILD%env.bat" x86
|
call "%PCBUILD%env.bat" x86
|
||||||
|
|
||||||
if defined PACKAGES set PACKAGES="/p:Packages=%PACKAGES%"
|
if defined PACKAGES set PACKAGES="/p:Packages=%PACKAGES%"
|
||||||
|
|
||||||
if defined BUILDX86 (
|
if defined BUILDX86 (
|
||||||
if defined REBUILD ( call "%PCBUILD%build.bat" -e -r
|
if defined REBUILD ( call "%PCBUILD%build.bat" -e -r
|
||||||
) else if not exist "%PCBUILD%win32\python.exe" call "%PCBUILD%build.bat" -e
|
) else if not exist "%PCBUILD%win32\python.exe" call "%PCBUILD%build.bat" -e
|
||||||
if errorlevel 1 goto :eof
|
if errorlevel 1 goto :eof
|
||||||
|
|
||||||
msbuild "%D%make_pkg.proj" /p:Configuration=Release /p:Platform=x86 %OUTPUT% %PACKAGES%
|
msbuild "%D%make_pkg.proj" /p:Configuration=Release /p:Platform=x86 %OUTPUT% %PACKAGES%
|
||||||
if errorlevel 1 goto :eof
|
if errorlevel 1 goto :eof
|
||||||
)
|
)
|
||||||
|
|
||||||
if defined BUILDX64 (
|
if defined BUILDX64 (
|
||||||
if defined REBUILD ( call "%PCBUILD%build.bat" -p x64 -e -r
|
if defined REBUILD ( call "%PCBUILD%build.bat" -p x64 -e -r
|
||||||
) else if not exist "%PCBUILD%amd64\python.exe" call "%PCBUILD%build.bat" -p x64 -e
|
) else if not exist "%PCBUILD%amd64\python.exe" call "%PCBUILD%build.bat" -p x64 -e
|
||||||
if errorlevel 1 goto :eof
|
if errorlevel 1 goto :eof
|
||||||
|
|
||||||
msbuild "%D%make_pkg.proj" /p:Configuration=Release /p:Platform=x64 %OUTPUT% %PACKAGES%
|
msbuild "%D%make_pkg.proj" /p:Configuration=Release /p:Platform=x64 %OUTPUT% %PACKAGES%
|
||||||
if errorlevel 1 goto :eof
|
if errorlevel 1 goto :eof
|
||||||
)
|
)
|
||||||
|
|
||||||
exit /B 0
|
exit /B 0
|
||||||
|
|
||||||
:Help
|
:Help
|
||||||
echo build.bat [-x86] [-x64] [--out DIR] [-r] [-h]
|
echo build.bat [-x86] [-x64] [--out DIR] [-r] [-h]
|
||||||
echo.
|
echo.
|
||||||
echo -x86 Build x86 installers
|
echo -x86 Build x86 installers
|
||||||
echo -x64 Build x64 installers
|
echo -x64 Build x64 installers
|
||||||
echo -r Rebuild rather than incremental build
|
echo -r Rebuild rather than incremental build
|
||||||
echo --out [DIR] Override output directory
|
echo --out [DIR] Override output directory
|
||||||
echo -h Show usage
|
echo -h Show usage
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
@rem Recreate some python charmap codecs from the Windows function
|
@rem Recreate some python charmap codecs from the Windows function
|
||||||
@rem MultiByteToWideChar.
|
@rem MultiByteToWideChar.
|
||||||
|
|
||||||
@cd /d %~dp0
|
@cd /d %~dp0
|
||||||
@mkdir build
|
@mkdir build
|
||||||
@rem Arabic DOS code page
|
@rem Arabic DOS code page
|
||||||
c:\python30\python genwincodec.py 720 > build/cp720.py
|
c:\python30\python genwincodec.py 720 > build/cp720.py
|
||||||
|
|
Loading…
Reference in New Issue