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

Side by Side Diff: chrome/tools/build/win/version.bat

Issue 92074: Fix version.bat to use the 'default' svn in the PATH and not a precooked one ... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: copyright Created 11 years, 8 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 :: Batch file run as build command for vers.vcproj
2 @echo off 1 @echo off
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
4 :: found in the LICENSE file.
5
6 :: Batch file run as build command for chrome_dll.vcproj
3 7
4 setlocal 8 setlocal
5 9
6 set InFile=%~1 10 set InFile=%~1
7 set SolutionDir=%~2 11 set SolutionDir=%~2
8 set IntDir=%~3 12 set IntDir=%~3
9 set OutFile=%~4 13 set OutFile=%~4
10 set VarsBat=%IntDir%/vers-vars.bat 14 set VarsBat=%IntDir%/vers-vars.bat
11 15
12 :: Put cygwin in the path 16 :: Put cygwin in the path
13 call %SolutionDir%\..\third_party\cygwin\setup_env.bat 17 call %SolutionDir%\..\third_party\cygwin\setup_env.bat
14 18
15 :: Load version digits as environment variables 19 :: Load version digits as environment variables
16 cat %SolutionDir%\VERSION | sed "s/\(.*\)/set \1/" > %VarsBat% 20 cat %SolutionDir%\VERSION | sed "s/\(.*\)/set \1/" > %VarsBat%
17 21
18 :: Load branding strings as environment variables 22 :: Load branding strings as environment variables
19 set Distribution="chromium" 23 set Distribution="chromium"
20 if "%CHROMIUM_BUILD%" == "_google_chrome" set Distribution="google_chrome" 24 if "%CHROMIUM_BUILD%" == "_google_chrome" set Distribution="google_chrome"
21 cat %SolutionDir%app\theme\%Distribution%\BRANDING | sed "s/\(.*\)/set \1/" >> % VarsBat% 25 cat %SolutionDir%app\theme\%Distribution%\BRANDING | sed "s/\(.*\)/set \1/" >> % VarsBat%
22 26
23 set OFFICIAL_BUILD=0 27 set OFFICIAL_BUILD=0
24 if "%CHROME_BUILD_TYPE%" == "_official" set OFFICIAL_BUILD=1 28 if "%CHROME_BUILD_TYPE%" == "_official" set OFFICIAL_BUILD=1
25 29
26 :: Determine the current repository revision number 30 :: Look if subversion client is available. It may not be available on Windows
27 set PATH=%~dp0..\..\..\..\third_party\svn;%PATH% 31 :: if downloaded with a tarball or depot_tools is not in the PATH.
28 svn.exe info | grep.exe "Revision:" | cut -d" " -f2- | sed "s/\(.*\)/set LASTCHA NGE=\1/" >> %VarsBat% 32 call svn --version 2>nul 1>nul
33 :: If not available, just skip getting the revision number.
34 if errorlevel 1 goto :NO_SVN
35 goto :SET_ENV
36
37
38 :NO_SVN
39 :: Not having svn makes it impossible to determine the current checkout revision
40 :: number. On normal build, this is not an issue but for official builds, this
41 :: *can't* be tolerated so issue an error instead. VS will pick it up corectly.
42 set NO_SVN_LEVEL=error
43 if "%OFFICIAL_BUILD%" == "0" set NO_SVN_LEVEL=warning
44 echo %0(28) : %NO_SVN_LEVEL% : svn is not installed. Can't determine the revisio n number.
45 echo set LASTCHANGE=0 >> %VarsBat%
46 goto :GEN_FILE
47
48
49 :SET_ENV
50 call svn info | grep.exe "Revision:" | cut -d" " -f2- | sed "s/\(.*\)/set LASTCH ANGE=\1/" >> %VarsBat%
51 goto :GEN_FILE
52
53
54 :GEN_FILE
29 call %VarsBat% 55 call %VarsBat%
30
31 ::echo LastChange: %LASTCHANGE% 56 ::echo LastChange: %LASTCHANGE%
32
33 :: output file 57 :: output file
34 cat %InFile% | sed "s/@MAJOR@/%MAJOR%/" ^ 58 cat %InFile% | sed "s/@MAJOR@/%MAJOR%/" ^
35 | sed "s/@MINOR@/%MINOR%/" ^ 59 | sed "s/@MINOR@/%MINOR%/" ^
36 | sed "s/@BUILD@/%BUILD%/" ^ 60 | sed "s/@BUILD@/%BUILD%/" ^
37 | sed "s/@PATCH@/%PATCH%/" ^ 61 | sed "s/@PATCH@/%PATCH%/" ^
38 | sed "s/@COMPANY_FULLNAME@/%COMPANY_FULLNAME%/" ^ 62 | sed "s/@COMPANY_FULLNAME@/%COMPANY_FULLNAME%/" ^
39 | sed "s/@COMPANY_SHORTNAME@/%COMPANY_SHORTNAME%/" ^ 63 | sed "s/@COMPANY_SHORTNAME@/%COMPANY_SHORTNAME%/" ^
40 | sed "s/@PRODUCT_FULLNAME@/%PRODUCT_FULLNAME%/" ^ 64 | sed "s/@PRODUCT_FULLNAME@/%PRODUCT_FULLNAME%/" ^
41 | sed "s/@PRODUCT_SHORTNAME@/%PRODUCT_SHORTNAME%/" ^ 65 | sed "s/@PRODUCT_SHORTNAME@/%PRODUCT_SHORTNAME%/" ^
42 | sed "s/@PRODUCT_EXE@/%PRODUCT_EXE%/" ^ 66 | sed "s/@PRODUCT_EXE@/%PRODUCT_EXE%/" ^
43 | sed "s/@COPYRIGHT@/%COPYRIGHT%/" ^ 67 | sed "s/@COPYRIGHT@/%COPYRIGHT%/" ^
44 | sed "s/@OFFICIAL_BUILD@/%OFFICIAL_BUILD%/" ^ 68 | sed "s/@OFFICIAL_BUILD@/%OFFICIAL_BUILD%/" ^
45 | sed "s/@LASTCHANGE@/%LASTCHANGE%/" > %OutFile% 69 | sed "s/@LASTCHANGE@/%LASTCHANGE%/" > %OutFile%
46 70
47 endlocal 71 endlocal
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