Index: bootstrap/win/win_tools.bat |
diff --git a/bootstrap/win/win_tools.bat b/bootstrap/win/win_tools.bat |
index ee19b5841ee3af6205fefa10362e0e552f2c5262..bf245ca54e9e78a2d98d9fe634b63227a54d6aba 100644 |
--- a/bootstrap/win/win_tools.bat |
+++ b/bootstrap/win/win_tools.bat |
@@ -25,6 +25,41 @@ if "%1" == "force" ( |
) |
+:PYTHON_CHECK |
+if not exist "%WIN_TOOLS_ROOT_DIR%\python276_bin" goto :PY27_INSTALL |
+if not exist "%WIN_TOOLS_ROOT_DIR%\python.bat" goto :PY27_INSTALL |
+set ERRORLEVEL=0 |
+goto :GIT_CHECK |
+ |
+ |
+:PY27_INSTALL |
+echo Installing python 2.7.6... |
+:: Cleanup python directory if it was existing. |
+if exist "%WIN_TOOLS_ROOT_DIR%\python276_bin\." rd /q /s "%WIN_TOOLS_ROOT_DIR%\python276_bin" |
+if exist "%ZIP_DIR%\python276.zip" del "%ZIP_DIR%\python276.zip" |
+echo Fetching from %WIN_TOOLS_ROOT_URL%/third_party/python276_bin.zip |
+cscript //nologo //e:jscript "%~dp0get_file.js" %WIN_TOOLS_ROOT_URL%/third_party/python276_bin.zip "%ZIP_DIR%\python276_bin.zip" |
+if errorlevel 1 goto :PYTHON_FAIL |
+:: Will create python276_bin\... |
+cscript //nologo //e:jscript "%~dp0unzip.js" "%ZIP_DIR%\python276_bin.zip" "%WIN_TOOLS_ROOT_DIR%" |
+:: Create the batch files. |
+call copy /y "%~dp0python276.new.bat" "%WIN_TOOLS_ROOT_DIR%\python.bat" 1>nul |
+call copy /y "%~dp0pylint.new.bat" "%WIN_TOOLS_ROOT_DIR%\pylint.bat" 1>nul |
+del "%ZIP_DIR%\python276_bin.zip" |
+set ERRORLEVEL=0 |
+goto :GIT_CHECK |
+ |
+ |
+:PYTHON_FAIL |
+echo ... Failed to checkout python automatically. |
+echo Please visit http://python.org to download the latest python 2.7.x client before |
+echo continuing. |
+echo You can also get the "prebaked" version used at %WIN_TOOLS_ROOT_URL%/third_party/ |
+set ERRORLEVEL=1 |
+goto :END |
+ |
+ |
+ |
:GIT_CHECK |
if "%DEPOT_TOOLS_GIT_1852%" == "1" goto :GIT_1852_CHECK |
:: Our new build of git doesn't work on some systems (e.g. uses newer APIs than |
@@ -113,11 +148,11 @@ goto :END |
:SVN_CHECK |
:: If the batch file exists, skip the svn check. |
-if exist "%WIN_TOOLS_ROOT_DIR%\svn.bat" goto :PYTHON_CHECK |
+if exist "%WIN_TOOLS_ROOT_DIR%\svn.bat" goto :END |
if "%WIN_TOOLS_FORCE%" == "1" goto :SVN_INSTALL |
call svn --version 2>nul 1>nul |
if errorlevel 1 goto :SVN_INSTALL |
-goto :PYTHON_CHECK |
+goto :END |
:SVN_INSTALL |
@@ -138,7 +173,7 @@ del "%ZIP_DIR%\svn.zip" |
:: Create the batch file. |
call copy /y "%~dp0svn.new.bat" "%WIN_TOOLS_ROOT_DIR%\svn.bat" 1>nul |
call copy /y "%~dp0svnversion.new.bat" "%WIN_TOOLS_ROOT_DIR%\svnversion.bat" 1>nul |
-goto :PYTHON_CHECK |
+goto :END |
:SVN_FAIL |
@@ -150,68 +185,6 @@ set ERRORLEVEL=1 |
goto :END |
-:PYTHON_CHECK |
-:: Note: while the variable talks about 2.7.5, we are now installing 2.7.6. |
-:: Sorry for the confusion. :( |
-if "%DEPOT_TOOLS_PYTHON_275%" == "0" goto :PY26_CHECK |
-if "%DEPOT_TOOLS_PYTHON_27%" == "0" goto :PY26_CHECK |
-goto :PY27_CHECK |
- |
- |
-:PY26_CHECK |
-if not exist "%WIN_TOOLS_ROOT_DIR%\python_bin" goto :PY26_INSTALL |
-if not exist "%WIN_TOOLS_ROOT_DIR%\python.bat" goto :PY26_INSTALL |
-set ERRORLEVEL=0 |
-goto :END |
- |
- |
-:PY27_CHECK |
-if not exist "%WIN_TOOLS_ROOT_DIR%\python276_bin" goto :PY27_INSTALL |
-if not exist "%WIN_TOOLS_ROOT_DIR%\python.bat" goto :PY27_INSTALL |
-set ERRORLEVEL=0 |
-goto :END |
- |
- |
-:PY27_INSTALL |
-echo Installing python 2.7.6... |
-:: Cleanup python directory if it was existing. |
-if exist "%WIN_TOOLS_ROOT_DIR%\python276_bin\." rd /q /s "%WIN_TOOLS_ROOT_DIR%\python276_bin" |
-if exist "%ZIP_DIR%\python276.zip" del "%ZIP_DIR%\python276.zip" |
-echo Fetching from %WIN_TOOLS_ROOT_URL%/third_party/python276_bin.zip |
-cscript //nologo //e:jscript "%~dp0get_file.js" %WIN_TOOLS_ROOT_URL%/third_party/python276_bin.zip "%ZIP_DIR%\python276_bin.zip" |
-if errorlevel 1 goto :PYTHON_FAIL |
-:: Will create python276_bin\... |
-cscript //nologo //e:jscript "%~dp0unzip.js" "%ZIP_DIR%\python276_bin.zip" "%WIN_TOOLS_ROOT_DIR%" |
-:: Create the batch files. |
-call copy /y "%~dp0python276.new.bat" "%WIN_TOOLS_ROOT_DIR%\python.bat" 1>nul |
-call copy /y "%~dp0pylint.new.bat" "%WIN_TOOLS_ROOT_DIR%\pylint.bat" 1>nul |
-del "%ZIP_DIR%\python276_bin.zip" |
-set ERRORLEVEL=0 |
-goto :END |
- |
- |
-:PY26_INSTALL |
-echo Installing python 2.6... |
-:: Cleanup python directory if it was existing. |
-if exist "%WIN_TOOLS_ROOT_DIR%\python_bin\." rd /q /s "%WIN_TOOLS_ROOT_DIR%\python_bin" |
-call svn co -q %WIN_TOOLS_ROOT_URL%/third_party/python_26 "%WIN_TOOLS_ROOT_DIR%\python_bin" |
-if errorlevel 1 goto :PYTHON_FAIL |
-:: Create the batch files. |
-call copy /y "%~dp0python.new.bat" "%WIN_TOOLS_ROOT_DIR%\python.bat" 1>nul |
-call copy /y "%~dp0pylint.new.bat" "%WIN_TOOLS_ROOT_DIR%\pylint.bat" 1>nul |
-set ERRORLEVEL=0 |
-goto :END |
- |
- |
-:PYTHON_FAIL |
-echo ... Failed to checkout python automatically. |
-echo Please visit http://python.org to download the latest python 2.7.x client before |
-echo continuing. |
-echo You can also get the "prebacked" version used at %WIN_TOOLS_ROOT_URL%/third_party/ |
-set ERRORLEVEL=1 |
-goto :END |
- |
- |
:returncode |
set WIN_TOOLS_ROOT_URL= |
set WIN_TOOLS_ROOT_DIR= |