@ -11,6 +11,9 @@
set WIN_TOOLS_ROOT_URL = https://src.chromium.org/svn/trunk/tools
set GIT_BIN_DIR = git-1.8.0_bin
: : It used to be %~dp0 but ADODB.Stream may fail to write to this directory if
: : the directory DACL is set to elevated integrity level.
set ZIP_DIR = %TEMP%
: : Get absolute root directory (.js scripts don't handle relative paths well).
pushd %~dp0 ..\..
@ -42,17 +45,17 @@ rmdir /S /Q "%WIN_TOOLS_ROOT_DIR%\%GIT_BIN_DIR%"
: GIT_INSTALL
echo Installing git (avg 1-2 min download) ...
: : git is not accessible; check it out and create 'proxy' files.
if exist " % ~dp0git.zip " del " %~dp0 git.zip"
if exist " % ZIP_DIR%\git.zip " del " %ZIP_DIR% \ git.zip"
echo Fetching from %WIN_TOOLS_ROOT_URL% /third_party/git-1.8.0_bin.zip
cscript //nologo //e:jscript " %~dp0 get_file.js " %WIN_TOOLS_ROOT_URL% /third_party/git-1.8.0_bin.zip " % ~dp0 git.zip"
cscript //nologo //e:jscript " %~dp0 get_file.js " %WIN_TOOLS_ROOT_URL% /third_party/git-1.8.0_bin.zip " % ZIP_DIR%\ git.zip"
if errorlevel 1 goto : GIT_FAIL
: : Cleanup svn directory if it was existing.
if exist " %WIN_TOOLS_ROOT_DIR% \ %GIT_BIN_DIR% \. " rd /q /s " %WIN_TOOLS_ROOT_DIR% \ %GIT_BIN_DIR% "
: : Will create %GIT_BIN_DIR%\...
cscript //nologo //e:jscript " %~dp0 unzip.js " " % ~dp0 git.zip" " %WIN_TOOLS_ROOT_DIR% "
cscript //nologo //e:jscript " %~dp0 unzip.js " " % ZIP_DIR%\ git.zip" " %WIN_TOOLS_ROOT_DIR% "
if errorlevel 1 goto : GIT_FAIL
if not exist " %WIN_TOOLS_ROOT_DIR% \ %GIT_BIN_DIR% \. " goto : GIT_FAIL
del " % ~dp0 git.zip"
del " % ZIP_DIR%\ git.zip"
: : Create the batch files.
call copy /y " %WIN_TOOLS_ROOT_DIR% \ %GIT_BIN_DIR% \git.bat " " %WIN_TOOLS_ROOT_DIR% \git.bat " 1 > nul
call copy /y " %WIN_TOOLS_ROOT_DIR% \ %GIT_BIN_DIR% \gitk.bat " " %WIN_TOOLS_ROOT_DIR% \gitk.bat " 1 > nul
@ -85,18 +88,18 @@ goto :PYTHON_CHECK
: SVN_INSTALL
echo Installing subversion ...
: : svn is not accessible; check it out and create 'proxy' files.
if exist " % ~dp0svn.zip " del " %~dp0 svn.zip"
if exist " % ZIP_DIR%\svn.zip " del " %ZIP_DIR% \ svn.zip"
echo Fetching from %WIN_TOOLS_ROOT_URL% /third_party/svn_bin.zip
cscript //nologo //e:jscript " %~dp0 get_file.js " %WIN_TOOLS_ROOT_URL% /third_party/svn_bin.zip " % ~dp0 svn.zip"
cscript //nologo //e:jscript " %~dp0 get_file.js " %WIN_TOOLS_ROOT_URL% /third_party/svn_bin.zip " % ZIP_DIR%\ svn.zip"
if errorlevel 1 goto : SVN_FAIL
: : Cleanup svn directory if it was existing.
if exist " %WIN_TOOLS_ROOT_DIR% \svn\. " rd /q /s " %WIN_TOOLS_ROOT_DIR% \svn "
if exist " %WIN_TOOLS_ROOT_DIR% \svn_bin\. " rd /q /s " %WIN_TOOLS_ROOT_DIR% \svn_bin "
: : Will create svn_bin\...
cscript //nologo //e:jscript " %~dp0 unzip.js " " % ~dp0 svn.zip" " %WIN_TOOLS_ROOT_DIR% "
cscript //nologo //e:jscript " %~dp0 unzip.js " " % ZIP_DIR%\ svn.zip" " %WIN_TOOLS_ROOT_DIR% "
if errorlevel 1 goto : SVN_FAIL
if not exist " %WIN_TOOLS_ROOT_DIR% \svn_bin\. " goto : SVN_FAIL
del " % ~dp0 svn.zip"
del " % ZIP_DIR%\ svn.zip"
: : Create the batch file.
call copy /y " %~dp0 svn.new.bat " " %WIN_TOOLS_ROOT_DIR% \svn.bat " 1 > nul
call copy /y " %~dp0 svnversion.new.bat " " %WIN_TOOLS_ROOT_DIR% \svnversion.bat " 1 > nul
@ -135,15 +138,16 @@ goto :END
echo Installing python 2.7.5...
: : Cleanup python directory if it was existing.
if exist " %WIN_TOOLS_ROOT_DIR% \python275_bin\. " rd /q /s " %WIN_TOOLS_ROOT_DIR% \python275_bin "
if exist " % ~dp0python275.zip " del " %~dp0 python275.zip"
if exist " % ZIP_DIR%\python275.zip " del " %ZIP_DIR% \ python275.zip"
echo Fetching from %WIN_TOOLS_ROOT_URL% /third_party/python275_bin.zip
cscript //nologo //e:jscript " %~dp0 get_file.js " %WIN_TOOLS_ROOT_URL% /third_party/python275_bin.zip " % ~dp0 python275_bin.zip"
cscript //nologo //e:jscript " %~dp0 get_file.js " %WIN_TOOLS_ROOT_URL% /third_party/python275_bin.zip " % ZIP_DIR%\ python275_bin.zip"
if errorlevel 1 goto : PYTHON_FAIL
: : Will create python275_bin\...
cscript //nologo //e:jscript " %~dp0 unzip.js " " % ~dp0 python275_bin.zip" " %WIN_TOOLS_ROOT_DIR% "
cscript //nologo //e:jscript " %~dp0 unzip.js " " % ZIP_DIR%\ python275_bin.zip" " %WIN_TOOLS_ROOT_DIR% "
: : Create the batch files.
call copy /y " %~dp0 python275.new.bat " " %WIN_TOOLS_ROOT_DIR% \python.bat " 1 > nul
call copy /y " %~dp0 pylint.new.bat " " %WIN_TOOLS_ROOT_DIR% \pylint.bat " 1 > nul
del " %ZIP_DIR% \python275_bin.zip "
set ERRORLEVEL = 0
goto : END