Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(64)

Side by Side Diff: bootstrap/win/win_tools.bat

Issue 99233: Add unzip.js instead of using 7za.exe. It greatly reduces the depot_tools.zip... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools/
Patch Set: '' Created 11 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « bootstrap/win/unzip.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 @echo off 1 @echo off
2 :: Copyright (c) 2009 The Chromium Authors. All rights reserved. 2 :: Copyright (c) 2009 The Chromium Authors. All rights reserved.
3 :: Use of this source code is governed by a BSD-style license that can be 3 :: Use of this source code is governed by a BSD-style license that can be
4 :: found in the LICENSE file. 4 :: found in the LICENSE file.
5 5
6 :: This script will try to find if svn and python are accessible and it not, 6 :: This script will try to find if svn and python are accessible and it not,
7 :: it will try to download it and 'install' it in depot_tools. 7 :: it will try to download it and 'install' it in depot_tools.
8 8
9 :: Sadly, we can't use SETLOCAL here otherwise it ERRORLEVEL is not correctly 9 :: Sadly, we can't use SETLOCAL here otherwise it ERRORLEVEL is not correctly
10 :: returned. 10 :: returned.
11 11
12 set WIN_TOOLS_ROOT_URL=http://src.chromium.org/svn/trunk/tools 12 set WIN_TOOLS_ROOT_URL=http://src.chromium.org/svn/trunk/tools
13 set WIN_TOOLS_ROOT_DIR=%~dp0..\.. 13 set WIN_TOOLS_ROOT_DIR=%~dp0..\..
14 14
15 :SVN_CHECK 15 :SVN_CHECK
16 :: If the batch file exists, skip the svn check. 16 :: If the batch file exists, skip the svn check.
17 if exist "%WIN_TOOLS_ROOT_DIR%\svn.bat" goto :PYTHON_CHECK 17 if exist "%WIN_TOOLS_ROOT_DIR%\svn.bat" goto :PYTHON_CHECK
18 call svn --version 2>nul 1>nul 18 call svn --version 2>nul 1>nul
19 if errorlevel 1 goto :SVN_INSTALL 19 if errorlevel 1 goto :SVN_INSTALL
20 goto :PYTHON_CHECK 20 goto :PYTHON_CHECK
21 21
22 22
23 :SVN_INSTALL 23 :SVN_INSTALL
24 echo Installing subversion ... 24 echo Installing subversion ...
25 :: svn is not accessible; check it out and create 'proxy' files. 25 :: svn is not accessible; check it out and create 'proxy' files.
26 if exist "%~dp0svn.7z" del "%~dp0svn.7z" 26 if exist "%~dp0svn.7z" del "%~dp0svn.7z"
27 cscript //nologo //e:jscript "%~dp0get_file.js" %WIN_TOOLS_ROOT_URL%/third_party /svn_win_client.7z "%~dp0svn.7z" 27 cscript //nologo //e:jscript "%~dp0get_file.js" %WIN_TOOLS_ROOT_URL%/third_party /svn_win_client.zip "%~dp0svn.zip"
28 if errorlevel 1 goto :SVN_FAIL 28 if errorlevel 1 goto :SVN_FAIL
29 echo call "%~dp07za" x -y "%~dp0svn.7z" -o"%WIN_TOOLS_ROOT_DIR%" 1>nul 29 cscript //nologo //e:jscript "%~dp0unzip.js" "%~dp0svn.zip" "%WIN_TOOLS_ROOT_DIR %"
30 call "%~dp07za" x -y "%~dp0svn.7z" -o"%WIN_TOOLS_ROOT_DIR%" 1>nul
31 if errorlevel 1 goto :SVN_FAIL 30 if errorlevel 1 goto :SVN_FAIL
32 if not exist "%WIN_TOOLS_ROOT_DIR%\svn\." goto :SVN_FAIL 31 if not exist "%WIN_TOOLS_ROOT_DIR%\svn\." goto :SVN_FAIL
33 del "%~dp0svn.7z" 32 del "%~dp0svn.zip"
34 :: Create the batch file. 33 :: Create the batch file.
35 call copy /y "%~dp0svn.bat" "%WIN_TOOLS_ROOT_DIR%\svn.bat" 1>nul 34 call copy /y "%~dp0svn.bat" "%WIN_TOOLS_ROOT_DIR%\svn.bat" 1>nul
36 goto :PYTHON_CHECK 35 goto :PYTHON_CHECK
37 36
38 37
39 :SVN_FAIL 38 :SVN_FAIL
40 echo ... Failed to checkout svn automatically. 39 echo ... Failed to checkout svn automatically.
41 echo Please visit http://subversion.tigris.org to download the latest subversion client 40 echo Please visit http://subversion.tigris.org to download the latest subversion client
42 echo before continuing. 41 echo before continuing.
43 echo You can also get the "prebacked" version used at %WIN_TOOLS_ROOT_URL%/third _party/ 42 echo You can also get the "prebacked" version used at %WIN_TOOLS_ROOT_URL%/third _party/
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 goto :END 75 goto :END
77 76
78 77
79 :returncode 78 :returncode
80 set WIN_TOOLS_ROOT_URL= 79 set WIN_TOOLS_ROOT_URL=
81 set WIN_TOOLS_ROOT_DIR= 80 set WIN_TOOLS_ROOT_DIR=
82 exit /b %ERRORLEVEL% 81 exit /b %ERRORLEVEL%
83 82
84 :END 83 :END
85 call :returncode %ERRORLEVEL% 84 call :returncode %ERRORLEVEL%
OLDNEW
« no previous file with comments | « bootstrap/win/unzip.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698