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

Side by Side Diff: tools/win/copy-installer.bat

Issue 10837096: Handle chrome.dll.pdb properly when incremental_chrome_dll is set. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 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 REM Copyright (c) 2012 The Chromium Authors. All rights reserved. 3 REM Copyright (c) 2012 The Chromium Authors. All rights reserved.
4 REM Use of this source code is governed by a BSD-style license that can be 4 REM Use of this source code is governed by a BSD-style license that can be
5 REM found in the LICENSE file. 5 REM found in the LICENSE file.
6 6
7 REM Copies an installer and symbols from a build directory on a network share 7 REM Copies an installer and symbols from a build directory on a network share
8 REM into the directory \[out|build]\[Debug|Release] on the current drive. 8 REM into the directory \[out|build]\[Debug|Release] on the current drive.
9 REM 9 REM
10 REM Usage: 10 REM Usage:
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 50
51 REM Figure out what files to copy based on the component type (shared/static). 51 REM Figure out what files to copy based on the component type (shared/static).
52 IF EXIST "%FROM%\base.dll" ( 52 IF EXIST "%FROM%\base.dll" (
53 SET TOCOPY=*.pdb setup.exe setup.exe.manifest chrome.packed.7z *.dll 53 SET TOCOPY=*.pdb setup.exe setup.exe.manifest chrome.packed.7z *.dll
54 SET INSTALLER=setup.exe 54 SET INSTALLER=setup.exe
55 ) ELSE ( 55 ) ELSE (
56 SET TOCOPY=*.pdb mini_installer.exe 56 SET TOCOPY=*.pdb mini_installer.exe
57 SET INSTALLER=mini_installer.exe 57 SET INSTALLER=mini_installer.exe
58 ) 58 )
59 59
60 REM Branch to handle copying via robocopy (fast) or xcopy (slow). 60 CALL :_copyfiles
61 robocopy /? 1> nul 2> nul
62 IF "%ERRORLEVEL%"=="9009" GOTO _xcopy else GOTO _robocopy
63 61
64 REM robocopy is rsync, basically. 62 REM incremental_chrome_dll=1 puts chrome_dll.pdb into the "initial" dir.
65 :_robocopy 63 IF EXIST "%FROM%\initial" (
66 robocopy "%FROM%" "%TO%" %TOCOPY% /J /MT 64 SET FROM=%FROM%\initial
67 GOTO _copydone 65 SET TOCOPY=*.pdb
66 CALL :_copyfiles
67 )
68 68
69 REM xcopy is not.
70 :_xcopy
71 IF NOT exist "%TO%" mkdir "%TO%"
72 call :_xcopy_hack %TOCOPY%
73 GOTO _copydone
74
75 :_copydone
76 ECHO Ready to run/debug %TO%\%INSTALLER%. 69 ECHO Ready to run/debug %TO%\%INSTALLER%.
77 GOTO :EOF 70 GOTO :EOF
78 71
79 REM All labels henceforth are subroutines intended to be invoked by CALL. 72 REM All labels henceforth are subroutines intended to be invoked by CALL.
80 73
74 REM Canonicalize the first argument, returning it in RET.
75 :_canonicalize
76 SET RET=%~f1
77 GOTO :EOF
78
81 REM Search for a mini_installer.exe in the candidate build outputs. 79 REM Search for a mini_installer.exe in the candidate build outputs.
82 :_find_build 80 :_find_build
83 IF "%OUTPUT%"=="" ( 81 IF "%OUTPUT%"=="" (
84 SET OUTPUTS=out build 82 SET OUTPUTS=out build
85 ) ELSE ( 83 ) ELSE (
86 SET OUTPUTS=%OUTPUT% 84 SET OUTPUTS=%OUTPUT%
87 SET OUTPUT= 85 SET OUTPUT=
88 ) 86 )
89 87
90 IF "%BUILDTYPE%"=="" ( 88 IF "%BUILDTYPE%"=="" (
91 SET BUILDTYPES=Debug Release 89 SET BUILDTYPES=Debug Release
92 ) ELSE ( 90 ) ELSE (
93 SET BUILDTYPES=%BUILDTYPE% 91 SET BUILDTYPES=%BUILDTYPE%
94 SET BUILDTYPE= 92 SET BUILDTYPE=
95 ) 93 )
96 94
97 FOR %%o IN (%OUTPUTS%) DO ( 95 FOR %%o IN (%OUTPUTS%) DO (
98 FOR %%f IN (%BUILDTYPES%) DO ( 96 FOR %%f IN (%BUILDTYPES%) DO (
99 IF EXIST "%FROM%\%%o\%%f\mini_installer.exe" ( 97 IF EXIST "%FROM%\%%o\%%f\mini_installer.exe" (
100 SET OUTPUT=%%o 98 SET OUTPUT=%%o
101 SET BUILDTYPE=%%f 99 SET BUILDTYPE=%%f
102 GOTO :EOF 100 GOTO :EOF
103 ) 101 )
104 ) 102 )
105 ) 103 )
106 GOTO :EOF 104 GOTO :EOF
107 105
106 REM Branch to handle copying via robocopy (fast) or xcopy (slow).
107 :_copyfiles
108 robocopy /? 1> nul 2> nul
109 IF NOT "%ERRORLEVEL%"=="9009" (
110 robocopy "%FROM%" "%TO%" %TOCOPY% /J /MT /XX
gab 2012/08/03 18:16:49 I'm not clear on what /XX does, from http://ss64.o
111 ) ELSE (
112 IF NOT EXIST "%TO%" mkdir "%TO%"
113 call :_xcopy_hack %TOCOPY%
114 )
115 GOTO :EOF
116
108 REM We can't use a for..in..do loop since we have wildcards, so we make a call 117 REM We can't use a for..in..do loop since we have wildcards, so we make a call
109 REM to this with the files to copy. 118 REM to this with the files to copy.
110 :_xcopy_hack 119 :_xcopy_hack
111 SHIFT 120 SHIFT
112 IF "%0"=="" GOTO :EOF 121 IF "%0"=="" GOTO :EOF
113 xcopy "%FROM%\%0" "%TO%" /y 122 xcopy "%FROM%\%0" "%TO%" /d /y
114 GOTO _xcopy_hack 123 GOTO _xcopy_hack
115
116 REM Canonicalize the first argument, returning it in RET.
117 :_canonicalize
118 SET RET=%~f1
119 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