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

Side by Side Diff: chrome-update.bat

Issue 112098: Automatic searching for vcvars32.bat and report if missing. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools/
Patch Set: '' Created 11 years, 6 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 | « no previous file | 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 2
3 :: This batch file assumes that the correct version of python can be found in 3 :: This batch file assumes that the correct version of python can be found in
4 :: the current directory, and that you have Visual Studio 8 installed in the 4 :: the current directory, and that you have Visual Studio 8 installed in the
5 :: default location. 5 :: default location. It will try to find Visual Studio in the default
6 :: installation paths for x86 and x64 versions of windows as well as through
7 :: the PATH environment variable.
6 8
7 setlocal 9 setlocal
8 call vcvars32.bat 10 IF EXIST "%ProgramFiles(x86)%\Microsoft Visual Studio 8\VC\bin\vcvars32.bat" (
11 CALL "%ProgramFiles(x86)%\Microsoft Visual Studio 8\VC\bin\vcvars32.bat"
12 ) ELSE IF EXIST "%ProgramFiles%\Microsoft Visual Studio 8\VC\bin\vcvars32.bat" (
13 CALL "%ProgramFiles%\Microsoft Visual Studio 8\VC\bin\vcvars32.bat"
14 ) ELSE (
15 :: See "HELP CALL" for information on how to use %~$PATH:1 to find a file in
16 :: the PATH.
17 CALL :FIND_IN_PATH "vcvars32.bat"
18 )
9 19
20 :: If vcvasr32.bat cannot be found or there was a problem, stop execution.
21 IF %ERRORLEVEL%==1 GOTO :EOF
10 python "%~dp0chrome-update.py" %* 22 python "%~dp0chrome-update.py" %*
23 GOTO :EOF
24
25 :FIND_IN_PATH
26 :: %~$PATH:1 works like "which" on linux; use it to see if the file exists and
27 :: call it if found. If it cannot be found print an error and set errorlevel
28 IF EXIST "%~$PATH:1" (
29 CALL "%~$PATH:1"
30 ) ELSE (
31 ECHO Cannot find vcvars32.bat! (Do you have Visual Studio in your PATH?)
32 SET ERRORLEVEL=1
33 )
34 GOTO :EOF
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698