OLD | NEW |
---|---|
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: |
11 REM \\build.share\<path_to_checkout>\src\tools\win\copy-installer.bat | 11 REM \\build.share\<path_to_checkout>\src\tools\win\copy-installer.bat |
12 REM | 12 REM |
13 REM By default, the script will copy the Debug build in the tree, falling back | 13 REM By default, the script will copy the Debug build in the tree, falling back |
14 REM to the Release build if one is not found. Similarly, the ninja output | 14 REM to the Release build if one is not found. Similarly, the ninja output |
15 REM directory is preferred over the devenv output directory. Specify | 15 REM directory is preferred over the devenv output directory. Specify |
16 REM "out|build" and/or "Debug|Release" (case matters) on the command line in | 16 REM "out|build" and/or "Debug|Release" (case matters) on the command line in |
17 REM any order to influence selection. The defaults for location and build type | 17 REM any order to influence selection. The defaults for location and build type |
18 REM can also be overridden in a given build tree by creating a | 18 REM can also be overridden in a given build tree by creating a |
19 REM "copy-installer.cfg" file alongside the .gclient file that sets the OUTPUT | 19 REM "copy-installer.cfg" file alongside the .gclient file that sets the OUTPUT |
20 REM and/or BUILDTYPE variables. | 20 REM and/or BUILDTYPE variables. |
21 REM | 21 REM |
22 REM Install Robocopy for superior performance on Windows XP if desired (it is | 22 REM Install Robocopy for superior performance on Windows XP if desired (it is |
(...skipping 20 matching lines...) Loading... | |
43 IF "%OUTPUT%%BUILDTYPE%"=="" ( | 43 IF "%OUTPUT%%BUILDTYPE%"=="" ( |
44 ECHO No build found to copy. | 44 ECHO No build found to copy. |
45 EXIT 1 | 45 EXIT 1 |
46 ) | 46 ) |
47 | 47 |
48 SET FROM=%FROM%\%OUTPUT%\%BUILDTYPE% | 48 SET FROM=%FROM%\%OUTPUT%\%BUILDTYPE% |
49 SET TO=\%OUTPUT%\%BUILDTYPE% | 49 SET TO=\%OUTPUT%\%BUILDTYPE% |
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.7z *.dll |
54 SET ARCHIVETODELETE=chrome.packed.7z | |
54 SET INSTALLER=setup.exe | 55 SET INSTALLER=setup.exe |
55 ) ELSE ( | 56 ) ELSE ( |
56 SET TOCOPY=*.pdb mini_installer.exe | 57 SET TOCOPY=*.pdb mini_installer.exe |
57 SET INSTALLER=mini_installer.exe | 58 SET INSTALLER=mini_installer.exe |
58 ) | 59 ) |
59 | 60 |
60 CALL :_copyfiles | 61 CALL :_copyfiles |
61 | 62 |
62 REM incremental_chrome_dll=1 puts chrome_dll.pdb into the "initial" dir. | 63 REM incremental_chrome_dll=1 puts chrome_dll.pdb into the "initial" dir. |
63 IF EXIST "%FROM%\initial" ( | 64 IF EXIST "%FROM%\initial" ( |
64 SET FROM=%FROM%\initial | 65 SET FROM=%FROM%\initial |
65 SET TOCOPY=*.pdb | 66 SET TOCOPY=*.pdb |
66 CALL :_copyfiles | 67 CALL :_copyfiles |
67 ) | 68 ) |
68 | 69 |
70 REM Keeping the old chrome.packed.7z around could cause the new setup.exe to | |
71 REM use it instead of the new chrome.7z, make sure this doesn't happen by | |
72 REM renaming chrome.packed.7z to chrome.packed.7z.old | |
73 IF EXIST "%TO%\%ARCHIVETODELETE%" ( | |
74 ECHO Renaming old %ARCHIVETODELETE% to %ARCHIVETODELETE%.old | |
robertshield
2012/08/15 19:38:32
I'd just delete it. All the other files have been
| |
75 ren "%TO%\%ARCHIVETODELETE%" "%ARCHIVETODELETE%.old" | |
76 ) | |
77 | |
69 ECHO Ready to run/debug %TO%\%INSTALLER%. | 78 ECHO Ready to run/debug %TO%\%INSTALLER%. |
70 GOTO :EOF | 79 GOTO :EOF |
71 | 80 |
72 REM All labels henceforth are subroutines intended to be invoked by CALL. | 81 REM All labels henceforth are subroutines intended to be invoked by CALL. |
73 | 82 |
74 REM Canonicalize the first argument, returning it in RET. | 83 REM Canonicalize the first argument, returning it in RET. |
75 :_canonicalize | 84 :_canonicalize |
76 SET RET=%~f1 | 85 SET RET=%~f1 |
77 GOTO :EOF | 86 GOTO :EOF |
78 | 87 |
(...skipping 35 matching lines...) Loading... | |
114 ) | 123 ) |
115 GOTO :EOF | 124 GOTO :EOF |
116 | 125 |
117 REM We can't use a for..in..do loop since we have wildcards, so we make a call | 126 REM We can't use a for..in..do loop since we have wildcards, so we make a call |
118 REM to this with the files to copy. | 127 REM to this with the files to copy. |
119 :_xcopy_hack | 128 :_xcopy_hack |
120 SHIFT | 129 SHIFT |
121 IF "%0"=="" GOTO :EOF | 130 IF "%0"=="" GOTO :EOF |
122 xcopy "%FROM%\%0" "%TO%" /d /y | 131 xcopy "%FROM%\%0" "%TO%" /d /y |
123 GOTO _xcopy_hack | 132 GOTO _xcopy_hack |
OLD | NEW |